{"version":3,"sources":["__prelude__","/node_modules/metro-runtime/src/polyfills/require.js","\u0000polyfill:external-require","\u0000polyfill:environment-variables","/node_modules/@react-native/js-polyfills/error-guard.js","/node_modules/expo/AppEntry.js","/node_modules/@babel/runtime/helpers/interopRequireDefault.js","/node_modules/expo/src/launch/registerRootComponent.tsx","/node_modules/expo/src/Expo.fx.web.tsx","/node_modules/react-native-web/dist/exports/AppRegistry/index.js","/node_modules/@babel/runtime/helpers/objectSpread2.js","/node_modules/@babel/runtime/helpers/defineProperty.js","/node_modules/@babel/runtime/helpers/toPropertyKey.js","/node_modules/@babel/runtime/helpers/typeof.js","/node_modules/@babel/runtime/helpers/toPrimitive.js","/node_modules/fbjs/lib/invariant.js","/node_modules/react-native-web/dist/exports/unmountComponentAtNode/index.js","/node_modules/react-dom/index.js","/node_modules/react-dom/cjs/react-dom.production.min.js","/node_modules/react/index.js","/node_modules/react/cjs/react.production.min.js","/node_modules/scheduler/index.js","/node_modules/scheduler/cjs/scheduler.production.min.js","/node_modules/react-native-web/dist/exports/AppRegistry/renderApplication.js","/node_modules/@babel/runtime/helpers/extends.js","\u0000shim:react-native-web/dist/exports/AppRegistry/AppContainer.js","/node_modules/react-native-web/dist/exports/render/index.js","/node_modules/react-dom/client.js","/node_modules/react-native-web/dist/exports/StyleSheet/dom/index.js","/node_modules/react-native-web/dist/modules/canUseDom/index.js","/node_modules/react-native-web/dist/exports/StyleSheet/dom/createCSSStyleSheet.js","/node_modules/react-native-web/dist/exports/StyleSheet/dom/createOrderedCSSStyleSheet.js","/node_modules/react-native-web/dist/exports/StyleSheet/index.js","/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","/node_modules/react-native-web/dist/exports/StyleSheet/compiler/index.js","/node_modules/react-native-web/dist/exports/StyleSheet/compiler/createReactDOMStyle.js","/node_modules/react-native-web/dist/exports/StyleSheet/compiler/normalizeValueWithProperty.js","/node_modules/react-native-web/dist/exports/StyleSheet/compiler/unitlessNumbers.js","/node_modules/react-native-web/dist/exports/StyleSheet/compiler/normalizeColor.js","/node_modules/react-native-web/dist/modules/isWebColor/index.js","/node_modules/react-native-web/dist/exports/processColor/index.js","/node_modules/react-native-web/node_modules/@react-native/normalize-colors/index.js","/node_modules/react-native-web/dist/exports/StyleSheet/compiler/hash.js","/node_modules/react-native-web/dist/exports/StyleSheet/compiler/hyphenateStyleName.js","/node_modules/react-native-web/dist/modules/prefixStyles/index.js","/node_modules/inline-style-prefixer/lib/createPrefixer.js","/node_modules/inline-style-prefixer/lib/utils/prefixProperty.js","/node_modules/inline-style-prefixer/lib/utils/capitalizeString.js","/node_modules/inline-style-prefixer/lib/utils/prefixValue.js","/node_modules/inline-style-prefixer/lib/utils/addNewValuesOnly.js","/node_modules/inline-style-prefixer/lib/utils/isObject.js","/node_modules/react-native-web/dist/modules/prefixStyles/static.js","/node_modules/inline-style-prefixer/lib/plugins/backgroundClip.js","/node_modules/inline-style-prefixer/lib/plugins/crossFade.js","/node_modules/css-in-js-utils/es/index.js","/node_modules/css-in-js-utils/es/assignStyle.js","/node_modules/css-in-js-utils/es/camelCaseProperty.js","/node_modules/css-in-js-utils/es/cssifyDeclaration.js","/node_modules/css-in-js-utils/es/hyphenateProperty.js","/node_modules/hyphenate-style-name/index.js","/node_modules/css-in-js-utils/es/cssifyObject.js","/node_modules/css-in-js-utils/es/isPrefixedProperty.js","/node_modules/css-in-js-utils/es/isPrefixedValue.js","/node_modules/css-in-js-utils/es/isUnitlessProperty.js","/node_modules/css-in-js-utils/es/normalizeProperty.js","/node_modules/css-in-js-utils/es/unprefixProperty.js","/node_modules/css-in-js-utils/es/resolveArrayValue.js","/node_modules/css-in-js-utils/es/unprefixValue.js","/node_modules/inline-style-prefixer/lib/plugins/cursor.js","/node_modules/inline-style-prefixer/lib/plugins/filter.js","/node_modules/inline-style-prefixer/lib/plugins/imageSet.js","/node_modules/css-in-js-utils/lib/isPrefixedValue.js","/node_modules/inline-style-prefixer/lib/plugins/logical.js","/node_modules/inline-style-prefixer/lib/plugins/position.js","/node_modules/inline-style-prefixer/lib/plugins/sizing.js","/node_modules/inline-style-prefixer/lib/plugins/transition.js","/node_modules/css-in-js-utils/lib/hyphenateProperty.js","/node_modules/styleq/transform-localize-style.js","/node_modules/styleq/dist/transform-localize-style.js","/node_modules/react-native-web/dist/exports/StyleSheet/preprocess.js","/node_modules/react-native-web/dist/modules/warnOnce/index.js","/node_modules/styleq/dist/styleq.js","/node_modules/react-native-web/dist/exports/StyleSheet/validate.js","/node_modules/postcss-value-parser/lib/index.js","/node_modules/postcss-value-parser/lib/parse.js","/node_modules/postcss-value-parser/lib/walk.js","/node_modules/postcss-value-parser/lib/stringify.js","/node_modules/postcss-value-parser/lib/unit.js","/node_modules/react-native-web/dist/exports/Platform/index.js","/App.tsx","/node_modules/@expo/metro-runtime/src/index.ts","/node_modules/@expo/metro-runtime/src/location/install.ts","/node_modules/@expo/metro-runtime/src/effects.ts","/node_modules/@expo/metro-runtime/src/async-require/index.ts","/node_modules/@expo/metro-runtime/src/async-require/buildAsyncRequire.ts","/node_modules/@expo/metro-runtime/src/async-require/loadBundle.ts","/node_modules/@expo/metro-runtime/src/async-require/buildUrlForBundle.ts","/node_modules/@expo/metro-runtime/src/async-require/fetchThenEval.web.ts","/node_modules/@expo/metro-runtime/rsc/virtual.js","/node_modules/@expo/metro-runtime/rsc/runtime.js","/node_modules/regenerator-runtime/runtime.js","/src/hooks/useLoadAssets.ts","/node_modules/expo-font/build/index.js","/node_modules/expo-font/build/Font.js","/node_modules/expo-modules-core/src/index.ts","/node_modules/expo-modules-core/src/EventEmitter.ts","/node_modules/expo-modules-core/src/ensureNativeModulesAreInstalled.ts","/node_modules/react-native-web/dist/exports/NativeModules/index.js","/node_modules/react-native-web/dist/exports/UIManager/index.js","/node_modules/react-native-web/dist/modules/getBoundingClientRect/index.js","/node_modules/react-native-web/dist/modules/setValueForStyles/index.js","/node_modules/react-native-web/dist/modules/setValueForStyles/dangerousStyleValue.js","/node_modules/react-native-web/dist/modules/unitlessNumbers/index.js","/node_modules/expo-modules-core/src/web/index.web.ts","/node_modules/expo-modules-core/src/web/CoreModule.ts","/node_modules/expo-modules-core/src/uuid/index.ts","/node_modules/expo-modules-core/src/uuid/uuid.web.ts","/node_modules/expo-modules-core/src/uuid/lib/sha1.ts","/node_modules/expo-modules-core/src/uuid/lib/v35.ts","/node_modules/expo-modules-core/src/uuid/lib/bytesToUuid.ts","/node_modules/expo-modules-core/src/uuid/uuid.types.ts","/node_modules/expo-modules-core/src/ts-declarations/global.ts","/node_modules/expo-modules-core/src/LegacyEventEmitter.ts","/node_modules/invariant/browser.js","/node_modules/react-native-web/dist/exports/NativeEventEmitter/index.js","/node_modules/react-native-web/dist/vendor/react-native/EventEmitter/NativeEventEmitter.js","/node_modules/react-native-web/dist/vendor/react-native/EventEmitter/RCTDeviceEventEmitter.js","/node_modules/react-native-web/dist/vendor/react-native/vendor/emitter/EventEmitter.js","/node_modules/expo-modules-core/src/NativeModule.ts","/node_modules/expo-modules-core/src/NativeModulesProxy.ts","/node_modules/expo-modules-core/src/NativeViewManagerAdapter.tsx","/node_modules/expo-modules-core/src/errors/UnavailabilityError.ts","/node_modules/expo-modules-core/src/errors/CodedError.ts","/node_modules/expo-modules-core/src/Platform.ts","/node_modules/expo-modules-core/src/environment/browser.web.ts","/node_modules/expo-modules-core/src/SharedObject.ts","/node_modules/expo-modules-core/src/SharedRef.ts","/node_modules/expo-modules-core/src/sweet/setUpErrorManager.fx.web.ts","/node_modules/expo-modules-core/src/requireNativeModule.web.ts","/node_modules/expo-modules-core/src/registerWebModule.ts","/node_modules/expo-modules-core/src/TypedArrays.types.ts","/node_modules/expo-modules-core/src/PermissionsInterface.ts","/node_modules/expo-modules-core/src/PermissionsHook.ts","/node_modules/expo-modules-core/src/Refs.ts","/node_modules/expo-modules-core/src/hooks/useReleasingSharedObject.ts","/node_modules/expo-modules-core/src/reload.ts","/node_modules/expo-font/build/ExpoFontLoader.web.js","/node_modules/fontfaceobserver/fontfaceobserver.standalone.js","/node_modules/expo-font/build/Font.types.js","/node_modules/expo-font/build/FontLoader.web.js","/node_modules/expo-asset/build/index.js","/node_modules/expo-asset/build/Asset.fx.js","/node_modules/expo-asset/build/Asset.js","\u0000polyfill:assets-registry","/node_modules/expo-asset/build/AssetSources.js","/node_modules/react-native-web/dist/exports/PixelRatio/index.js","/node_modules/react-native-web/dist/exports/Dimensions/index.js","/node_modules/expo-asset/build/AssetSourceResolver.js","/node_modules/expo-asset/build/PlatformUtils.web.js","/node_modules/expo-asset/build/AssetUris.js","/node_modules/expo-asset/build/ExpoAsset.web.js","/node_modules/expo-asset/build/ImageAssets.js","/node_modules/expo-asset/build/LocalAssets.web.js","/node_modules/expo-asset/build/resolveAssetSource.js","/node_modules/expo-asset/build/AssetHooks.js","/node_modules/expo-font/build/memory.js","/node_modules/expo-font/build/server.js","/node_modules/expo-font/build/FontHooks.js","/src/assets/fonts/Overpass-Regular.ttf","/src/assets/fonts/Overpass-Medium.ttf","/src/assets/fonts/Overpass-Bold.ttf","/src/assets/fonts/Overpass-SemiBold.ttf","/src/assets/fonts/Overpass-ExtraBold.ttf","/src/assets/fonts/suisseworks-bold.otf","/src/components/ResetAppProvider/index.tsx","/src/components/v2BaseComponents/SplashScreenBackground.tsx","/node_modules/react-native-web/dist/exports/ImageBackground/index.js","/node_modules/react-native-web/dist/exports/Image/index.js","/node_modules/react-native-web/dist/exports/createElement/index.js","/node_modules/react-native-web/dist/modules/AccessibilityUtil/index.js","/node_modules/react-native-web/dist/modules/AccessibilityUtil/isDisabled.js","/node_modules/react-native-web/dist/modules/AccessibilityUtil/propsToAccessibilityComponent.js","/node_modules/react-native-web/dist/modules/AccessibilityUtil/propsToAriaRole.js","/node_modules/react-native-web/dist/modules/createDOMProps/index.js","/node_modules/react-native-web/dist/modules/useLocale/index.js","/node_modules/react-native-web/dist/modules/useLocale/isLocaleRTL.js","/node_modules/react-native-web/dist/modules/ImageLoader/index.js","/node_modules/react-native-web/dist/exports/Text/TextAncestorContext.js","/node_modules/react-native-web/dist/exports/View/index.js","/node_modules/react-native-web/dist/modules/forwardedProps/index.js","/node_modules/react-native-web/dist/modules/pick/index.js","/node_modules/react-native-web/dist/modules/useElementLayout/index.js","/node_modules/react-native-web/dist/modules/useLayoutEffect/index.js","/node_modules/react-native-web/dist/modules/useMergeRefs/index.js","/node_modules/react-native-web/dist/modules/mergeRefs/index.js","/node_modules/react-native-web/dist/modules/usePlatformMethods/index.js","/node_modules/react-native-web/dist/modules/useStable/index.js","/node_modules/react-native-web/dist/modules/useResponderEvents/index.js","/node_modules/react-native-web/dist/modules/useResponderEvents/ResponderSystem.js","/node_modules/react-native-web/dist/modules/useResponderEvents/createResponderEvent.js","/node_modules/react-native-web/dist/modules/useResponderEvents/ResponderEventTypes.js","/node_modules/react-native-web/dist/modules/useResponderEvents/utils.js","/node_modules/react-native-web/dist/modules/isSelectionValid/index.js","/node_modules/react-native-web/dist/modules/useResponderEvents/ResponderTouchHistoryStore.js","/src/Images.ts","/assets/PrimaryRecordBackground.png","/assets/PrimaryRecordLogoDark.png","/assets/PrimaryLogo.png","/assets/primary-record-icon-svg.svg","/assets/usage-screenshots/1.png","/assets/usage-screenshots/2.png","/assets/usage-screenshots/3.png","/assets/usage-screenshots/4.png","/assets/usage-screenshots/5.png","/assets/usage-screenshots/6.png","/assets/usage-screenshots/7.png","/assets/nurse-approved.png","/assets/app/puzzle.png","/assets/app/one-up-logo.png","/assets/app/primary-record-logo-dark-v2.png","/assets/app/desktopSplash.jpg","/assets/app/mobileSplash.png","/assets/app/large-header-logo.png","/assets/app/small-header-logo.png","/assets/app/large-icon-logo.png","/assets/app/fda.png","/assets/nvidia-inception-program.jpg","/assets/app/download-in-app-store.svg","/assets/app/download-in-google-play.png","/src/hooks/useIsMobileLayout.ts","/src/utils/constants.ts","/node_modules/react/jsx-runtime.js","/node_modules/react/cjs/react-jsx-runtime.production.min.js","/src/hooks/useEnvironment.ts","/src/hooks/usePersistedKeyValueStore.ts","/node_modules/react-native-storage/lib/storage.esm.js","/node_modules/@babel/runtime/regenerator/index.js","/node_modules/@babel/runtime/helpers/regeneratorRuntime.js","/node_modules/@react-native-async-storage/async-storage/lib/module/index.js","/node_modules/@react-native-async-storage/async-storage/lib/module/AsyncStorage.js","/node_modules/merge-options/index.js","/node_modules/is-plain-obj/index.js","/node_modules/@react-native-async-storage/async-storage/lib/module/hooks.js","/node_modules/react-native-global-state-hooks/lib/bundle.js","/src/webEnvironment.ts","/src/PrimaryRecordApp.tsx","/node_modules/aws-amplify/dist/esm/index.mjs","/node_modules/aws-amplify/dist/esm/initSingleton.mjs","/node_modules/@aws-amplify/core/dist/esm/index.mjs","/node_modules/@aws-amplify/core/dist/esm/Hub/index.mjs","/node_modules/@aws-amplify/core/dist/esm/Logger/ConsoleLogger.mjs","/node_modules/@aws-amplify/core/dist/esm/constants.mjs","/node_modules/@aws-amplify/core/dist/esm/Logger/types.mjs","/node_modules/@aws-amplify/core/dist/esm/errors/AmplifyError.mjs","/node_modules/@aws-amplify/core/dist/esm/types/errors.mjs","/node_modules/@aws-amplify/core/dist/esm/errors/errorHelpers.mjs","/node_modules/@aws-amplify/core/dist/esm/errors/createAssertionFunction.mjs","/node_modules/@aws-amplify/core/dist/esm/singleton/Auth/utils/index.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/convert/base64/base64Decoder.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/globalHelpers/index.mjs","/node_modules/@aws-amplify/core/dist/esm/singleton/Auth/utils/errorHelpers.mjs","/node_modules/@aws-amplify/core/dist/esm/singleton/Amplify.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/getClientInfo/getClientInfo.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/retry/retry.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/retry/isNonRetryableError.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/deepFreeze.mjs","/node_modules/@aws-amplify/core/dist/esm/parseAWSExports.mjs","/node_modules/@aws-amplify/core/dist/esm/singleton/constants.mjs","/node_modules/uuid/dist/esm-browser/index.js","/node_modules/uuid/dist/esm-browser/v1.js","/node_modules/uuid/dist/esm-browser/rng.js","/node_modules/uuid/dist/esm-browser/stringify.js","/node_modules/uuid/dist/esm-browser/validate.js","/node_modules/uuid/dist/esm-browser/regex.js","/node_modules/uuid/dist/esm-browser/v3.js","/node_modules/uuid/dist/esm-browser/v35.js","/node_modules/uuid/dist/esm-browser/parse.js","/node_modules/uuid/dist/esm-browser/md5.js","/node_modules/uuid/dist/esm-browser/v4.js","/node_modules/uuid/dist/esm-browser/native.js","/node_modules/uuid/dist/esm-browser/v5.js","/node_modules/uuid/dist/esm-browser/sha1.js","/node_modules/uuid/dist/esm-browser/nil.js","/node_modules/uuid/dist/esm-browser/version.js","/node_modules/@aws-amplify/core/dist/esm/utils/parseAmplifyConfig.mjs","/node_modules/@aws-amplify/core/dist/esm/parseAmplifyOutputs.mjs","/node_modules/@aws-amplify/core/dist/esm/singleton/Auth/index.mjs","/node_modules/@aws-crypto/sha256-js/build/module/index.js","/node_modules/@aws-crypto/sha256-js/build/module/jsSha256.js","/node_modules/tslib/tslib.es6.js","/node_modules/@aws-crypto/sha256-js/build/module/constants.js","/node_modules/@aws-crypto/sha256-js/build/module/RawSha256.js","/node_modules/@aws-crypto/util/build/module/index.js","/node_modules/@aws-crypto/util/build/module/convertToBuffer.js","/node_modules/@smithy/util-utf8/dist-es/index.js","/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js","/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js","/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js","/node_modules/@aws-crypto/util/build/module/isEmptyData.js","/node_modules/@aws-crypto/util/build/module/numToUint8.js","/node_modules/@aws-crypto/util/build/module/uint32ArrayFrom.js","/node_modules/@smithy/util-hex-encoding/dist-es/index.js","/node_modules/@aws-amplify/core/dist/esm/Platform/index.mjs","/node_modules/@aws-amplify/core/dist/esm/Platform/types.mjs","/node_modules/@aws-amplify/core/dist/esm/Platform/version.mjs","/node_modules/@aws-amplify/core/dist/esm/Platform/detectFramework.mjs","/node_modules/@aws-amplify/core/dist/esm/Platform/detection/index.mjs","/node_modules/@aws-amplify/core/dist/esm/Platform/detection/React.mjs","/node_modules/@aws-amplify/core/dist/esm/Platform/detection/helpers.mjs","/node_modules/@aws-amplify/core/dist/esm/Platform/detection/Vue.mjs","/node_modules/@aws-amplify/core/dist/esm/Platform/detection/Svelte.mjs","/node_modules/@aws-amplify/core/dist/esm/Platform/detection/Next.mjs","/node_modules/@aws-amplify/core/dist/esm/Platform/detection/Nuxt.mjs","/node_modules/@aws-amplify/core/dist/esm/Platform/detection/Angular.mjs","/node_modules/@aws-amplify/core/dist/esm/Platform/detection/ReactNative.mjs","/node_modules/@aws-amplify/core/dist/esm/Platform/detection/Expo.mjs","/node_modules/@aws-amplify/core/dist/esm/Platform/detection/Web.mjs","/node_modules/@aws-amplify/core/dist/esm/Platform/customUserAgent.mjs","/node_modules/@aws-amplify/core/dist/esm/BackgroundProcessManager/types.mjs","/node_modules/@aws-amplify/core/dist/esm/Reachability/Reachability.mjs","/node_modules/rxjs/dist/esm5/index.js","/node_modules/rxjs/dist/esm5/internal/Observable.js","/node_modules/rxjs/dist/esm5/internal/Subscriber.js","/node_modules/rxjs/dist/esm5/internal/util/isFunction.js","/node_modules/rxjs/dist/esm5/internal/Subscription.js","/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js","/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js","/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js","/node_modules/rxjs/dist/esm5/internal/config.js","/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js","/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js","/node_modules/rxjs/dist/esm5/internal/util/noop.js","/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js","/node_modules/rxjs/dist/esm5/internal/util/errorContext.js","/node_modules/rxjs/dist/esm5/internal/symbol/observable.js","/node_modules/rxjs/dist/esm5/internal/util/pipe.js","/node_modules/rxjs/dist/esm5/internal/util/identity.js","/node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js","/node_modules/rxjs/dist/esm5/internal/operators/refCount.js","/node_modules/rxjs/dist/esm5/internal/util/lift.js","/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js","/node_modules/rxjs/dist/esm5/internal/observable/dom/animationFrames.js","/node_modules/rxjs/dist/esm5/internal/scheduler/performanceTimestampProvider.js","/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrameProvider.js","/node_modules/rxjs/dist/esm5/internal/Subject.js","/node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js","/node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js","/node_modules/rxjs/dist/esm5/internal/ReplaySubject.js","/node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js","/node_modules/rxjs/dist/esm5/internal/AsyncSubject.js","/node_modules/rxjs/dist/esm5/internal/scheduler/asap.js","/node_modules/rxjs/dist/esm5/internal/scheduler/AsapAction.js","/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js","/node_modules/rxjs/dist/esm5/internal/scheduler/Action.js","/node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js","/node_modules/rxjs/dist/esm5/internal/scheduler/immediateProvider.js","/node_modules/rxjs/dist/esm5/internal/util/Immediate.js","/node_modules/rxjs/dist/esm5/internal/scheduler/AsapScheduler.js","/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js","/node_modules/rxjs/dist/esm5/internal/Scheduler.js","/node_modules/rxjs/dist/esm5/internal/scheduler/async.js","/node_modules/rxjs/dist/esm5/internal/scheduler/queue.js","/node_modules/rxjs/dist/esm5/internal/scheduler/QueueAction.js","/node_modules/rxjs/dist/esm5/internal/scheduler/QueueScheduler.js","/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrame.js","/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameAction.js","/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameScheduler.js","/node_modules/rxjs/dist/esm5/internal/scheduler/VirtualTimeScheduler.js","/node_modules/rxjs/dist/esm5/internal/Notification.js","/node_modules/rxjs/dist/esm5/internal/observable/empty.js","/node_modules/rxjs/dist/esm5/internal/observable/of.js","/node_modules/rxjs/dist/esm5/internal/util/args.js","/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js","/node_modules/rxjs/dist/esm5/internal/observable/from.js","/node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js","/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js","/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js","/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js","/node_modules/rxjs/dist/esm5/internal/util/isPromise.js","/node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js","/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js","/node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js","/node_modules/rxjs/dist/esm5/internal/util/isIterable.js","/node_modules/rxjs/dist/esm5/internal/symbol/iterator.js","/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js","/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js","/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js","/node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js","/node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js","/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js","/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js","/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js","/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js","/node_modules/rxjs/dist/esm5/internal/observable/throwError.js","/node_modules/rxjs/dist/esm5/internal/util/isObservable.js","/node_modules/rxjs/dist/esm5/internal/lastValueFrom.js","/node_modules/rxjs/dist/esm5/internal/util/EmptyError.js","/node_modules/rxjs/dist/esm5/internal/firstValueFrom.js","/node_modules/rxjs/dist/esm5/internal/util/ArgumentOutOfRangeError.js","/node_modules/rxjs/dist/esm5/internal/util/NotFoundError.js","/node_modules/rxjs/dist/esm5/internal/util/SequenceError.js","/node_modules/rxjs/dist/esm5/internal/operators/timeout.js","/node_modules/rxjs/dist/esm5/internal/util/isDate.js","/node_modules/rxjs/dist/esm5/internal/observable/bindCallback.js","/node_modules/rxjs/dist/esm5/internal/observable/bindCallbackInternals.js","/node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js","/node_modules/rxjs/dist/esm5/internal/operators/map.js","/node_modules/rxjs/dist/esm5/internal/observable/bindNodeCallback.js","/node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js","/node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js","/node_modules/rxjs/dist/esm5/internal/util/createObject.js","/node_modules/rxjs/dist/esm5/internal/observable/concat.js","/node_modules/rxjs/dist/esm5/internal/operators/concatAll.js","/node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js","/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js","/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js","/node_modules/rxjs/dist/esm5/internal/observable/connectable.js","/node_modules/rxjs/dist/esm5/internal/observable/defer.js","/node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js","/node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js","/node_modules/rxjs/dist/esm5/internal/observable/fromEventPattern.js","/node_modules/rxjs/dist/esm5/internal/observable/generate.js","/node_modules/rxjs/dist/esm5/internal/observable/iif.js","/node_modules/rxjs/dist/esm5/internal/observable/interval.js","/node_modules/rxjs/dist/esm5/internal/observable/timer.js","/node_modules/rxjs/dist/esm5/internal/observable/merge.js","/node_modules/rxjs/dist/esm5/internal/observable/never.js","/node_modules/rxjs/dist/esm5/internal/observable/onErrorResumeNext.js","/node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js","/node_modules/rxjs/dist/esm5/internal/observable/pairs.js","/node_modules/rxjs/dist/esm5/internal/observable/partition.js","/node_modules/rxjs/dist/esm5/internal/util/not.js","/node_modules/rxjs/dist/esm5/internal/operators/filter.js","/node_modules/rxjs/dist/esm5/internal/observable/race.js","/node_modules/rxjs/dist/esm5/internal/observable/range.js","/node_modules/rxjs/dist/esm5/internal/observable/using.js","/node_modules/rxjs/dist/esm5/internal/observable/zip.js","/node_modules/rxjs/dist/esm5/internal/types.js","/node_modules/rxjs/dist/esm5/internal/operators/audit.js","/node_modules/rxjs/dist/esm5/internal/operators/auditTime.js","/node_modules/rxjs/dist/esm5/internal/operators/buffer.js","/node_modules/rxjs/dist/esm5/internal/operators/bufferCount.js","/node_modules/rxjs/dist/esm5/internal/operators/bufferTime.js","/node_modules/rxjs/dist/esm5/internal/operators/bufferToggle.js","/node_modules/rxjs/dist/esm5/internal/operators/bufferWhen.js","/node_modules/rxjs/dist/esm5/internal/operators/catchError.js","/node_modules/rxjs/dist/esm5/internal/operators/combineAll.js","/node_modules/rxjs/dist/esm5/internal/operators/combineLatestAll.js","/node_modules/rxjs/dist/esm5/internal/operators/joinAllInternals.js","/node_modules/rxjs/dist/esm5/internal/operators/toArray.js","/node_modules/rxjs/dist/esm5/internal/operators/reduce.js","/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js","/node_modules/rxjs/dist/esm5/internal/operators/combineLatestWith.js","/node_modules/rxjs/dist/esm5/internal/operators/combineLatest.js","/node_modules/rxjs/dist/esm5/internal/operators/concatMap.js","/node_modules/rxjs/dist/esm5/internal/operators/concatMapTo.js","/node_modules/rxjs/dist/esm5/internal/operators/concatWith.js","/node_modules/rxjs/dist/esm5/internal/operators/concat.js","/node_modules/rxjs/dist/esm5/internal/operators/connect.js","/node_modules/rxjs/dist/esm5/internal/observable/fromSubscribable.js","/node_modules/rxjs/dist/esm5/internal/operators/count.js","/node_modules/rxjs/dist/esm5/internal/operators/debounce.js","/node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js","/node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js","/node_modules/rxjs/dist/esm5/internal/operators/delay.js","/node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js","/node_modules/rxjs/dist/esm5/internal/operators/take.js","/node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js","/node_modules/rxjs/dist/esm5/internal/operators/mapTo.js","/node_modules/rxjs/dist/esm5/internal/operators/dematerialize.js","/node_modules/rxjs/dist/esm5/internal/operators/distinct.js","/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js","/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilKeyChanged.js","/node_modules/rxjs/dist/esm5/internal/operators/elementAt.js","/node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js","/node_modules/rxjs/dist/esm5/internal/operators/endWith.js","/node_modules/rxjs/dist/esm5/internal/operators/every.js","/node_modules/rxjs/dist/esm5/internal/operators/exhaust.js","/node_modules/rxjs/dist/esm5/internal/operators/exhaustAll.js","/node_modules/rxjs/dist/esm5/internal/operators/exhaustMap.js","/node_modules/rxjs/dist/esm5/internal/operators/expand.js","/node_modules/rxjs/dist/esm5/internal/operators/finalize.js","/node_modules/rxjs/dist/esm5/internal/operators/find.js","/node_modules/rxjs/dist/esm5/internal/operators/findIndex.js","/node_modules/rxjs/dist/esm5/internal/operators/first.js","/node_modules/rxjs/dist/esm5/internal/operators/groupBy.js","/node_modules/rxjs/dist/esm5/internal/operators/isEmpty.js","/node_modules/rxjs/dist/esm5/internal/operators/last.js","/node_modules/rxjs/dist/esm5/internal/operators/takeLast.js","/node_modules/rxjs/dist/esm5/internal/operators/materialize.js","/node_modules/rxjs/dist/esm5/internal/operators/max.js","/node_modules/rxjs/dist/esm5/internal/operators/flatMap.js","/node_modules/rxjs/dist/esm5/internal/operators/mergeMapTo.js","/node_modules/rxjs/dist/esm5/internal/operators/mergeScan.js","/node_modules/rxjs/dist/esm5/internal/operators/mergeWith.js","/node_modules/rxjs/dist/esm5/internal/operators/merge.js","/node_modules/rxjs/dist/esm5/internal/operators/min.js","/node_modules/rxjs/dist/esm5/internal/operators/multicast.js","/node_modules/rxjs/dist/esm5/internal/operators/onErrorResumeNextWith.js","/node_modules/rxjs/dist/esm5/internal/operators/pairwise.js","/node_modules/rxjs/dist/esm5/internal/operators/pluck.js","/node_modules/rxjs/dist/esm5/internal/operators/publish.js","/node_modules/rxjs/dist/esm5/internal/operators/publishBehavior.js","/node_modules/rxjs/dist/esm5/internal/operators/publishLast.js","/node_modules/rxjs/dist/esm5/internal/operators/publishReplay.js","/node_modules/rxjs/dist/esm5/internal/operators/raceWith.js","/node_modules/rxjs/dist/esm5/internal/operators/repeat.js","/node_modules/rxjs/dist/esm5/internal/operators/repeatWhen.js","/node_modules/rxjs/dist/esm5/internal/operators/retry.js","/node_modules/rxjs/dist/esm5/internal/operators/retryWhen.js","/node_modules/rxjs/dist/esm5/internal/operators/sample.js","/node_modules/rxjs/dist/esm5/internal/operators/sampleTime.js","/node_modules/rxjs/dist/esm5/internal/operators/scan.js","/node_modules/rxjs/dist/esm5/internal/operators/sequenceEqual.js","/node_modules/rxjs/dist/esm5/internal/operators/share.js","/node_modules/rxjs/dist/esm5/internal/operators/shareReplay.js","/node_modules/rxjs/dist/esm5/internal/operators/single.js","/node_modules/rxjs/dist/esm5/internal/operators/skip.js","/node_modules/rxjs/dist/esm5/internal/operators/skipLast.js","/node_modules/rxjs/dist/esm5/internal/operators/skipUntil.js","/node_modules/rxjs/dist/esm5/internal/operators/skipWhile.js","/node_modules/rxjs/dist/esm5/internal/operators/startWith.js","/node_modules/rxjs/dist/esm5/internal/operators/switchAll.js","/node_modules/rxjs/dist/esm5/internal/operators/switchMap.js","/node_modules/rxjs/dist/esm5/internal/operators/switchMapTo.js","/node_modules/rxjs/dist/esm5/internal/operators/switchScan.js","/node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js","/node_modules/rxjs/dist/esm5/internal/operators/takeWhile.js","/node_modules/rxjs/dist/esm5/internal/operators/tap.js","/node_modules/rxjs/dist/esm5/internal/operators/throttle.js","/node_modules/rxjs/dist/esm5/internal/operators/throttleTime.js","/node_modules/rxjs/dist/esm5/internal/operators/timeInterval.js","/node_modules/rxjs/dist/esm5/internal/operators/timeoutWith.js","/node_modules/rxjs/dist/esm5/internal/operators/timestamp.js","/node_modules/rxjs/dist/esm5/internal/operators/window.js","/node_modules/rxjs/dist/esm5/internal/operators/windowCount.js","/node_modules/rxjs/dist/esm5/internal/operators/windowTime.js","/node_modules/rxjs/dist/esm5/internal/operators/windowToggle.js","/node_modules/rxjs/dist/esm5/internal/operators/windowWhen.js","/node_modules/rxjs/dist/esm5/internal/operators/withLatestFrom.js","/node_modules/rxjs/dist/esm5/internal/operators/zipAll.js","/node_modules/rxjs/dist/esm5/internal/operators/zipWith.js","/node_modules/rxjs/dist/esm5/internal/operators/zip.js","/node_modules/@aws-amplify/core/dist/esm/utils/isWebWorker.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/sessionListener/index.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/sessionListener/SessionListener.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/isBrowser.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/sessionListener/constants.mjs","/node_modules/@aws-amplify/core/dist/esm/singleton/apis/fetchAuthSession.mjs","/node_modules/@aws-amplify/core/dist/esm/singleton/apis/internal/fetchAuthSession.mjs","/node_modules/@aws-amplify/core/dist/esm/singleton/apis/clearCredentials.mjs","/node_modules/@aws-amplify/core/dist/esm/awsClients/cognitoIdentity/getId.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/serde/responseInfo.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/serde/json.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/internal/composeServiceApi.mjs","/node_modules/@aws-amplify/core/dist/esm/awsClients/cognitoIdentity/base.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/endpoints/getDnsSuffix.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/endpoints/partitions.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/handlers/unauthenticated.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/retry/middleware.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/userAgent/middleware.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/internal/composeTransferHandler.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/handlers/fetch.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/utils/memoization.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/retry/jitteredBackoff.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/retry/jitteredBackoff.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/retry/constants.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/retry/defaultRetryDecider.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/retry/isClockSkewError.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/amplifyUrl/index.mjs","/node_modules/@aws-amplify/core/dist/esm/awsClients/cognitoIdentity/getCredentialsForIdentity.mjs","/node_modules/@aws-amplify/core/dist/esm/storage/index.mjs","/node_modules/@aws-amplify/core/dist/esm/storage/DefaultStorage.mjs","/node_modules/@aws-amplify/core/dist/esm/storage/KeyValueStorage.mjs","/node_modules/@aws-amplify/core/dist/esm/errors/PlatformNotSupportedError.mjs","/node_modules/@aws-amplify/core/dist/esm/storage/utils.mjs","/node_modules/@aws-amplify/core/dist/esm/storage/InMemoryStorage.mjs","/node_modules/@aws-amplify/core/dist/esm/storage/SessionStorage.mjs","/node_modules/@aws-amplify/core/dist/esm/storage/CookieStorage.mjs","/node_modules/js-cookie/dist/js.cookie.js","/node_modules/@aws-amplify/core/dist/esm/Cache/index.mjs","/node_modules/@aws-amplify/core/dist/esm/Cache/StorageCache.mjs","/node_modules/@aws-amplify/core/dist/esm/Cache/constants.mjs","/node_modules/@aws-amplify/core/dist/esm/Cache/StorageCacheCommon.mjs","/node_modules/@aws-amplify/core/dist/esm/Cache/utils/cacheHelpers.mjs","/node_modules/@aws-amplify/core/dist/esm/Cache/utils/errorHelpers.mjs","/node_modules/@aws-amplify/core/dist/esm/I18n/index.mjs","/node_modules/@aws-amplify/core/dist/esm/I18n/I18n.mjs","/node_modules/@aws-amplify/core/dist/esm/I18n/errorHelpers.mjs","/node_modules/@aws-amplify/core/dist/esm/ServiceWorker/ServiceWorker.mjs","/node_modules/@aws-amplify/core/dist/esm/awsClients/pinpoint/base.mjs","/node_modules/@aws-amplify/core/dist/esm/awsClients/pinpoint/errorHelpers.mjs","/node_modules/@aws-amplify/core/dist/esm/providers/pinpoint/apis/record.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/amplifyUuid/index.mjs","/node_modules/@aws-amplify/core/dist/esm/providers/pinpoint/utils/resolveEndpointId.mjs","/node_modules/@aws-amplify/core/dist/esm/providers/pinpoint/apis/updateEndpoint.mjs","/node_modules/@aws-amplify/core/dist/esm/awsClients/pinpoint/updateEndpoint.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/handlers/authenticated.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/signing/middleware.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/signing/signer/signatureV4/signRequest.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/signing/signer/signatureV4/utils/getSignedHeaders.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/signing/signer/signatureV4/utils/getSigningValues.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/signing/signer/signatureV4/utils/getCredentialScope.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/signing/signer/signatureV4/constants.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/signing/signer/signatureV4/utils/getFormattedDates.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/signing/signer/signatureV4/utils/getSignature.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/signing/signer/signatureV4/utils/dataHashHelpers.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalRequest.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalHeaders.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalQueryString.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/signing/signer/signatureV4/utils/getCanonicalUri.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/signing/signer/signatureV4/utils/getHashedPayload.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/signing/signer/signatureV4/utils/getSigningKey.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/signing/signer/signatureV4/utils/getStringToSign.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/signing/utils/getSkewCorrectedDate.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/signing/utils/getUpdatedSystemClockOffset.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/signing/utils/isClockSkewed.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/signing/utils/extendedEncodeURIComponent.mjs","/node_modules/@aws-amplify/core/dist/esm/providers/pinpoint/utils/cacheEndpointId.mjs","/node_modules/@aws-amplify/core/dist/esm/providers/pinpoint/utils/getCacheKey.mjs","/node_modules/@aws-amplify/core/dist/esm/providers/pinpoint/utils/createEndpointId.mjs","/node_modules/@aws-amplify/core/dist/esm/providers/pinpoint/utils/getEndpointId.mjs","/node_modules/@aws-amplify/core/dist/esm/providers/pinpoint/utils/constants.mjs","/node_modules/@aws-amplify/core/dist/esm/providers/pinpoint/utils/getEventBuffer.mjs","/node_modules/@aws-amplify/core/dist/esm/providers/pinpoint/utils/PinpointEventBuffer.mjs","/node_modules/@aws-amplify/core/dist/esm/awsClients/pinpoint/putEvents.mjs","/node_modules/@aws-amplify/core/dist/esm/providers/pinpoint/utils/isAppInForeground.mjs","/node_modules/@aws-amplify/core/dist/esm/providers/pinpoint/types/errors.mjs","/node_modules/@aws-amplify/core/dist/esm/ServiceWorker/errorHelpers.mjs","/node_modules/@aws-amplify/core/dist/esm/libraryUtils.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/generateRandomString.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/retry/NonRetryableError.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/retry/jitteredExponentialRetry.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/urlSafeDecode.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/urlSafeEncode.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/deDupeAsyncFunction.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/deviceName/getDeviceName.mjs","/node_modules/@aws-amplify/core/dist/esm/Signer/Signer.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/middleware/signing/signer/signatureV4/presignUrl.mjs","/node_modules/@aws-amplify/core/dist/esm/Signer/DateUtils.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/haveCredentialsChanged.mjs","/node_modules/@aws-amplify/core/dist/esm/errors/APIError.mjs","/node_modules/@aws-amplify/core/dist/esm/BackgroundProcessManager/BackgroundProcessManager.mjs","/node_modules/@aws-amplify/core/dist/esm/BackgroundProcessManager/BackgroundManagerNotOpenError.mjs","/node_modules/@aws-amplify/core/dist/esm/Mutex/Mutex.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/convert/base64/base64Encoder.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/convert/base64/bytesToString.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/cryptoSecureRandomInt.mjs","/node_modules/@aws-amplify/core/dist/esm/utils/WordArray.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/index.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signUp.mjs","/node_modules/@aws-amplify/auth/dist/esm/errors/utils/assertValidationError.mjs","/node_modules/@aws-amplify/auth/dist/esm/common/AuthErrorStrings.mjs","/node_modules/@aws-amplify/auth/dist/esm/errors/types/validation.mjs","/node_modules/@aws-amplify/auth/dist/esm/errors/AuthError.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/parsers/regionParsers.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/apiHelpers.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/signUpHelpers.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signIn.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/signInHelpers.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/types/errors.mjs","/node_modules/@aws-amplify/auth/dist/esm/errors/constants.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/getCurrentUser.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/internal/getCurrentUser.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/types.mjs","/node_modules/@aws-amplify/auth/dist/esm/utils/getAuthUserAgentValue.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createInitiateAuthClient.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/internal/index.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/shared/serde/createUserPoolSerializer.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/shared/serde/createUserPoolDeserializer.mjs","/node_modules/@aws-amplify/core/dist/esm/clients/index.mjs","/node_modules/@aws-amplify/auth/dist/esm/errors/utils/assertServiceError.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/constants.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createRespondToAuthChallengeClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createVerifySoftwareTokenClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createAssociateSoftwareTokenClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createConfirmDeviceClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/factories/createCognitoUserPoolEndpointResolver.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/cognitoUserPoolEndpointResolver.mjs","/node_modules/@aws-amplify/auth/dist/esm/client/flows/userAuth/handleWebAuthnSignInResult.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/cacheTokens.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/tokenProvider.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/CognitoUserPoolsTokenProvider.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/refreshAuthTokens.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/userContextData.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/TokenStore.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/types.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/errorHelpers.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/tokenProvider/TokenOrchestrator.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/oAuthStore.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/signInWithRedirectStore.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/inflightPromise.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/dispatchSignedInHubEvent.mjs","/node_modules/@aws-amplify/auth/dist/esm/client/utils/store/autoSignInStore.mjs","/node_modules/@aws-amplify/auth/dist/esm/client/utils/store/signInStore.mjs","/node_modules/@aws-amplify/auth/dist/esm/client/utils/passkey/errors.mjs","/node_modules/@aws-amplify/auth/dist/esm/client/utils/passkey/getPasskey.mjs","/node_modules/@aws-amplify/auth/dist/esm/client/utils/passkey/getIsPasskeySupported.mjs","/node_modules/@aws-amplify/auth/dist/esm/client/utils/passkey/serde.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/convert/base64url/convertArrayBufferToBase64Url.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/convert/base64url/convertBase64UrlToArrayBuffer.mjs","/node_modules/@aws-amplify/auth/dist/esm/client/utils/passkey/types/index.mjs","/node_modules/@aws-amplify/auth/dist/esm/client/utils/passkey/types/shared.mjs","/node_modules/@aws-amplify/auth/dist/esm/client/flows/shared/handlePasswordSRP.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/getAuthenticationHelper.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/AuthenticationHelper/AuthenticationHelper.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/textEncoder/index.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/BigInteger/BigInteger.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/calculate/calculateS.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/calculate/calculateU.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/getHashFromHex.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/getBytesFromHex.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/constants.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/getHashFromData.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/getHexFromBytes.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/getPaddedHex.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/getHkdfKey.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/getRandomBytes.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/getRandomString.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/calculate/calculateA.mjs","/node_modules/@aws-amplify/auth/dist/esm/client/flows/userAuth/handleSelectChallenge.mjs","/node_modules/@aws-amplify/auth/dist/esm/client/flows/userAuth/handleSelectChallengeWithPassword.mjs","/node_modules/@aws-amplify/auth/dist/esm/client/flows/userAuth/handleSelectChallengeWithPasswordSRP.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/getNowString.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/srp/getSignatureString.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signInWithCustomAuth.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signInWithCustomSRPAuth.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signInWithSRP.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/autoSignIn.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signInWithUserPassword.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signInWithUserAuth.mjs","/node_modules/@aws-amplify/auth/dist/esm/client/flows/userAuth/handleUserAuthFlow.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createSignUpClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/resetPassword.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createForgotPasswordClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/confirmResetPassword.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createConfirmForgotPasswordClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/resendSignUpCode.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createResendConfirmationCodeClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/confirmSignUp.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createConfirmSignUpClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/confirmSignIn.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/updateMFAPreference.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createSetUserMFAPreferenceClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/fetchMFAPreference.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createGetUserClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/verifyTOTPSetup.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/updatePassword.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createChangePasswordClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/setUpTOTP.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/updateUserAttributes.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createUpdateUserAttributesClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/updateUserAttribute.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/confirmUserAttribute.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createVerifyUserAttributeClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signInWithRedirect.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/enableOAuthListener.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/attemptCompleteOAuthFlow.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/completeOAuthFlow.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/createOAuthError.mjs","/node_modules/@aws-amplify/auth/dist/esm/Errors.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/validateState.mjs","/node_modules/@aws-amplify/auth/dist/esm/types/Auth.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/getRedirectUrl.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/handleFailure.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/types/models.mjs","/node_modules/@aws-amplify/auth/dist/esm/utils/openAuthSession.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/generateCodeVerifier.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/generateState.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/cancelOAuthFlow.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/fetchUserAttributes.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/internal/fetchUserAttributes.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/signOut.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/handleOAuthSignOut.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/completeOAuthSignOut.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/utils/oauth/oAuthSignOutRedirect.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createRevokeTokenClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createGlobalSignOutClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/sendUserAttributeVerificationCode.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createGetUserAttributeVerificationCodeClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/deleteUserAttributes.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createDeleteUserAttributesClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/deleteUser.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createDeleteUserClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/shared/serde/createEmptyResponseDeserializer.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/rememberDevice.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createUpdateDeviceStatusClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/forgetDevice.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createForgetDeviceClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/apis/fetchDevices.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createListDevicesClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/index.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/IdentityIdStore.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/types.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/credentialsProvider.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/IdentityIdProvider.mjs","/node_modules/@aws-amplify/auth/dist/esm/providers/cognito/credentialsProvider/utils.mjs","/node_modules/@tanstack/react-query/build/legacy/index.js","/node_modules/@tanstack/query-core/build/legacy/index.js","/node_modules/@tanstack/query-core/build/legacy/chunk-WPSKCR32.js","/node_modules/@tanstack/query-core/build/legacy/retryer.js","/node_modules/@tanstack/query-core/build/legacy/focusManager.js","/node_modules/@tanstack/query-core/build/legacy/subscribable.js","/node_modules/@tanstack/query-core/build/legacy/utils.js","/node_modules/@tanstack/query-core/build/legacy/onlineManager.js","/node_modules/@tanstack/query-core/build/legacy/queryCache.js","/node_modules/@tanstack/query-core/build/legacy/query.js","/node_modules/@tanstack/query-core/build/legacy/notifyManager.js","/node_modules/@tanstack/query-core/build/legacy/removable.js","/node_modules/@tanstack/query-core/build/legacy/queryClient.js","/node_modules/@tanstack/query-core/build/legacy/mutationCache.js","/node_modules/@tanstack/query-core/build/legacy/mutation.js","/node_modules/@tanstack/query-core/build/legacy/infiniteQueryBehavior.js","/node_modules/@tanstack/query-core/build/legacy/queryObserver.js","/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js","/node_modules/@tanstack/query-core/build/legacy/queriesObserver.js","/node_modules/@tanstack/query-core/build/legacy/infiniteQueryObserver.js","/node_modules/@tanstack/query-core/build/legacy/mutationObserver.js","/node_modules/@tanstack/query-core/build/legacy/hydration.js","/node_modules/@tanstack/query-core/build/legacy/types.js","/node_modules/@tanstack/react-query/build/legacy/types.js","/node_modules/@tanstack/react-query/build/legacy/useQueries.js","/node_modules/@tanstack/react-query/build/legacy/QueryClientProvider.js","/node_modules/@tanstack/react-query/build/legacy/isRestoring.js","/node_modules/@tanstack/react-query/build/legacy/QueryErrorResetBoundary.js","/node_modules/@tanstack/react-query/build/legacy/errorBoundaryUtils.js","/node_modules/@tanstack/react-query/build/legacy/utils.js","/node_modules/@tanstack/react-query/build/legacy/suspense.js","/node_modules/@tanstack/react-query/build/legacy/useQuery.js","/node_modules/@tanstack/react-query/build/legacy/useBaseQuery.js","/node_modules/@tanstack/react-query/build/legacy/useSuspenseQuery.js","/node_modules/@tanstack/react-query/build/legacy/useSuspenseInfiniteQuery.js","/node_modules/@tanstack/react-query/build/legacy/useSuspenseQueries.js","/node_modules/@tanstack/react-query/build/legacy/queryOptions.js","/node_modules/@tanstack/react-query/build/legacy/infiniteQueryOptions.js","/node_modules/@tanstack/react-query/build/legacy/HydrationBoundary.js","/node_modules/@tanstack/react-query/build/legacy/useIsFetching.js","/node_modules/@tanstack/react-query/build/legacy/useMutationState.js","/node_modules/@tanstack/react-query/build/legacy/useMutation.js","/node_modules/@tanstack/react-query/build/legacy/useInfiniteQuery.js","/node_modules/@react-navigation/native/lib/module/index.js","/node_modules/@react-navigation/native/lib/module/Link.js","/node_modules/react-native-web/dist/exports/Text/index.js","/node_modules/@react-navigation/native/lib/module/useLinkProps.js","/node_modules/@react-navigation/core/lib/module/index.js","/node_modules/@react-navigation/core/lib/module/BaseNavigationContainer.js","/node_modules/@react-navigation/routers/lib/module/index.js","/node_modules/@react-navigation/routers/lib/module/CommonActions.js","/node_modules/@react-navigation/routers/lib/module/BaseRouter.js","/node_modules/nanoid/non-secure/index.js","/node_modules/@react-navigation/routers/lib/module/DrawerRouter.js","/node_modules/@react-navigation/routers/lib/module/TabRouter.js","/node_modules/@react-navigation/routers/lib/module/StackRouter.js","/node_modules/@react-navigation/routers/lib/module/types.js","/node_modules/@react-navigation/core/lib/module/checkDuplicateRouteNames.js","/node_modules/@react-navigation/core/lib/module/checkSerializable.js","/node_modules/@react-navigation/core/lib/module/createNavigationContainerRef.js","/node_modules/@react-navigation/core/lib/module/EnsureSingleNavigator.js","/node_modules/@react-navigation/core/lib/module/findFocusedRoute.js","/node_modules/@react-navigation/core/lib/module/NavigationBuilderContext.js","/node_modules/@react-navigation/core/lib/module/NavigationContainerRefContext.js","/node_modules/@react-navigation/core/lib/module/NavigationContext.js","/node_modules/@react-navigation/core/lib/module/NavigationRouteContext.js","/node_modules/@react-navigation/core/lib/module/NavigationStateContext.js","/node_modules/@react-navigation/core/lib/module/UnhandledActionContext.js","/node_modules/@react-navigation/core/lib/module/useChildListeners.js","/node_modules/@react-navigation/core/lib/module/useEventEmitter.js","/node_modules/@react-navigation/core/lib/module/useKeyedChildListeners.js","/node_modules/@react-navigation/core/lib/module/useOptionsGetters.js","/node_modules/@react-navigation/core/lib/module/useScheduleUpdate.js","/node_modules/@react-navigation/core/lib/module/useSyncState.js","/node_modules/@react-navigation/core/lib/module/createNavigatorFactory.js","/node_modules/@react-navigation/core/lib/module/Group.js","/node_modules/@react-navigation/core/lib/module/Screen.js","/node_modules/@react-navigation/core/lib/module/CurrentRenderContext.js","/node_modules/@react-navigation/core/lib/module/getActionFromState.js","/node_modules/@react-navigation/core/lib/module/getFocusedRouteNameFromRoute.js","/node_modules/@react-navigation/core/lib/module/useRouteCache.js","/node_modules/@react-navigation/core/lib/module/getPathFromState.js","/node_modules/query-string/index.js","/node_modules/strict-uri-encode/index.js","/node_modules/decode-uri-component/index.js","/node_modules/split-on-first/index.js","/node_modules/filter-obj/index.js","/node_modules/@react-navigation/core/lib/module/fromEntries.js","/node_modules/@react-navigation/core/lib/module/validatePathConfig.js","/node_modules/@react-navigation/core/lib/module/getStateFromPath.js","/node_modules/escape-string-regexp/index.js","/node_modules/@react-navigation/core/lib/module/NavigationHelpersContext.js","/node_modules/@react-navigation/core/lib/module/PreventRemoveContext.js","/node_modules/@react-navigation/core/lib/module/PreventRemoveProvider.js","/node_modules/use-latest-callback/lib/src/index.js","/node_modules/use-latest-callback/lib/src/useIsomorphicLayoutEffect.js","/node_modules/@react-navigation/core/lib/module/types.js","/node_modules/@react-navigation/core/lib/module/useFocusEffect.js","/node_modules/@react-navigation/core/lib/module/useNavigation.js","/node_modules/@react-navigation/core/lib/module/useIsFocused.js","/node_modules/@react-navigation/core/lib/module/useNavigationBuilder.js","/node_modules/react-is/index.js","/node_modules/react-is/cjs/react-is.production.min.js","/node_modules/@react-navigation/core/lib/module/isArrayEqual.js","/node_modules/@react-navigation/core/lib/module/isRecordEqual.js","/node_modules/@react-navigation/core/lib/module/useComponent.js","/node_modules/@react-navigation/core/lib/module/useCurrentRender.js","/node_modules/@react-navigation/core/lib/module/useDescriptors.js","/node_modules/@react-navigation/core/lib/module/SceneView.js","/node_modules/@react-navigation/core/lib/module/StaticContainer.js","/node_modules/@react-navigation/core/lib/module/useNavigationCache.js","/node_modules/@react-navigation/core/lib/module/useFocusedListenersChildrenAdapter.js","/node_modules/@react-navigation/core/lib/module/useFocusEvents.js","/node_modules/@react-navigation/core/lib/module/useNavigationHelpers.js","/node_modules/@react-navigation/core/lib/module/useOnAction.js","/node_modules/@react-navigation/core/lib/module/useOnPreventRemove.js","/node_modules/@react-navigation/core/lib/module/useOnGetState.js","/node_modules/@react-navigation/core/lib/module/useOnRouteFocus.js","/node_modules/@react-navigation/core/lib/module/useRegisterNavigator.js","/node_modules/@react-navigation/core/lib/module/useNavigationContainerRef.js","/node_modules/@react-navigation/core/lib/module/useNavigationState.js","/node_modules/@react-navigation/core/lib/module/usePreventRemove.js","/node_modules/@react-navigation/core/lib/module/usePreventRemoveContext.js","/node_modules/@react-navigation/core/lib/module/useRoute.js","/node_modules/@react-navigation/native/lib/module/LinkingContext.js","/node_modules/@react-navigation/native/lib/module/useLinkTo.js","/node_modules/@react-navigation/native/lib/module/NavigationContainer.js","/node_modules/@react-navigation/native/lib/module/theming/DefaultTheme.js","/node_modules/@react-navigation/native/lib/module/theming/ThemeProvider.js","/node_modules/@react-navigation/native/lib/module/theming/ThemeContext.js","/node_modules/@react-navigation/native/lib/module/useBackButton.js","/node_modules/@react-navigation/native/lib/module/useDocumentTitle.js","/node_modules/@react-navigation/native/lib/module/useLinking.js","/node_modules/fast-deep-equal/index.js","/node_modules/@react-navigation/native/lib/module/createMemoryHistory.js","/node_modules/@react-navigation/native/lib/module/ServerContext.js","/node_modules/@react-navigation/native/lib/module/useThenable.js","/node_modules/@react-navigation/native/lib/module/ServerContainer.js","/node_modules/@react-navigation/native/lib/module/theming/DarkTheme.js","/node_modules/@react-navigation/native/lib/module/theming/useTheme.js","/node_modules/@react-navigation/native/lib/module/types.js","/node_modules/@react-navigation/native/lib/module/useLinkBuilder.js","/node_modules/@react-navigation/native/lib/module/useScrollToTop.js","/src/components/notifications/NotificationsProvider.tsx","/node_modules/react-native-web/dist/exports/Animated/index.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/Animated.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/components/AnimatedFlatList.js","/node_modules/react-native-web/dist/exports/FlatList/index.js","/node_modules/react-native-web/dist/vendor/react-native/FlatList/index.js","/node_modules/react-native-web/dist/vendor/react-native/deepDiffer/index.js","/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/index.js","/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js","/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","/node_modules/@babel/runtime/helpers/arrayLikeToArray.js","/node_modules/react-native-web/dist/exports/RefreshControl/index.js","/node_modules/react-native-web/dist/exports/ScrollView/index.js","/node_modules/react-native-web/dist/modules/dismissKeyboard/index.js","/node_modules/react-native-web/dist/modules/TextInputState/index.js","/node_modules/react-native-web/dist/exports/ScrollView/ScrollViewBase.js","/node_modules/fbjs/lib/warning.js","/node_modules/fbjs/lib/emptyFunction.js","/node_modules/react-native-web/dist/exports/findNodeHandle/index.js","/node_modules/react-native-web/dist/vendor/react-native/Batchinator/index.js","/node_modules/react-native-web/dist/exports/InteractionManager/index.js","/node_modules/react-native-web/dist/exports/InteractionManager/TaskQueue.js","/node_modules/react-native-web/dist/modules/requestIdleCallback/index.js","/node_modules/react-native-web/dist/vendor/react-native/Utilities/clamp.js","/node_modules/react-native-web/dist/vendor/react-native/infoLog/index.js","/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/CellRenderMask.js","/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/ChildListCollection.js","/node_modules/react-native-web/dist/vendor/react-native/FillRateHelper/index.js","/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/StateSafePureComponent.js","/node_modules/react-native-web/dist/vendor/react-native/ViewabilityHelper/index.js","/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/VirtualizedListCellRenderer.js","/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/VirtualizedListContext.js","/node_modules/react-native-web/dist/vendor/react-native/VirtualizeUtils/index.js","/node_modules/nullthrows/nullthrows.js","/node_modules/react-native-web/node_modules/memoize-one/dist/memoize-one.esm.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/createAnimatedComponent.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/useAnimatedProps.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedProps.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/AnimatedEvent.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedValue.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedInterpolation.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedWithChildren.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedNode.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/NativeAnimatedHelper.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/NativeAnimatedModule.js","/node_modules/react-native-web/dist/vendor/react-native/TurboModule/TurboModuleRegistry.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/NativeAnimatedTurboModule.js","/node_modules/react-native-web/dist/vendor/react-native/Utilities/Platform.js","/node_modules/react-native-web/dist/vendor/react-native/ReactNative/ReactNativeFeatureFlags.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedStyle.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedTransform.js","/node_modules/react-native-web/dist/vendor/react-native/Utilities/useRefEffect.js","/node_modules/react-native-web/dist/vendor/react-native/Utilities/useMergeRefs.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/components/AnimatedImage.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/components/AnimatedScrollView.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/components/AnimatedSectionList.js","/node_modules/react-native-web/dist/exports/SectionList/index.js","/node_modules/react-native-web/dist/vendor/react-native/SectionList/index.js","/node_modules/react-native-web/dist/vendor/react-native/VirtualizedSectionList/index.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/components/AnimatedText.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/components/AnimatedView.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/AnimatedMock.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/AnimatedImplementation.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedAddition.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedDiffClamp.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedDivision.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedModulo.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedMultiplication.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedSubtraction.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedTracking.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedValueXY.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/animations/DecayAnimation.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/animations/Animation.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/animations/SpringAnimation.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/SpringConfig.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedColor.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/animations/TimingAnimation.js","/node_modules/react-native-web/dist/exports/Easing/index.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/Easing.js","/node_modules/react-native-web/dist/vendor/react-native/Animated/bezier.js","/src/components/v2BaseComponents/Text.tsx","/src/utils/theme.ts","/src/utils/getBrowser.ts","/src/components/v2BaseComponents/FixedPositionPortalContainer/index.tsx","/node_modules/@gorhom/portal/lib/module/index.js","/node_modules/@gorhom/portal/lib/module/components/portal/Portal.js","/node_modules/@gorhom/portal/lib/module/hooks/usePortal.js","/node_modules/@gorhom/portal/lib/module/state/constants.js","/node_modules/@gorhom/portal/lib/module/contexts/portal.js","/node_modules/@gorhom/portal/lib/module/components/portalHost/PortalHost.js","/node_modules/@gorhom/portal/lib/module/hooks/usePortalState.js","/node_modules/@gorhom/portal/lib/module/components/portalProvider/PortalProvider.js","/node_modules/@gorhom/portal/lib/module/state/reducer.js","/node_modules/@gorhom/portal/lib/module/utilities/logger.js","/src/components/AppNavigator/TabNavigation/constants.ts","/src/components/v2BaseComponents/ActionButtonLayout/ActionButtonLayout.tsx","/src/components/v2BaseComponents/Divider/index.tsx","/src/components/v2BaseComponents/Stack/index.tsx","/src/utils/spacing.ts","/src/components/v2BaseComponents/Form/ForcedStackFieldsContext.ts","/src/components/v2BaseComponents/Button/index.tsx","/node_modules/react-native-web/dist/exports/Pressable/index.js","/node_modules/react-native-web/dist/modules/useHover/index.js","/node_modules/react-native-web/dist/modules/modality/index.js","/node_modules/react-native-web/dist/modules/addEventListener/index.js","/node_modules/react-native-web/dist/modules/useEvent/index.js","/node_modules/react-native-web/dist/modules/usePressEvents/index.js","/node_modules/react-native-web/dist/modules/usePressEvents/PressResponder.js","/src/components/v2BaseComponents/Icon/index.tsx","/node_modules/@lifeomic/chromicons-native/dist/chromicons.esm.js","/node_modules/react-native-svg/lib/module/index.js","/node_modules/react-native-svg/lib/module/ReactNativeSVG.web.js","/node_modules/react-native-svg/lib/module/xml.js","/node_modules/react-native-svg/lib/module/utils/fetchData.js","/node_modules/buffer/index.js","/node_modules/base64-js/index.js","/node_modules/ieee754/index.js","/node_modules/react-native-svg/lib/module/xmlTags.js","/node_modules/react-native-svg/lib/module/elements.web.js","/node_modules/react-native-svg/lib/module/web/utils/index.js","/node_modules/react-native-svg/lib/module/lib/extract/extractTransform.js","/node_modules/react-native-svg/lib/module/lib/Matrix2D.js","/node_modules/react-native-svg/lib/module/lib/extract/transform.js","/node_modules/react-native-svg/lib/module/lib/extract/transformToRn.js","/node_modules/react-native-svg/lib/module/web/WebShape.js","/node_modules/react-native-svg/lib/module/web/utils/prepare.js","/node_modules/react-native-svg/lib/module/lib/resolve.js","/node_modules/react-native-svg/lib/module/lib/resolveAssetUri.js","/node_modules/react-native-svg/lib/module/web/utils/convertInt32Color.js","/node_modules/react-native-svg/lib/module/lib/SvgTouchableMixin.js","/node_modules/react-native-web/dist/exports/Touchable/index.js","/node_modules/react-native-web/dist/exports/Touchable/BoundingDimensions.js","/node_modules/react-native-web/dist/vendor/react-native/PooledClass/index.js","/node_modules/react-native-web/dist/exports/Touchable/Position.js","/node_modules/react-native-svg/lib/module/deprecated.js","/node_modules/react-native-svg/lib/module/lib/extract/types.js","/src/components/v2BaseComponents/CustomIcons/index.tsx","/src/components/v2BaseComponents/CustomIcons/AIChat.tsx","/src/components/v2BaseComponents/CustomIcons/utils.ts","/src/components/v2BaseComponents/CustomIcons/Allergies.tsx","/src/components/v2BaseComponents/CustomIcons/CareTeam.tsx","/src/components/v2BaseComponents/CustomIcons/Chat.tsx","/src/components/v2BaseComponents/CustomIcons/Conditions.tsx","/src/components/v2BaseComponents/CustomIcons/Documents.tsx","/src/components/v2BaseComponents/CustomIcons/Imaging.tsx","/src/components/v2BaseComponents/CustomIcons/Labs.tsx","/src/components/v2BaseComponents/CustomIcons/Medications.tsx","/src/components/v2BaseComponents/CustomIcons/Procedures.tsx","/src/components/v2BaseComponents/CustomIcons/ProfileInfo.tsx","/src/components/v2BaseComponents/CustomIcons/Reports.tsx","/src/components/v2BaseComponents/CustomIcons/Vaccinations.tsx","/src/components/v2BaseComponents/CustomIcons/Visits.tsx","/src/components/v2BaseComponents/CustomIcons/AISparkle.tsx","/src/components/v2BaseComponents/CustomIcons/UserCircle.tsx","/src/components/v2BaseComponents/CustomIcons/Play.tsx","/src/components/v2BaseComponents/CustomIcons/Pause.tsx","/src/components/v2BaseComponents/CustomIcons/Portals.tsx","/src/components/v2BaseComponents/CustomIcons/MedicationsFilled.tsx","/src/components/v2BaseComponents/CustomIcons/CareTeamFilled.tsx","/src/components/v2BaseComponents/CustomIcons/ConditionsFilled.tsx","/src/components/v2BaseComponents/CustomIcons/FilesFilled.tsx","/src/components/v2BaseComponents/CustomIcons/FolderFilled.tsx","/src/components/v2BaseComponents/CustomIcons/LabsFilled.tsx","/src/components/v2BaseComponents/CustomIcons/NotesFilled.tsx","/src/components/v2BaseComponents/CustomIcons/ProceduresFilled.tsx","/src/components/v2BaseComponents/CustomIcons/ProfileInfoFilled.tsx","/src/components/v2BaseComponents/CustomIcons/VaccinationsFilled.tsx","/src/components/v2BaseComponents/CustomIcons/VisitsFilled.tsx","/src/components/v2BaseComponents/CustomIcons/AllergiesFilled.tsx","/src/hooks/useInteractionStateStyles.tsx","/src/components/v2BaseComponents/HoverDetectionContainer/index.tsx","/src/hooks/useToggle.ts","/src/components/v2BaseComponents/IsDisabledProvider/index.tsx","/node_modules/ts-is-present/lib/index.js","/src/components/v2BaseComponents/Button/AppleLogo.tsx","/src/components/v2BaseComponents/Button/GoogleLogo.tsx","/src/utils/intl.ts","/node_modules/aws-amplify/dist/esm/utils/index.mjs","/src/utils/hexToRGBA.ts","/src/components/v2BaseComponents/Menu/index.tsx","/src/components/v2BaseComponents/PressableDynamicOpacity/index.tsx","/src/components/v2BaseComponents/Popover.tsx","/src/hooks/useElementPosition.ts","/src/hooks/useForceUpdate.ts","/src/utils/batchMeasureViewRef.ts","/node_modules/lodash/throttle.js","/node_modules/lodash/debounce.js","/node_modules/lodash/isObject.js","/node_modules/lodash/now.js","/node_modules/lodash/_root.js","/node_modules/lodash/_freeGlobal.js","/node_modules/lodash/toNumber.js","/node_modules/lodash/_baseTrim.js","/node_modules/lodash/_trimmedEndIndex.js","/node_modules/lodash/isSymbol.js","/node_modules/lodash/_baseGetTag.js","/node_modules/lodash/_Symbol.js","/node_modules/lodash/_getRawTag.js","/node_modules/lodash/_objectToString.js","/node_modules/lodash/isObjectLike.js","/src/hooks/useRerenderOnInterval.ts","/src/components/v2BaseComponents/LayoutChangeEventProvider/index.tsx","/node_modules/react-native-safe-area-context/lib/module/index.js","/node_modules/react-native-safe-area-context/lib/module/SafeAreaContext.js","/node_modules/react-native-safe-area-context/lib/module/NativeSafeAreaProvider.web.js","/node_modules/react-native-safe-area-context/lib/module/SafeAreaView.web.js","/node_modules/react-native-safe-area-context/lib/module/InitialWindow.js","/node_modules/react-native-safe-area-context/lib/module/SafeArea.types.js","/src/components/shared/KeyboardRestrictedView.tsx","/node_modules/react-native-web/dist/exports/Keyboard/index.js","/src/components/v2BaseComponents/MainContentContainer/index.tsx","/src/components/v2BaseComponents/NestedScrollViewPortal/index.tsx","/src/components/v2BaseComponents/MaxWidthRestrictedContent.tsx","/src/components/v2BaseComponents/TabView/hooks.tsx","/src/hooks/usePrevious.ts","/node_modules/lodash/isEqual.js","/node_modules/lodash/_baseIsEqual.js","/node_modules/lodash/_baseIsEqualDeep.js","/node_modules/lodash/_Stack.js","/node_modules/lodash/_ListCache.js","/node_modules/lodash/_listCacheClear.js","/node_modules/lodash/_listCacheDelete.js","/node_modules/lodash/_assocIndexOf.js","/node_modules/lodash/eq.js","/node_modules/lodash/_listCacheGet.js","/node_modules/lodash/_listCacheHas.js","/node_modules/lodash/_listCacheSet.js","/node_modules/lodash/_stackClear.js","/node_modules/lodash/_stackDelete.js","/node_modules/lodash/_stackGet.js","/node_modules/lodash/_stackHas.js","/node_modules/lodash/_stackSet.js","/node_modules/lodash/_Map.js","/node_modules/lodash/_getNative.js","/node_modules/lodash/_baseIsNative.js","/node_modules/lodash/isFunction.js","/node_modules/lodash/_isMasked.js","/node_modules/lodash/_coreJsData.js","/node_modules/lodash/_toSource.js","/node_modules/lodash/_getValue.js","/node_modules/lodash/_MapCache.js","/node_modules/lodash/_mapCacheClear.js","/node_modules/lodash/_Hash.js","/node_modules/lodash/_hashClear.js","/node_modules/lodash/_nativeCreate.js","/node_modules/lodash/_hashDelete.js","/node_modules/lodash/_hashGet.js","/node_modules/lodash/_hashHas.js","/node_modules/lodash/_hashSet.js","/node_modules/lodash/_mapCacheDelete.js","/node_modules/lodash/_getMapData.js","/node_modules/lodash/_isKeyable.js","/node_modules/lodash/_mapCacheGet.js","/node_modules/lodash/_mapCacheHas.js","/node_modules/lodash/_mapCacheSet.js","/node_modules/lodash/_equalArrays.js","/node_modules/lodash/_SetCache.js","/node_modules/lodash/_setCacheAdd.js","/node_modules/lodash/_setCacheHas.js","/node_modules/lodash/_arraySome.js","/node_modules/lodash/_cacheHas.js","/node_modules/lodash/_equalByTag.js","/node_modules/lodash/_Uint8Array.js","/node_modules/lodash/_mapToArray.js","/node_modules/lodash/_setToArray.js","/node_modules/lodash/_equalObjects.js","/node_modules/lodash/_getAllKeys.js","/node_modules/lodash/_baseGetAllKeys.js","/node_modules/lodash/_arrayPush.js","/node_modules/lodash/isArray.js","/node_modules/lodash/_getSymbols.js","/node_modules/lodash/_arrayFilter.js","/node_modules/lodash/stubArray.js","/node_modules/lodash/keys.js","/node_modules/lodash/_arrayLikeKeys.js","/node_modules/lodash/_baseTimes.js","/node_modules/lodash/isArguments.js","/node_modules/lodash/_baseIsArguments.js","/node_modules/lodash/isBuffer.js","/node_modules/lodash/stubFalse.js","/node_modules/lodash/_isIndex.js","/node_modules/lodash/isTypedArray.js","/node_modules/lodash/_baseIsTypedArray.js","/node_modules/lodash/isLength.js","/node_modules/lodash/_baseUnary.js","/node_modules/lodash/_nodeUtil.js","/node_modules/lodash/_baseKeys.js","/node_modules/lodash/_isPrototype.js","/node_modules/lodash/_nativeKeys.js","/node_modules/lodash/_overArg.js","/node_modules/lodash/isArrayLike.js","/node_modules/lodash/_getTag.js","/node_modules/lodash/_DataView.js","/node_modules/lodash/_Promise.js","/node_modules/lodash/_Set.js","/node_modules/lodash/_WeakMap.js","/src/components/shared/Scroll/index.ts","/src/components/shared/Scroll/PRFlatList.tsx","/src/components/shared/Scroll/ScrollContextProvider.tsx","/src/components/shared/Scroll/ScrollContext.tsx","/src/components/shared/Scroll/PRScrollView.tsx","/src/components/shared/Scroll/hooks.ts","/src/components/AppNavigator/RootNavigation.tsx","/node_modules/@react-navigation/native-stack/lib/module/index.js","/node_modules/@react-navigation/native-stack/lib/module/navigators/createNativeStackNavigator.js","/node_modules/@react-navigation/native-stack/lib/module/views/NativeStackView.js","/node_modules/@react-navigation/elements/lib/module/index.js","/node_modules/@react-navigation/elements/lib/module/Background.js","/node_modules/@react-navigation/elements/lib/module/Header/getDefaultHeaderHeight.js","/node_modules/@react-navigation/elements/lib/module/Header/getHeaderTitle.js","/node_modules/@react-navigation/elements/lib/module/Header/Header.js","/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackground.js","/node_modules/@react-navigation/elements/lib/module/Header/HeaderShownContext.js","/node_modules/@react-navigation/elements/lib/module/getNamedContext.js","/node_modules/@react-navigation/elements/lib/module/Header/HeaderTitle.js","/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackButton.js","/node_modules/react-native-web/dist/exports/I18nManager/index.js","/node_modules/@react-navigation/elements/lib/module/MaskedView.js","/node_modules/@react-navigation/elements/lib/module/PlatformPressable.js","/node_modules/@react-navigation/elements/lib/module/assets/back-icon.png","/node_modules/@react-navigation/elements/lib/module/assets/back-icon-mask.png","/node_modules/@react-navigation/elements/lib/module/Header/HeaderBackContext.js","/node_modules/@react-navigation/elements/lib/module/Header/HeaderHeightContext.js","/node_modules/@react-navigation/elements/lib/module/Header/useHeaderHeight.js","/node_modules/@react-navigation/elements/lib/module/MissingIcon.js","/node_modules/@react-navigation/elements/lib/module/ResourceSavingView.js","/node_modules/@react-navigation/elements/lib/module/SafeAreaProviderCompat.js","/node_modules/@react-navigation/elements/lib/module/Screen.js","/node_modules/@react-navigation/elements/lib/module/types.js","/src/utils/appNavigationNames.tsx","/src/hooks/api/useMedicalProfile.ts","/src/utils/urls.ts","/src/hooks/useNotify.ts","/src/hooks/useAvatar.ts","/src/utils/blobBase64Conversions.ts","/src/utils/api.ts","/node_modules/aws-amplify/dist/esm/api/index.mjs","/node_modules/@aws-amplify/api/dist/esm/index.mjs","/node_modules/@aws-amplify/api/dist/esm/API.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/internals/index.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/internals/InternalGraphQLAPI.mjs","/node_modules/graphql/index.mjs","/node_modules/graphql/version.mjs","/node_modules/graphql/graphql.mjs","/node_modules/graphql/jsutils/isPromise.mjs","/node_modules/graphql/language/parser.mjs","/node_modules/graphql/error/syntaxError.mjs","/node_modules/graphql/error/GraphQLError.mjs","/node_modules/graphql/jsutils/isObjectLike.mjs","/node_modules/graphql/polyfills/symbols.mjs","/node_modules/graphql/language/location.mjs","/node_modules/graphql/language/printLocation.mjs","/node_modules/graphql/language/kinds.mjs","/node_modules/graphql/language/ast.mjs","/node_modules/graphql/jsutils/defineInspect.mjs","/node_modules/graphql/jsutils/invariant.mjs","/node_modules/graphql/jsutils/nodejsCustomInspectSymbol.mjs","/node_modules/graphql/language/tokenKind.mjs","/node_modules/graphql/language/source.mjs","/node_modules/graphql/jsutils/inspect.mjs","/node_modules/graphql/jsutils/devAssert.mjs","/node_modules/graphql/jsutils/instanceOf.mjs","/node_modules/graphql/language/directiveLocation.mjs","/node_modules/graphql/language/lexer.mjs","/node_modules/graphql/language/blockString.mjs","/node_modules/graphql/validation/validate.mjs","/node_modules/graphql/language/visitor.mjs","/node_modules/graphql/type/validate.mjs","/node_modules/graphql/polyfills/find.mjs","/node_modules/graphql/polyfills/objectValues.mjs","/node_modules/graphql/error/locatedError.mjs","/node_modules/graphql/utilities/assertValidName.mjs","/node_modules/graphql/utilities/typeComparators.mjs","/node_modules/graphql/type/definition.mjs","/node_modules/graphql/polyfills/objectEntries.mjs","/node_modules/graphql/jsutils/keyMap.mjs","/node_modules/graphql/jsutils/mapValue.mjs","/node_modules/graphql/jsutils/toObjMap.mjs","/node_modules/graphql/jsutils/keyValMap.mjs","/node_modules/graphql/jsutils/didYouMean.mjs","/node_modules/graphql/jsutils/identityFunc.mjs","/node_modules/graphql/jsutils/suggestionList.mjs","/node_modules/graphql/jsutils/naturalCompare.mjs","/node_modules/graphql/language/printer.mjs","/node_modules/graphql/utilities/valueFromASTUntyped.mjs","/node_modules/graphql/type/schema.mjs","/node_modules/graphql/polyfills/arrayFrom.mjs","/node_modules/graphql/type/introspection.mjs","/node_modules/graphql/utilities/astFromValue.mjs","/node_modules/graphql/polyfills/isFinite.mjs","/node_modules/graphql/jsutils/safeArrayFrom.mjs","/node_modules/graphql/type/scalars.mjs","/node_modules/graphql/polyfills/isInteger.mjs","/node_modules/graphql/type/directives.mjs","/node_modules/graphql/utilities/TypeInfo.mjs","/node_modules/graphql/utilities/typeFromAST.mjs","/node_modules/graphql/validation/specifiedRules.mjs","/node_modules/graphql/validation/rules/ExecutableDefinitionsRule.mjs","/node_modules/graphql/language/predicates.mjs","/node_modules/graphql/validation/rules/UniqueOperationNamesRule.mjs","/node_modules/graphql/validation/rules/LoneAnonymousOperationRule.mjs","/node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.mjs","/node_modules/graphql/validation/rules/KnownTypeNamesRule.mjs","/node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.mjs","/node_modules/graphql/validation/rules/VariablesAreInputTypesRule.mjs","/node_modules/graphql/validation/rules/ScalarLeafsRule.mjs","/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.mjs","/node_modules/graphql/validation/rules/UniqueFragmentNamesRule.mjs","/node_modules/graphql/validation/rules/KnownFragmentNamesRule.mjs","/node_modules/graphql/validation/rules/NoUnusedFragmentsRule.mjs","/node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.mjs","/node_modules/graphql/validation/rules/NoFragmentCyclesRule.mjs","/node_modules/graphql/validation/rules/UniqueVariableNamesRule.mjs","/node_modules/graphql/validation/rules/NoUndefinedVariablesRule.mjs","/node_modules/graphql/validation/rules/NoUnusedVariablesRule.mjs","/node_modules/graphql/validation/rules/KnownDirectivesRule.mjs","/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs","/node_modules/graphql/validation/rules/KnownArgumentNamesRule.mjs","/node_modules/graphql/validation/rules/UniqueArgumentNamesRule.mjs","/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs","/node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.mjs","/node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.mjs","/node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.mjs","/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.mjs","/node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.mjs","/node_modules/graphql/validation/rules/UniqueOperationTypesRule.mjs","/node_modules/graphql/validation/rules/UniqueTypeNamesRule.mjs","/node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.mjs","/node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.mjs","/node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.mjs","/node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.mjs","/node_modules/graphql/validation/ValidationContext.mjs","/node_modules/graphql/execution/execute.mjs","/node_modules/graphql/jsutils/memoize3.mjs","/node_modules/graphql/jsutils/promiseReduce.mjs","/node_modules/graphql/jsutils/promiseForObject.mjs","/node_modules/graphql/jsutils/Path.mjs","/node_modules/graphql/utilities/getOperationRootType.mjs","/node_modules/graphql/execution/values.mjs","/node_modules/graphql/jsutils/printPathArray.mjs","/node_modules/graphql/utilities/valueFromAST.mjs","/node_modules/graphql/utilities/coerceInputValue.mjs","/node_modules/graphql/type/index.mjs","/node_modules/graphql/language/index.mjs","/node_modules/graphql/execution/index.mjs","/node_modules/graphql/subscription/index.mjs","/node_modules/graphql/subscription/subscribe.mjs","/node_modules/graphql/jsutils/isAsyncIterable.mjs","/node_modules/graphql/subscription/mapAsyncIterator.mjs","/node_modules/graphql/validation/index.mjs","/node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.mjs","/node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.mjs","/node_modules/graphql/error/index.mjs","/node_modules/graphql/error/formatError.mjs","/node_modules/graphql/utilities/index.mjs","/node_modules/graphql/utilities/getIntrospectionQuery.mjs","/node_modules/graphql/utilities/getOperationAST.mjs","/node_modules/graphql/utilities/introspectionFromSchema.mjs","/node_modules/graphql/utilities/buildClientSchema.mjs","/node_modules/graphql/utilities/buildASTSchema.mjs","/node_modules/graphql/utilities/extendSchema.mjs","/node_modules/graphql/utilities/lexicographicSortSchema.mjs","/node_modules/graphql/utilities/printSchema.mjs","/node_modules/graphql/utilities/concatAST.mjs","/node_modules/graphql/utilities/separateOperations.mjs","/node_modules/graphql/utilities/stripIgnoredCharacters.mjs","/node_modules/graphql/utilities/findBreakingChanges.mjs","/node_modules/graphql/utilities/findDeprecatedUsages.mjs","/node_modules/@aws-amplify/api-rest/dist/esm/index.mjs","/node_modules/@aws-amplify/api-rest/dist/esm/errors/CanceledError.mjs","/node_modules/@aws-amplify/api-rest/dist/esm/errors/RestApiError.mjs","/node_modules/@aws-amplify/api-rest/dist/esm/apis/index.mjs","/node_modules/@aws-amplify/api-rest/dist/esm/apis/common/publicApis.mjs","/node_modules/@aws-amplify/api-rest/dist/esm/utils/createCancellableOperation.mjs","/node_modules/@aws-amplify/api-rest/dist/esm/errors/validation.mjs","/node_modules/@aws-amplify/api-rest/dist/esm/utils/serviceError.mjs","/node_modules/@aws-amplify/api-rest/dist/esm/utils/logger.mjs","/node_modules/@aws-amplify/api-rest/dist/esm/utils/parseSigningInfo.mjs","/node_modules/@aws-amplify/api-rest/dist/esm/utils/constants.mjs","/node_modules/@aws-amplify/api-rest/dist/esm/utils/resolveApiUrl.mjs","/node_modules/@aws-amplify/api-rest/dist/esm/errors/assertValidatonError.mjs","/node_modules/@aws-amplify/api-rest/dist/esm/utils/isIamAuthApplicable.mjs","/node_modules/@aws-amplify/api-rest/dist/esm/apis/common/handler.mjs","/node_modules/@aws-amplify/api-rest/dist/esm/utils/resolveHeaders.mjs","/node_modules/@aws-amplify/api-rest/dist/esm/internals/index.mjs","/node_modules/@aws-amplify/api-rest/dist/esm/apis/common/internalPost.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/Providers/AWSAppSyncRealTimeProvider/index.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/Providers/constants.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/Providers/AWSWebSocketProvider/index.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/types/PubSub.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/utils/ConnectionStateMonitor.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/utils/ReachabilityMonitor/index.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/utils/ReconnectionMonitor.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/Providers/AWSWebSocketProvider/appsyncUrl.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/Providers/AWSWebSocketProvider/authHeaders.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/utils/resolveConfig.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/utils/errors/assertValidationError.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/utils/errors/GraphQLApiError.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/utils/errors/validation.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/utils/resolveLibraryOptions.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/utils/errors/repackageAuthError.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/utils/errors/constants.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/types/index.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/utils/errors/createGraphQLResultWithError.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/internals/utils/runtimeTypeGuards/isGraphQLResponseWithErrors.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/internals/graphqlAuth.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/internals/v6.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/GraphQLAPI.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/index.mjs","/node_modules/@aws-amplify/data-schema-types/dist/esm/index.mjs","/node_modules/@aws-amplify/data-schema-types/dist/esm/client/symbol.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/addSchemaToClient.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/generateCustomOperationsProperty.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/operations/custom.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/APIClient.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/utils/resolveOwnerFields.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/utils/stringTransformation.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/utils/selfAwareAsync.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/cancellation.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/operations/utils.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/ai/getCustomUserAgentDetails.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/utils/clientProperties/generateConversationsProperty.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/ai/createCreateConversationFunction.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/operations/get.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/ai/convertItemToConversation.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/ai/createListMessagesFunction.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/operations/list.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/ai/convertItemToConversationMessage.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/ai/conversationMessageDeserializers.mjs","/node_modules/@smithy/util-base64/dist-es/index.js","/node_modules/@smithy/util-base64/dist-es/fromBase64.browser.js","/node_modules/@smithy/util-base64/dist-es/constants.browser.js","/node_modules/@smithy/util-base64/dist-es/toBase64.browser.js","/node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/dist-es/index.js","/node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js","/node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js","/node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/ai/createOnStreamEventFunction.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/ai/conversationStreamEventDeserializers.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/ai/createSendMessageFunction.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/ai/conversationMessageSerializers.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/ai/createGetConversationFunction.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/ai/createListConversationsFunction.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/ai/createDeleteConversationFunction.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/ai/createUpdateConversationFunction.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/utils/clientProperties/generateGenerationsProperty.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/utils/clientProperties/generateEnumsProperty.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/utils/clientProperties/generateModelsProperty.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/operations/indexQuery.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/operations/subscription.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/operations/observeQuery.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/utils/resolvePKFields.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/utils/findIndexByFields.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/clientUtils.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/addSchemaToClientWithInstance.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/utils/runtimeTypeGuards/isApiGraphQLProviderConfig.mjs","/node_modules/@aws-amplify/data-schema/dist/esm/runtime/internals/server/generateModelsProperty.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/internals/generateClient.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/internals/utils/runtimeTypeGuards/isApiGraphQLProviderConfig.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/internals/utils/runtimeTypeGuards/isConfigureEventWithResourceConfig.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/index.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/internals/events/index.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/Providers/AWSAppSyncEventsProvider/index.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/internals/events/appsyncRequest.mjs","/node_modules/@aws-amplify/api-graphql/dist/esm/internals/events/utils.mjs","/src/hooks/api/cacheKeys.ts","/src/utils/queryClient.ts","/src/hooks/useQueryCallbacks.ts","/src/hooks/api/useMedicalProfiles.ts","/src/hooks/useAppType.tsx","/src/hooks/api/useUser.ts","/src/utils/bugsnag.ts","/node_modules/@bugsnag/expo/src/notifier.js","/node_modules/@bugsnag/expo/package.json","/node_modules/expo-constants/build/Constants.js","/node_modules/expo-constants/build/Constants.types.js","/node_modules/expo-constants/build/ExponentConstants.web.js","/node_modules/@bugsnag/core/client.js","/node_modules/@bugsnag/core/config.js","/node_modules/@bugsnag/core/lib/es-utils/filter.js","/node_modules/@bugsnag/core/lib/es-utils/reduce.js","/node_modules/@bugsnag/core/lib/es-utils/keys.js","/node_modules/@bugsnag/core/lib/es-utils/is-array.js","/node_modules/@bugsnag/core/lib/es-utils/includes.js","/node_modules/@bugsnag/core/lib/validators/int-range.js","/node_modules/@bugsnag/core/lib/validators/string-with-length.js","/node_modules/@bugsnag/core/lib/validators/list-of-functions.js","/node_modules/@bugsnag/core/lib/breadcrumb-types.js","/node_modules/@bugsnag/core/event.js","/node_modules/@bugsnag/core/lib/error-stack-parser.js","/node_modules/error-stack-parser/error-stack-parser.js","/node_modules/stackframe/stackframe.js","/node_modules/stack-generator/stack-generator.js","/node_modules/@bugsnag/core/lib/has-stack.js","/node_modules/@bugsnag/core/lib/es-utils/map.js","/node_modules/@bugsnag/core/lib/es-utils/assign.js","/node_modules/@bugsnag/core/lib/metadata-delegate.js","/node_modules/@bugsnag/core/lib/feature-flag-delegate.js","/node_modules/@bugsnag/safe-json-stringify/index.js","/node_modules/@bugsnag/core/lib/iserror.js","/node_modules/iserror/index.js","/node_modules/@bugsnag/core/breadcrumb.js","/node_modules/@bugsnag/core/session.js","/node_modules/@bugsnag/cuid/index.js","/node_modules/@bugsnag/cuid/lib/fingerprint.browser.js","/node_modules/@bugsnag/cuid/lib/pad.js","/node_modules/@bugsnag/cuid/lib/is-cuid.js","/node_modules/@bugsnag/core/lib/callback-runner.js","/node_modules/@bugsnag/core/lib/async-every.js","/node_modules/@bugsnag/core/lib/sync-callback-runner.js","/node_modules/@bugsnag/delivery-expo/delivery.js","/node_modules/@bugsnag/core/lib/json-payload.js","/node_modules/@bugsnag/delivery-expo/queue.js","/node_modules/expo-file-system/src/index.ts","/node_modules/expo-file-system/src/FileSystem.ts","/node_modules/expo-file-system/src/ExponentFileSystem.web.ts","/node_modules/expo-file-system/src/ExponentFileSystemShim.ts","/node_modules/expo-file-system/src/FileSystem.types.ts","/node_modules/@bugsnag/delivery-expo/network-status.js","/node_modules/@react-native-community/netinfo/lib/module/index.js","/node_modules/@react-native-community/netinfo/lib/module/internal/defaultConfiguration.web.js","/node_modules/@react-native-community/netinfo/lib/module/internal/nativeInterface.web.js","/node_modules/@react-native-community/netinfo/lib/module/internal/nativeModule.web.js","/node_modules/@react-native-community/netinfo/lib/module/internal/privateTypes.js","/node_modules/@react-native-community/netinfo/lib/module/internal/types.js","/node_modules/@react-native-community/netinfo/lib/module/internal/state.js","/node_modules/@react-native-community/netinfo/lib/module/internal/internetReachability.js","/node_modules/@bugsnag/delivery-expo/redelivery.js","/node_modules/expo-crypto/build/Crypto.js","/node_modules/expo-crypto/build/Crypto.types.js","/node_modules/expo-crypto/build/ExpoCrypto.web.js","/node_modules/@bugsnag/expo/src/config.js","/node_modules/@bugsnag/plugin-react/dist/bugsnag-react.js","/node_modules/@bugsnag/plugin-react-native-global-error-handler/error-handler.js","/node_modules/@bugsnag/plugin-react-native-unhandled-rejection/rejection-handler.js","/node_modules/promise/setimmediate/rejection-tracking.js","/node_modules/promise/setimmediate/core.js","/node_modules/@bugsnag/plugin-expo-device/device.js","/node_modules/expo-device/build/Device.js","/node_modules/expo-device/build/Device.types.js","/node_modules/expo-device/build/ExpoDevice.web.js","/node_modules/ua-parser-js/src/ua-parser.js","/node_modules/react-native/package.json","/node_modules/expo-secure-store/build/SecureStore.js","/node_modules/expo-secure-store/build/ExpoSecureStore.web.js","/node_modules/expo-secure-store/build/byteCounter.js","/node_modules/@bugsnag/plugin-expo-app/app.js","/node_modules/expo-application/build/Application.js","/node_modules/expo-application/build/Application.types.js","/node_modules/expo-application/build/ExpoApplication.web.js","/node_modules/react-native-web/dist/exports/AppState/index.js","/node_modules/@bugsnag/plugin-console-breadcrumbs/console-breadcrumbs.js","/node_modules/@bugsnag/plugin-network-breadcrumbs/network-breadcrumbs.js","/node_modules/@bugsnag/plugin-expo-app-state-breadcrumbs/app-state.js","/node_modules/@bugsnag/plugin-expo-connectivity-breadcrumbs/connectivity.js","/node_modules/@bugsnag/plugin-react-native-orientation-breadcrumbs/orientation.js","/node_modules/@bugsnag/plugin-browser-session/session.js","/src/utils/initialNavigationUrl.ts","/src/hooks/useIsE2E.ts","/src/hooks/useIsUserLoggedIn.ts","/node_modules/aws-amplify/dist/esm/auth/index.mjs","/node_modules/@aws-amplify/auth/dist/esm/index.mjs","/node_modules/@aws-amplify/auth/dist/esm/client/apis/associateWebAuthnCredential.mjs","/node_modules/@aws-amplify/auth/dist/esm/client/utils/passkey/registerPasskey.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createStartWebAuthnRegistrationClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createCompleteWebAuthnRegistrationClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/client/apis/listWebAuthnCredentials.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/apis/listWebAuthnCredentials.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createListWebAuthnCredentialsClient.mjs","/node_modules/@aws-amplify/auth/dist/esm/client/apis/deleteWebAuthnCredential.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/apis/deleteWebAuthnCredential.mjs","/node_modules/@aws-amplify/auth/dist/esm/foundation/factories/serviceClients/cognitoIdentityProvider/createDeleteWebAuthnCredentialClient.mjs","/src/components/AppNavigator/TabNavigation/index.tsx","/src/hooks/useEnforceLoginStatus.ts","/src/hooks/useHideRootNavigationHeader.ts","/src/components/AppNavigator/TabNavigation/DrawerNavigation/index.tsx","/src/components/AppNavigator/TabNavigation/tabConfig.ts","/src/components/AppNavigator/AccountNavigation.tsx","/src/components/screens/Tabs/Account/index.tsx","/src/components/screens/Tabs/Account/AccountInformationScreen/index.tsx","/src/components/shared/Account/UserAccountInformationScreen/index.tsx","/src/utils/addressToString.ts","/src/components/shared/Account/UserAccountInformationScreen/UserInfoForm.tsx","/node_modules/formik/dist/formik.esm.js","/node_modules/formik/node_modules/deepmerge/dist/es.js","/node_modules/lodash-es/isPlainObject.js","/node_modules/lodash-es/_baseGetTag.js","/node_modules/lodash-es/_Symbol.js","/node_modules/lodash-es/_root.js","/node_modules/lodash-es/_freeGlobal.js","/node_modules/lodash-es/_getRawTag.js","/node_modules/lodash-es/_objectToString.js","/node_modules/lodash-es/_getPrototype.js","/node_modules/lodash-es/_overArg.js","/node_modules/lodash-es/isObjectLike.js","/node_modules/lodash-es/cloneDeep.js","/node_modules/lodash-es/_baseClone.js","/node_modules/lodash-es/_Stack.js","/node_modules/lodash-es/_ListCache.js","/node_modules/lodash-es/_listCacheClear.js","/node_modules/lodash-es/_listCacheDelete.js","/node_modules/lodash-es/_assocIndexOf.js","/node_modules/lodash-es/eq.js","/node_modules/lodash-es/_listCacheGet.js","/node_modules/lodash-es/_listCacheHas.js","/node_modules/lodash-es/_listCacheSet.js","/node_modules/lodash-es/_stackClear.js","/node_modules/lodash-es/_stackDelete.js","/node_modules/lodash-es/_stackGet.js","/node_modules/lodash-es/_stackHas.js","/node_modules/lodash-es/_stackSet.js","/node_modules/lodash-es/_Map.js","/node_modules/lodash-es/_getNative.js","/node_modules/lodash-es/_baseIsNative.js","/node_modules/lodash-es/isFunction.js","/node_modules/lodash-es/isObject.js","/node_modules/lodash-es/_isMasked.js","/node_modules/lodash-es/_coreJsData.js","/node_modules/lodash-es/_toSource.js","/node_modules/lodash-es/_getValue.js","/node_modules/lodash-es/_MapCache.js","/node_modules/lodash-es/_mapCacheClear.js","/node_modules/lodash-es/_Hash.js","/node_modules/lodash-es/_hashClear.js","/node_modules/lodash-es/_nativeCreate.js","/node_modules/lodash-es/_hashDelete.js","/node_modules/lodash-es/_hashGet.js","/node_modules/lodash-es/_hashHas.js","/node_modules/lodash-es/_hashSet.js","/node_modules/lodash-es/_mapCacheDelete.js","/node_modules/lodash-es/_getMapData.js","/node_modules/lodash-es/_isKeyable.js","/node_modules/lodash-es/_mapCacheGet.js","/node_modules/lodash-es/_mapCacheHas.js","/node_modules/lodash-es/_mapCacheSet.js","/node_modules/lodash-es/_arrayEach.js","/node_modules/lodash-es/_assignValue.js","/node_modules/lodash-es/_baseAssignValue.js","/node_modules/lodash-es/_defineProperty.js","/node_modules/lodash-es/_baseAssign.js","/node_modules/lodash-es/_copyObject.js","/node_modules/lodash-es/keys.js","/node_modules/lodash-es/_arrayLikeKeys.js","/node_modules/lodash-es/_baseTimes.js","/node_modules/lodash-es/isArguments.js","/node_modules/lodash-es/_baseIsArguments.js","/node_modules/lodash-es/isArray.js","/node_modules/lodash-es/isBuffer.js","/node_modules/lodash-es/stubFalse.js","/node_modules/lodash-es/_isIndex.js","/node_modules/lodash-es/isTypedArray.js","/node_modules/lodash-es/_baseIsTypedArray.js","/node_modules/lodash-es/isLength.js","/node_modules/lodash-es/_baseUnary.js","/node_modules/lodash-es/_nodeUtil.js","/node_modules/lodash-es/_baseKeys.js","/node_modules/lodash-es/_isPrototype.js","/node_modules/lodash-es/_nativeKeys.js","/node_modules/lodash-es/isArrayLike.js","/node_modules/lodash-es/_baseAssignIn.js","/node_modules/lodash-es/keysIn.js","/node_modules/lodash-es/_baseKeysIn.js","/node_modules/lodash-es/_nativeKeysIn.js","/node_modules/lodash-es/_cloneBuffer.js","/node_modules/lodash-es/_copyArray.js","/node_modules/lodash-es/_copySymbols.js","/node_modules/lodash-es/_getSymbols.js","/node_modules/lodash-es/_arrayFilter.js","/node_modules/lodash-es/stubArray.js","/node_modules/lodash-es/_copySymbolsIn.js","/node_modules/lodash-es/_getSymbolsIn.js","/node_modules/lodash-es/_arrayPush.js","/node_modules/lodash-es/_getAllKeys.js","/node_modules/lodash-es/_baseGetAllKeys.js","/node_modules/lodash-es/_getAllKeysIn.js","/node_modules/lodash-es/_getTag.js","/node_modules/lodash-es/_DataView.js","/node_modules/lodash-es/_Promise.js","/node_modules/lodash-es/_Set.js","/node_modules/lodash-es/_WeakMap.js","/node_modules/lodash-es/_initCloneArray.js","/node_modules/lodash-es/_initCloneByTag.js","/node_modules/lodash-es/_cloneArrayBuffer.js","/node_modules/lodash-es/_Uint8Array.js","/node_modules/lodash-es/_cloneDataView.js","/node_modules/lodash-es/_cloneRegExp.js","/node_modules/lodash-es/_cloneSymbol.js","/node_modules/lodash-es/_cloneTypedArray.js","/node_modules/lodash-es/_initCloneObject.js","/node_modules/lodash-es/_baseCreate.js","/node_modules/lodash-es/isMap.js","/node_modules/lodash-es/_baseIsMap.js","/node_modules/lodash-es/isSet.js","/node_modules/lodash-es/_baseIsSet.js","/node_modules/react-fast-compare/index.js","/node_modules/tiny-warning/dist/tiny-warning.esm.js","/node_modules/lodash-es/clone.js","/node_modules/lodash-es/toPath.js","/node_modules/lodash-es/_arrayMap.js","/node_modules/lodash-es/isSymbol.js","/node_modules/lodash-es/_stringToPath.js","/node_modules/lodash-es/_memoizeCapped.js","/node_modules/lodash-es/memoize.js","/node_modules/lodash-es/_toKey.js","/node_modules/lodash-es/toString.js","/node_modules/lodash-es/_baseToString.js","/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","/src/utils/validators.ts","/node_modules/luxon/build/cjs-browser/luxon.js","/src/utils/validateDateFormat.ts","/src/components/v2BaseComponents/ImagePicker/TempImagePicker/index.tsx","/src/components/v2BaseComponents/ImagePicker/TempImagePicker/useTempImage.ts","/src/utils/processSystemFile.ts","/node_modules/mime/index.js","/node_modules/mime/Mime.js","/node_modules/mime/types/standard.js","/node_modules/mime/types/other.js","/src/components/v2BaseComponents/ImagePicker/utils.ts","/src/utils/loadScript.ts","/src/components/v2BaseComponents/ImagePicker/index.tsx","/node_modules/expo-image-picker/build/ImagePicker.js","/node_modules/expo-image-picker/build/ExponentImagePicker.web.js","/node_modules/expo-image-picker/build/ImagePicker.types.js","/node_modules/expo-image-picker/build/utils.js","/node_modules/expo-document-picker/build/index.js","/node_modules/expo-document-picker/build/ExpoDocumentPicker.web.js","/node_modules/expo-document-picker/build/types.js","/src/hooks/useMediaPermissions.ts","/src/components/v2BaseComponents/Prompt/index.tsx","/src/components/v2BaseComponents/Prompt/SelectListPrompt.tsx","/src/components/v2BaseComponents/Prompt/PromptContainer.tsx","/node_modules/react-native-web/dist/exports/PanResponder/index.js","/node_modules/react-native-web/dist/vendor/react-native/PanResponder/index.js","/node_modules/react-native-web/dist/vendor/react-native/TouchHistoryMath/index.js","/src/components/v2BaseComponents/Prompt/OnPromptCloseProvider.tsx","/src/components/v2BaseComponents/Prompt/StandardPrompt.tsx","/src/components/v2BaseComponents/Prompt/PromptActions.tsx","/src/components/v2BaseComponents/Loader/index.tsx","/src/components/v2BaseComponents/Loader/Loader.tsx","/node_modules/react-native-web/dist/exports/ActivityIndicator/index.js","/src/components/v2BaseComponents/Loader/LoadingContent.tsx","/src/components/v2BaseComponents/Loader/AnimateLoadedContent.tsx","/src/components/v2BaseComponents/IconButton/index.tsx","/src/components/v2BaseComponents/ScaledImage/index.tsx","/src/components/v2BaseComponents/Skeleton/index.tsx","/src/components/v2BaseComponents/Skeleton/BaseSkeleton.tsx","/src/utils/handleFormikSubmit.ts","/src/components/v2BaseComponents/Form/index.tsx","/src/components/v2BaseComponents/Form/Form.tsx","/src/components/v2BaseComponents/ActionButtonLayout/index.tsx","/src/components/v2BaseComponents/TitledSection.tsx","/src/components/v2BaseComponents/Form/CenteredFormRow.tsx","/src/components/v2BaseComponents/Form/SplitFormRow.tsx","/src/components/v2BaseComponents/Inputs/index.tsx","/src/components/v2BaseComponents/Inputs/Input.tsx","/node_modules/react-native-web/dist/exports/TextInput/index.js","/src/components/v2BaseComponents/Inputs/InputBase.tsx","/src/components/v2BaseComponents/Inputs/Select/index.tsx","/src/components/v2BaseComponents/Inputs/Select/Select.tsx","/src/components/v2BaseComponents/Inputs/SelectBase/index.tsx","/src/components/v2BaseComponents/Inputs/SelectBase/MobileSelect.tsx","/src/components/v2BaseComponents/Inputs/SelectBase/SelectBaseInput.tsx","/src/components/v2BaseComponents/Inputs/SelectBase/SelectChevron.tsx","/src/components/v2BaseComponents/Inputs/SelectBase/WebSelect.tsx","/src/components/v2BaseComponents/Chip/index.tsx","/node_modules/lodash/truncate.js","/node_modules/lodash/_baseToString.js","/node_modules/lodash/_arrayMap.js","/node_modules/lodash/_castSlice.js","/node_modules/lodash/_baseSlice.js","/node_modules/lodash/_hasUnicode.js","/node_modules/lodash/isRegExp.js","/node_modules/lodash/_baseIsRegExp.js","/node_modules/lodash/_stringSize.js","/node_modules/lodash/_asciiSize.js","/node_modules/lodash/_baseProperty.js","/node_modules/lodash/_unicodeSize.js","/node_modules/lodash/_stringToArray.js","/node_modules/lodash/_asciiToArray.js","/node_modules/lodash/_unicodeToArray.js","/node_modules/lodash/toInteger.js","/node_modules/lodash/toFinite.js","/node_modules/lodash/toString.js","/src/components/v2BaseComponents/Inputs/Select/AutocompleteSelect.tsx","/node_modules/fuzzy-search/src/FuzzySearch.js","/node_modules/fuzzy-search/src/Helper.js","/src/components/v2BaseComponents/Inputs/AutocompleteInput/index.tsx","/node_modules/react-native-outside-press/lib/module/index.js","/node_modules/react-native-outside-press/lib/module/components/event-provider.js","/node_modules/react-native-outside-press/lib/module/hooks/use-event-store.js","/node_modules/react-native-outside-press/lib/module/event-context.js","/node_modules/react-native-outside-press/lib/module/components/container.js","/node_modules/react-native-outside-press/lib/module/hooks/use-event.js","/node_modules/react-native-outside-press/lib/module/utils/deep-clone.js","/node_modules/react-native-outside-press/lib/module/components/outside-press-handler.js","/src/components/v2BaseComponents/Paper/index.tsx","/src/components/v2BaseComponents/Paper/Paper.tsx","/src/components/v2BaseComponents/TabView/index.tsx","/src/components/v2BaseComponents/TabView/TabView.tsx","/src/components/v2BaseComponents/TabView/TabLabel.tsx","/src/components/v2BaseComponents/TabView/TabContentContainer.tsx","/src/components/v2BaseComponents/TabView/constants.ts","/src/components/v2BaseComponents/TabView/utils.ts","/src/components/v2BaseComponents/TabView/SideTabView.tsx","/src/components/v2BaseComponents/TabView/SideTabButton.tsx","/src/components/v2BaseComponents/TabView/LayoutDependentTabView.tsx","/src/components/v2BaseComponents/Inputs/AutocompleteInput/SelectOption.tsx","/src/components/v2BaseComponents/Inputs/AutocompleteInput/useSuggestionPosition.ts","/src/components/v2BaseComponents/Inputs/AutocompleteInput/useAutoCompleteInputEventOrchestration.ts","/node_modules/@cassiozen/usestatemachine/dist/usestatemachine.esm.js","/src/components/v2BaseComponents/Inputs/DateTimePicker/index.tsx","/src/components/v2BaseComponents/Inputs/DateTimePicker/DateTimePicker.tsx","/node_modules/react-native-mask-input/lib/module/index.js","/node_modules/react-native-mask-input/lib/module/MaskInput.js","/node_modules/react-native-mask-input/lib/module/useMaskedInputProps.js","/node_modules/react-native-mask-input/lib/module/formatWithMask.js","/node_modules/react-native-mask-input/lib/module/createNumberMask.js","/node_modules/react-native-mask-input/lib/module/Masks.js","/src/components/v2BaseComponents/Inputs/DateTimePicker/utils.ts","/src/components/v2BaseComponents/Inputs/DateTimePicker/NativePickerPrompt.tsx","/src/components/v2BaseComponents/Inputs/PhoneNumber/index.tsx","/src/components/v2BaseComponents/Inputs/FormikInputs.tsx","/src/components/v2BaseComponents/Inputs/Switch.tsx","/node_modules/react-native-web/dist/exports/Switch/index.js","/node_modules/react-native-web/dist/modules/multiplyStyleLengthValue/index.js","/src/components/v2BaseComponents/Inputs/Checkbox.tsx","/src/components/v2BaseComponents/Inputs/PillSelect.tsx","/src/components/v2BaseComponents/Inputs/TextArea.tsx","/src/components/v2BaseComponents/Inputs/NoteTitleInput.tsx","/src/components/v2BaseComponents/Inputs/NoteContentInput/index.tsx","/node_modules/@10play/tentap-editor/lib/module/index.js","/node_modules/@10play/tentap-editor/lib/module/TenTapViewNativeComponent.js","/node_modules/@10play/react-native-web-webview/lib/commonjs/shim.js","/node_modules/@10play/tentap-editor/lib/module/RichText/index.js","/node_modules/@10play/tentap-editor/lib/module/RichText/RichText.js","/node_modules/@10play/react-native-web-webview/lib/commonjs/index.js","/node_modules/@10play/react-native-web-webview/lib/commonjs/WebView.js","/node_modules/react-native-web/dist/index.js","/node_modules/react-native-web/dist/exports/AccessibilityInfo/index.js","/node_modules/react-native-web/dist/exports/Alert/index.js","/node_modules/react-native-web/dist/exports/Appearance/index.js","\u0000shim:react-native-web/dist/exports/BackHandler/index.js","/node_modules/react-native-web/dist/exports/Clipboard/index.js","/node_modules/react-native-web/dist/exports/LayoutAnimation/index.js","/node_modules/react-native-web/dist/vendor/react-native/LayoutAnimation/index.js","/node_modules/react-native-web/dist/exports/Linking/index.js","/node_modules/react-native-web/dist/exports/Share/index.js","/node_modules/react-native-web/dist/exports/Vibration/index.js","/node_modules/react-native-web/dist/exports/Button/index.js","/node_modules/react-native-web/dist/exports/TouchableOpacity/index.js","/node_modules/react-native-web/dist/exports/CheckBox/index.js","/node_modules/react-native-web/dist/exports/KeyboardAvoidingView/index.js","/node_modules/react-native-web/dist/exports/Modal/index.js","/node_modules/react-native-web/dist/exports/Modal/ModalPortal.js","/node_modules/react-native-web/dist/exports/Modal/ModalAnimation.js","/node_modules/react-native-web/dist/exports/Modal/ModalContent.js","/node_modules/react-native-web/dist/exports/Modal/ModalFocusTrap.js","/node_modules/react-native-web/dist/exports/Picker/index.js","/node_modules/react-native-web/dist/exports/Picker/PickerItem.js","/node_modules/react-native-web/dist/exports/ProgressBar/index.js","/node_modules/react-native-web/dist/exports/SafeAreaView/index.js","/node_modules/react-native-web/dist/exports/StatusBar/index.js","/node_modules/react-native-web/dist/exports/TouchableHighlight/index.js","/node_modules/react-native-web/dist/exports/TouchableNativeFeedback/index.js","/node_modules/react-native-web/dist/modules/UnimplementedView/index.js","/node_modules/react-native-web/dist/exports/TouchableWithoutFeedback/index.js","/node_modules/react-native-web/dist/exports/VirtualizedList/index.js","/node_modules/react-native-web/dist/exports/YellowBox/index.js","/node_modules/react-native-web/dist/exports/LogBox/index.js","/node_modules/react-native-web/dist/exports/DeviceEventEmitter/index.js","/node_modules/react-native-web/dist/exports/useColorScheme/index.js","/node_modules/react-native-web/dist/exports/useLocaleContext/index.js","/node_modules/react-native-web/dist/exports/useWindowDimensions/index.js","/node_modules/@10play/react-native-web-webview/lib/commonjs/utils.js","/node_modules/@10play/tentap-editor/lib/module/simpleWebEditor/build/editorHtml.js","/node_modules/@10play/tentap-editor/lib/module/utils/index.js","/node_modules/@10play/tentap-editor/lib/module/utils/useKeyboard.js","/node_modules/@10play/tentap-editor/lib/module/utils/uniqueBy.js","/node_modules/@10play/tentap-editor/lib/module/RichText/utils.js","/node_modules/@10play/tentap-editor/lib/module/utils/misc.js","/node_modules/@10play/tentap-editor/lib/module/bridges/core.js","/node_modules/@10play/tentap-editor/lib/module/bridges/base.js","/node_modules/@10play/tentap-editor/lib/module/RichText/AsyncMessages.js","/node_modules/@10play/tentap-editor/lib/module/webEditorUtils/focusListener.js","/node_modules/@tiptap/extension-document/dist/index.js","/node_modules/@tiptap/core/dist/index.js","/node_modules/@tiptap/pm/state/dist/index.js","/node_modules/prosemirror-state/dist/index.js","/node_modules/prosemirror-model/dist/index.js","/node_modules/orderedmap/dist/index.js","/node_modules/prosemirror-transform/dist/index.js","/node_modules/@tiptap/pm/view/dist/index.js","/node_modules/prosemirror-view/dist/index.js","/node_modules/@tiptap/pm/keymap/dist/index.js","/node_modules/prosemirror-keymap/dist/index.js","/node_modules/w3c-keyname/index.js","/node_modules/@tiptap/pm/model/dist/index.js","/node_modules/@tiptap/pm/transform/dist/index.js","/node_modules/@tiptap/pm/commands/dist/index.js","/node_modules/prosemirror-commands/dist/index.js","/node_modules/@tiptap/pm/schema-list/dist/index.js","/node_modules/prosemirror-schema-list/dist/index.js","/node_modules/@tiptap/extension-paragraph/dist/index.js","/node_modules/@tiptap/extension-text/dist/index.js","/node_modules/@10play/tentap-editor/lib/module/RichText/useEditorBridge.js","/node_modules/lodash/cloneDeep.js","/node_modules/lodash/_baseClone.js","/node_modules/lodash/_arrayEach.js","/node_modules/lodash/_assignValue.js","/node_modules/lodash/_baseAssignValue.js","/node_modules/lodash/_defineProperty.js","/node_modules/lodash/_baseAssign.js","/node_modules/lodash/_copyObject.js","/node_modules/lodash/_baseAssignIn.js","/node_modules/lodash/keysIn.js","/node_modules/lodash/_baseKeysIn.js","/node_modules/lodash/_nativeKeysIn.js","/node_modules/lodash/_cloneBuffer.js","/node_modules/lodash/_copyArray.js","/node_modules/lodash/_copySymbols.js","/node_modules/lodash/_copySymbolsIn.js","/node_modules/lodash/_getSymbolsIn.js","/node_modules/lodash/_getPrototype.js","/node_modules/lodash/_getAllKeysIn.js","/node_modules/lodash/_initCloneArray.js","/node_modules/lodash/_initCloneByTag.js","/node_modules/lodash/_cloneArrayBuffer.js","/node_modules/lodash/_cloneDataView.js","/node_modules/lodash/_cloneRegExp.js","/node_modules/lodash/_cloneSymbol.js","/node_modules/lodash/_cloneTypedArray.js","/node_modules/lodash/_initCloneObject.js","/node_modules/lodash/_baseCreate.js","/node_modules/lodash/isMap.js","/node_modules/lodash/_baseIsMap.js","/node_modules/lodash/isSet.js","/node_modules/lodash/_baseIsSet.js","/node_modules/@10play/tentap-editor/lib/module/types/Messaging.js","/node_modules/@10play/tentap-editor/lib/module/RichText/EditorHelper.js","/node_modules/@10play/tentap-editor/lib/module/bridges/StarterKit.js","/node_modules/@10play/tentap-editor/lib/module/bridges/bold.js","/node_modules/@tiptap/extension-bold/dist/index.js","/node_modules/@10play/tentap-editor/lib/module/bridges/code.js","/node_modules/@tiptap/extension-code/dist/index.js","/node_modules/@10play/tentap-editor/lib/module/bridges/italic.js","/node_modules/@tiptap/extension-italic/dist/index.js","/node_modules/@10play/tentap-editor/lib/module/bridges/history.js","/node_modules/@tiptap/extension-history/dist/index.js","/node_modules/@tiptap/pm/history/dist/index.js","/node_modules/prosemirror-history/dist/index.js","/node_modules/rope-sequence/dist/index.js","/node_modules/@10play/tentap-editor/lib/module/bridges/strike.js","/node_modules/@tiptap/extension-strike/dist/index.js","/node_modules/@10play/tentap-editor/lib/module/bridges/orderedList.js","/node_modules/@tiptap/extension-list-item/dist/index.js","/node_modules/@tiptap/extension-ordered-list/dist/index.js","/node_modules/@10play/tentap-editor/lib/module/bridges/heading.js","/node_modules/@tiptap/extension-heading/dist/index.js","/node_modules/@10play/tentap-editor/lib/module/bridges/listItem.js","/node_modules/@10play/tentap-editor/lib/module/bridges/bulletList.js","/node_modules/@tiptap/extension-bullet-list/dist/index.js","/node_modules/@10play/tentap-editor/lib/module/bridges/blockquote.js","/node_modules/@tiptap/extension-blockquote/dist/index.js","/node_modules/@10play/tentap-editor/lib/module/bridges/underline.js","/node_modules/@tiptap/extension-underline/dist/index.js","/node_modules/@10play/tentap-editor/lib/module/bridges/tasklist.js","/node_modules/@tiptap/extension-task-list/dist/index.js","/node_modules/@tiptap/extension-task-item/dist/index.js","/node_modules/@10play/tentap-editor/lib/module/bridges/link.js","/node_modules/@tiptap/extension-link/dist/index.js","/node_modules/linkifyjs/dist/linkify.es.js","/node_modules/@10play/tentap-editor/lib/module/bridges/color.js","/node_modules/@tiptap/extension-text-style/dist/index.js","/node_modules/@tiptap/extension-color/dist/index.js","/node_modules/@10play/tentap-editor/lib/module/bridges/highlight.js","/node_modules/@tiptap/extension-highlight/dist/index.js","/node_modules/@10play/tentap-editor/lib/module/bridges/image.js","/node_modules/@tiptap/extension-image/dist/index.js","/node_modules/@10play/tentap-editor/lib/module/bridges/placeholder.js","/node_modules/@tiptap/extension-placeholder/dist/index.js","/node_modules/@10play/tentap-editor/lib/module/bridges/dropcursor.js","/node_modules/@tiptap/extension-dropcursor/dist/index.js","/node_modules/@tiptap/pm/dropcursor/dist/index.js","/node_modules/prosemirror-dropcursor/dist/index.js","/node_modules/@10play/tentap-editor/lib/module/bridges/br.js","/node_modules/@tiptap/extension-hard-break/dist/index.js","/node_modules/@10play/tentap-editor/lib/module/RichText/theme.js","/node_modules/@10play/tentap-editor/lib/module/RichText/Keyboard/keyboardTheme.js","/node_modules/@10play/tentap-editor/lib/module/RichText/Toolbar/toolbarTheme.js","/node_modules/@10play/tentap-editor/lib/module/utils/mergeThemes.js","/node_modules/lodash/merge.js","/node_modules/lodash/_baseMerge.js","/node_modules/lodash/_assignMergeValue.js","/node_modules/lodash/_baseFor.js","/node_modules/lodash/_createBaseFor.js","/node_modules/lodash/_baseMergeDeep.js","/node_modules/lodash/isArrayLikeObject.js","/node_modules/lodash/isPlainObject.js","/node_modules/lodash/_safeGet.js","/node_modules/lodash/toPlainObject.js","/node_modules/lodash/_createAssigner.js","/node_modules/lodash/_baseRest.js","/node_modules/lodash/identity.js","/node_modules/lodash/_overRest.js","/node_modules/lodash/_apply.js","/node_modules/lodash/_setToString.js","/node_modules/lodash/_baseSetToString.js","/node_modules/lodash/constant.js","/node_modules/lodash/_shortOut.js","/node_modules/lodash/_isIterateeCall.js","/node_modules/@10play/tentap-editor/lib/module/RichText/useBridgeState.js","/node_modules/@10play/tentap-editor/lib/module/RichText/Toolbar/index.js","/node_modules/@10play/tentap-editor/lib/module/RichText/Toolbar/Toolbar.js","/node_modules/@10play/tentap-editor/lib/module/RichText/Toolbar/actions.js","/node_modules/@10play/tentap-editor/lib/module/assets/index.js","/node_modules/@10play/tentap-editor/lib/module/assets/indent.png","/node_modules/@10play/tentap-editor/lib/module/assets/unindent.png","/node_modules/@10play/tentap-editor/lib/module/assets/bold.png","/node_modules/@10play/tentap-editor/lib/module/assets/italic.png","/node_modules/@10play/tentap-editor/lib/module/assets/underline.png","/node_modules/@10play/tentap-editor/lib/module/assets/strikethrough.png","/node_modules/@10play/tentap-editor/lib/module/assets/h1.png","/node_modules/@10play/tentap-editor/lib/module/assets/h2.png","/node_modules/@10play/tentap-editor/lib/module/assets/h3.png","/node_modules/@10play/tentap-editor/lib/module/assets/h4.png","/node_modules/@10play/tentap-editor/lib/module/assets/h5.png","/node_modules/@10play/tentap-editor/lib/module/assets/h6.png","/node_modules/@10play/tentap-editor/lib/module/assets/ol.png","/node_modules/@10play/tentap-editor/lib/module/assets/ul.png","/node_modules/@10play/tentap-editor/lib/module/assets/checklist.png","/node_modules/@10play/tentap-editor/lib/module/assets/undo.png","/node_modules/@10play/tentap-editor/lib/module/assets/redo.png","/node_modules/@10play/tentap-editor/lib/module/assets/link.png","/node_modules/@10play/tentap-editor/lib/module/assets/palette.png","/node_modules/@10play/tentap-editor/lib/module/assets/code.png","/node_modules/@10play/tentap-editor/lib/module/assets/quote.png","/node_modules/@10play/tentap-editor/lib/module/assets/Aa.png","/node_modules/@10play/tentap-editor/lib/module/assets/a.png","/node_modules/@10play/tentap-editor/lib/module/assets/close.png","/node_modules/@10play/tentap-editor/lib/module/types/Actions.js","/node_modules/@10play/tentap-editor/lib/module/RichText/Toolbar/EditLinkBar.js","/node_modules/@10play/tentap-editor/lib/module/RichText/Toolbar/ToolbarItemComp.js","/node_modules/@10play/tentap-editor/lib/module/RichText/Toolbar/WebToolbar.js","/node_modules/@10play/tentap-editor/lib/module/RichText/Keyboard/index.js","/node_modules/@10play/tentap-editor/lib/module/RichText/Keyboard/CustomKeyboardBase.js","/node_modules/@10play/tentap-editor/lib/module/RichText/Keyboard/CustomKeyboard.android.js","/node_modules/@10play/tentap-editor/lib/module/RichText/Keyboard/CustomKeyboard.ios.js","/node_modules/@10play/tentap-editor/lib/module/utils/useRefHandle.js","/node_modules/@10play/tentap-editor/lib/module/RichText/Keyboard/ColorKeyboard.js","/node_modules/@10play/tentap-editor/lib/module/RichText/Keyboard/CustomKeyboardExtension.js","/node_modules/@10play/tentap-editor/lib/module/RichText/useEditorContent.js","/node_modules/@10play/tentap-editor/lib/module/types/index.js","/node_modules/@10play/tentap-editor/lib/module/types/EditorBridge.js","/node_modules/@10play/tentap-editor/lib/module/types/Theme.js","/src/components/v2BaseComponents/Inputs/NoteContentInput/injectedFontFamilyCss.ts","/src/components/shared/PermissionsInput/index.tsx","/src/components/shared/PermissionsInput/permissionTree.tsx","/src/components/shared/PermissionsInput/Node.tsx","/src/components/shared/PermissionsInput/utils.ts","/src/components/shared/PermissionsInput/intl.ts","/src/components/v2BaseComponents/ConfigurationTable/index.tsx","/src/components/shared/PermissionsInput/useCollaboratorEditWarningPrompt.tsx","/src/components/shared/PromptButton.tsx","/src/components/v2BaseComponents/Alert.tsx","/src/components/v2BaseComponents/Link.tsx","/node_modules/expo-linking/build/Linking.js","/node_modules/expo-linking/build/ExpoLinking.web.js","/node_modules/expo-linking/build/RNLinking.web.js","/node_modules/expo-linking/build/createURL.web.js","/node_modules/expo-linking/build/validateURL.js","/node_modules/expo-linking/build/Linking.types.js","/node_modules/expo-linking/build/Schemes.web.js","/src/components/v2BaseComponents/Inputs/ColorPickerInput/index.tsx","/node_modules/react-native-wheel-color-picker/ColorPicker.js","/node_modules/react-native-elevation/elevations.js","/node_modules/react-native-wheel-color-picker/assets/graphics/ui/color-wheel.png","/node_modules/react-native-wheel-color-picker/assets/graphics/ui/black-gradient.png","/node_modules/react-native-wheel-color-picker/assets/graphics/ui/black-gradient-rotated.png","/src/components/v2BaseComponents/Inputs/LargeTextInput.tsx","/src/components/shared/Account/UserAccountInformationScreen/EnvironmentToggle.tsx","/src/hooks/api/useSetEnvironment.ts","/node_modules/@aws-amplify/ui-react-native/dist/index.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/index.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/Authenticator.js","/node_modules/@aws-amplify/ui-react-core/dist/esm/index.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/Authenticator/context/AuthenticatorProvider.mjs","/node_modules/@xstate/react/es/index.js","/node_modules/@xstate/react/es/useMachine.js","/node_modules/use-sync-external-store/shim/with-selector.js","/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js","/node_modules/use-sync-external-store/shim/index.js","/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","/node_modules/xstate/es/index.js","/node_modules/xstate/es/actions.js","/node_modules/xstate/es/_virtual/_tslib.js","/node_modules/xstate/es/types.js","/node_modules/xstate/es/actionTypes.js","/node_modules/xstate/es/utils.js","/node_modules/xstate/es/constants.js","/node_modules/xstate/es/environment.js","/node_modules/xstate/es/Actor.js","/node_modules/xstate/es/serviceScope.js","/node_modules/xstate/es/interpreter.js","/node_modules/xstate/es/State.js","/node_modules/xstate/es/stateUtils.js","/node_modules/xstate/es/scheduler.js","/node_modules/xstate/es/registry.js","/node_modules/xstate/es/devTools.js","/node_modules/xstate/es/behaviors.js","/node_modules/xstate/es/Machine.js","/node_modules/xstate/es/StateNode.js","/node_modules/xstate/es/invokeUtils.js","/node_modules/xstate/es/mapState.js","/node_modules/xstate/es/match.js","/node_modules/xstate/es/schema.js","/node_modules/@xstate/react/es/useInterpret.js","/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js","/node_modules/@xstate/react/es/useConstant.js","/node_modules/@xstate/react/es/utils.js","/node_modules/@xstate/react/es/useActor.js","/node_modules/@xstate/react/es/useSelector.js","/node_modules/@xstate/react/es/useSpawn.js","/node_modules/@xstate/react/es/createActorContext.js","/node_modules/@aws-amplify/ui/dist/esm/index.mjs","/node_modules/@aws-amplify/ui/dist/esm/helpers/authenticator/actor.mjs","/node_modules/@aws-amplify/ui/dist/esm/helpers/authenticator/defaultAuthHubHandler.mjs","/node_modules/@aws-amplify/ui/dist/esm/utils/setUserAgent/constants.mjs","/node_modules/@aws-amplify/ui/dist/esm/utils/utils.mjs","/node_modules/@aws-amplify/ui/dist/esm/helpers/authenticator/facade.mjs","/node_modules/@aws-amplify/ui/dist/esm/helpers/authenticator/constants.mjs","/node_modules/@aws-amplify/ui/dist/esm/i18n/country-dial-codes.mjs","/node_modules/@aws-amplify/ui/dist/esm/helpers/authenticator/getRoute.mjs","/node_modules/@aws-amplify/ui/dist/esm/helpers/authenticator/form.mjs","/node_modules/@aws-amplify/ui/dist/esm/types/authenticator/user.mjs","/node_modules/@aws-amplify/ui/dist/esm/types/authenticator/attributes.mjs","/node_modules/@aws-amplify/ui/dist/esm/helpers/authenticator/utils.mjs","/node_modules/@aws-amplify/ui/dist/esm/helpers/authenticator/formFields/formFields.mjs","/node_modules/@aws-amplify/ui/dist/esm/helpers/authenticator/formFields/defaults.mjs","/node_modules/@aws-amplify/ui/dist/esm/helpers/authenticator/formFields/utils.mjs","/node_modules/@aws-amplify/ui/dist/esm/i18n/translations.mjs","/node_modules/@aws-amplify/ui/dist/esm/i18n/dictionaries/index.mjs","/node_modules/@aws-amplify/ui/dist/esm/i18n/dictionaries/authenticator/de.mjs","/node_modules/@aws-amplify/ui/dist/esm/i18n/dictionaries/authenticator/en.mjs","/node_modules/@aws-amplify/ui/dist/esm/i18n/dictionaries/authenticator/es.mjs","/node_modules/@aws-amplify/ui/dist/esm/i18n/dictionaries/authenticator/fr.mjs","/node_modules/@aws-amplify/ui/dist/esm/i18n/dictionaries/authenticator/it.mjs","/node_modules/@aws-amplify/ui/dist/esm/i18n/dictionaries/authenticator/ja.mjs","/node_modules/@aws-amplify/ui/dist/esm/i18n/dictionaries/authenticator/kr.mjs","/node_modules/@aws-amplify/ui/dist/esm/i18n/dictionaries/authenticator/nb.mjs","/node_modules/@aws-amplify/ui/dist/esm/i18n/dictionaries/authenticator/nl.mjs","/node_modules/@aws-amplify/ui/dist/esm/i18n/dictionaries/authenticator/pl.mjs","/node_modules/@aws-amplify/ui/dist/esm/i18n/dictionaries/authenticator/pt.mjs","/node_modules/@aws-amplify/ui/dist/esm/i18n/dictionaries/authenticator/zh.mjs","/node_modules/@aws-amplify/ui/dist/esm/i18n/dictionaries/authenticator/sv.mjs","/node_modules/@aws-amplify/ui/dist/esm/i18n/dictionaries/authenticator/id.mjs","/node_modules/@aws-amplify/ui/dist/esm/i18n/dictionaries/authenticator/tr.mjs","/node_modules/@aws-amplify/ui/dist/esm/i18n/dictionaries/authenticator/ru.mjs","/node_modules/@aws-amplify/ui/dist/esm/i18n/dictionaries/authenticator/he.mjs","/node_modules/@aws-amplify/ui/dist/esm/i18n/dictionaries/authenticator/ua.mjs","/node_modules/@aws-amplify/ui/dist/esm/i18n/dictionaries/authenticator/th.mjs","/node_modules/@aws-amplify/ui/dist/esm/i18n/dictionaries/authenticator/defaultTexts.mjs","/node_modules/@aws-amplify/ui/dist/esm/helpers/authenticator/textUtil.mjs","/node_modules/@aws-amplify/ui/dist/esm/helpers/accountSettings/utils.mjs","/node_modules/@aws-amplify/ui/dist/esm/helpers/utils.mjs","/node_modules/@aws-amplify/ui/dist/esm/helpers/accountSettings/validator.mjs","/node_modules/@aws-amplify/ui/dist/esm/machines/authenticator/index.mjs","/node_modules/@aws-amplify/ui/dist/esm/machines/authenticator/actions.mjs","/node_modules/@aws-amplify/ui/dist/esm/machines/authenticator/utils.mjs","/node_modules/lodash/pickBy.js","/node_modules/lodash/_baseIteratee.js","/node_modules/lodash/_baseMatches.js","/node_modules/lodash/_baseIsMatch.js","/node_modules/lodash/_getMatchData.js","/node_modules/lodash/_isStrictComparable.js","/node_modules/lodash/_matchesStrictComparable.js","/node_modules/lodash/_baseMatchesProperty.js","/node_modules/lodash/get.js","/node_modules/lodash/_baseGet.js","/node_modules/lodash/_castPath.js","/node_modules/lodash/_isKey.js","/node_modules/lodash/_stringToPath.js","/node_modules/lodash/_memoizeCapped.js","/node_modules/lodash/memoize.js","/node_modules/lodash/_toKey.js","/node_modules/lodash/hasIn.js","/node_modules/lodash/_baseHasIn.js","/node_modules/lodash/_hasPath.js","/node_modules/lodash/property.js","/node_modules/lodash/_basePropertyDeep.js","/node_modules/lodash/_basePickBy.js","/node_modules/lodash/_baseSet.js","/node_modules/@aws-amplify/ui/dist/esm/machines/authenticator/guards.mjs","/node_modules/@aws-amplify/ui/dist/esm/machines/authenticator/actors/forgotPassword.mjs","/node_modules/@aws-amplify/ui/dist/esm/validators/index.mjs","/node_modules/@aws-amplify/ui/dist/esm/machines/authenticator/defaultServices.mjs","/node_modules/@aws-amplify/ui/dist/esm/machines/authenticator/actors/signIn.mjs","/node_modules/@aws-amplify/ui/dist/esm/machines/authenticator/actors/utils.mjs","/node_modules/@aws-amplify/ui/dist/esm/machines/authenticator/actors/signUp.mjs","/node_modules/@aws-amplify/ui/dist/esm/machines/authenticator/actors/signOut.mjs","/node_modules/@aws-amplify/ui/dist/esm/machines/authenticator/actors/verifyUserAttributes.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/createTheme/createTheme.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/defaultTheme.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/index.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/borderWidths.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/colors.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/index.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/alert.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/aiConversation.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/autocomplete.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/authenticator.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/avatar.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/badge.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/breadcrumbs.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/button.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/card.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/checkbox.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/checkboxField.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/collection.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/copy.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/dialCodeSelect.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/divider.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/dropZone.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/accordion.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/field.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/fieldControl.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/fieldGroup.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/fieldset.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/fieldMessages.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/fileuploader.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/flex.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/heading.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/highlightMatch.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/icon.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/input.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/image.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/inAppMessaging.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/link.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/liveness.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/loader.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/menu.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/message.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/pagination.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/passwordField.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/phoneNumberField.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/placeholder.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/radio.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/radioGroup.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/rating.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/searchField.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/select.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/selectField.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/sliderField.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/stepperField.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/storagemanager.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/switchField.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/table.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/tabs.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/text.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/textAreaField.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/textField.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/toggleButton.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/components/toggleButtonGroup.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/fonts.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/fontSizes.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/fontWeights.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/lineHeights.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/opacities.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/outlineOffsets.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/outlineWidths.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/radii.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/shadows.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/space.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/time.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/tokens/transforms.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/breakpoints.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/createTheme/utils.mjs","/node_modules/lodash/kebabCase.js","/node_modules/lodash/_createCompounder.js","/node_modules/lodash/_arrayReduce.js","/node_modules/lodash/deburr.js","/node_modules/lodash/_deburrLetter.js","/node_modules/lodash/_basePropertyOf.js","/node_modules/lodash/words.js","/node_modules/lodash/_asciiWords.js","/node_modules/lodash/_hasUnicodeWord.js","/node_modules/lodash/_unicodeWords.js","/node_modules/@aws-amplify/ui/dist/esm/utils/references.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/createTheme/constants.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/createTheme/createComponentCSS.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/createTheme/createColorPalette.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/createTheme/createAnimationCSS.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/createTheme/defineComponentTheme.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/createTheme/createComponentClasses.mjs","/node_modules/@aws-amplify/ui/dist/esm/utils/classNames.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/createTheme/createGlobalCSS.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/createTheme/resolveObject.mjs","/node_modules/@aws-amplify/ui/dist/esm/theme/defaultDarkModeOverride.mjs","/node_modules/@aws-amplify/ui/dist/esm/types/authenticator/utils.mjs","/node_modules/@aws-amplify/ui/dist/esm/types/primitives/componentClassName.mjs","/node_modules/@aws-amplify/ui/dist/esm/utils/setUserAgent/setUserAgent.mjs","/node_modules/@aws-amplify/ui/dist/esm/utils/humanFileSize.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/Authenticator/context/AuthenticatorContext.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/Authenticator/hooks/useAuthenticator/useAuthenticator.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/Authenticator/hooks/useAuthenticator/constants.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/Authenticator/hooks/useAuthenticator/utils.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/Authenticator/hooks/utils.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/Authenticator/hooks/constants.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/Authenticator/hooks/useAuthenticatorRoute/useAuthenticatorRoute.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/Authenticator/hooks/useAuthenticatorRoute/utils.mjs","/node_modules/react-hook-form/dist/index.esm.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/components/FormCore/FormProvider.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/components/RenderNothing/RenderNothing.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/Authenticator/hooks/useAuthenticatorRoute/constants.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/Authenticator/hooks/useAuthenticatorInitMachine/useAuthenticatorInitMachine.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/components/FormCore/useField.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/components/FormCore/useForm.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/components/FormCore/withFormProvider.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/hooks/useDataState.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/hooks/useDeprecationWarning.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/hooks/useGetUrl.mjs","/node_modules/aws-amplify/dist/esm/storage/index.mjs","/node_modules/@aws-amplify/storage/dist/esm/index.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/apis/uploadData.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/apis/internal/uploadData/index.mjs","/node_modules/@aws-amplify/storage/node_modules/@smithy/md5-js/dist-es/index.js","/node_modules/@aws-amplify/storage/node_modules/@smithy/md5-js/dist-es/constants.js","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/client/runtime/s3TransferHandler/xhr.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/client/runtime/contentSha256middleware.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/client/runtime/constants.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/client/runtime/xhrTransferHandler.mjs","/node_modules/@aws-amplify/storage/dist/esm/errors/CanceledError.mjs","/node_modules/@aws-amplify/storage/dist/esm/errors/StorageError.mjs","/node_modules/metro-runtime/src/modules/empty-module.js","/node_modules/@aws-amplify/storage/dist/esm/errors/utils/assertValidationError.mjs","/node_modules/@aws-amplify/storage/dist/esm/errors/types/validation.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/constants.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/transferTask.mjs","/node_modules/@aws-amplify/storage/dist/esm/utils/logger.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/apis/internal/uploadData/byteLength.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/apis/internal/uploadData/putObjectJob.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/md5.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/client/runtime/base64/index.browser.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/readFile.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/resolveS3ConfigAndInput.mjs","/node_modules/@aws-amplify/storage/dist/esm/utils/resolvePrefix.mjs","/node_modules/@aws-amplify/storage/dist/esm/errors/constants.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/validateBucketOwnerID.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/validateStorageOperationInput.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/isInputWithPath.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/resolveIdentityId.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/client/s3data/base.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/client/utils/parsePayload.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/client/runtime/xmlParser/dom.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/client/utils/createRetryDecider.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/client/s3data/getObject.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/client/utils/deserializeHelpers.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/client/utils/serializeHelpers.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/validateObjectUrl.mjs","/node_modules/@aws-amplify/storage/dist/esm/errors/IntegrityError.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/client/s3data/listObjectsV2.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/client/s3data/putObject.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/client/s3data/createMultipartUpload.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/client/s3data/uploadPart.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/client/s3data/completeMultipartUpload.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/validateMultipartUploadXML.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/client/utils/integrityHelpers.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/client/s3data/listParts.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/client/s3data/abortMultipartUpload.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/client/s3data/copyObject.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/client/s3data/headObject.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/client/s3data/deleteObject.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/userAgent.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/crc32.mjs","/node_modules/crc-32/crc32.js","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/hexUtils.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/constructContentDisposition.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/apis/internal/uploadData/multipart/uploadHandlers.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/apis/internal/uploadData/multipart/uploadPartExecutor.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/apis/internal/uploadData/multipart/uploadCache.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/apis/internal/uploadData/multipart/progressTracker.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/apis/internal/uploadData/multipart/initialUpload.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/getCombinedCrc32.native.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/apis/internal/uploadData/multipart/getDataChunker.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/apis/internal/uploadData/multipart/calculatePartSize.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/apis/downloadData.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/apis/internal/downloadData.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/apis/remove.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/apis/internal/remove.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/apis/list.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/apis/internal/list.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/validateStorageOperationInputWithPrefix.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/utils/urlDecoder.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/apis/getProperties.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/apis/internal/getProperties.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/apis/copy.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/apis/internal/copy.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/apis/getUrl.mjs","/node_modules/@aws-amplify/storage/dist/esm/providers/s3/apis/internal/getUrl.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/hooks/useHasValueUpdated.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/hooks/usePreviousValue.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/hooks/useSetUserAgent.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/hooks/useTimeout.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/hooks/useDropZone.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/utils/filterAllowedFiles.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/utils/processDroppedItems.mjs","/node_modules/@aws-amplify/ui-react-core/dist/esm/utils/createContextUtilities.mjs","/node_modules/@aws-amplify/ui-react-native/dist/hooks/index.js","/node_modules/@aws-amplify/ui-react-native/dist/hooks/useDeprecationWarning/index.js","/node_modules/@aws-amplify/ui-react-native/dist/hooks/useDeprecationWarning/useDeprecationWarning.js","/node_modules/@aws-amplify/ui-react-native/dist/utils/index.js","/node_modules/@aws-amplify/ui-react-native/dist/utils/font.js","/node_modules/@aws-amplify/ui-react-native/dist/utils/platform.js","/node_modules/@aws-amplify/ui-react-native/dist/hooks/useDeviceOrientation/index.js","/node_modules/@aws-amplify/ui-react-native/dist/hooks/useDeviceOrientation/useDeviceOrientation.js","/node_modules/@aws-amplify/ui-react-native/dist/hooks/usePressableContainerStyles/index.js","/node_modules/@aws-amplify/ui-react-native/dist/hooks/usePressableContainerStyles/usePressableContainerStyles.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/common/index.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/common/DefaultContainer/index.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/common/DefaultContainer/DefaultContainer.js","/node_modules/@aws-amplify/ui-react-native/dist/theme/index.js","/node_modules/@aws-amplify/ui-react-native/dist/theme/createTheme.js","/node_modules/@aws-amplify/ui-react-native/dist/theme/defaultTheme.js","/node_modules/@aws-amplify/ui-react-native/dist/theme/types.js","/node_modules/@aws-amplify/ui-react-native/dist/theme/useTheme.js","/node_modules/@aws-amplify/ui-react-native/dist/theme/ThemeContext.js","/node_modules/@aws-amplify/ui-react-native/dist/theme/ThemeProvider.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/common/DefaultContainer/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/common/DefaultContainer/InnerContainer.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/common/DefaultContent/index.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/common/DefaultContent/DefaultContent.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/index.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Button/index.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Button/Button.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Button/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Carousel/index.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Carousel/Carousel.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Carousel/CarouselPageIndicator.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Carousel/constants.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Carousel/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Checkbox/index.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Checkbox/Checkbox.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Icon/index.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Icon/Icon.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Icon/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Icon/constants.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Label/index.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Label/Label.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Label/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Checkbox/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Label/utils.js","/node_modules/@aws-amplify/ui-react-native/dist/assets/index.js","/node_modules/@aws-amplify/ui-react-native/dist/assets/icons/index.ts","/node_modules/@aws-amplify/ui-react-native/dist/assets/icons/icons.ts","/node_modules/@aws-amplify/ui-react-native/dist/assets/icons/amazonLogo.png","/node_modules/@aws-amplify/ui-react-native/dist/assets/icons/appleLogo.png","/node_modules/@aws-amplify/ui-react-native/dist/assets/icons/checkboxFilled.png","/node_modules/@aws-amplify/ui-react-native/dist/assets/icons/checkboxOutline.png","/node_modules/@aws-amplify/ui-react-native/dist/assets/icons/close.png","/node_modules/@aws-amplify/ui-react-native/dist/assets/icons/copy.png","/node_modules/@aws-amplify/ui-react-native/dist/assets/icons/error.png","/node_modules/@aws-amplify/ui-react-native/dist/assets/icons/facebookLogo.png","/node_modules/@aws-amplify/ui-react-native/dist/assets/icons/googleLogo.png","/node_modules/@aws-amplify/ui-react-native/dist/assets/icons/visibilityOn.png","/node_modules/@aws-amplify/ui-react-native/dist/assets/icons/visibilityOff.png","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Divider/index.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Divider/Divider.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Divider/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/ErrorMessage/index.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/ErrorMessage/ErrorMessage.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/IconButton/index.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/IconButton/IconButton.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/IconButton/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/ErrorMessage/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Heading/index.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Heading/Heading.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Heading/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/PasswordField/index.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/PasswordField/PasswordField.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/TextField/index.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/TextField/TextField.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/TextField/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/PasswordField/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/PhoneNumberField/index.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/PhoneNumberField/PhoneNumberField.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/PhoneNumberField/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Radio/index.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Radio/Radio.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Radio/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Radio/getRadioDimensions.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/RadioGroup/index.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/RadioGroup/RadioGroup.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/RadioGroup/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Tabs/index.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Tabs/Tab.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Tabs/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/primitives/Tabs/Tabs.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/common/DefaultContent/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/common/DefaultFooter/index.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/common/DefaultFooter/DefaultFooter.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/common/DefaultFormFields/index.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/common/DefaultFormFields/DefaultTextFormFields.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/common/DefaultFormFields/Field.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/common/DefaultFormFields/FieldErrors.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/common/DefaultHeader/index.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/common/DefaultHeader/DefaultHeader.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/common/FederatedProviderButton/index.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/common/FederatedProviderButton/FederatedProviderButton.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/common/FederatedProviderButtons/index.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/common/FederatedProviderButtons/FederatedProviderButtons.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/common/FederatedProviderButtons/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/hooks/index.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/hooks/useFieldValues/index.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/hooks/useFieldValues/useFieldValues.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/hooks/useFieldValues/utils.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/hooks/useFieldValues/constants.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/hooks/types.js","/node_modules/@aws-amplify/ui-react-native/dist/version.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/Defaults/index.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/Defaults/ConfirmResetPassword/index.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/Defaults/ConfirmSignIn/index.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/Defaults/ConfirmSignUp/index.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/Defaults/ConfirmVerifyUser/index.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/Defaults/ForceNewPassword/index.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/Defaults/ForgotPassword/index.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/Defaults/ForgotPassword/ForgotPassword.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/Defaults/SetupTotp/index.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/Defaults/SetupTotp/SetupTotp.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/Defaults/SetupTotp/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/Defaults/SignIn/index.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/Defaults/SignIn/SignIn.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/Defaults/SignUp/index.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/Defaults/SignUp/SignUp.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/Defaults/VerifyUser/index.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/Defaults/VerifyUser/VerifyUser.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/useAuthenticator.js","/node_modules/@aws-amplify/ui-react-native/dist/Authenticator/withAuthenticator.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/index.js","/node_modules/@aws-amplify/ui-react-core-notifications/dist/esm/index.mjs","/node_modules/@aws-amplify/ui-react-core-notifications/dist/esm/InAppMessaging/hooks/useMessage/useMessage.mjs","/node_modules/aws-amplify/dist/esm/in-app-messaging/index.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/index.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/providers/pinpoint/apis/identifyUser.mjs","/node_modules/@aws-amplify/core/dist/esm/providers/pinpoint/index.mjs","/node_modules/@aws-amplify/core/dist/esm/providers/pinpoint/apis/flushEvents.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/providers/pinpoint/utils/resolveConfig.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/errors/assertValidationError.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/errors/InAppMessagingError.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/errors/validation.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/providers/pinpoint/utils/resolveCredentials.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/providers/pinpoint/utils/userAgent.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/providers/pinpoint/utils/constants.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/providers/pinpoint/utils/messageProcessingHelpers.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/providers/pinpoint/utils/helpers.mjs","/node_modules/lodash/isEmpty.js","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/utils/statusHelpers.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/providers/pinpoint/apis/syncMessages.mjs","/node_modules/@aws-amplify/core/dist/esm/awsClients/pinpoint/index.mjs","/node_modules/@aws-amplify/core/dist/esm/awsClients/pinpoint/getInAppMessages.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/errors/assertServiceError.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/providers/pinpoint/apis/dispatchEvent.mjs","/node_modules/lodash/flatten.js","/node_modules/lodash/_baseFlatten.js","/node_modules/lodash/_isFlattenable.js","/node_modules/@aws-amplify/notifications/dist/esm/eventListeners/eventListeners.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/providers/pinpoint/utils/conflictHandlerManager.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/providers/pinpoint/apis/setConflictHandler.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/providers/pinpoint/apis/initializeInAppMessaging.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/providers/pinpoint/types/types.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageReceived.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageDismissed.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/providers/pinpoint/apis/onMessageActionTaken.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/providers/pinpoint/apis/notifyMessageInteraction.mjs","/node_modules/@aws-amplify/notifications/dist/esm/inAppMessaging/providers/pinpoint/apis/clearMessages.mjs","/node_modules/@aws-amplify/ui-react-core-notifications/dist/esm/InAppMessaging/context/InAppMessagingContext/InAppMessagingContext.mjs","/node_modules/@aws-amplify/ui-react-core-notifications/dist/esm/InAppMessaging/context/InAppMessagingContext/useInAppMessagingState.mjs","/node_modules/@aws-amplify/ui-react-core-notifications/dist/esm/InAppMessaging/hooks/useMessage/utils.mjs","/node_modules/@aws-amplify/ui-react-core-notifications/dist/esm/InAppMessaging/utils/handleMessageAction.mjs","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/index.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/InAppMessageDisplay/index.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/InAppMessageDisplay/InAppMessageDisplay.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/BannerMessage/index.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/BannerMessage/BannerMessage.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/hooks/index.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/hooks/useMessageImage/index.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/hooks/useMessageImage/useMessageImage.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/hooks/useMessageImage/types.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/hooks/useMessageImage/utils.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/hooks/useMessageImage/constants.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/hooks/useMessageProps/index.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/hooks/useMessageProps/useMessageProps.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/hooks/useMessageProps/utils.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/constants.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/MessageWrapper/index.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/MessageWrapper/MessageWrapper.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/MessageWrapper/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/MessageLayout/index.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/MessageLayout/MessageLayout.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/BannerMessage/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/FullScreenMessage/index.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/FullScreenMessage/FullScreenMessage.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/FullScreenMessage/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/CarouselMessage/index.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/CarouselMessage/CarouselMessage.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/CarouselMessage/CarouselMessageItem.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/CarouselMessage/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/ModalMessage/index.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/ModalMessage/ModalMessage.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/ModalMessage/styles.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/InAppMessageDisplay/handleMessageLinkAction.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/withInAppMessaging/index.js","/node_modules/@aws-amplify/ui-react-native/dist/InAppMessaging/components/withInAppMessaging/withInAppMessaging.js","/src/components/shared/FormExitValidation.tsx","/src/components/v2BaseComponents/Avatar/index.tsx","/src/components/v2BaseComponents/SkeletonLoadingContainer/index.tsx","/src/components/v2BaseComponents/SkeletonLoadingProvider/index.tsx","/src/utils/getName.ts","/src/components/v2BaseComponents/LabelValueDisplay/index.tsx","/node_modules/lodash/chunk.js","/src/hooks/useSignOutAndResetApp.ts","/src/hooks/useUrlAppParams.ts","/src/hooks/api/usePayments.ts","/node_modules/react-native-purchases/dist/index.js","/node_modules/react-native-purchases/dist/purchases.js","/node_modules/@revenuecat/purchases-typescript-internal/dist/index.js","/node_modules/@revenuecat/purchases-typescript-internal/dist/errors.js","/node_modules/@revenuecat/purchases-typescript-internal/dist/customerInfo.js","/node_modules/@revenuecat/purchases-typescript-internal/dist/offerings.js","/node_modules/@revenuecat/purchases-typescript-internal/dist/enums.js","/node_modules/@revenuecat/purchases-typescript-internal/dist/purchasesConfiguration.js","/node_modules/@revenuecat/purchases-typescript-internal/dist/callbackTypes.js","/node_modules/react-native-purchases/dist/errors.js","/node_modules/react-native-purchases/dist/customerInfo.js","/node_modules/react-native-purchases/dist/offerings.js","/src/utils/waitForAppStateRefocus.ts","/src/hooks/api/useUserDevicePushTokens.ts","/src/hooks/useIsTestUser.ts","/src/components/shared/Account/UserAccountInformationScreen/ToggleOrgPaidStatus.tsx","/src/hooks/api/useAdminListedOrganizations.ts","/src/components/screens/Tabs/Account/SubscriptionScreen/index.tsx","/src/components/screens/Tabs/Account/SubscriptionScreen/AddSubscription.tsx","/src/hooks/usePreRedirectArgs.ts","/src/hooks/useRecordEvent.ts","/node_modules/aws-amplify/dist/esm/analytics/index.mjs","/node_modules/@aws-amplify/analytics/dist/esm/index.mjs","/node_modules/@aws-amplify/analytics/dist/esm/providers/pinpoint/apis/record.mjs","/node_modules/@aws-amplify/analytics/dist/esm/errors/assertValidationError.mjs","/node_modules/@aws-amplify/analytics/dist/esm/errors/AnalyticsError.mjs","/node_modules/@aws-amplify/analytics/dist/esm/errors/validation.mjs","/node_modules/@aws-amplify/analytics/dist/esm/utils/eventBuffer/EventBuffer.mjs","/node_modules/@aws-amplify/analytics/dist/esm/utils/statusHelpers.mjs","/node_modules/@aws-amplify/analytics/dist/esm/utils/userAgent.mjs","/node_modules/@aws-amplify/analytics/dist/esm/trackers/EventTracker.mjs","/node_modules/@aws-amplify/analytics/dist/esm/trackers/PageViewTracker.mjs","/node_modules/@aws-amplify/analytics/dist/esm/trackers/SessionTracker.mjs","/node_modules/@aws-amplify/analytics/dist/esm/providers/pinpoint/utils/resolveConfig.mjs","/node_modules/@aws-amplify/analytics/dist/esm/providers/pinpoint/utils/resolveCredentials.mjs","/node_modules/@aws-amplify/analytics/dist/esm/providers/pinpoint/apis/identifyUser.mjs","/node_modules/@aws-amplify/analytics/dist/esm/providers/pinpoint/apis/configureAutoTrack.mjs","/node_modules/@aws-amplify/analytics/dist/esm/utils/trackerHelpers.mjs","/node_modules/@aws-amplify/analytics/dist/esm/utils/trackerConfigHelpers.mjs","/node_modules/@aws-amplify/analytics/dist/esm/providers/pinpoint/apis/flushEvents.mjs","/node_modules/@aws-amplify/analytics/dist/esm/apis/enable.mjs","/node_modules/@aws-amplify/analytics/dist/esm/apis/disable.mjs","/src/hooks/useClientType.ts","/src/components/shared/RegistrationCode/index.tsx","/src/components/shared/RegistrationCode/ButtonPromptRegistrationCodeConfiguration.tsx","/src/components/shared/RegistrationCode/RegistrationCodePromptContents.tsx","/src/components/shared/RegistrationCode/RegistrationCodeInputField.tsx","/src/hooks/useDebouncedValue.ts","/src/components/shared/RegistrationCode/ActiveRegistrationCodeAlert.tsx","/src/utils/getCommaList.ts","/src/utils/sharedMessages.ts","/src/utils/getDateString.ts","/src/utils/getAge.ts","/src/components/shared/RegistrationCode/AccountScreenRegistrationCodeInput.tsx","/src/components/shared/RegistrationCode/PendingUrlRegistrationCodeAlert.tsx","/src/components/shared/RegistrationCode/useRegistrationCodeActionButton.tsx","/src/components/v2BaseComponents/DetailsLayout.tsx","/src/components/shared/SubscriptionPlanDetails/index.tsx","/src/components/screens/Tabs/Account/SubscriptionScreen/SubscriptionDetails.tsx","/src/components/shared/Account/AccountHeader.tsx","/src/components/v2BaseComponents/HeaderContainer/index.tsx","/src/components/v2BaseComponents/InfoIcon/index.tsx","/src/components/v2BaseComponents/ListItem.tsx","/src/hooks/useInitializePayments.ts","/src/components/screens/Tabs/Account/SupportScreen/index.tsx","/src/hooks/useRedirectToFeedbackAndRoadmap.ts","/src/components/screens/Tabs/Account/AccountScreen/index.tsx","/src/components/shared/Account/ConsumerAccountLandingScreen.tsx","/src/hooks/useIsWebDesktop.ts","/src/components/screens/Tabs/Account/AccountDeletionConfirmationScreen/index.tsx","/src/components/screens/Tabs/Account/AccountDeletionConfirmationScreen/ConsumerDeleteAccountConfirmation.tsx","/src/components/screens/Tabs/Account/AccountDeletionConfirmationScreen/ProDeleteAccountConfirmation.tsx","/src/hooks/api/useOrganization.ts","/src/components/screens/Tabs/Account/PreferencesScreen/index.tsx","/src/components/screens/Tabs/Account/PreferencesScreen/useProfilesWithPreferences.tsx","/src/hooks/api/useMyPreferences.ts","/src/components/screens/Tabs/Account/PreferencesScreen/ProfileGroupConfiguration.tsx","/src/components/screens/Tabs/Account/RedirectScreen/index.tsx","/src/hooks/api/useProfileConnectedHealthSystems.ts","/src/components/v2BaseComponents/Permissions/hooks.ts","/src/hooks/api/useEvaluatedPermissions.ts","/src/components/screens/Tabs/Account/RedirectScreen/StripeProducts.tsx","/src/hooks/api/useInitiateEndpointRefreshCapabilityDiscover.ts","/src/hooks/api/useCanAddMedicalProfile.ts","/src/components/AppNavigator/TabNavigation/wrapInTabContentContainer.tsx","/src/components/v2BaseComponents/ErrorBoundary/index.tsx","/src/hooks/api/useReportERror.ts","/src/components/shared/MaybeSideNavLayout/index.tsx","/src/components/shared/MaybeSideNavLayout/DrawerHeaderImage.tsx","/src/components/AppNavigator/TabNavigation/DrawerNavigation/constants.ts","/src/components/shared/SideDrawerCollapsedStateProvider.tsx","/src/components/AppNavigator/TabNavigation/DrawerNavigation/useDrawerWidthAnimation.ts","/src/components/v2BaseComponents/Header/index.tsx","/src/components/v2BaseComponents/Header/ProfileHeader.tsx","/src/components/v2BaseComponents/Header/BaseHeader.tsx","/src/components/v2BaseComponents/Header/useSafeGoBack.ts","/src/components/v2BaseComponents/Header/HeaderStack.tsx","/src/components/v2BaseComponents/Header/OrganizationButton.tsx","/src/hooks/api/useNotes.ts","/src/components/shared/Notes/utils/types.ts","/src/hooks/api/useHasNotePermission.ts","/src/components/v2BaseComponents/AIChatButton.tsx","/src/components/v2BaseComponents/Header/LogoHeader.tsx","/src/components/v2BaseComponents/Header/StandardHeader.tsx","/src/components/v2BaseComponents/Header/BackDisabledStandardHeader.tsx","/src/components/v2BaseComponents/Header/Breadcrumbs.tsx","/src/hooks/api/useAuditLog.ts","/src/hooks/api/useCareTeamMember.ts","/src/utils/careTeamUtils.ts","/src/hooks/api/useCollaborator.ts","/src/hooks/api/useReports.ts","/src/hooks/api/useMedicalProfileFiles.ts","/src/hooks/api/useDateLabs.ts","/src/hooks/api/useLabHistory.ts","/src/hooks/api/useResource.ts","/src/utils/resourceUtils/getResourceTitle.ts","/src/hooks/useVisitName.ts","/src/utils/medicalDataUtils.ts","/node_modules/lodash/uniqBy.js","/node_modules/lodash/_baseUniq.js","/node_modules/lodash/_arrayIncludes.js","/node_modules/lodash/_baseIndexOf.js","/node_modules/lodash/_baseFindIndex.js","/node_modules/lodash/_baseIsNaN.js","/node_modules/lodash/_strictIndexOf.js","/node_modules/lodash/_arrayIncludesWith.js","/node_modules/lodash/_createSet.js","/node_modules/lodash/noop.js","/src/utils/toTitleCase.ts","/src/hooks/api/useCollaboratorInvitation.ts","/src/hooks/api/useCollaboratorInvitations.ts","/src/hooks/api/useProfilePendingTransferRequest.ts","/src/utils/collaboratorUtils.ts","/src/hooks/api/useOrganizationClientRecords.ts","/src/components/v2BaseComponents/Header/NoHeader.tsx","/src/components/v2BaseComponents/Header/DektopLogoHeader.tsx","/src/hooks/useUrlUTMParameters.ts","/src/hooks/api/useUserUTMParameters.ts","/src/components/AppNavigator/ActivityNavigation.tsx","/src/components/screens/Tabs/Activity/index.tsx","/src/components/screens/Tabs/Activity/ActivityScreen/index.tsx","/src/components/shared/LogList/index.tsx","/src/components/shared/LogList/LogList.tsx","/src/hooks/api/useAuditLogs.ts","/src/hooks/useRefetchOnFocus.ts","/src/components/shared/LogList/LogSearch.tsx","/src/components/v2BaseComponents/SearchInput/index.tsx","/src/components/v2BaseComponents/Inputs/ProfileMultiSelect.tsx","/src/components/shared/LogList/types.ts","/src/components/shared/LogList/LogCard/index.ts","/src/components/shared/LogList/LogCard/BaseLogCard.tsx","/src/components/v2BaseComponents/Card/index.tsx","/src/components/v2BaseComponents/ReferenceCounts.tsx","/src/utils/entityIcons.tsx","/src/components/shared/LogList/LogCard/AuditLogLogCard.tsx","/src/components/shared/LogList/utils/getLogAvatarProps.ts","/src/components/shared/LogList/LogCard/LogCardAvatar.tsx","/src/hooks/api/useMedicalProfileOwner.ts","/src/hooks/api/useCollaborators.ts","/src/components/shared/LogList/LogCard/ProfilesProvider.tsx","/src/hooks/api/useOrganizationMedicalProfiles.ts","/src/components/shared/EmptyStateHint/index.tsx","/src/components/shared/LogList/ProAppProfilesProvider.tsx","/src/components/screens/Tabs/Activity/ActivityScreen/GuidanceContent.tsx","/src/hooks/useGuidanceAction.tsx","/src/components/screens/Tabs/Activity/ActivityScreen/useSelectedProfileIds.tsx","/src/hooks/api/useMyOrganizationClientInvitations.ts","/src/components/screens/Tabs/Activity/ActivityScreen/PendingOrganizationClientInvitationLogCard.tsx","/src/components/shared/OrganizationInvitationGate/index.tsx","/src/components/shared/OrganizationInvitationGate/OrganizationClientInvitation/index.tsx","/src/components/shared/OrganizationInvitationGate/OrganizationClientInvitation/ConsentStep/index.tsx","/src/components/shared/OrganizationInvitationGate/OrganizationClientInvitation/ConsentStep/ConsentFile.tsx","/src/components/shared/OrganizationInvitationGate/OrganizationClientInvitation/StepPaper.tsx","/src/components/shared/OrganizationInvitationGate/OrganizationClientInvitation/GateButtons.tsx","/src/components/shared/MaybeStackedButtons/index.tsx","/src/hooks/api/useOrganizationInvitationDefinitions.ts","/src/components/v2BaseComponents/ImagePicker/TempFilePicker/index.tsx","/src/components/v2BaseComponents/ImagePicker/TempFilePicker/useTempFile.ts","/src/components/v2BaseComponents/SectionHeader/index.tsx","/src/components/shared/OrganizationInvitationGate/OrganizationClientInvitation/MedicalProfileStep/index.tsx","/src/components/shared/OrganizationInvitationGate/OrganizationClientInvitation/utils.ts","/src/components/shared/OrganizationInvitationGate/OrganizationClientInvitation/MedicalProfileStep/SelectExistingProfile/index.tsx","/src/components/shared/OrganizationInvitationGate/OrganizationClientInvitation/StepCompleteButton.tsx","/src/components/shared/OrganizationInvitationGate/OrganizationClientInvitation/MedicalProfileStep/CreateProfile/index.tsx","/src/components/shared/OrganizationInvitationGate/OrganizationClientInvitation/PermissionsStep/index.tsx","/src/utils/defaultPermissions.ts","/src/components/v2BaseComponents/Header/NonActionableHeader.tsx","/src/components/shared/OrganizationInvitationGate/OrganizationClientInvitation/IntroStep/index.tsx","/src/components/shared/OrganizationInviteLogo/index.tsx","/src/components/screens/Tabs/Activity/AuditLogDetailsScreen/index.tsx","/src/components/shared/AuditLogDetails/index.tsx","/src/components/shared/AuditLogDetails/ReferenceCards.tsx","/src/components/shared/CollaboratorCard/index.tsx","/src/utils/evaluatePermissions.ts","/src/components/shared/InvitationCard/index.tsx","/src/hooks/api/useMedicalProfileInvitation.ts","/src/components/shared/CareTeamMemberCard/index.tsx","/src/components/shared/EndpointCard/EndpointCard.tsx","/src/hooks/api/useOneUpEndpoint.ts","/src/components/shared/NoteCard/index.tsx","/src/components/shared/Notes/utils/getNoteTags.ts","/src/components/shared/SelectableMinimalCard.tsx","/src/components/v2BaseComponents/MarkdownDisplay/index.tsx","/node_modules/react-native-markdown-display/src/index.js","/node_modules/prop-types/index.js","/node_modules/prop-types/factoryWithThrowingShims.js","/node_modules/prop-types/lib/ReactPropTypesSecret.js","/node_modules/react-native-markdown-display/src/lib/parser.js","/node_modules/react-native-markdown-display/src/lib/util/tokensToAST.js","/node_modules/react-native-markdown-display/src/lib/util/getUniqueID.js","/node_modules/react-native-markdown-display/src/lib/util/getTokenTypeByToken.js","/node_modules/react-native-markdown-display/src/lib/util/stringToTokens.js","/node_modules/react-native-markdown-display/src/lib/util/cleanupTokens.js","/node_modules/react-native-markdown-display/src/lib/util/flattenInlineTokens.js","/node_modules/react-native-markdown-display/src/lib/util/renderInlineAsText.js","/node_modules/react-native-markdown-display/src/lib/util/groupTextTokens.js","/node_modules/react-native-markdown-display/src/lib/util/Token.js","/node_modules/react-native-markdown-display/src/lib/util/omitListItemParagraph.js","/node_modules/react-native-markdown-display/src/lib/util/hasParents.js","/node_modules/react-native-markdown-display/src/lib/util/openUrl.js","/node_modules/react-native-markdown-display/src/lib/renderRules.js","/node_modules/react-native-fit-image/dist/FitImage.js","/node_modules/react-native-markdown-display/src/lib/data/textStyleProps.js","/node_modules/react-native-markdown-display/src/lib/AstRenderer.js","/node_modules/react-native-markdown-display/src/lib/util/convertAdditionalStyles.js","/node_modules/css-to-react-native/index.js","/node_modules/camelize/index.js","/node_modules/css-color-keywords/index.js","/node_modules/css-color-keywords/colors.json","/node_modules/react-native-markdown-display/node_modules/markdown-it/index.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/index.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/common/utils.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/common/entities.js","/node_modules/react-native-markdown-display/node_modules/entities/lib/maps/entities.json","/node_modules/react-native-markdown-display/node_modules/uc.micro/categories/P/regex.js","/node_modules/react-native-markdown-display/node_modules/mdurl/index.js","/node_modules/react-native-markdown-display/node_modules/mdurl/encode.js","/node_modules/react-native-markdown-display/node_modules/mdurl/decode.js","/node_modules/react-native-markdown-display/node_modules/mdurl/format.js","/node_modules/react-native-markdown-display/node_modules/mdurl/parse.js","/node_modules/react-native-markdown-display/node_modules/uc.micro/index.js","/node_modules/react-native-markdown-display/node_modules/uc.micro/properties/Any/regex.js","/node_modules/react-native-markdown-display/node_modules/uc.micro/categories/Cc/regex.js","/node_modules/react-native-markdown-display/node_modules/uc.micro/categories/Cf/regex.js","/node_modules/react-native-markdown-display/node_modules/uc.micro/categories/Z/regex.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/helpers/index.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/helpers/parse_link_label.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/helpers/parse_link_destination.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/helpers/parse_link_title.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/renderer.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/parser_core.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/ruler.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_core/normalize.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_core/block.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_core/inline.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_core/linkify.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_core/replacements.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_core/smartquotes.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_core/state_core.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/token.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/parser_block.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_block/table.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_block/code.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_block/fence.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_block/blockquote.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_block/hr.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_block/list.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_block/reference.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_block/heading.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_block/lheading.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_block/html_block.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/common/html_blocks.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/common/html_re.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_block/paragraph.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_block/state_block.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/parser_inline.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_inline/text.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_inline/newline.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_inline/escape.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_inline/backticks.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_inline/strikethrough.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_inline/emphasis.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_inline/link.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_inline/image.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_inline/autolink.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_inline/html_inline.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_inline/entity.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_inline/balance_pairs.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_inline/text_collapse.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/rules_inline/state_inline.js","/node_modules/react-native-markdown-display/node_modules/linkify-it/index.js","/node_modules/react-native-markdown-display/node_modules/linkify-it/lib/re.js","/node_modules/punycode/punycode.es6.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/presets/default.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/presets/zero.js","/node_modules/react-native-markdown-display/node_modules/markdown-it/lib/presets/commonmark.js","/node_modules/react-native-markdown-display/src/lib/util/removeTextStyleProps.js","/node_modules/react-native-markdown-display/src/lib/styles.js","/node_modules/markdown-truncate/lib/index.js","/src/components/shared/ResourceCard/index.tsx","/src/components/shared/ResourceCard/LazyLoadedReferenceCounts.tsx","/src/hooks/api/useMedicalProfileData.ts","/src/hooks/api/useResourceReferenceCounts.ts","/node_modules/@yornaath/batshit/dist/index.esm.js","/node_modules/@yornaath/batshit/dist/deferred.esm.js","/node_modules/lodash/lodash.js","/src/components/v2BaseComponents/IsInViewport.tsx","/src/components/shared/ResourceCard/VisitCard.tsx","/src/components/shared/LargeDateDisplay.tsx","/src/utils/getDosageInstructions.ts","/src/components/shared/ProfileCard/index.tsx","/src/components/shared/SharedReportCard/index.tsx","/src/components/shared/FileCard/index.tsx","/src/components/shared/MedicalProfileFileIconDisplay/index.tsx","/src/hooks/api/useMedicalProfileFileImage.ts","/src/components/shared/FileDisplay/PageDisplay.tsx","/src/components/shared/FileDisplay/utils.ts","/src/components/v2BaseComponents/FullScreenImageView/index.tsx","/src/components/v2BaseComponents/FullScreenImageView/FullScreenImageView.tsx","/src/components/v2BaseComponents/FullScreenImageView/NativeImageView.tsx","/node_modules/@staltz/react-native-image-viewing/dist/index.js","/node_modules/@staltz/react-native-image-viewing/dist/ImageViewing.js","/node_modules/@staltz/react-native-image-viewing/dist/components/ImageItem/ImageItem.web.js","/node_modules/@staltz/react-native-image-viewing/dist/hooks/useImageDimensions.js","/node_modules/@staltz/react-native-image-viewing/dist/utils.js","/node_modules/@staltz/react-native-image-viewing/dist/components/ImageItem/ImageLoading.js","/node_modules/@staltz/react-native-image-viewing/dist/components/ImageDefaultHeader.js","/node_modules/@staltz/react-native-image-viewing/dist/components/StatusBarManager.js","/node_modules/@staltz/react-native-image-viewing/dist/hooks/useAnimatedComponents.js","/node_modules/@staltz/react-native-image-viewing/dist/hooks/useImageIndexChange.js","/node_modules/@staltz/react-native-image-viewing/dist/hooks/useRequestClose.js","/src/components/v2BaseComponents/FullScreenImageView/WebImageView.tsx","/node_modules/react-zoom-pan-pinch/dist/index.esm.js","/src/components/v2BaseComponents/FullScreenImageView/AvatarAPIImagesProvider.tsx","/src/components/v2BaseComponents/FullScreenImageView/DirectUrlImageProvider.tsx","/src/components/v2BaseComponents/FullScreenImageView/types.ts","/src/components/shared/InvoiceCard/index.tsx","/src/utils/centsToDollarsConversion.ts","/src/hooks/api/useCollaboratorInvoices.ts","/src/hooks/api/useFeatureToggles.ts","/src/components/shared/ProfileDirectiveCard/index.tsx","/src/hooks/api/useMedicalProfileDirectives.ts","/src/components/shared/CommentList/CommentList.tsx","/src/components/v2BaseComponents/FadeIn.tsx","/src/components/v2BaseComponents/MessageInput/index.tsx","/src/components/shared/CommentList/index.tsx","/src/components/shared/Notes/NoteDetails/NotesCommentsList.tsx","/src/components/shared/CommentList/CommentItem.tsx","/src/components/shared/AuditLogDetails/ProfileMessageDetails.tsx","/src/components/screens/Tabs/Activity/AddMessageScreen/index.tsx","/src/components/shared/ProfileMessaging/index.ts","/src/components/shared/ProfileMessaging/ProfileMessageInput.tsx","/src/components/shared/ProfileMessaging/SelectedProfilesHeader.tsx","/src/components/shared/ProfileMessaging/SharedProfilesHeader.tsx","/src/components/shared/ProfileMessaging/SelectedClientProfilesHeader.tsx","/src/components/shared/ProfileMessaging/useProfileMessagingState.ts","/src/hooks/api/useProfileMessages.ts","/src/components/AppNavigator/NotesNavigation.tsx","/src/components/screens/Tabs/Notes/index.tsx","/src/components/screens/Tabs/Notes/AddNoteScreen/index.tsx","/src/components/shared/Notes/NotesEditor/index.tsx","/src/components/shared/Notes/NotesEditor/Actions.tsx","/src/components/shared/AudioRecording/index.tsx","/src/components/shared/AudioRecording/AudioRecordingContainer.tsx","/src/components/shared/AudioRecording/PromptAudioButton.tsx","/src/components/shared/AudioRecording/Recorder.tsx","/node_modules/expo-av/build/index.js","/node_modules/expo-av/build/Audio.js","/node_modules/expo-av/build/Audio.types.js","/node_modules/expo-av/build/ExponentAV.web.js","/node_modules/expo-av/build/Audio/RecordingConstants.js","/node_modules/expo-av/build/Audio/Recording.js","/node_modules/expo-av/build/Audio/AudioAvailability.js","/node_modules/expo-av/build/Audio/Sound.js","/node_modules/expo-av/build/AV.js","/node_modules/expo-av/build/AV.types.js","/node_modules/expo-av/build/Audio/Recording.types.js","/node_modules/expo-av/build/Video.js","/node_modules/expo-av/build/ExpoVideoManager.web.js","/node_modules/expo-av/build/FullscreenUtils.web.js","/node_modules/expo-av/build/ExponentVideo.web.js","/node_modules/expo-av/build/Video.types.js","/src/components/shared/AudioRecording/useProcessAndUploadFile.ts","/src/hooks/useLocation.ts","/node_modules/expo-network/build/Network.js","/node_modules/expo-network/build/ExpoNetwork.web.js","/node_modules/expo-network/build/Network.types.js","/src/components/shared/MedicalProfileUsageIndicator/index.tsx","/src/hooks/api/useMedicalProfileUsageMetric.ts","/src/components/shared/Notes/NotesEditor/AttachmentPicker/index.tsx","/src/components/shared/Notes/NotesEditor/AttachmentList/index.tsx","/src/components/shared/Notes/AttachmentListItem.tsx","/src/components/shared/Notes/utils/noteFileToNoteModified.ts","/src/components/screens/Tabs/Notes/NoteDetailsScreen/index.tsx","/src/components/shared/Notes/NoteDetails/index.tsx","/src/components/shared/Notes/NoteDetails/NoteDetailsHeader.tsx","/src/components/shared/Notes/NoteDetails/DetailsTab.tsx","/src/components/shared/Notes/NoteDetails/AttachmentList.tsx","/src/components/shared/SendNoteSideDrawerContent/index.tsx","/src/components/v2BaseComponents/Form/SideDrawerFormContainer.tsx","/src/components/v2BaseComponents/SideDrawer/index.tsx","/src/components/v2BaseComponents/SideDrawer/MaybeRenderedSideDrawer.tsx","/src/components/v2BaseComponents/SideDrawer/SideDrawerContainer.tsx","/src/components/v2BaseComponents/SideDrawer/DrawerContentContainer.tsx","/src/components/v2BaseComponents/SideDrawer/SideDrawerContentContainer.tsx","/src/components/shared/EmailListConfiguration/index.tsx","/src/components/shared/EmailListConfiguration/CollaboratorsProvider.tsx","/src/components/shared/EmailListConfiguration/EmailSelection.tsx","/src/components/screens/Tabs/Notes/NoteEditScreen/index.tsx","/src/components/screens/Tabs/Notes/NotesRootScreen/index.tsx","/src/components/shared/Notes/NotesList/index.tsx","/src/components/shared/Notes/NotesList/NoteSearch.tsx","/src/components/shared/Notes/NotesList/CopyOrganizationNotesSideDrawerContent.tsx","/src/components/shared/ClientRecord/CopyOrganizationNoteToClients/index.tsx","/src/components/screens/Tabs/Notes/NoteTransferScreen/index.tsx","/src/components/shared/Notes/TransferNote/index.tsx","/src/components/shared/Notes/TransferNote/ProfileSelect.tsx","/src/components/shared/Notes/TransferNote/SelectLoader.tsx","/src/components/shared/Notes/TransferNote/DomainSelect.tsx","/src/components/shared/Notes/TransferNote/CareTeamMemberSelect.tsx","/src/hooks/api/useCareTeamMembers.ts","/src/components/shared/Notes/TransferNote/ResourceSelect.tsx","/src/components/shared/ResourceSearch/ResourceSearch.tsx","/src/components/shared/ResourceSearch/ResourceListSearchFilters/index.tsx","/src/components/shared/Filtering/index.ts","/src/components/shared/Filtering/Container.tsx","/src/components/shared/Filtering/SelectFilter.tsx","/src/utils/addCountToString.ts","/src/components/shared/Filtering/SearchBar.tsx","/src/components/shared/Filtering/FilterPopoverContent.tsx","/src/components/shared/Filtering/FilterButton.tsx","/src/components/shared/Filtering/MultiSelectFilter..tsx","/src/components/shared/ResourceSearch/ResourceListSearchFilters/getFilterSummary.ts","/src/components/shared/ResourceSearch/SearchResultsList.tsx","/src/components/shared/ResourceSearch/ResourceListCard.tsx","/src/components/screens/Tabs/Notes/SendNoteScreen/index.tsx","/src/components/AppNavigator/ProfilesNavigation.tsx","/src/components/screens/Tabs/Profiles/index.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/index.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ConsumerAppProfilesRoot/index.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ConsumerAppProfilesRoot/ProfileItem/index.tsx","/src/hooks/api/useProfileInUnreadAppNotificationCount.ts","/src/components/v2BaseComponents/NotificationIndicator/NotificationCountIndicator.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ConsumerAppProfilesRoot/InvitationAlert.tsx","/src/components/v2BaseComponents/LargeAlertPaper.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ConsumerAppProfilesRoot/RegistrationAddProfileModal.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ConsumerAppProfilesRoot/GuidanceContext.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ConsumerAppProfilesRoot/ExternalInboundTransferRequestAlert.tsx","/src/hooks/api/useInboundTransferRequests.ts","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ConsumerAppProfilesRoot/useAddProfileButtonAction.tsx","/src/hooks/useUserHasOwnMedicalProfile.ts","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ConsumerAppProfilesRoot/ClientInvitationAlert.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/index.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/index.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/ClientRecordsTable.tsx","/src/components/v2BaseComponents/RichTable/useRichTableState.ts","/src/utils/clientRecordsUtil.ts","/src/components/v2BaseComponents/RichTable/index.tsx","/src/hooks/useTableCellDimensions.ts","/src/components/v2BaseComponents/RichTable/utils.ts","/src/components/v2BaseComponents/RichTable/TableColumnHeader.tsx","/src/components/v2BaseComponents/RichTable/SortToggle.tsx","/src/components/v2BaseComponents/RichTable/SelectionCheckbox.tsx","/src/components/v2BaseComponents/RichTable/SearchFilters.tsx","/src/components/v2BaseComponents/RichTable/CollapsableContent.tsx","/src/components/v2BaseComponents/RichTable/useResetSelection.ts","/src/components/v2BaseComponents/RichTable/TableActions/index.tsx","/src/components/v2BaseComponents/RichTable/types.ts","/src/components/v2BaseComponents/RichTable/TableActions/TableActionButton.tsx","/src/components/v2BaseComponents/RichTable/TableActions/useFilterShownTableActions.ts","/src/components/shared/IndeterminateLoadingBar/index.tsx","/src/components/v2BaseComponents/RichTable/TableRow/index.tsx","/src/components/v2BaseComponents/RichTable/TableRow/useHoverState.tsx","/src/components/v2BaseComponents/RichTable/SelectedCategoriesDisplay.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/EditClientGroupsSideDrawerContent.tsx","/src/hooks/api/useOrganizationGroups.ts","/src/components/shared/ClientProfile/EditClientGroups/index.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/AddClientRecordSideDrawerContent.tsx","/src/components/shared/ClientRecord/ClientRecordFields/index.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/AddClientInvitationSideDrawerContent.tsx","/src/hooks/api/useOrganizationClientInvitations.ts","/src/components/shared/OrganizationClientInvitations/OrganizationClientInvitationFields/index.tsx","/src/components/shared/MaybePublicOrgMissingInfoAlert.tsx","/src/hooks/useIsPublicOrgMissingInfo.ts","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/ReEngageClientPromptContent.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/EditClientRecordSideDrawerContent.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/AddClientRecordInvitationSideDrawerContent.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/RevokeInvitationPromptContent.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/ArchiveClientPromptContent.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/DeactivateClientPromptContent.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/UnArchiveClientPromptContent.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/CopyOrganizationNotesSideDrawerContent.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/CopyOrganizationCareTeamMemberSideDrawerContent.tsx","/src/components/shared/ClientRecord/CopyOrganizationCareTeamMembersToClients/index.tsx","/src/hooks/api/useOrganizationCareTeamMembers.ts","/src/components/screens/Tabs/Profiles/DataDetailsScreen/useFilterCareTeamMembers.ts","/src/components/screens/Tabs/Profiles/DataDetailsScreen/CareTeamMemberListCard.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/SendClientsMessageSideDrawerContent.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/ClientsActivitySideDrawerContent.tsx","/src/hooks/api/usePersistFileToClientProfiles.ts","/src/hooks/api/useOrganizationAllowedMedicalProfileUsage.ts","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/CopyVisitToClientsSideDrawerContent.tsx","/src/hooks/api/usePersistVisitToClientProfiles.ts","/src/components/shared/ResourceForms/VisitForm/Form.tsx","/src/components/shared/ResourceForms/ImagesField/index.tsx","/src/components/shared/ResourceForms/ImagesField/ResourceImageInput.tsx","/src/components/shared/ResourceForms/ImagesField/ImageInput.tsx","/src/components/shared/ResourceForms/ImagesField/types.ts","/src/utils/generateRandomID.ts","/src/components/shared/ResourceForms/ProviderFields.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/DeleteClientRecordsPromptContent.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/EditClientInvitationSideDrawerContent.tsx","/src/components/shared/ClientInvitationProvider.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/useSelectedCategories.ts","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/useRenderMultipleStatusSelectionDisplay.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/useMultipleSelectionWarningPrompt.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/BulkAddClientProfilesGroupsSideDrawerContent.tsx","/src/components/shared/BulkAddClientProfilesGroups/index.tsx","/src/hooks/api/useOrganizationPaymentIntegration.ts","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/EditClientRecordBillingInformationSideDrawerContent.tsx","/src/components/shared/EditClientBillingInfo/EditClientBillingInfoFields.tsx","/src/hooks/api/useOrganizationClientRecordBillingDetails.ts","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/ClientInvoiceItemsSideDrawerContent/index.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/ClientInvoiceItemsSideDrawerContent/AddInvoiceItemContent.tsx","/src/components/shared/ClientInvoiceItems/ClientInvoiceItemFields.tsx","/src/hooks/api/useOrganizationClientRecordInvoiceItems.ts","/src/components/shared/ClientInvoiceItems/index.tsx","/src/components/shared/ClientInvoiceItems/InvoiceItemsList.tsx","/src/components/shared/ClientInvoiceItems/BillingContactDetailsHeader.tsx","/src/components/shared/ClientInvoiceItems/useClientInvoiceItemsState.ts","/src/components/shared/ClientInvoiceItems/useSendInvoicePrompt.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/ClientInvoiceItemsSideDrawerContent/EditInvoiceItemContent.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/ClientInvoiceItemsSideDrawerContent/InvoiceItemsListContent.tsx","/src/hooks/api/useOrganizationClientRecordInvoices.ts","/src/components/shared/EditClientBillingInfo/index.tsx","/src/components/shared/EditClientBillingInfo/RequiredClientBillingInfoGate.tsx","/src/hooks/useScreenParamStorage.ts","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/ArchiveClientsPromptContent.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AdminProfilesRoot/RevokeInvitationsPromptContent.tsx","/src/hooks/api/useOrganizationClientProfileUnreadInAppNotificationCount.ts","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AgentProfilesRoot/index.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AgentProfilesRoot/ClientProfilesTable.tsx","/src/components/screens/Tabs/Profiles/ProfilesRootScreen/ProAppProfilesRoot/AgentProfilesRoot/ClientProfileDetailsSideDrawerContent.tsx","/src/components/shared/ClientProfile/ClientProfileDetails/index.tsx","/src/components/screens/Tabs/Profiles/AddProfileScreen/index.tsx","/src/components/shared/ContactDetailsForm/index.tsx","/src/components/screens/Tabs/Profiles/ProfileScreen/index.tsx","/src/components/screens/Tabs/Profiles/ProfileScreen/ProfileScreenContent/HealthTab.tsx","/src/components/screens/Tabs/Profiles/ProfileScreen/ProfileCardButtons/index.tsx","/src/components/v2BaseComponents/Permissions/PermissionCheck.tsx","/src/components/shared/RefreshProgress/index.tsx","/src/hooks/api/useMedicalProfileRefreshProgress.ts","/src/components/v2BaseComponents/ProgressBar/index.tsx","/node_modules/expo-linear-gradient/build/LinearGradient.js","/node_modules/expo-linear-gradient/build/NativeLinearGradient.web.js","/node_modules/expo-linear-gradient/build/normalizeColor.js","/src/components/v2BaseComponents/CardButton/index.tsx","/src/components/v2BaseComponents/SizedView.tsx","/src/hooks/useProfileCounts.ts","/src/hooks/api/useOneUpRefresh.ts","/src/hooks/api/useProfileTransferRequest.ts","/src/hooks/useDeleteButtonModal.tsx","/src/hooks/useRemoveSelfAsCollaboratorButton.tsx","/src/components/screens/Tabs/Profiles/ProfileScreen/PendingOwnershipTransferAlert/index.tsx","/src/components/screens/Tabs/Profiles/ProfileScreen/ProfileScreenContent/ProfileSubscribeBanner.tsx","/src/hooks/useProfileSubscribeBanner.tsx","/src/hooks/api/useIsProfilePaid.ts","/src/components/shared/ProfileAccessContent/index.tsx","/src/components/shared/ProfileAccessContent/CollaboratorAndInviteList/index.tsx","/src/components/screens/Tabs/Profiles/ProfileScreen/useActiveProfileTab.ts","/src/components/v2BaseComponents/ProfileHeaderContainer/index.tsx","/src/components/shared/SearchBar/index.tsx","/src/components/shared/SearchBar/SearchPromptContents.tsx","/src/components/shared/SearchBar/SearchInput.tsx","/src/components/shared/SearchBar/MobileChatsButton.tsx","/src/components/shared/SearchBar/DesktopChatHistory.tsx","/src/hooks/api/useChat.ts","/src/hooks/api/useMedicalProfileSearch.ts","/src/components/shared/SearchBar/SearchResults.tsx","/src/components/shared/SearchBar/SearchResult/index.tsx","/src/components/shared/SearchBar/SearchResult/BaseSearchResult.tsx","/src/hooks/api/useMedicalProfileResource.ts","/src/components/shared/SearchBar/SearchHistory.tsx","/src/components/shared/SearchBar/useSearchText.tsx","/src/components/shared/SearchBar/useSearchHistory.ts","/src/components/shared/SearchBar/SearchPromptInput.tsx","/src/components/v2BaseComponents/ProfileActivity/index.tsx","/src/components/v2BaseComponents/ProfileActivity/ActivityCalendar.tsx","/src/components/v2BaseComponents/Calendar/index.tsx","/src/components/v2BaseComponents/Calendar/Calendar.tsx","/src/components/v2BaseComponents/Calendar/CalendarMonthHelper.ts","/src/components/v2BaseComponents/Calendar/Day.tsx","/src/components/v2BaseComponents/Calendar/constants.ts","/src/components/v2BaseComponents/Calendar/DateScanHeader/DateMonthScanHeader.tsx","/src/components/v2BaseComponents/Calendar/DateScanHeader/BaseScanHeader.tsx","/src/components/v2BaseComponents/Calendar/YearScanMonthSelector.tsx","/src/components/v2BaseComponents/Calendar/DateScanHeader/YearScanHeader.tsx","/src/components/v2BaseComponents/Calendar/utils.ts","/src/components/v2BaseComponents/Calendar/types.tsx","/src/components/v2BaseComponents/ProfileActivity/useCalendarEvents.ts","/src/components/v2BaseComponents/ProfileActivity/types.ts","/src/components/v2BaseComponents/ProfileActivity/ActivityCalendarDay.tsx","/src/components/v2BaseComponents/ProfileActivity/ActivityIndicator.tsx","/src/components/v2BaseComponents/ProfileActivity/utils.ts","/src/components/v2BaseComponents/ProfileActivity/FocusedEventsPrompt.tsx","/src/components/v2BaseComponents/ProfileActivity/DayEventList.tsx","/src/components/v2BaseComponents/ProfileActivity/ActivityCalendarHeader/index.tsx","/src/components/v2BaseComponents/ProfileActivity/ActivityCalendarHeader/CalendarModeToggle.tsx","/src/components/v2BaseComponents/ToggleSet/index.tsx","/src/components/v2BaseComponents/ProfileActivity/ActivityListContent/index.tsx","/src/components/v2BaseComponents/ProfileActivity/ActivityListContent/ActivityListDateDisplay.tsx","/src/components/v2BaseComponents/ProfileActivity/YearScanMonthDisplay.tsx","/src/components/v2BaseComponents/ProfileActivity/DesktopRecentActivitySection/index.tsx","/src/components/v2BaseComponents/ProfileActivity/DesktopRecentActivitySection/MessagesList.tsx","/src/components/v2BaseComponents/ProfileActivity/DesktopRecentActivitySection/ListSection.tsx","/src/components/v2BaseComponents/ProfileActivity/DesktopRecentActivitySection/SendMessageContent.tsx","/src/hooks/api/useProfileInAppNotifications.ts","/src/components/shared/InAppNotificationCard/index.tsx","/src/components/v2BaseComponents/NotificationIndicator/NotificationIndicator.tsx","/src/components/v2BaseComponents/ProfileActivity/DesktopRecentActivitySection/MessageSideDrawerContent/index.tsx","/src/components/shared/InAppNotificationsList/useNotificationListState.ts","/src/components/shared/InAppNotificationsList/index.tsx","/src/components/v2BaseComponents/ProfileActivity/DesktopRecentActivitySection/NotesList.tsx","/src/components/v2BaseComponents/ProfileActivity/DesktopRecentActivitySection/LoadingContent.tsx","/src/components/v2BaseComponents/ProfileActivity/DesktopRecentActivitySection/AddNoteContent.tsx","/src/components/v2BaseComponents/ProfileActivity/MobileActivitySection.tsx","/src/components/v2BaseComponents/ProfileActivity/PendingTransferRequestAlert.tsx","/src/components/screens/Tabs/Profiles/EditProfileScreen/index.tsx","/src/hooks/useSetHeaderTitle.ts","/src/utils/genderSexToString.ts","/src/components/screens/Tabs/Profiles/EditProfileScreen/MedicalProfileCards/index.tsx","/src/hooks/api/useMedicalProfileCards.ts","/src/components/screens/Tabs/Profiles/EditProfileScreen/AdvancedDirectives/index.tsx","/src/components/screens/Tabs/Profiles/EditProfileScreen/AdvancedDirectives/CodeStatusSection.tsx","/src/components/screens/Tabs/Profiles/EditProfileScreen/AdvancedDirectives/EditCodeStatusSideDrawerContent.tsx","/src/components/shared/Directives/CodeStatusFormFields.tsx","/src/components/shared/Directives/FilesField.tsx","/src/hooks/useCodeStatusDescriptiveLabel.tsx","/src/components/screens/Tabs/Profiles/EditProfileScreen/AdvancedDirectives/POASection.tsx","/src/components/screens/Tabs/Profiles/EditProfileScreen/AdvancedDirectives/EditPOASideDrawerContent.tsx","/src/components/shared/Directives/POAFormFields.tsx","/src/components/screens/Tabs/Profiles/ProfileContactDetailsScreen/index.tsx","/src/components/screens/Tabs/Profiles/ProfileContactDetailsScreen/EditContactDetailsContext.ts","/src/components/screens/Tabs/Profiles/ProfileContactDetailsScreen/EditStep1.tsx","/src/components/screens/Tabs/Profiles/ProfileContactDetailsScreen/EditStep2.tsx","/src/components/screens/Tabs/Profiles/EmergencyContactCreateScreen/index.tsx","/src/components/screens/Tabs/Profiles/EmergencyContactEditScreen/index.tsx","/src/components/screens/Tabs/Profiles/EmergencyContactListScreen/index.tsx","/src/components/screens/Tabs/Profiles/CareTeamScreen/index.tsx","/src/components/shared/CareTeamMemberList/index.tsx","/src/components/shared/CareTeamMemberList/CareTeamMemberTypeFilter.tsx","/src/components/shared/CareTeamMemberList/CareTeamMemberSearchFilter.tsx","/src/components/shared/CareTeamMemberList/CareTeamActiveFilter.tsx","/src/components/screens/Tabs/Profiles/CareTeamScreen/CopyOrganizationCareTeamMemberSideDrawerContent.tsx","/src/components/screens/Tabs/Profiles/AddCareTeamScreen/index.tsx","/src/components/shared/CareTeamForm/index.tsx","/src/components/shared/CareTeamForm/CareTeamActionButtonForm.tsx","/src/components/shared/CareTeamForm/CareTeamTypeConditionalRenderContainer.tsx","/src/components/shared/CareTeamForm/CareTeamTypeSelect.tsx","/src/components/shared/CareTeamForm/SelectCareTeamMemberTypeContext.ts","/src/components/shared/CareTeamForm/useCareTeamFormHelpers.tsx","/src/components/shared/CareTeamForm/CareTeamFields/InsuranceFields.tsx","/src/components/shared/CareTeamForm/utils.ts","/src/components/shared/CareTeamForm/CareTeamFields/ProviderFields.tsx","/src/components/shared/CareTeamForm/CareTeamFields/SupportFields.tsx","/src/components/shared/CareTeamForm/CareTeamSideDrawerForm.tsx","/src/components/screens/Tabs/Profiles/CareTeamMemberScreen/index.tsx","/src/components/shared/CareTeam/CareTeamMemberHeader.tsx","/src/components/screens/Tabs/Profiles/CareTeamMemberScreen/relatedResourcesMap.ts","/src/utils/resourceUtils/medicalDataPermissions.ts","/src/hooks/api/useCareTeamMemberResources.ts","/src/components/screens/Tabs/Profiles/CareTeamMemberScreen/CareTeamMemberResources.tsx","/src/hooks/useIdList.ts","/src/hooks/useListEditActions.tsx","/src/components/screens/Tabs/Profiles/CareTeamMemberScreen/DetailsTab.tsx","/src/components/screens/Tabs/Profiles/CareTeamMemberScreen/useInviteCollaboratorWithDefaultValues.ts","/src/components/screens/Tabs/Profiles/CareTeamMemberScreen/CareTeamCollaborators.tsx","/src/components/screens/Tabs/Profiles/CareTeamMemberScreen/CollaboratorCard.tsx","/src/components/screens/Tabs/Profiles/CareTeamMemberScreen/RelatedCareTeam.tsx","/src/components/screens/Tabs/Profiles/CareTeamMemberScreen/useDeleteCareTeamMemberButton.tsx","/src/components/shared/CareTeam/CareTeamMemberDetails.tsx","/src/components/shared/CareTeam/InsuranceCards.tsx","/src/components/v2BaseComponents/LargeDescriptiveImage.tsx","/src/components/screens/Tabs/Profiles/EditCareTeamMemberScreen/index.tsx","/src/components/screens/Tabs/Profiles/CopyCareTeamMemberScreen/index.tsx","/src/components/screens/Tabs/Profiles/AddRelatedCareTeamMemberScreen/index.tsx","/src/components/screens/Tabs/Profiles/InviteCollaboratorScreen/index.tsx","/src/components/screens/Tabs/Profiles/InviteCollaboratorScreen/InviteForm.tsx","/src/components/screens/Tabs/Profiles/InviteCollaboratorScreen/InviteCareTeamMemberHeader.tsx","/src/components/HOC/withRemountOnFocus.tsx","/src/components/screens/Tabs/Profiles/InviteDetailsScreen/index.tsx","/src/components/screens/Tabs/Profiles/InviteDetailsScreen/ConsentField.tsx","/src/components/screens/Tabs/Profiles/CollaboratorScreen/index.tsx","/src/components/screens/Tabs/Profiles/CollaboratorScreen/AssociatedCareTeamMember.tsx","/src/components/screens/Tabs/Profiles/CollaboratorScreen/OrganizationCollaboratorView.tsx","/src/components/screens/Tabs/Profiles/CollaboratorScreen/CollaboratorHeader.tsx","/src/components/shared/ContactDetailsDisplay/index.tsx","/src/components/screens/Tabs/Profiles/CollaboratorScreen/CollaboratorInvoicesTab/index.tsx","/src/hooks/api/useRemoveOrganizationAsCollaborator.ts","/src/components/screens/Tabs/Profiles/AddTransferRequestScreen/index.tsx","/src/components/v2BaseComponents/ProfileOwnerAvatar.tsx","/src/components/screens/Tabs/Profiles/TransferRequestScreen/index.tsx","/src/components/screens/Tabs/Profiles/TransferRequestResponseScreen/index.tsx","/src/components/screens/Tabs/Profiles/AddCardScreen/index.tsx","/src/components/shared/CardForm.tsx","/src/components/screens/Tabs/Profiles/EditCardScreen/index.tsx","/src/components/screens/Tabs/Profiles/EditCardScreen/ViewCard.tsx","/src/components/screens/Tabs/Profiles/DataScreen/index.tsx","/src/components/screens/Tabs/Profiles/DataScreen/StandardResourceList.tsx","/src/components/shared/VisitInviteEmailSideDrawerContent/index.tsx","/src/hooks/api/useProfileVisitInviteEmails.ts","/src/components/screens/Tabs/Profiles/DataScreen/LabDateBucketList.tsx","/src/hooks/api/useLabDateBuckets.ts","/src/components/screens/Tabs/Profiles/DataScreen/UniqueLabs.tsx","/src/hooks/api/useUniqueLabs.ts","/src/components/screens/Tabs/Profiles/DataDetailsScreen/index.tsx","/src/components/screens/Tabs/Profiles/DataDetailsScreen/ResourceDetailsHeader.tsx","/src/components/screens/Tabs/Profiles/DataDetailsScreen/RelatedResourceListTab.tsx","/src/components/screens/Tabs/Profiles/DataDetailsScreen/CareTeamMemberList.tsx","/src/utils/resourceUtils/relatedResourcesMap.ts","/src/utils/resourceUtils/messages.ts","/src/components/screens/Tabs/Profiles/DataDetailsScreen/RelatedResourceListV2/index.tsx","/src/components/screens/Tabs/Profiles/DataDetailsScreen/RelatedResourceListV2/LinkedList.tsx","/src/components/screens/Tabs/Profiles/DataDetailsScreen/RelatedResourceListV2/SuggestLinks.tsx","/src/hooks/api/useRelatedResourceSuggestions.ts","/src/components/shared/ResourceSearch/LoadableResourceContainer.tsx","/src/components/screens/Tabs/Profiles/DataDetailsScreen/RelatedResourceListV2/SuggestedAdditions.tsx","/src/hooks/api/useRelatedResourceDiscoveries.ts","/src/components/screens/Tabs/Profiles/DataDetailsScreen/DetailsTab.tsx","/src/components/screens/Tabs/Profiles/DataDetailsScreen/DetailsList.tsx","/src/components/screens/Tabs/Profiles/DataDetailsScreen/HistoryList.tsx","/src/components/screens/Tabs/Profiles/DataDetailsScreen/ClinicalImpressions.tsx","/src/hooks/api/useResourceDescription.ts","/src/components/screens/Tabs/Profiles/AddDataScreen/index.tsx","/src/components/shared/ResourceForms/ConditionForm.tsx","/src/utils/resourceUtils/isResourceActive.ts","/src/components/shared/ResourceForms/AllergyForm.tsx","/src/components/shared/ResourceForms/MedicationForm/index.tsx","/src/components/shared/ResourceForms/RenderWithProviders.tsx","/src/components/shared/ResourceForms/MedicationForm/MaybeFDAInputGate.tsx","/src/components/shared/ResourceForms/MedicationForm/FDASearchForm.tsx","/src/hooks/api/useFDADrugSearch.ts","/src/components/shared/ResourceForms/MedicationForm/Form.tsx","/src/components/shared/ResourceForms/VisitForm/index.tsx","/src/components/shared/ResourceForms/VaccinationForm/index.tsx","/src/components/shared/ResourceForms/VaccinationForm/VaccineTypeInput.tsx","/src/hooks/api/useVaccineTypeSearch.ts","/src/components/shared/ResourceForms/ProcedureForm/index.tsx","/src/components/shared/ResourceForms/ProcedureForm/Form.tsx","/src/components/shared/ResourceForms/ImagingForm.tsx","/src/components/screens/Tabs/Profiles/EditDataScreen/index.tsx","/src/components/screens/Tabs/Profiles/EditDataScreen/getEditDefaultResource.ts","/src/components/screens/Tabs/Profiles/AddPortalScreen/index.tsx","/src/hooks/api/useOneUpEndpointsSearch.ts","/src/components/screens/Tabs/Profiles/AddPortalScreen/AddPortalInstructions.tsx","/src/hooks/api/useOneUpHealthConnect.ts","/src/components/screens/Tabs/Profiles/AddPortalScreen/NoResultsDisplay.tsx","/src/hooks/useBuildOneUpHealthConnectUrl.ts","/src/components/screens/Tabs/Profiles/AddPortalScreen/PortalConnectionConfirmationContent.tsx","/src/components/screens/Tabs/Profiles/NoteScreen/index.tsx","/src/components/screens/Tabs/Profiles/AddNote/index.tsx","/src/components/screens/Tabs/Profiles/EditNoteScreen/index.tsx","/src/components/screens/Tabs/Profiles/TransferNote/index.tsx","/src/components/screens/Tabs/Profiles/InviteScreen/index.tsx","/src/components/screens/Tabs/Profiles/PortalConnectionScreen/index.tsx","/src/components/screens/Tabs/Profiles/PortalConnectionScreen/DeleteConfirmationPromptContents.tsx","/src/components/screens/Tabs/Profiles/PortalConnectionScreen/PatientMismatchAlert.tsx","/src/components/shared/HelpPrompt/index.tsx","/src/components/screens/Tabs/Profiles/PortalConnectionScreen/DisableAutomaticRefreshToggle.tsx","/src/components/screens/Tabs/Profiles/DataBulkUpdate/index.tsx","/src/components/shared/ResourceSearch/StaticSearchList.tsx","/src/components/screens/Tabs/Profiles/ReportsScreen/index.tsx","/src/components/screens/Tabs/Profiles/ReportsScreen/ReportsList.tsx","/src/components/v2BaseComponents/GridDisplay.tsx","/src/components/screens/Tabs/Profiles/ReportsScreen/ReportCard.tsx","/src/hooks/useLogarithmicApproachProgress.ts","/src/utils/reports.ts","/src/components/screens/Tabs/Profiles/CopyNote/index.tsx","/src/components/screens/Tabs/Profiles/SharedReportScreen/index.tsx","/src/components/screens/Tabs/Profiles/SharedReportScreen/useSharedReportUrl.ts","/node_modules/react-native-qrcode-svg/index.js","/node_modules/react-native-qrcode-svg/src/index.js","/node_modules/react-native-qrcode-svg/src/genMatrix.js","/node_modules/qrcode/lib/browser.js","/node_modules/qrcode/lib/can-promise.js","/node_modules/qrcode/lib/core/qrcode.js","/node_modules/qrcode/lib/core/utils.js","/node_modules/qrcode/lib/core/error-correction-level.js","/node_modules/qrcode/lib/core/bit-buffer.js","/node_modules/qrcode/lib/core/bit-matrix.js","/node_modules/qrcode/lib/core/alignment-pattern.js","/node_modules/qrcode/lib/core/finder-pattern.js","/node_modules/qrcode/lib/core/mask-pattern.js","/node_modules/qrcode/lib/core/error-correction-code.js","/node_modules/qrcode/lib/core/reed-solomon-encoder.js","/node_modules/qrcode/lib/core/polynomial.js","/node_modules/qrcode/lib/core/galois-field.js","/node_modules/qrcode/lib/core/version.js","/node_modules/qrcode/lib/core/mode.js","/node_modules/qrcode/lib/core/version-check.js","/node_modules/qrcode/lib/core/regex.js","/node_modules/qrcode/lib/core/format-info.js","/node_modules/qrcode/lib/core/segments.js","/node_modules/qrcode/lib/core/numeric-data.js","/node_modules/qrcode/lib/core/alphanumeric-data.js","/node_modules/qrcode/lib/core/byte-data.js","/node_modules/qrcode/lib/core/kanji-data.js","/node_modules/dijkstrajs/dijkstra.js","/node_modules/qrcode/lib/renderer/canvas.js","/node_modules/qrcode/lib/renderer/utils.js","/node_modules/qrcode/lib/renderer/svg-tag.js","/node_modules/react-native-qrcode-svg/src/transformMatrixIntoPath.js","/node_modules/react-native-qrcode-svg/src/LogoSVG/index.js","/node_modules/react-native-qrcode-svg/src/utils.js","/node_modules/text-encoding/index.js","/node_modules/text-encoding/lib/encoding.js","/node_modules/text-encoding/lib/encoding-indexes.js","/src/components/screens/Tabs/Profiles/SharedReportScreen/useDownloadQRCode.ts","/src/components/v2BaseComponents/Table/index.tsx","/src/hooks/useCopyToClipboard.ts","/node_modules/expo-clipboard/build/Clipboard.js","/node_modules/expo-clipboard/build/ClipboardPasteButton.js","/node_modules/expo-clipboard/build/ExpoClipboardPasteButton.js","/node_modules/expo-clipboard/build/ExpoClipboard.web.js","/node_modules/expo-clipboard/build/web/ClipboardModule.js","/node_modules/expo-clipboard/build/web/Exceptions.js","/node_modules/expo-clipboard/build/web/Utils.js","/node_modules/expo-clipboard/build/Clipboard.types.js","/src/components/screens/Tabs/Profiles/AddSharedReportScreen/index.tsx","/src/components/screens/Tabs/Profiles/FileScreen/index.tsx","/src/components/shared/FolderSelection/index.tsx","/src/components/shared/FileFolderPath/index.tsx","/src/components/screens/Tabs/Profiles/FileScreen/FileDetails.tsx","/src/components/screens/Tabs/Profiles/FileScreen/FileContents.tsx","/src/components/screens/Tabs/Profiles/FileScreen/FileViewer.tsx","/src/components/shared/FileDisplay/BoundingBoxDisplay.tsx","/src/components/shared/MountAfterDelay.tsx","/src/components/screens/Tabs/Profiles/FileScreen/AudioPlayer.tsx","/src/components/shared/AudioPlayer/MedicalProfileFileAudioPlayer.tsx","/src/hooks/api/useMedicalProfileFileAudio.ts","/src/components/shared/AudioPlayer/AudioPlayer.tsx","/src/components/shared/AudioPlayer/ProgressSlider.tsx","/node_modules/@react-native-assets/slider/dist/index.js","/node_modules/@react-native-assets/slider/dist/Slider.js","/node_modules/react-native-web/dist/cjs/index.js","/node_modules/react-native-web/dist/cjs/exports/createElement/index.js","/node_modules/react-native-web/dist/cjs/modules/AccessibilityUtil/index.js","/node_modules/react-native-web/dist/cjs/modules/AccessibilityUtil/isDisabled.js","/node_modules/react-native-web/dist/cjs/modules/AccessibilityUtil/propsToAccessibilityComponent.js","/node_modules/react-native-web/dist/cjs/modules/AccessibilityUtil/propsToAriaRole.js","/node_modules/react-native-web/dist/cjs/modules/createDOMProps/index.js","/node_modules/react-native-web/dist/cjs/exports/StyleSheet/index.js","/node_modules/react-native-web/dist/cjs/exports/StyleSheet/compiler/index.js","/node_modules/react-native-web/dist/cjs/exports/StyleSheet/compiler/createReactDOMStyle.js","/node_modules/react-native-web/dist/cjs/exports/StyleSheet/compiler/normalizeValueWithProperty.js","/node_modules/react-native-web/dist/cjs/exports/StyleSheet/compiler/unitlessNumbers.js","/node_modules/react-native-web/dist/cjs/exports/StyleSheet/compiler/normalizeColor.js","/node_modules/react-native-web/dist/cjs/modules/isWebColor/index.js","/node_modules/react-native-web/dist/cjs/exports/processColor/index.js","/node_modules/react-native-web/dist/cjs/modules/canUseDom/index.js","/node_modules/react-native-web/dist/cjs/exports/StyleSheet/compiler/hash.js","/node_modules/react-native-web/dist/cjs/exports/StyleSheet/compiler/hyphenateStyleName.js","/node_modules/react-native-web/dist/cjs/modules/prefixStyles/index.js","/node_modules/react-native-web/dist/cjs/modules/prefixStyles/static.js","/node_modules/react-native-web/dist/cjs/exports/StyleSheet/dom/index.js","/node_modules/react-native-web/dist/cjs/exports/StyleSheet/dom/createCSSStyleSheet.js","/node_modules/react-native-web/dist/cjs/exports/StyleSheet/dom/createOrderedCSSStyleSheet.js","/node_modules/react-native-web/dist/cjs/exports/StyleSheet/preprocess.js","/node_modules/react-native-web/dist/cjs/modules/warnOnce/index.js","/node_modules/react-native-web/dist/cjs/exports/StyleSheet/validate.js","/node_modules/react-native-web/dist/cjs/modules/useLocale/index.js","/node_modules/@babel/runtime/helpers/interopRequireWildcard.js","/node_modules/react-native-web/dist/cjs/modules/useLocale/isLocaleRTL.js","/node_modules/react-native-web/dist/cjs/exports/findNodeHandle/index.js","/node_modules/react-native-web/dist/cjs/exports/render/index.js","/node_modules/react-native-web/dist/cjs/exports/unmountComponentAtNode/index.js","/node_modules/react-native-web/dist/cjs/exports/NativeModules/index.js","/node_modules/react-native-web/dist/cjs/exports/UIManager/index.js","/node_modules/react-native-web/dist/cjs/modules/getBoundingClientRect/index.js","/node_modules/react-native-web/dist/cjs/modules/setValueForStyles/index.js","/node_modules/react-native-web/dist/cjs/modules/setValueForStyles/dangerousStyleValue.js","/node_modules/react-native-web/dist/cjs/modules/unitlessNumbers/index.js","/node_modules/react-native-web/dist/cjs/exports/AccessibilityInfo/index.js","/node_modules/react-native-web/dist/cjs/exports/Alert/index.js","/node_modules/react-native-web/dist/cjs/exports/Animated/index.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/Animated.js","/node_modules/react-native-web/dist/cjs/exports/Platform/index.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/components/AnimatedFlatList.js","/node_modules/react-native-web/dist/cjs/exports/FlatList/index.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/FlatList/index.js","/node_modules/react-native-web/dist/cjs/exports/View/index.js","/node_modules/react-native-web/dist/cjs/modules/forwardedProps/index.js","/node_modules/react-native-web/dist/cjs/modules/pick/index.js","/node_modules/react-native-web/dist/cjs/modules/useElementLayout/index.js","/node_modules/react-native-web/dist/cjs/modules/useLayoutEffect/index.js","/node_modules/react-native-web/dist/cjs/modules/useMergeRefs/index.js","/node_modules/react-native-web/dist/cjs/modules/mergeRefs/index.js","/node_modules/react-native-web/dist/cjs/modules/usePlatformMethods/index.js","/node_modules/react-native-web/dist/cjs/modules/useStable/index.js","/node_modules/react-native-web/dist/cjs/modules/useResponderEvents/index.js","/node_modules/react-native-web/dist/cjs/modules/useResponderEvents/ResponderSystem.js","/node_modules/react-native-web/dist/cjs/modules/useResponderEvents/createResponderEvent.js","/node_modules/react-native-web/dist/cjs/modules/useResponderEvents/ResponderEventTypes.js","/node_modules/react-native-web/dist/cjs/modules/useResponderEvents/utils.js","/node_modules/react-native-web/dist/cjs/modules/isSelectionValid/index.js","/node_modules/react-native-web/dist/cjs/modules/useResponderEvents/ResponderTouchHistoryStore.js","/node_modules/react-native-web/dist/cjs/exports/Text/TextAncestorContext.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/deepDiffer/index.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/VirtualizedList/index.js","/node_modules/react-native-web/dist/cjs/exports/RefreshControl/index.js","/node_modules/react-native-web/dist/cjs/exports/ScrollView/index.js","/node_modules/react-native-web/dist/cjs/exports/Dimensions/index.js","/node_modules/react-native-web/dist/cjs/modules/dismissKeyboard/index.js","/node_modules/react-native-web/dist/cjs/modules/TextInputState/index.js","/node_modules/react-native-web/dist/cjs/exports/ScrollView/ScrollViewBase.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Batchinator/index.js","/node_modules/react-native-web/dist/cjs/exports/InteractionManager/index.js","/node_modules/react-native-web/dist/cjs/exports/InteractionManager/TaskQueue.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/vendor/emitter/EventEmitter.js","/node_modules/react-native-web/dist/cjs/modules/requestIdleCallback/index.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Utilities/clamp.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/infoLog/index.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/VirtualizedList/CellRenderMask.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/VirtualizedList/ChildListCollection.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/FillRateHelper/index.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/VirtualizedList/StateSafePureComponent.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/ViewabilityHelper/index.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/VirtualizedList/VirtualizedListCellRenderer.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/VirtualizedList/VirtualizedListContext.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/VirtualizeUtils/index.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/createAnimatedComponent.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/useAnimatedProps.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/nodes/AnimatedProps.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/AnimatedEvent.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/nodes/AnimatedValue.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/nodes/AnimatedInterpolation.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/nodes/AnimatedWithChildren.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/nodes/AnimatedNode.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/NativeAnimatedHelper.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/NativeAnimatedModule.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/TurboModule/TurboModuleRegistry.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/NativeAnimatedTurboModule.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/EventEmitter/NativeEventEmitter.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/EventEmitter/RCTDeviceEventEmitter.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Utilities/Platform.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/ReactNative/ReactNativeFeatureFlags.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/nodes/AnimatedStyle.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/nodes/AnimatedTransform.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Utilities/useRefEffect.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Utilities/useMergeRefs.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/components/AnimatedImage.js","/node_modules/react-native-web/dist/cjs/exports/Image/index.js","/node_modules/react-native-web/dist/cjs/modules/ImageLoader/index.js","/node_modules/react-native-web/dist/cjs/exports/PixelRatio/index.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/components/AnimatedScrollView.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/components/AnimatedSectionList.js","/node_modules/react-native-web/dist/cjs/exports/SectionList/index.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/SectionList/index.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/VirtualizedSectionList/index.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/components/AnimatedText.js","/node_modules/react-native-web/dist/cjs/exports/Text/index.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/components/AnimatedView.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/AnimatedMock.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/AnimatedImplementation.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/nodes/AnimatedAddition.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/nodes/AnimatedDiffClamp.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/nodes/AnimatedDivision.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/nodes/AnimatedModulo.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/nodes/AnimatedMultiplication.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/nodes/AnimatedSubtraction.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/nodes/AnimatedTracking.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/nodes/AnimatedValueXY.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/animations/DecayAnimation.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/animations/Animation.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/animations/SpringAnimation.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/SpringConfig.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/nodes/AnimatedColor.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/animations/TimingAnimation.js","/node_modules/react-native-web/dist/cjs/exports/Easing/index.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/Easing.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/Animated/bezier.js","/node_modules/react-native-web/dist/cjs/exports/Appearance/index.js","/node_modules/react-native-web/dist/cjs/exports/AppRegistry/index.js","/node_modules/react-native-web/dist/cjs/exports/AppRegistry/renderApplication.js","\u0000shim:react-native-web/dist/cjs/exports/AppRegistry/AppContainer.js","/node_modules/react-native-web/dist/cjs/exports/AppState/index.js","\u0000shim:react-native-web/dist/cjs/exports/BackHandler/index.js","/node_modules/react-native-web/dist/cjs/exports/Clipboard/index.js","/node_modules/react-native-web/dist/cjs/exports/I18nManager/index.js","/node_modules/react-native-web/dist/cjs/exports/Keyboard/index.js","/node_modules/react-native-web/dist/cjs/exports/LayoutAnimation/index.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/LayoutAnimation/index.js","/node_modules/react-native-web/dist/cjs/exports/Linking/index.js","/node_modules/react-native-web/dist/cjs/exports/NativeEventEmitter/index.js","/node_modules/react-native-web/dist/cjs/exports/PanResponder/index.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/PanResponder/index.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/TouchHistoryMath/index.js","/node_modules/react-native-web/dist/cjs/exports/Share/index.js","/node_modules/react-native-web/dist/cjs/exports/Vibration/index.js","/node_modules/react-native-web/dist/cjs/exports/ActivityIndicator/index.js","/node_modules/react-native-web/dist/cjs/exports/Button/index.js","/node_modules/react-native-web/dist/cjs/exports/TouchableOpacity/index.js","/node_modules/react-native-web/dist/cjs/modules/usePressEvents/index.js","/node_modules/react-native-web/dist/cjs/modules/usePressEvents/PressResponder.js","/node_modules/react-native-web/dist/cjs/exports/CheckBox/index.js","/node_modules/react-native-web/dist/cjs/exports/ImageBackground/index.js","/node_modules/react-native-web/dist/cjs/exports/KeyboardAvoidingView/index.js","/node_modules/react-native-web/dist/cjs/exports/Modal/index.js","/node_modules/react-native-web/dist/cjs/exports/Modal/ModalPortal.js","/node_modules/react-native-web/dist/cjs/exports/Modal/ModalAnimation.js","/node_modules/react-native-web/dist/cjs/exports/Modal/ModalContent.js","/node_modules/react-native-web/dist/cjs/exports/Modal/ModalFocusTrap.js","/node_modules/react-native-web/dist/cjs/exports/Picker/index.js","/node_modules/react-native-web/dist/cjs/exports/Picker/PickerItem.js","/node_modules/react-native-web/dist/cjs/exports/Pressable/index.js","/node_modules/react-native-web/dist/cjs/modules/useHover/index.js","/node_modules/react-native-web/dist/cjs/modules/modality/index.js","/node_modules/react-native-web/dist/cjs/modules/addEventListener/index.js","/node_modules/react-native-web/dist/cjs/modules/useEvent/index.js","/node_modules/react-native-web/dist/cjs/exports/ProgressBar/index.js","/node_modules/react-native-web/dist/cjs/exports/SafeAreaView/index.js","/node_modules/react-native-web/dist/cjs/exports/StatusBar/index.js","/node_modules/react-native-web/dist/cjs/exports/Switch/index.js","/node_modules/react-native-web/dist/cjs/modules/multiplyStyleLengthValue/index.js","/node_modules/react-native-web/dist/cjs/exports/TextInput/index.js","/node_modules/react-native-web/dist/cjs/exports/Touchable/index.js","/node_modules/react-native-web/dist/cjs/exports/Touchable/BoundingDimensions.js","/node_modules/react-native-web/dist/cjs/vendor/react-native/PooledClass/index.js","/node_modules/react-native-web/dist/cjs/exports/Touchable/Position.js","/node_modules/react-native-web/dist/cjs/exports/TouchableHighlight/index.js","/node_modules/react-native-web/dist/cjs/exports/TouchableNativeFeedback/index.js","/node_modules/react-native-web/dist/cjs/modules/UnimplementedView/index.js","/node_modules/react-native-web/dist/cjs/exports/TouchableWithoutFeedback/index.js","/node_modules/react-native-web/dist/cjs/exports/VirtualizedList/index.js","/node_modules/react-native-web/dist/cjs/exports/YellowBox/index.js","/node_modules/react-native-web/dist/cjs/exports/LogBox/index.js","/node_modules/react-native-web/dist/cjs/exports/DeviceEventEmitter/index.js","/node_modules/react-native-web/dist/cjs/exports/useColorScheme/index.js","/node_modules/react-native-web/dist/cjs/exports/useLocaleContext/index.js","/node_modules/react-native-web/dist/cjs/exports/useWindowDimensions/index.js","/node_modules/@react-native-assets/slider/dist/hooks/useThumb.js","/node_modules/@react-native-assets/slider/dist/hooks/useEvent.js","/node_modules/@react-native-assets/slider/dist/hooks/useRounding.js","/node_modules/@react-native-assets/slider/dist/components/Track.js","/node_modules/@react-native-assets/slider/dist/components/Thumb.js","/node_modules/@react-native-assets/slider/dist/components/ResponderView.js","/node_modules/@react-native-assets/slider/dist/hooks/useDrag.js","/node_modules/@react-native-assets/slider/dist/hooks/useCustomMarks.js","/node_modules/@react-native-assets/slider/dist/RangeSlider.js","/node_modules/@react-native-assets/slider/dist/hooks/useRange.js","/src/components/shared/AudioPlayer/AudioPlayerControls.tsx","/src/components/shared/AudioPlayer/TimeDisplay.tsx","/src/components/shared/AudioPlayer/useAudioDuration.ts","/src/components/screens/Tabs/Profiles/FileScreen/TranscriptDisplay.tsx","/src/components/screens/Tabs/Profiles/FileScreen/TranscriptLineDisplay.tsx","/src/components/screens/Tabs/Profiles/FileScreen/useEditFileAction.tsx","/src/components/screens/Tabs/Profiles/FilesScreen/index.tsx","/src/components/screens/Tabs/Profiles/FilesScreen/SearchField.tsx","/src/components/screens/Tabs/Profiles/FilesScreen/SearchContent.tsx","/src/components/screens/Tabs/Profiles/FilesScreen/SearchResultCard.tsx","/src/components/screens/Tabs/Profiles/FilesScreen/SearchResultImageDisplay.tsx","/src/components/shared/FileDisplay/SnippetDisplay.tsx","/src/components/screens/Tabs/Profiles/FilesScreen/SearchResultAudioDisplay.tsx","/src/components/shared/FolderCard/index.tsx","/src/components/screens/Tabs/Profiles/FilesScreen/useFolderActions/index.tsx","/src/components/screens/Tabs/Profiles/FilesScreen/useFolderActions/useAddFolderAction.tsx","/src/components/screens/Tabs/Profiles/FilesScreen/useFolderActions/useDeleteFolderAction.tsx","/src/components/screens/Tabs/Profiles/FilesScreen/useFolderActions/useEditFolderAction.tsx","/src/components/screens/Tabs/Profiles/FilesScreen/useFolderActions/useMoveFolderAction.tsx","/src/components/screens/Tabs/Profiles/ChatScreen/index.tsx","/src/components/screens/Tabs/Profiles/ChatScreen/Chat/index.tsx","/src/components/screens/Tabs/Profiles/ChatScreen/Chat/ChatArea.tsx","/src/components/screens/Tabs/Profiles/ChatScreen/Chat/ConversationList.tsx","/src/components/screens/Tabs/Profiles/ChatScreen/Chat/ChatEntries.tsx","/src/components/screens/Tabs/Profiles/ChatScreen/Chat/ChatEntry/index.tsx","/src/components/screens/Tabs/Profiles/ChatScreen/Chat/ChatEntry/ModelMessageTail.tsx","/src/components/screens/Tabs/Profiles/ChatScreen/Chat/ChatEntry/UserMessageTail.tsx","/src/components/screens/Tabs/Profiles/ChatScreen/Chat/ChatReferences/index.tsx","/src/components/screens/Tabs/Profiles/ChatScreen/Chat/utils.ts","/src/components/screens/Tabs/Profiles/ChatScreen/Chat/ChatReferences/ReferencesDisplay.tsx","/src/components/screens/Tabs/Profiles/ChatScreen/Chat/ChatReferences/BaseReference.tsx","/src/components/screens/Tabs/Profiles/ChatScreen/Chat/EmptyChatState/index.tsx","/src/components/screens/Tabs/Profiles/ChatScreen/Chat/EmptyChatState/suggestions.ts","/src/components/screens/Tabs/Profiles/ChatScreen/Chat/EmptyChatState/Suggestion.tsx","/src/components/screens/Tabs/Profiles/ChatScreen/Chat/ChatMessageInput.tsx","/src/components/screens/Tabs/Profiles/ChatScreen/Chat/InformationNotification.tsx","/src/components/screens/Tabs/Profiles/ChatScreen/Chat/DeleteChatButton.tsx","/src/components/screens/Tabs/Profiles/ChatScreen/Chat/ChatList/index.tsx","/src/components/screens/Tabs/Profiles/ChatScreen/Chat/ChatList/DesktopChatList.tsx","/src/components/screens/Tabs/Profiles/ChatScreen/Chat/ChatList/MobileChatListButton.tsx","/src/components/screens/Tabs/Profiles/DateLabsScreen/index.tsx","/src/components/shared/LabValueRangeBar/index.tsx","/src/components/shared/LabValueRangeBar/ValueIndicator.tsx","/src/components/screens/Tabs/Profiles/LabHistoryScreen/index.tsx","/src/components/screens/Tabs/Profiles/LabHistoryScreen/HistoryChart.tsx","/node_modules/victory/lib/index.js","/node_modules/victory-area/es/index.js","/node_modules/victory-area/es/victory-area.js","/node_modules/victory-area/es/helper-methods.js","/node_modules/victory-core/es/index.js","/node_modules/victory-core/es/types/callbacks.js","/node_modules/victory-core/es/types/prop-types.js","/node_modules/victory-core/es/victory-accessible-group/victory-accessible-group.js","/node_modules/victory-core/es/victory-animation/victory-animation.js","/node_modules/victory-vendor/d3-ease.js","/node_modules/victory-vendor/lib/d3-ease.js","/node_modules/victory-vendor/lib-vendor/d3-ease/src/index.js","/node_modules/victory-vendor/lib-vendor/d3-ease/src/linear.js","/node_modules/victory-vendor/lib-vendor/d3-ease/src/quad.js","/node_modules/victory-vendor/lib-vendor/d3-ease/src/cubic.js","/node_modules/victory-vendor/lib-vendor/d3-ease/src/poly.js","/node_modules/victory-vendor/lib-vendor/d3-ease/src/sin.js","/node_modules/victory-vendor/lib-vendor/d3-ease/src/exp.js","/node_modules/victory-vendor/lib-vendor/d3-ease/src/math.js","/node_modules/victory-vendor/lib-vendor/d3-ease/src/circle.js","/node_modules/victory-vendor/lib-vendor/d3-ease/src/bounce.js","/node_modules/victory-vendor/lib-vendor/d3-ease/src/back.js","/node_modules/victory-vendor/lib-vendor/d3-ease/src/elastic.js","/node_modules/victory-core/es/victory-animation/util.js","/node_modules/lodash/orderBy.js","/node_modules/lodash/_baseOrderBy.js","/node_modules/lodash/_baseMap.js","/node_modules/lodash/_baseEach.js","/node_modules/lodash/_baseForOwn.js","/node_modules/lodash/_createBaseEach.js","/node_modules/lodash/_baseSortBy.js","/node_modules/lodash/_compareMultiple.js","/node_modules/lodash/_compareAscending.js","/node_modules/victory-vendor/d3-interpolate.js","/node_modules/victory-vendor/lib/d3-interpolate.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/index.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/value.js","/node_modules/victory-vendor/lib-vendor/d3-color/src/index.js","/node_modules/victory-vendor/lib-vendor/d3-color/src/color.js","/node_modules/victory-vendor/lib-vendor/d3-color/src/define.js","/node_modules/victory-vendor/lib-vendor/d3-color/src/lab.js","/node_modules/victory-vendor/lib-vendor/d3-color/src/math.js","/node_modules/victory-vendor/lib-vendor/d3-color/src/cubehelix.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/rgb.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/basis.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/basisClosed.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/color.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/constant.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/array.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/numberArray.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/date.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/number.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/object.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/string.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/discrete.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/hue.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/round.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/transform/index.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/transform/parse.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/transform/decompose.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/zoom.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/hsl.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/lab.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/hcl.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/cubehelix.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/piecewise.js","/node_modules/victory-vendor/lib-vendor/d3-interpolate/src/quantize.js","/node_modules/victory-core/es/victory-util/timer-context.js","/node_modules/victory-core/es/victory-util/timer.js","/node_modules/victory-vendor/d3-timer.js","/node_modules/victory-vendor/lib/d3-timer.js","/node_modules/victory-vendor/lib-vendor/d3-timer/src/index.js","/node_modules/victory-vendor/lib-vendor/d3-timer/src/timer.js","/node_modules/victory-vendor/lib-vendor/d3-timer/src/timeout.js","/node_modules/victory-vendor/lib-vendor/d3-timer/src/interval.js","/node_modules/victory-core/es/victory-container/victory-container.js","/node_modules/lodash/uniqueId.js","/node_modules/victory-core/es/victory-portal/portal.js","/node_modules/victory-core/es/victory-util/user-props.js","/node_modules/victory-core/es/victory-util/helpers.js","/node_modules/lodash/defaults.js","/node_modules/lodash/pick.js","/node_modules/lodash/_basePick.js","/node_modules/lodash/_flatRest.js","/node_modules/victory-core/es/victory-util/index.js","/node_modules/victory-core/es/victory-util/add-events.js","/node_modules/victory-core/node_modules/react-fast-compare/index.js","/node_modules/victory-core/es/victory-transition/victory-transition.js","/node_modules/victory-core/es/victory-util/collection.js","/node_modules/victory-core/es/victory-util/transitions.js","/node_modules/victory-core/es/victory-util/events.js","/node_modules/lodash/omitBy.js","/node_modules/lodash/negate.js","/node_modules/lodash/uniq.js","/node_modules/victory-core/es/victory-util/merge-refs.js","/node_modules/victory-core/es/victory-util/axis.js","/node_modules/victory-core/es/victory-util/domain.js","/node_modules/lodash/isDate.js","/node_modules/lodash/_baseIsDate.js","/node_modules/lodash/sortedUniq.js","/node_modules/lodash/_baseSortedUniq.js","/node_modules/victory-core/es/victory-util/data.js","/node_modules/lodash/isUndefined.js","/node_modules/victory-core/es/victory-util/scale.js","/node_modules/victory-vendor/d3-scale.js","/node_modules/victory-vendor/lib/d3-scale.js","/node_modules/victory-vendor/lib-vendor/d3-scale/src/index.js","/node_modules/victory-vendor/lib-vendor/d3-scale/src/band.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/index.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/bisect.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/ascending.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/bisector.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/descending.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/number.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/count.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/cross.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/cumsum.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/deviation.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/variance.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/extent.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/fsum.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/group.js","/node_modules/victory-vendor/lib-vendor/internmap/src/index.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/identity.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/groupSort.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/sort.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/permute.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/bin.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/array.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/constant.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/nice.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/ticks.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/threshold/sturges.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/threshold/freedmanDiaconis.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/quantile.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/max.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/min.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/quickselect.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/threshold/scott.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/maxIndex.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/mean.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/median.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/merge.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/minIndex.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/mode.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/pairs.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/range.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/rank.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/least.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/leastIndex.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/greatest.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/greatestIndex.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/scan.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/shuffle.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/sum.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/transpose.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/zip.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/every.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/some.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/filter.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/map.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/reduce.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/reverse.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/difference.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/disjoint.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/intersection.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/subset.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/superset.js","/node_modules/victory-vendor/lib-vendor/d3-array/src/union.js","/node_modules/victory-vendor/lib-vendor/d3-scale/src/init.js","/node_modules/victory-vendor/lib-vendor/d3-scale/src/ordinal.js","/node_modules/victory-vendor/lib-vendor/d3-scale/src/identity.js","/node_modules/victory-vendor/lib-vendor/d3-scale/src/linear.js","/node_modules/victory-vendor/lib-vendor/d3-scale/src/continuous.js","/node_modules/victory-vendor/lib-vendor/d3-scale/src/constant.js","/node_modules/victory-vendor/lib-vendor/d3-scale/src/number.js","/node_modules/victory-vendor/lib-vendor/d3-scale/src/tickFormat.js","/node_modules/victory-vendor/lib-vendor/d3-format/src/index.js","/node_modules/victory-vendor/lib-vendor/d3-format/src/defaultLocale.js","/node_modules/victory-vendor/lib-vendor/d3-format/src/locale.js","/node_modules/victory-vendor/lib-vendor/d3-format/src/exponent.js","/node_modules/victory-vendor/lib-vendor/d3-format/src/formatDecimal.js","/node_modules/victory-vendor/lib-vendor/d3-format/src/formatGroup.js","/node_modules/victory-vendor/lib-vendor/d3-format/src/formatNumerals.js","/node_modules/victory-vendor/lib-vendor/d3-format/src/formatSpecifier.js","/node_modules/victory-vendor/lib-vendor/d3-format/src/formatTrim.js","/node_modules/victory-vendor/lib-vendor/d3-format/src/formatTypes.js","/node_modules/victory-vendor/lib-vendor/d3-format/src/formatPrefixAuto.js","/node_modules/victory-vendor/lib-vendor/d3-format/src/formatRounded.js","/node_modules/victory-vendor/lib-vendor/d3-format/src/identity.js","/node_modules/victory-vendor/lib-vendor/d3-format/src/precisionFixed.js","/node_modules/victory-vendor/lib-vendor/d3-format/src/precisionPrefix.js","/node_modules/victory-vendor/lib-vendor/d3-format/src/precisionRound.js","/node_modules/victory-vendor/lib-vendor/d3-scale/src/log.js","/node_modules/victory-vendor/lib-vendor/d3-scale/src/nice.js","/node_modules/victory-vendor/lib-vendor/d3-scale/src/symlog.js","/node_modules/victory-vendor/lib-vendor/d3-scale/src/pow.js","/node_modules/victory-vendor/lib-vendor/d3-scale/src/radial.js","/node_modules/victory-vendor/lib-vendor/d3-scale/src/quantile.js","/node_modules/victory-vendor/lib-vendor/d3-scale/src/quantize.js","/node_modules/victory-vendor/lib-vendor/d3-scale/src/threshold.js","/node_modules/victory-vendor/lib-vendor/d3-scale/src/time.js","/node_modules/victory-vendor/lib-vendor/d3-time/src/index.js","/node_modules/victory-vendor/lib-vendor/d3-time/src/interval.js","/node_modules/victory-vendor/lib-vendor/d3-time/src/millisecond.js","/node_modules/victory-vendor/lib-vendor/d3-time/src/second.js","/node_modules/victory-vendor/lib-vendor/d3-time/src/duration.js","/node_modules/victory-vendor/lib-vendor/d3-time/src/minute.js","/node_modules/victory-vendor/lib-vendor/d3-time/src/hour.js","/node_modules/victory-vendor/lib-vendor/d3-time/src/day.js","/node_modules/victory-vendor/lib-vendor/d3-time/src/week.js","/node_modules/victory-vendor/lib-vendor/d3-time/src/month.js","/node_modules/victory-vendor/lib-vendor/d3-time/src/year.js","/node_modules/victory-vendor/lib-vendor/d3-time/src/utcMinute.js","/node_modules/victory-vendor/lib-vendor/d3-time/src/utcHour.js","/node_modules/victory-vendor/lib-vendor/d3-time/src/utcDay.js","/node_modules/victory-vendor/lib-vendor/d3-time/src/utcWeek.js","/node_modules/victory-vendor/lib-vendor/d3-time/src/utcMonth.js","/node_modules/victory-vendor/lib-vendor/d3-time/src/utcYear.js","/node_modules/victory-vendor/lib-vendor/d3-time/src/ticks.js","/node_modules/victory-vendor/lib-vendor/d3-time-format/src/index.js","/node_modules/victory-vendor/lib-vendor/d3-time-format/src/defaultLocale.js","/node_modules/victory-vendor/lib-vendor/d3-time-format/src/locale.js","/node_modules/victory-vendor/lib-vendor/d3-time-format/src/isoFormat.js","/node_modules/victory-vendor/lib-vendor/d3-time-format/src/isoParse.js","/node_modules/victory-vendor/lib-vendor/d3-scale/src/utcTime.js","/node_modules/victory-vendor/lib-vendor/d3-scale/src/sequential.js","/node_modules/victory-vendor/lib-vendor/d3-scale/src/sequentialQuantile.js","/node_modules/victory-vendor/lib-vendor/d3-scale/src/diverging.js","/node_modules/victory-core/es/victory-util/immutable.js","/node_modules/victory-core/es/victory-util/common-props.js","/node_modules/victory-core/es/victory-util/default-transitions.js","/node_modules/victory-core/es/victory-util/hooks/index.js","/node_modules/victory-core/es/victory-util/hooks/use-previous-props.js","/node_modules/victory-core/es/victory-util/hooks/use-animation-state.js","/node_modules/victory-core/es/victory-util/label-helpers.js","/node_modules/victory-core/es/victory-util/line-helpers.js","/node_modules/victory-vendor/d3-shape.js","/node_modules/victory-vendor/lib/d3-shape.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/index.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/arc.js","/node_modules/victory-vendor/lib-vendor/d3-path/src/index.js","/node_modules/victory-vendor/lib-vendor/d3-path/src/path.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/constant.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/math.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/area.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/array.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/curve/linear.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/line.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/point.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/pie.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/descending.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/identity.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/areaRadial.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/curve/radial.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/lineRadial.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/pointRadial.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/link.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/curve/bump.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/symbol.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/symbol/asterisk.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/symbol/circle.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/symbol/cross.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/symbol/diamond.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/symbol/diamond2.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/symbol/plus.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/symbol/square.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/symbol/square2.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/symbol/star.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/symbol/triangle.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/symbol/triangle2.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/symbol/wye.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/symbol/x.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/curve/basisClosed.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/noop.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/curve/basis.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/curve/basisOpen.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/curve/bundle.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/curve/cardinalClosed.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/curve/cardinal.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/curve/cardinalOpen.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/curve/catmullRomClosed.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/curve/catmullRom.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/curve/catmullRomOpen.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/curve/linearClosed.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/curve/monotone.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/curve/natural.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/curve/step.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/stack.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/offset/none.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/order/none.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/offset/expand.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/offset/diverging.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/offset/silhouette.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/offset/wiggle.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/order/appearance.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/order/ascending.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/order/descending.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/order/insideOut.js","/node_modules/victory-vendor/lib-vendor/d3-shape/src/order/reverse.js","/node_modules/victory-core/es/victory-util/log.js","/node_modules/victory-core/es/victory-util/point-path-helpers.js","/node_modules/victory-core/es/victory-util/selection.js","/node_modules/victory-core/es/victory-util/style.js","/node_modules/victory-core/es/victory-theme/victory-theme.js","/node_modules/victory-core/es/victory-theme/grayscale.js","/node_modules/victory-core/es/victory-theme/material.js","/node_modules/victory-core/es/victory-theme/clean.js","/node_modules/victory-core/es/victory-theme/types.js","/node_modules/victory-core/es/victory-util/textsize.js","/node_modules/victory-core/es/victory-util/wrapper.js","/node_modules/lodash/groupBy.js","/node_modules/lodash/_createAggregator.js","/node_modules/lodash/_arrayAggregator.js","/node_modules/lodash/_baseAggregator.js","/node_modules/victory-core/es/victory-portal/portal-outlet.js","/node_modules/victory-core/es/victory-portal/portal-context.js","/node_modules/victory-core/es/victory-label/victory-label.js","/node_modules/victory-core/es/victory-portal/victory-portal.js","/node_modules/victory-core/es/victory-primitives/rect.js","/node_modules/victory-core/es/victory-primitives/text.js","/node_modules/victory-core/es/victory-primitives/tspan.js","/node_modules/victory-core/es/victory-clip-container/victory-clip-container.js","/node_modules/victory-core/es/victory-primitives/clip-path.js","/node_modules/victory-core/es/victory-primitives/circle.js","/node_modules/victory-core/es/victory-primitives/index.js","/node_modules/victory-core/es/victory-primitives/arc.js","/node_modules/victory-core/es/victory-primitives/path.js","/node_modules/victory-core/es/victory-primitives/background.js","/node_modules/victory-core/es/victory-primitives/border.js","/node_modules/victory-core/es/victory-primitives/line.js","/node_modules/victory-core/es/victory-primitives/line-segment.js","/node_modules/victory-core/es/victory-primitives/point.js","/node_modules/victory-core/es/victory-primitives/types.js","/node_modules/victory-core/es/victory-primitives/whisker.js","/node_modules/victory-area/es/area.js","/node_modules/victory-axis/es/index.js","/node_modules/victory-axis/es/victory-axis.js","/node_modules/victory-axis/es/helper-methods.js","/node_modules/victory-bar/es/index.js","/node_modules/victory-bar/es/victory-bar.js","/node_modules/victory-bar/es/helper-methods.js","/node_modules/victory-bar/es/bar.js","/node_modules/victory-bar/es/bar-helper-methods.js","/node_modules/victory-bar/es/path-helper-methods.js","/node_modules/victory-bar/es/geometry-helper-methods.js","/node_modules/victory-box-plot/es/index.js","/node_modules/victory-box-plot/es/victory-box-plot.js","/node_modules/victory-box-plot/es/helper-methods.js","/node_modules/victory-vendor/d3-array.js","/node_modules/victory-vendor/lib/d3-array.js","/node_modules/victory-brush-container/es/index.js","/node_modules/victory-brush-container/es/victory-brush-container.js","/node_modules/victory-brush-container/es/brush-helpers.js","/node_modules/victory-brush-container/node_modules/react-fast-compare/index.js","/node_modules/victory-brush-line/es/index.js","/node_modules/victory-brush-line/es/victory-brush-line.js","/node_modules/victory-brush-line/node_modules/react-fast-compare/index.js","/node_modules/victory-candlestick/es/index.js","/node_modules/victory-candlestick/es/victory-candlestick.js","/node_modules/victory-candlestick/es/candle.js","/node_modules/victory-candlestick/es/helper-methods.js","/node_modules/victory-canvas/es/index.js","/node_modules/victory-canvas/es/canvas-bar.js","/node_modules/victory-canvas/es/hooks/use-canvas-context.js","/node_modules/victory-canvas/es/canvas-group.js","/node_modules/victory-canvas/es/canvas-curve.js","/node_modules/victory-canvas/es/canvas-point.js","/node_modules/victory-chart/es/index.js","/node_modules/victory-chart/es/victory-chart.js","/node_modules/victory-shared-events/es/index.js","/node_modules/victory-shared-events/es/victory-shared-events.js","/node_modules/lodash/fromPairs.js","/node_modules/victory-shared-events/node_modules/react-fast-compare/index.js","/node_modules/json-stringify-safe/stringify.js","/node_modules/victory-polar-axis/es/index.js","/node_modules/victory-polar-axis/es/types.js","/node_modules/victory-polar-axis/es/victory-polar-axis.js","/node_modules/victory-polar-axis/es/helper-methods.js","/node_modules/victory-chart/es/helper-methods.js","/node_modules/victory-chart/node_modules/react-fast-compare/index.js","/node_modules/victory-create-container/es/index.js","/node_modules/victory-create-container/es/create-container.js","/node_modules/lodash/forOwn.js","/node_modules/lodash/_castFunction.js","/node_modules/lodash/toPairs.js","/node_modules/lodash/_createToPairs.js","/node_modules/lodash/_baseToPairs.js","/node_modules/lodash/_setToPairs.js","/node_modules/victory-zoom-container/es/index.js","/node_modules/victory-zoom-container/es/victory-zoom-container.js","/node_modules/victory-zoom-container/es/zoom-helpers.js","/node_modules/lodash/delay.js","/node_modules/lodash/_baseDelay.js","/node_modules/victory-selection-container/es/index.js","/node_modules/victory-selection-container/es/victory-selection-container.js","/node_modules/victory-selection-container/es/selection-helpers.js","/node_modules/victory-voronoi-container/es/index.js","/node_modules/victory-voronoi-container/es/victory-voronoi-container.js","/node_modules/victory-tooltip/es/index.js","/node_modules/victory-tooltip/es/victory-tooltip.js","/node_modules/victory-tooltip/es/flyout.js","/node_modules/victory-voronoi-container/es/voronoi-helpers.js","/node_modules/victory-voronoi-container/node_modules/react-fast-compare/index.js","/node_modules/delaunay-find/lib/index.js","/node_modules/delaunator/delaunator.js","/node_modules/victory-cursor-container/es/index.js","/node_modules/victory-cursor-container/es/cursor-helpers.js","/node_modules/victory-cursor-container/es/victory-cursor-container.js","/node_modules/victory-errorbar/es/index.js","/node_modules/victory-errorbar/es/victory-errorbar.js","/node_modules/victory-errorbar/es/error-bar.js","/node_modules/victory-errorbar/es/helper-methods.js","/node_modules/lodash/assign.js","/node_modules/victory-group/es/index.js","/node_modules/victory-group/es/victory-group.js","/node_modules/victory-group/es/helper-methods.js","/node_modules/victory-group/node_modules/react-fast-compare/index.js","/node_modules/victory-histogram/es/index.js","/node_modules/victory-histogram/es/victory-histogram.js","/node_modules/victory-histogram/es/helper-methods.js","/node_modules/victory-histogram/node_modules/react-fast-compare/index.js","/node_modules/victory-legend/es/index.js","/node_modules/victory-legend/es/victory-legend.js","/node_modules/victory-legend/es/helper-methods.js","/node_modules/lodash/range.js","/node_modules/lodash/_createRange.js","/node_modules/lodash/_baseRange.js","/node_modules/victory-line/es/index.js","/node_modules/victory-line/es/victory-line.js","/node_modules/victory-line/es/helper-methods.js","/node_modules/victory-line/es/curve.js","/node_modules/victory-pie/es/index.js","/node_modules/victory-pie/es/victory-pie.js","/node_modules/victory-pie/es/helper-methods.js","/node_modules/victory-pie/es/slice.js","/node_modules/victory-scatter/es/index.js","/node_modules/victory-scatter/es/victory-scatter.js","/node_modules/victory-scatter/es/helper-methods.js","/node_modules/victory-stack/es/index.js","/node_modules/victory-stack/es/victory-stack.js","/node_modules/victory-stack/es/helper-methods.js","/node_modules/victory-stack/node_modules/react-fast-compare/index.js","/node_modules/victory-voronoi/es/index.js","/node_modules/victory-voronoi/es/victory-voronoi.js","/node_modules/victory-voronoi/es/voronoi.js","/node_modules/victory-voronoi/es/helper-methods.js","/node_modules/d3-voronoi/src/index.js","/node_modules/d3-voronoi/src/voronoi.js","/node_modules/d3-voronoi/src/constant.js","/node_modules/d3-voronoi/src/point.js","/node_modules/d3-voronoi/src/Diagram.js","/node_modules/d3-voronoi/src/Beach.js","/node_modules/d3-voronoi/src/RedBlackTree.js","/node_modules/d3-voronoi/src/Cell.js","/node_modules/d3-voronoi/src/Edge.js","/node_modules/d3-voronoi/src/Circle.js","/src/components/screens/Tabs/Profiles/ClientProfileScreen/index.tsx","/src/components/screens/Tabs/Profiles/EditClientProfileScreen/index.tsx","/src/components/screens/Tabs/Profiles/ClientRecordScreen/index.tsx","/src/components/shared/ClientRecord/ClientRecordDetails/index.tsx","/src/components/shared/ClientRecord/ClientRecordInvitationDetails/index.tsx","/src/hooks/api/useOrganizationUsers.ts","/src/components/shared/ClientRecord/ClientRecordInvitationDetails/InvitationInputs.tsx","/src/components/shared/ClientRecord/ClientRecordInvitationDetails/InvitationFiles.tsx","/src/hooks/api/useOrganizationClientRecordInvitationFile.ts","/src/hooks/api/useOrganizationClientInvitationFile.ts","/src/components/shared/ClientRecord/ClientRecordInvitationDetails/InvitationInputFiles.tsx","/src/components/screens/Tabs/Profiles/ClientRecordScreen/ClientRecordHistoryContent.tsx","/src/components/shared/ClientProfile/ClientProfileHistory/index.tsx","/src/components/screens/Tabs/Profiles/ClientRecordScreen/OrganizationClientRecordFiles/index.tsx","/src/hooks/api/useOrganizationMedicalProfileFolderId.ts","/src/components/screens/Tabs/Profiles/ClientRecordScreen/ClientRecordActivity/index.tsx","/src/components/screens/Tabs/Profiles/ClientRecordScreen/ClientRecordInvoices/index.tsx","/src/components/shared/ClientInvoices/index.tsx","/src/components/shared/ClientInvoices/ClientInvoicesList.tsx","/src/utils/invoiceStatusTypeGuards.ts","/src/components/screens/Tabs/Profiles/ClientRecordScreen/ClientRecordBillingContact/index.tsx","/src/components/screens/Tabs/Profiles/ClientRecordScreen/ClientRecordBillingContact/ClientRecordBillingContactDetails.tsx","/src/components/screens/Tabs/Profiles/ClientRecordScreen/ClientRecordBillingContact/EditClientRecordBillingContactDetails.tsx","/src/components/screens/Tabs/Profiles/AddClientRecordScreen/index.tsx","/src/components/screens/Tabs/Profiles/AddClientInvitationScreen/index.tsx","/src/components/screens/Tabs/Profiles/EditClientRecordScreen/index.tsx","/src/components/screens/Tabs/Profiles/AddClientRecordInvitationScreen/index.tsx","/src/components/screens/Tabs/Profiles/AddClientRecordNoteScreen/index.tsx","/src/components/screens/Tabs/Profiles/ClientRecordNoteDetailsScreen/index.tsx","/src/components/screens/Tabs/Profiles/EditClientRecordNoteScreen/index.tsx","/src/components/screens/Tabs/Profiles/CopyOrgNotesToClientsScreen/index.tsx","/src/components/screens/Tabs/Profiles/CopyOrgCareTeamMemberToClientsScreen/index.tsx","/src/components/screens/Tabs/Profiles/SendClientsMessageScreen/index.tsx","/src/components/screens/Tabs/Profiles/ClientsActivityScreen/index.tsx","/src/components/screens/Tabs/Profiles/ClientActivityDetailsScreen/index.tsx","/src/components/screens/Tabs/Profiles/OrgInviteAcceptSuccessScreen/index.tsx","/src/components/screens/Tabs/Profiles/ProfileActivityDetailsScreen/index.tsx","/src/components/screens/Tabs/Profiles/ProfileActivityScreen/index.tsx","/src/components/screens/Tabs/Profiles/MessageProfileScreen/index.tsx","/src/components/screens/Tabs/Profiles/ClientActivityHistoryScreen/index.tsx","/src/components/screens/Tabs/Profiles/ClientActivityHistoryScreen/ClientActivityHistoryTable.tsx","/src/hooks/api/useOrganizationClientRecordAuditLogs.ts","/src/components/screens/Tabs/Profiles/CopyVisitToClientsScreen/index.tsx","/src/components/screens/Tabs/Profiles/AccessScreen/index.tsx","/src/components/screens/Tabs/Profiles/ConnectScreen/index.tsx","/src/components/shared/ProfileConnectContent/index.tsx","/src/components/shared/ProfileConnectContent/PortalsList.tsx","/src/components/shared/ProfileConnectContent/NoConnectedSystemsGate.tsx","/src/components/screens/Tabs/Profiles/ProfileNotesScreen/index.tsx","/src/components/screens/Tabs/Profiles/BulkAddClientRecordsScreen/index.tsx","/src/components/screens/Tabs/Profiles/BulkAddClientRecordsScreen/PendingFileContent/index.tsx","/src/components/screens/Tabs/Profiles/BulkAddClientRecordsScreen/PendingFileContent/useDownloadTemplate.ts","/src/components/screens/Tabs/Profiles/BulkAddClientRecordsScreen/types.ts","/src/components/screens/Tabs/Profiles/BulkAddClientRecordsScreen/PendingFileContent/useUploadCSV.ts","/src/components/screens/Tabs/Profiles/BulkAddClientRecordsScreen/ReviewAndEditContent/index.tsx","/src/components/screens/Tabs/Profiles/BulkAddClientRecordsScreen/ReviewAndEditContent/Headers.tsx","/src/components/screens/Tabs/Profiles/BulkAddClientRecordsScreen/ReviewAndEditContent/constants.ts","/src/components/screens/Tabs/Profiles/BulkAddClientRecordsScreen/ReviewAndEditContent/utils.ts","/src/components/screens/Tabs/Profiles/BulkAddClientRecordsScreen/ReviewAndEditContent/EditRow.tsx","/src/components/screens/Tabs/Profiles/BulkAddClientRecordsScreen/ReviewAndEditContent/GridInput.tsx","/src/components/screens/Tabs/Profiles/BulkAddClientRecordsScreen/ReviewAndEditContent/TableTopActions.tsx","/src/components/screens/Tabs/Profiles/BulkAddClientRecordsScreen/ReviewAndEditContent/useTableErrors.ts","/src/components/screens/Tabs/Profiles/BulkAddClientRecordsScreen/ReviewAndEditContent/RowActions.tsx","/src/components/screens/Tabs/Profiles/AddSuggestedProfileFoldersScreen/index.tsx","/src/components/screens/Tabs/Profiles/AddSuggestedProfileFoldersScreen/SuggestedFolderCard.tsx","/src/components/screens/Tabs/Profiles/EditClientInvitationScreen/index.tsx","/src/components/screens/Tabs/Profiles/BulkAddClientRecordsProfilesScreen/index.tsx","/src/components/screens/Tabs/Profiles/EditClientBillingInfoScreen/index.tsx","/src/components/screens/Tabs/Profiles/ClientInvoiceItemsScreen/index.tsx","/src/components/screens/Tabs/Profiles/ClientInvoiceItemsScreen/AddInvoiceItemContent.tsx","/src/components/screens/Tabs/Profiles/ClientInvoiceItemsScreen/EditInvoiceItemContent.tsx","/src/components/screens/Tabs/Profiles/ClientInvoiceItemsScreen/InvoiceItemsListContent.tsx","/src/components/screens/Tabs/Profiles/CollaboratorInvoiceScreen/index.tsx","/src/components/screens/Tabs/Profiles/EditLegalDecisionMakerScreen/index.tsx","/src/components/screens/Tabs/Profiles/EditCodeStatusScreen/index.tsx","/src/components/screens/Tabs/Profiles/BulkInviteClientsScreen/index.tsx","/src/components/screens/Tabs/Profiles/BulkInviteClientsScreen/FormDefaultSelection.tsx","/src/components/screens/Tabs/Profiles/BulkInviteClientsScreen/InviteForms/index.tsx","/src/components/screens/Tabs/Profiles/BulkInviteClientsScreen/InviteForms/FocusedInviteForm.tsx","/src/components/screens/Tabs/Profiles/BulkInviteClientsScreen/InviteProgress.tsx","/src/components/screens/Tabs/Profiles/MessagesScreen/index.tsx","/src/components/screens/Tabs/Profiles/SendNoteScreen/index.tsx","/src/components/screens/Tabs/Profiles/VisitInviteEmailsScreens/index.tsx","/src/components/shared/ProfileSideTabNavigation/index.tsx","/src/components/v2BaseComponents/TabView/SideTabNavigation.tsx","/src/components/shared/ProfileSideTabNavigation/ProfileSubscribeBanner.tsx","/src/components/AppNavigator/ResourcesNavigation.tsx","/src/components/screens/Tabs/Resources/index.tsx","/src/components/screens/Tabs/Resources/ResourcesRootScreen/index.tsx","/src/components/screens/Tabs/Resources/ResourcesRootScreen/NotesTab/index.tsx","/src/components/screens/Tabs/Resources/ResourcesRootScreen/NotesTab/NotesTable.tsx","/src/utils/multiLineTruncate.ts","/src/components/screens/Tabs/Resources/ResourcesRootScreen/NotesTab/AddNoteSideDrawerContent.tsx","/src/components/screens/Tabs/Resources/ResourcesRootScreen/NotesTab/NoteDetailsSideDrawerContent.tsx","/src/components/screens/Tabs/Resources/ResourcesRootScreen/NotesTab/NoteEditSideDrawerContent.tsx","/src/components/screens/Tabs/Resources/ResourcesRootScreen/CareTeamMembersTab/index.tsx","/src/components/screens/Tabs/Resources/ResourcesRootScreen/CareTeamMembersTab/CareTeamMembersTable.tsx","/src/components/screens/Tabs/Resources/ResourcesRootScreen/CareTeamMembersTab/AddCareTeamMemberSideDrawerContent.tsx","/src/components/screens/Tabs/Resources/ResourcesRootScreen/CareTeamMembersTab/EditCareTeamMemberSideDrawerContent.tsx","/src/components/screens/Tabs/Resources/ResourcesRootScreen/CareTeamMembersTab/CareTeamMemberDetailsSideDrawerContent.tsx","/src/components/shared/OrganizationCareTeamMember/OrganizationCareTeamMemberDetails.tsx","/src/components/screens/Tabs/Resources/AddNoteScreen/index.tsx","/src/components/screens/Tabs/Resources/NoteDetailsScreen/index.tsx","/src/components/screens/Tabs/Resources/NoteEditScreen/index.tsx","/src/components/screens/Tabs/Resources/AddCareTeamMemberScreen/index.tsx","/src/components/screens/Tabs/Resources/EditCareTeamMemberScreen/index.tsx","/src/components/screens/Tabs/Resources/CareTeamMemberScreen/index.tsx","/src/components/AppNavigator/OrganizationNavigation.tsx","/src/components/screens/Tabs/Organization/index.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/index.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/OrganizationTab/index.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/OrganizationTab/OrganizationDetailsContent/index.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/OrganizationTab/OrganizationDetailsContent/BrandingColorDisplay.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/OrganizationTab/OrganizationEditContent/index.tsx","/src/components/shared/OrganizationDetailsForm/index.tsx","/src/components/shared/MaybeStackedImageField/index.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/OrganizationUsersTab/index.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/OrganizationUsersTab/OrganizationUsersTable.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/OrganizationUsersTab/OrganizationUserDetailsSideDrawerCotnent.tsx","/src/components/shared/OrganizationUsers/OrganizationUserDetails/index.tsx","/src/components/shared/OrganizationUsers/OrganizationUserDetails/DetailsContent.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/OrganizationUsersTab/EditOrganizationUserSideDrawerContent.tsx","/src/components/shared/OrganizationUsers/EditOrganizationUserFields/index.tsx","/src/hooks/api/useOrganizationUserInvitations.ts","/src/components/screens/Tabs/Organization/OrganizationScreen/OrganizationUsersTab/InvitationDetailsSideDrawerContent.tsx","/src/components/shared/OrganizationInvitations/OrganizationInvitationDetails/index.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/OrganizationUsersTab/AddOrganizationInvitationSideDrawerContent.tsx","/src/components/shared/OrganizationInvitations/OrganizationInvitationFields/index.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/BillingTab/index.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/BillingTab/FreeTierContent.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/BillingTab/PaidTab.tsx","/src/hooks/api/useOrganizationUsage.ts","/src/components/screens/Tabs/Organization/OrganizationScreen/GroupsTab/index.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/GroupsTab/GroupsTable.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/GroupsTab/AddGroupSideDrawerContent.tsx","/src/components/shared/Groups/GroupFields.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/GroupsTab/EditGroupSideDrawerContent/index.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/GroupsTab/EditGroupSideDrawerContent/EditGroupForm.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/GroupsTab/GroupDetailsDrawerContent.tsx","/src/components/shared/Groups/GroupDetails/index.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/InvitationDefinitionsTab/index.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/InvitationDefinitionsTab/InvitationDefinitionsTable.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/InvitationDefinitionsTab/AddInvitationDefinitionSideDrawerContent.tsx","/src/components/shared/InvitationDefinitions/FormFields/index.tsx","/src/components/shared/InvitationDefinitions/FormFields/CheckboxesField/index.tsx","/src/components/shared/InvitationDefinitions/FormFields/FormInputSection.tsx","/src/components/shared/InvitationDefinitions/FormFields/FilesField/index.tsx","/src/components/shared/InvitationDefinitions/FormFields/FileInputsField/index.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/InvitationDefinitionsTab/EditInvitationDefinitionSideDrawerContent/index.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/InvitationDefinitionsTab/EditInvitationDefinitionSideDrawerContent/EditInvitationDefinitionForm.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/InvitationDefinitionsTab/InvitationDefinitionDetailsDrawerContent.tsx","/src/components/shared/InvitationDefinitions/InvitationDefinitionDetails/index.tsx","/src/components/shared/InvitationDefinitions/InvitationDefinitionDetails/DetailsContent.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/SubscriptionTab/index.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/ClientBillingTab/index.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/ClientBillingTab/NotSetupContent/index.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/ClientBillingTab/RestrictedContent/index.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/ClientBillingTab/SetupContent/index.tsx","/src/components/screens/Tabs/Organization/OrganizationScreen/ClientBillingTab/MissingBrandingAlert/index.tsx","/src/hooks/api/useOrganizationPaymentIntegrationBranding.ts","/src/components/screens/Tabs/Organization/AddOrganizationInvitationScreen/index.tsx","/src/components/screens/Tabs/Organization/OrganizationInvitationScreen/index.tsx","/src/components/screens/Tabs/Organization/UserScreen/index.tsx","/src/components/screens/Tabs/Organization/EditUserScreen/index.tsx","/src/components/screens/Tabs/Organization/InvitationDefinitionScreen/index.tsx","/src/components/screens/Tabs/Organization/AddInvitationDefinitionScreen/index.tsx","/src/components/screens/Tabs/Organization/EditInvitationDefinitionScreen/index.tsx","/src/components/screens/Tabs/Organization/EditInvitationDefinitionScreen/EditInvitationDefinitionForm.tsx","/src/components/screens/Tabs/Organization/GroupScreen/index.tsx","/src/components/screens/Tabs/Organization/AddGroupScreen/index.tsx","/src/components/screens/Tabs/Organization/EditGroupScreen/index.tsx","/src/components/screens/Tabs/Organization/EditGroupScreen/EditGroupForm.tsx","/src/components/screens/Tabs/Organization/EditClientBillingBrandingScreen/index.tsx","/src/components/AppNavigator/TabNavigation/DrawerNavigation/NavigationItem.tsx","/src/components/AppNavigator/TabNavigation/DrawerNavigation/Inset.tsx","/src/components/AppNavigator/TabNavigation/DrawerNavigation/ProfileNavigationItems.tsx","/src/components/shared/AppTypeGuards.tsx","/src/components/AppNavigator/TabNavigation/BottomTabNavigation.tsx","/node_modules/@react-navigation/bottom-tabs/lib/module/index.js","/node_modules/@react-navigation/bottom-tabs/lib/module/navigators/createBottomTabNavigator.js","/node_modules/warn-once/index.js","/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabView.js","/node_modules/@react-navigation/bottom-tabs/lib/module/utils/BottomTabBarHeightCallbackContext.js","/node_modules/@react-navigation/bottom-tabs/lib/module/utils/BottomTabBarHeightContext.js","/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabBar.js","/node_modules/@react-navigation/bottom-tabs/lib/module/utils/useIsKeyboardShown.js","/node_modules/@react-navigation/bottom-tabs/lib/module/views/BottomTabItem.js","/node_modules/color/index.js","/node_modules/color-string/index.js","/node_modules/color-name/index.js","/node_modules/simple-swizzle/index.js","/node_modules/simple-swizzle/node_modules/is-arrayish/index.js","/node_modules/color/node_modules/color-convert/index.js","/node_modules/color/node_modules/color-convert/conversions.js","/node_modules/color/node_modules/color-name/index.js","/node_modules/color/node_modules/color-convert/route.js","/node_modules/@react-navigation/bottom-tabs/lib/module/views/TabBarIcon.js","/node_modules/@react-navigation/bottom-tabs/lib/module/views/Badge.js","/node_modules/@react-navigation/bottom-tabs/lib/module/views/ScreenFallback.js","/node_modules/react-native-screens/lib/module/index.js","/node_modules/react-native-screens/lib/module/fabric/NativeScreensModule.web.js","/node_modules/react-native-screens/lib/module/types.js","/node_modules/react-native-screens/lib/module/core.js","/node_modules/react-native-screens/lib/module/components/Screen.web.js","/node_modules/react-native-screens/lib/module/components/ScreenStackHeaderConfig.web.js","/node_modules/react-native-screens/lib/module/components/SearchBar.web.js","/node_modules/react-native-screens/lib/module/components/ScreenContainer.web.js","/node_modules/react-native-screens/lib/module/components/ScreenStack.web.js","/node_modules/react-native-screens/lib/module/components/ScreenStackItem.js","/node_modules/react-native-screens/lib/module/components/DebugContainer.web.js","/node_modules/react-native-screens/lib/module/components/ScreenContentWrapper.web.js","/node_modules/react-native-screens/lib/module/contexts.js","/node_modules/react-native-screens/lib/module/components/ScreenFooter.web.js","/node_modules/react-native-screens/lib/module/components/FullWindowOverlay.web.js","/node_modules/react-native-screens/lib/module/utils.js","/node_modules/react-native-screens/lib/module/useTransitionProgress.js","/node_modules/react-native-screens/lib/module/TransitionProgressContext.js","/node_modules/@react-navigation/bottom-tabs/lib/module/utils/useBottomTabBarHeight.js","/src/components/AppNavigator/TabNavigation/TabBar.tsx","/src/components/shared/EnforceUserOnboarding/index.tsx","/src/components/shared/EnforceUserOnboarding/UserRegistration.tsx","/src/components/shared/EnforceUserOnboarding/UserRegistrationForm/index.tsx","/src/components/shared/EnforceUserOnboarding/UserRegistrationForm/UserRegistrationDataProvider.tsx","/src/hooks/api/useMyOrganizationInvitations.ts","/src/components/shared/EnforceUserOnboarding/UserIntentsForm.tsx","/src/components/shared/EnforceUserOnboarding/useUserOnboardingFlow.ts","/src/components/shared/EnforceUserOnboarding/UserRegistrationWelcome.tsx","/src/components/shared/EnforceUserOnboarding/ProfessionalNoOrganizationGate.tsx","/src/components/shared/EnforceUserOnboarding/CreateOrganizationForm.tsx","/src/components/shared/EnforceUserOnboarding/JoinWithNoPendingInvitations.tsx","/src/components/shared/EnforceUserOnboarding/OrganizationPendingInvitation.tsx","/src/utils/withOnlyMountOnFocus.tsx","/src/hooks/useConfigureAnalytics.ts","/src/components/shared/ReconcileProConsumerNavigation.tsx","/src/hooks/useRegisterDevicePushToken.ts","/node_modules/expo-notifications/build/index.js","/node_modules/expo/src/Expo.ts","/node_modules/expo/src/errors/ExpoErrorManager.ts","/node_modules/expo/src/environment/ExpoGo.web.ts","/node_modules/expo/src/hooks/useEvent.ts","/node_modules/expo-notifications/build/getDevicePushTokenAsync.web.js","/node_modules/expo-notifications/build/unregisterForNotificationsAsync.js","/node_modules/expo-notifications/build/PushTokenManager.js","/node_modules/expo-notifications/build/getExpoPushTokenAsync.js","/node_modules/expo-notifications/build/DevicePushTokenAutoRegistration.fx.js","/node_modules/abort-controller/polyfill.mjs","/node_modules/abort-controller/dist/abort-controller.mjs","/node_modules/event-target-shim/dist/event-target-shim.mjs","/node_modules/expo-notifications/build/ServerRegistrationModule.web.js","/node_modules/expo-notifications/build/TokenEmitter.js","/node_modules/expo-notifications/build/warnOfExpoGoPushUsage.js","/node_modules/expo-notifications/build/utils/updateDevicePushTokenAsync.js","/node_modules/@ide/backoff/build/backoff.js","/node_modules/assert/build/assert.js","/node_modules/assert/build/internal/errors.js","/node_modules/util/util.js","/node_modules/util/support/types.js","/node_modules/is-arguments/index.js","/node_modules/has-tostringtag/shams.js","/node_modules/has-symbols/shams.js","/node_modules/call-bound/index.js","/node_modules/get-intrinsic/index.js","/node_modules/es-object-atoms/index.js","/node_modules/es-errors/index.js","/node_modules/es-errors/eval.js","/node_modules/es-errors/range.js","/node_modules/es-errors/ref.js","/node_modules/es-errors/syntax.js","/node_modules/es-errors/type.js","/node_modules/es-errors/uri.js","/node_modules/math-intrinsics/abs.js","/node_modules/math-intrinsics/floor.js","/node_modules/math-intrinsics/max.js","/node_modules/math-intrinsics/min.js","/node_modules/math-intrinsics/pow.js","/node_modules/gopd/index.js","/node_modules/gopd/gOPD.js","/node_modules/es-define-property/index.js","/node_modules/has-symbols/index.js","/node_modules/dunder-proto/get.js","/node_modules/call-bind-apply-helpers/index.js","/node_modules/function-bind/index.js","/node_modules/function-bind/implementation.js","/node_modules/call-bind-apply-helpers/functionCall.js","/node_modules/call-bind-apply-helpers/actualApply.js","/node_modules/call-bind-apply-helpers/functionApply.js","/node_modules/call-bind-apply-helpers/reflectApply.js","/node_modules/hasown/index.js","/node_modules/is-generator-function/index.js","/node_modules/safe-regex-test/index.js","/node_modules/is-regex/index.js","/node_modules/get-proto/index.js","/node_modules/get-proto/Reflect.getPrototypeOf.js","/node_modules/get-proto/Object.getPrototypeOf.js","/node_modules/which-typed-array/index.js","/node_modules/for-each/index.js","/node_modules/is-callable/index.js","/node_modules/available-typed-arrays/index.js","/node_modules/possible-typed-array-names/index.js","/node_modules/call-bind/index.js","/node_modules/set-function-length/index.js","/node_modules/define-data-property/index.js","/node_modules/has-property-descriptors/index.js","/node_modules/call-bind-apply-helpers/applyBind.js","/node_modules/is-typed-array/index.js","/node_modules/util/support/isBufferBrowser.js","/node_modules/inherits/inherits_browser.js","/node_modules/assert/build/internal/assert/assertion_error.js","/node_modules/object.assign/polyfill.js","/node_modules/object.assign/implementation.js","/node_modules/object-keys/index.js","/node_modules/object-keys/isArguments.js","/node_modules/object-keys/implementation.js","/node_modules/object-is/polyfill.js","/node_modules/object-is/implementation.js","/node_modules/call-bind/callBound.js","/node_modules/assert/build/internal/util/comparisons.js","/node_modules/object-is/index.js","/node_modules/define-properties/index.js","/node_modules/object-is/shim.js","/node_modules/is-nan/index.js","/node_modules/is-nan/implementation.js","/node_modules/is-nan/polyfill.js","/node_modules/is-nan/shim.js","/node_modules/expo-notifications/build/getPresentedNotificationsAsync.js","/node_modules/expo-notifications/build/NotificationPresenterModule.js","/node_modules/expo-notifications/build/utils/mapNotificationResponse.js","/node_modules/expo-notifications/build/presentNotificationAsync.js","/node_modules/expo-notifications/build/dismissNotificationAsync.js","/node_modules/expo-notifications/build/dismissAllNotificationsAsync.js","/node_modules/expo-notifications/build/getNotificationChannelsAsync.js","/node_modules/expo-notifications/build/getNotificationChannelAsync.js","/node_modules/expo-notifications/build/setNotificationChannelAsync.js","/node_modules/expo-notifications/build/deleteNotificationChannelAsync.js","/node_modules/expo-notifications/build/getNotificationChannelGroupsAsync.js","/node_modules/expo-notifications/build/getNotificationChannelGroupAsync.js","/node_modules/expo-notifications/build/setNotificationChannelGroupAsync.js","/node_modules/expo-notifications/build/deleteNotificationChannelGroupAsync.js","/node_modules/expo-notifications/build/getBadgeCountAsync.js","/node_modules/expo-notifications/build/BadgeModule.web.js","/node_modules/badgin/build/index.es.js","/node_modules/expo-notifications/build/setBadgeCountAsync.js","/node_modules/expo-notifications/build/getAllScheduledNotificationsAsync.js","/node_modules/expo-notifications/build/NotificationScheduler.js","/node_modules/expo-notifications/build/scheduleNotificationAsync.js","/node_modules/expo-notifications/build/Notifications.types.js","/node_modules/expo-notifications/build/cancelScheduledNotificationAsync.js","/node_modules/expo-notifications/build/cancelAllScheduledNotificationsAsync.js","/node_modules/expo-notifications/build/getNotificationCategoriesAsync.js","/node_modules/expo-notifications/build/NotificationCategoriesModule.js","/node_modules/expo-notifications/build/setNotificationCategoryAsync.js","/node_modules/expo-notifications/build/deleteNotificationCategoryAsync.js","/node_modules/expo-notifications/build/getNextTriggerDateAsync.js","/node_modules/expo-notifications/build/useLastNotificationResponse.js","/node_modules/expo-notifications/build/NotificationsEmitter.js","/node_modules/expo-notifications/build/NotificationsEmitterModule.js","/node_modules/expo-notifications/build/registerTaskAsync.js","/node_modules/expo-notifications/build/BackgroundNotificationTasksModule.js","/node_modules/expo-notifications/build/unregisterTaskAsync.js","/node_modules/expo-notifications/build/NotificationsHandler.js","/node_modules/expo-notifications/build/NotificationsHandlerModule.js","/node_modules/expo-notifications/build/NotificationPermissions.js","/node_modules/expo-notifications/build/NotificationPermissionsModule.js","/node_modules/expo-notifications/build/NotificationChannelGroupManager.types.js","/node_modules/expo-notifications/build/NotificationChannelManager.types.js","/node_modules/expo-notifications/build/NotificationPermissions.types.js","/node_modules/expo-notifications/build/Tokens.types.js","/src/hooks/api/useRegisterUserPlatform.ts","/src/components/screens/Root/SignUpScreen.tsx","/src/components/shared/AmplifyAuthentication.tsx","/src/components/shared/SharedLoginSection.tsx","/src/hooks/useFederatedAuth.ts","/src/components/shared/RedirectToAppOnLogin.tsx","/src/components/shared/AmplifyAuthenticationFormFields/index.tsx","/src/components/shared/AmplifyAuthenticationFormFields/AmplifyAuthenticationField.tsx","/src/components/shared/TitleLogo.tsx","/src/components/screens/Root/SignInScreen.tsx","/src/components/screens/Root/SharedReportScreen/index.tsx","/src/hooks/api/usePublicSharedReport.ts","/src/components/screens/Root/RedirectScreen.tsx","/src/components/screens/Root/WelcomeScreen/index.tsx","/src/components/screens/Root/WelcomeScreen/WebWelcomeScreen.tsx","/src/components/screens/Root/WelcomeScreen/WelcomeHeader.tsx","/src/components/screens/Root/WelcomeScreen/Logo.tsx","/src/components/shared/ProfessionalIndicator/index.tsx","/src/components/screens/Root/WelcomeScreen/Footer.tsx","/src/components/screens/Root/WelcomeScreen/ScreenshotsCarousel.tsx","/src/components/screens/Root/WelcomeScreen/AboutThisAppSection.tsx","/src/components/screens/Root/WelcomeScreen/ExpandableInformationSection.tsx","/src/components/screens/Root/WelcomeScreen/ExpandableInformationSubsection.tsx","/src/components/screens/Root/WelcomeScreen/DataSafetySection.tsx","/src/components/screens/Root/WelcomeScreen/LoginButtons.tsx","/src/components/screens/Root/WelcomeScreen/NativeWelcomeScreen.tsx","/src/aws-exports-dev.js","/src/aws-exports-prod.js","/node_modules/expo-web-browser/build/WebBrowser.js","/node_modules/expo-web-browser/build/ExpoWebBrowser.web.js","/node_modules/expo-web-browser/build/WebBrowser.types.js","/src/hooks/useLockDeviceOrientation.tsx","/node_modules/expo-screen-orientation/build/ScreenOrientation.js","/node_modules/expo-screen-orientation/build/ExpoScreenOrientation.web.js","/node_modules/expo-screen-orientation/build/ScreenOrientation.types.js","/node_modules/rn-pendo-sdk/lib/index.js","/node_modules/rn-pendo-sdk/lib/pendoAPI.js","/node_modules/@babel/runtime/helpers/asyncToGenerator.js","/node_modules/@babel/runtime/helpers/classCallCheck.js","/node_modules/@babel/runtime/helpers/createClass.js","/node_modules/rn-pendo-sdk/lib/common.js","/node_modules/rn-pendo-sdk/lib/pendoLogger.js","/node_modules/rn-pendo-sdk/lib/pendoTypes.js","/node_modules/rn-pendo-sdk/lib/traverseOptions.js","/node_modules/rn-pendo-sdk/package.json","/node_modules/rn-pendo-sdk/lib/pendoRNN.js","/node_modules/rn-pendo-sdk/lib/debouncer.js","/node_modules/rn-pendo-sdk/lib/treeAnalyzer.js","/node_modules/rn-pendo-sdk/lib/androidAnalyzer.js","/node_modules/rn-pendo-sdk/lib/fiber-types.js","/node_modules/@babel/runtime/helpers/toConsumableArray.js","/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","/node_modules/@babel/runtime/helpers/iterableToArray.js","/node_modules/@babel/runtime/helpers/nonIterableSpread.js","/node_modules/rn-pendo-sdk/lib/nativeParams.js","/node_modules/rn-pendo-sdk/lib/pendoNode.js","/node_modules/rn-pendo-sdk/lib/iosAnalyzer.js","/node_modules/rn-pendo-sdk/lib/iosTraverse.js","/node_modules/rn-pendo-sdk/lib/iosTraverseFabric.js","/node_modules/rn-pendo-sdk/lib/pendoRN.js","/node_modules/@babel/runtime/helpers/objectWithoutProperties.js","/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","/node_modules/@babel/runtime/helpers/assertThisInitialized.js","/node_modules/@babel/runtime/helpers/getPrototypeOf.js","/node_modules/@babel/runtime/helpers/inherits.js","/node_modules/@babel/runtime/helpers/setPrototypeOf.js","/node_modules/rn-pendo-sdk/lib/pendoBase.js","/node_modules/@babel/runtime/helpers/get.js","/node_modules/@babel/runtime/helpers/superPropBase.js","/node_modules/rn-pendo-sdk/lib/pendoModal.js","/node_modules/rn-pendo-sdk/lib/pendoExpoRouter.js","/src/utils/linkingOptions.ts","/src/utils/handle1UpHealthRedirect.ts","/src/utils/hideConsoleErrors.ts","/src/utils/initPendo.ts","/node_modules/expo-splash-screen/build/index.js"],"sourcesContent":["var __BUNDLE_START_TIME__=globalThis.nativePerformanceNow?nativePerformanceNow():Date.now(),__DEV__=false,process=globalThis.process||{},__METRO_GLOBAL_PREFIX__='';process.env=process.env||{};process.env.NODE_ENV=process.env.NODE_ENV||\"production\";","\"use strict\";\n\nglobal.__r = metroRequire;\nglobal[`${__METRO_GLOBAL_PREFIX__}__d`] = define;\nglobal.__c = clear;\nglobal.__registerSegment = registerSegment;\nvar modules = clear();\nconst EMPTY = {};\nconst CYCLE_DETECTED = {};\nconst { hasOwnProperty } = {};\nif (__DEV__) {\n global.$RefreshReg$ = () => {};\n global.$RefreshSig$ = () => (type) => type;\n}\nfunction clear() {\n modules = new Map();\n return modules;\n}\nif (__DEV__) {\n var verboseNamesToModuleIds = new Map();\n var getModuleIdForVerboseName = (verboseName) => {\n const moduleId = verboseNamesToModuleIds.get(verboseName);\n if (moduleId == null) {\n throw new Error(`Unknown named module: \"${verboseName}\"`);\n }\n return moduleId;\n };\n var initializingModuleIds = [];\n}\nfunction define(factory, moduleId, dependencyMap) {\n if (modules.has(moduleId)) {\n if (__DEV__) {\n const inverseDependencies = arguments[4];\n if (inverseDependencies) {\n global.__accept(moduleId, factory, dependencyMap, inverseDependencies);\n }\n }\n return;\n }\n const mod = {\n dependencyMap,\n factory,\n hasError: false,\n importedAll: EMPTY,\n importedDefault: EMPTY,\n isInitialized: false,\n publicModule: {\n exports: {},\n },\n };\n modules.set(moduleId, mod);\n if (__DEV__) {\n mod.hot = createHotReloadingObject();\n const verboseName = arguments[3];\n if (verboseName) {\n mod.verboseName = verboseName;\n verboseNamesToModuleIds.set(verboseName, moduleId);\n }\n }\n}\nfunction metroRequire(moduleId) {\n if (__DEV__ && typeof moduleId === \"string\") {\n const verboseName = moduleId;\n moduleId = getModuleIdForVerboseName(verboseName);\n console.warn(\n `Requiring module \"${verboseName}\" by name is only supported for ` +\n \"debugging purposes and will BREAK IN PRODUCTION!\"\n );\n }\n const moduleIdReallyIsNumber = moduleId;\n if (__DEV__) {\n const initializingIndex = initializingModuleIds.indexOf(\n moduleIdReallyIsNumber\n );\n if (initializingIndex !== -1) {\n const cycle = initializingModuleIds\n .slice(initializingIndex)\n .map((id) => modules.get(id)?.verboseName ?? \"[unknown]\");\n if (shouldPrintRequireCycle(cycle)) {\n cycle.push(cycle[0]);\n console.warn(\n `Require cycle: ${cycle.join(\" -> \")}\\n\\n` +\n \"Require cycles are allowed, but can result in uninitialized values. \" +\n \"Consider refactoring to remove the need for a cycle.\"\n );\n }\n }\n }\n const module = modules.get(moduleIdReallyIsNumber);\n return module && module.isInitialized\n ? module.publicModule.exports\n : guardedLoadModule(moduleIdReallyIsNumber, module);\n}\nfunction shouldPrintRequireCycle(modules) {\n const regExps =\n global[__METRO_GLOBAL_PREFIX__ + \"__requireCycleIgnorePatterns\"];\n if (!Array.isArray(regExps)) {\n return true;\n }\n const isIgnored = (module) =>\n module != null && regExps.some((regExp) => regExp.test(module));\n return modules.every((module) => !isIgnored(module));\n}\nfunction metroImportDefault(moduleId) {\n if (__DEV__ && typeof moduleId === \"string\") {\n const verboseName = moduleId;\n moduleId = getModuleIdForVerboseName(verboseName);\n }\n const moduleIdReallyIsNumber = moduleId;\n const maybeInitializedModule = modules.get(moduleIdReallyIsNumber);\n if (\n maybeInitializedModule &&\n maybeInitializedModule.importedDefault !== EMPTY\n ) {\n return maybeInitializedModule.importedDefault;\n }\n const exports = metroRequire(moduleIdReallyIsNumber);\n const importedDefault =\n exports && exports.__esModule ? exports.default : exports;\n const initializedModule = modules.get(moduleIdReallyIsNumber);\n return (initializedModule.importedDefault = importedDefault);\n}\nmetroRequire.importDefault = metroImportDefault;\nfunction metroImportAll(moduleId) {\n if (__DEV__ && typeof moduleId === \"string\") {\n const verboseName = moduleId;\n moduleId = getModuleIdForVerboseName(verboseName);\n }\n const moduleIdReallyIsNumber = moduleId;\n const maybeInitializedModule = modules.get(moduleIdReallyIsNumber);\n if (maybeInitializedModule && maybeInitializedModule.importedAll !== EMPTY) {\n return maybeInitializedModule.importedAll;\n }\n const exports = metroRequire(moduleIdReallyIsNumber);\n let importedAll;\n if (exports && exports.__esModule) {\n importedAll = exports;\n } else {\n importedAll = {};\n if (exports) {\n for (const key in exports) {\n if (hasOwnProperty.call(exports, key)) {\n importedAll[key] = exports[key];\n }\n }\n }\n importedAll.default = exports;\n }\n const initializedModule = modules.get(moduleIdReallyIsNumber);\n return (initializedModule.importedAll = importedAll);\n}\nmetroRequire.importAll = metroImportAll;\nmetroRequire.context = function fallbackRequireContext() {\n if (__DEV__) {\n throw new Error(\n \"The experimental Metro feature `require.context` is not enabled in your project.\\nThis can be enabled by setting the `transformer.unstable_allowRequireContext` property to `true` in your Metro configuration.\"\n );\n }\n throw new Error(\n \"The experimental Metro feature `require.context` is not enabled in your project.\"\n );\n};\nmetroRequire.resolveWeak = function fallbackRequireResolveWeak() {\n if (__DEV__) {\n throw new Error(\n \"require.resolveWeak cannot be called dynamically. Ensure you are using the same version of `metro` and `metro-runtime`.\"\n );\n }\n throw new Error(\"require.resolveWeak cannot be called dynamically.\");\n};\nlet inGuard = false;\nfunction guardedLoadModule(moduleId, module) {\n if (!inGuard && global.ErrorUtils) {\n inGuard = true;\n let returnValue;\n try {\n returnValue = loadModuleImplementation(moduleId, module);\n } catch (e) {\n global.ErrorUtils.reportFatalError(e);\n }\n inGuard = false;\n return returnValue;\n } else {\n return loadModuleImplementation(moduleId, module);\n }\n}\nconst ID_MASK_SHIFT = 16;\nconst LOCAL_ID_MASK = ~0 >>> ID_MASK_SHIFT;\nfunction unpackModuleId(moduleId) {\n const segmentId = moduleId >>> ID_MASK_SHIFT;\n const localId = moduleId & LOCAL_ID_MASK;\n return {\n segmentId,\n localId,\n };\n}\nmetroRequire.unpackModuleId = unpackModuleId;\nfunction packModuleId(value) {\n return (value.segmentId << ID_MASK_SHIFT) + value.localId;\n}\nmetroRequire.packModuleId = packModuleId;\nconst moduleDefinersBySegmentID = [];\nconst definingSegmentByModuleID = new Map();\nfunction registerSegment(segmentId, moduleDefiner, moduleIds) {\n moduleDefinersBySegmentID[segmentId] = moduleDefiner;\n if (__DEV__) {\n if (segmentId === 0 && moduleIds) {\n throw new Error(\n \"registerSegment: Expected moduleIds to be null for main segment\"\n );\n }\n if (segmentId !== 0 && !moduleIds) {\n throw new Error(\n \"registerSegment: Expected moduleIds to be passed for segment #\" +\n segmentId\n );\n }\n }\n if (moduleIds) {\n moduleIds.forEach((moduleId) => {\n if (!modules.has(moduleId) && !definingSegmentByModuleID.has(moduleId)) {\n definingSegmentByModuleID.set(moduleId, segmentId);\n }\n });\n }\n}\nfunction loadModuleImplementation(moduleId, module) {\n if (!module && moduleDefinersBySegmentID.length > 0) {\n const segmentId = definingSegmentByModuleID.get(moduleId) ?? 0;\n const definer = moduleDefinersBySegmentID[segmentId];\n if (definer != null) {\n definer(moduleId);\n module = modules.get(moduleId);\n definingSegmentByModuleID.delete(moduleId);\n }\n }\n const nativeRequire = global.nativeRequire;\n if (!module && nativeRequire) {\n const { segmentId, localId } = unpackModuleId(moduleId);\n nativeRequire(localId, segmentId);\n module = modules.get(moduleId);\n }\n if (!module) {\n throw unknownModuleError(moduleId);\n }\n if (module.hasError) {\n throw module.error;\n }\n if (__DEV__) {\n var Systrace = requireSystrace();\n var Refresh = requireRefresh();\n }\n module.isInitialized = true;\n const { factory, dependencyMap } = module;\n if (__DEV__) {\n initializingModuleIds.push(moduleId);\n }\n try {\n if (__DEV__) {\n Systrace.beginEvent(\"JS_require_\" + (module.verboseName || moduleId));\n }\n const moduleObject = module.publicModule;\n if (__DEV__) {\n moduleObject.hot = module.hot;\n var prevRefreshReg = global.$RefreshReg$;\n var prevRefreshSig = global.$RefreshSig$;\n if (Refresh != null) {\n const RefreshRuntime = Refresh;\n global.$RefreshReg$ = (type, id) => {\n RefreshRuntime.register(type, moduleId + \" \" + id);\n };\n global.$RefreshSig$ =\n RefreshRuntime.createSignatureFunctionForTransform;\n }\n }\n moduleObject.id = moduleId;\n factory(\n global,\n metroRequire,\n metroImportDefault,\n metroImportAll,\n moduleObject,\n moduleObject.exports,\n dependencyMap\n );\n if (!__DEV__) {\n module.factory = undefined;\n module.dependencyMap = undefined;\n }\n if (__DEV__) {\n Systrace.endEvent();\n if (Refresh != null) {\n registerExportsForReactRefresh(Refresh, moduleObject.exports, moduleId);\n }\n }\n return moduleObject.exports;\n } catch (e) {\n module.hasError = true;\n module.error = e;\n module.isInitialized = false;\n module.publicModule.exports = undefined;\n throw e;\n } finally {\n if (__DEV__) {\n if (initializingModuleIds.pop() !== moduleId) {\n throw new Error(\n \"initializingModuleIds is corrupt; something is terribly wrong\"\n );\n }\n global.$RefreshReg$ = prevRefreshReg;\n global.$RefreshSig$ = prevRefreshSig;\n }\n }\n}\nfunction unknownModuleError(id) {\n let message = 'Requiring unknown module \"' + id + '\".';\n if (__DEV__) {\n message +=\n \" If you are sure the module exists, try restarting Metro. \" +\n \"You may also want to run `yarn` or `npm install`.\";\n }\n return Error(message);\n}\nif (__DEV__) {\n metroRequire.Systrace = {\n beginEvent: () => {},\n endEvent: () => {},\n };\n metroRequire.getModules = () => {\n return modules;\n };\n var createHotReloadingObject = function () {\n const hot = {\n _acceptCallback: null,\n _disposeCallback: null,\n _didAccept: false,\n accept: (callback) => {\n hot._didAccept = true;\n hot._acceptCallback = callback;\n },\n dispose: (callback) => {\n hot._disposeCallback = callback;\n },\n };\n return hot;\n };\n let reactRefreshTimeout = null;\n const metroHotUpdateModule = function (\n id,\n factory,\n dependencyMap,\n inverseDependencies\n ) {\n const mod = modules.get(id);\n if (!mod) {\n if (factory) {\n return;\n }\n throw unknownModuleError(id);\n }\n if (!mod.hasError && !mod.isInitialized) {\n mod.factory = factory;\n mod.dependencyMap = dependencyMap;\n return;\n }\n const Refresh = requireRefresh();\n const refreshBoundaryIDs = new Set();\n let didBailOut = false;\n let updatedModuleIDs;\n try {\n updatedModuleIDs = topologicalSort(\n [id],\n (pendingID) => {\n const pendingModule = modules.get(pendingID);\n if (pendingModule == null) {\n return [];\n }\n const pendingHot = pendingModule.hot;\n if (pendingHot == null) {\n throw new Error(\n \"[Refresh] Expected module.hot to always exist in DEV.\"\n );\n }\n let canAccept = pendingHot._didAccept;\n if (!canAccept && Refresh != null) {\n const isBoundary = isReactRefreshBoundary(\n Refresh,\n pendingModule.publicModule.exports\n );\n if (isBoundary) {\n canAccept = true;\n refreshBoundaryIDs.add(pendingID);\n }\n }\n if (canAccept) {\n return [];\n }\n const parentIDs = inverseDependencies[pendingID];\n if (parentIDs.length === 0) {\n performFullRefresh(\"No root boundary\", {\n source: mod,\n failed: pendingModule,\n });\n didBailOut = true;\n return [];\n }\n return parentIDs;\n },\n () => didBailOut\n ).reverse();\n } catch (e) {\n if (e === CYCLE_DETECTED) {\n performFullRefresh(\"Dependency cycle\", {\n source: mod,\n });\n return;\n }\n throw e;\n }\n if (didBailOut) {\n return;\n }\n const seenModuleIDs = new Set();\n for (let i = 0; i < updatedModuleIDs.length; i++) {\n const updatedID = updatedModuleIDs[i];\n if (seenModuleIDs.has(updatedID)) {\n continue;\n }\n seenModuleIDs.add(updatedID);\n const updatedMod = modules.get(updatedID);\n if (updatedMod == null) {\n throw new Error(\"[Refresh] Expected to find the updated module.\");\n }\n const prevExports = updatedMod.publicModule.exports;\n const didError = runUpdatedModule(\n updatedID,\n updatedID === id ? factory : undefined,\n updatedID === id ? dependencyMap : undefined\n );\n const nextExports = updatedMod.publicModule.exports;\n if (didError) {\n return;\n }\n if (refreshBoundaryIDs.has(updatedID)) {\n const isNoLongerABoundary = !isReactRefreshBoundary(\n Refresh,\n nextExports\n );\n const didInvalidate = shouldInvalidateReactRefreshBoundary(\n Refresh,\n prevExports,\n nextExports\n );\n if (isNoLongerABoundary || didInvalidate) {\n const parentIDs = inverseDependencies[updatedID];\n if (parentIDs.length === 0) {\n performFullRefresh(\n isNoLongerABoundary\n ? \"No longer a boundary\"\n : \"Invalidated boundary\",\n {\n source: mod,\n failed: updatedMod,\n }\n );\n return;\n }\n for (let j = 0; j < parentIDs.length; j++) {\n const parentID = parentIDs[j];\n const parentMod = modules.get(parentID);\n if (parentMod == null) {\n throw new Error(\"[Refresh] Expected to find parent module.\");\n }\n const canAcceptParent = isReactRefreshBoundary(\n Refresh,\n parentMod.publicModule.exports\n );\n if (canAcceptParent) {\n refreshBoundaryIDs.add(parentID);\n updatedModuleIDs.push(parentID);\n } else {\n performFullRefresh(\"Invalidated boundary\", {\n source: mod,\n failed: parentMod,\n });\n return;\n }\n }\n }\n }\n }\n if (Refresh != null) {\n if (reactRefreshTimeout == null) {\n reactRefreshTimeout = setTimeout(() => {\n reactRefreshTimeout = null;\n Refresh.performReactRefresh();\n }, 30);\n }\n }\n };\n const topologicalSort = function (roots, getEdges, earlyStop) {\n const result = [];\n const visited = new Set();\n const stack = new Set();\n function traverseDependentNodes(node) {\n if (stack.has(node)) {\n throw CYCLE_DETECTED;\n }\n if (visited.has(node)) {\n return;\n }\n visited.add(node);\n stack.add(node);\n const dependentNodes = getEdges(node);\n if (earlyStop(node)) {\n stack.delete(node);\n return;\n }\n dependentNodes.forEach((dependent) => {\n traverseDependentNodes(dependent);\n });\n stack.delete(node);\n result.push(node);\n }\n roots.forEach((root) => {\n traverseDependentNodes(root);\n });\n return result;\n };\n const runUpdatedModule = function (id, factory, dependencyMap) {\n const mod = modules.get(id);\n if (mod == null) {\n throw new Error(\"[Refresh] Expected to find the module.\");\n }\n const { hot } = mod;\n if (!hot) {\n throw new Error(\"[Refresh] Expected module.hot to always exist in DEV.\");\n }\n if (hot._disposeCallback) {\n try {\n hot._disposeCallback();\n } catch (error) {\n console.error(\n `Error while calling dispose handler for module ${id}: `,\n error\n );\n }\n }\n if (factory) {\n mod.factory = factory;\n }\n if (dependencyMap) {\n mod.dependencyMap = dependencyMap;\n }\n mod.hasError = false;\n mod.error = undefined;\n mod.importedAll = EMPTY;\n mod.importedDefault = EMPTY;\n mod.isInitialized = false;\n const prevExports = mod.publicModule.exports;\n mod.publicModule.exports = {};\n hot._didAccept = false;\n hot._acceptCallback = null;\n hot._disposeCallback = null;\n metroRequire(id);\n if (mod.hasError) {\n mod.hasError = false;\n mod.isInitialized = true;\n mod.error = null;\n mod.publicModule.exports = prevExports;\n return true;\n }\n if (hot._acceptCallback) {\n try {\n hot._acceptCallback();\n } catch (error) {\n console.error(\n `Error while calling accept handler for module ${id}: `,\n error\n );\n }\n }\n return false;\n };\n const performFullRefresh = (reason, modules) => {\n if (\n typeof window !== \"undefined\" &&\n window.location != null &&\n typeof window.location.reload === \"function\"\n ) {\n window.location.reload();\n } else {\n const Refresh = requireRefresh();\n if (Refresh != null) {\n const sourceName = modules.source?.verboseName ?? \"unknown\";\n const failedName = modules.failed?.verboseName ?? \"unknown\";\n Refresh.performFullRefresh(\n `Fast Refresh - ${reason} <${sourceName}> <${failedName}>`\n );\n } else {\n console.warn(\"Could not reload the application after an edit.\");\n }\n }\n };\n var isReactRefreshBoundary = function (Refresh, moduleExports) {\n if (Refresh.isLikelyComponentType(moduleExports)) {\n return true;\n }\n if (moduleExports == null || typeof moduleExports !== \"object\") {\n return false;\n }\n let hasExports = false;\n let areAllExportsComponents = true;\n for (const key in moduleExports) {\n hasExports = true;\n if (key === \"__esModule\") {\n continue;\n }\n const desc = Object.getOwnPropertyDescriptor(moduleExports, key);\n if (desc && desc.get) {\n return false;\n }\n const exportValue = moduleExports[key];\n if (!Refresh.isLikelyComponentType(exportValue)) {\n areAllExportsComponents = false;\n }\n }\n return hasExports && areAllExportsComponents;\n };\n var shouldInvalidateReactRefreshBoundary = (\n Refresh,\n prevExports,\n nextExports\n ) => {\n const prevSignature = getRefreshBoundarySignature(Refresh, prevExports);\n const nextSignature = getRefreshBoundarySignature(Refresh, nextExports);\n if (prevSignature.length !== nextSignature.length) {\n return true;\n }\n for (let i = 0; i < nextSignature.length; i++) {\n if (prevSignature[i] !== nextSignature[i]) {\n return true;\n }\n }\n return false;\n };\n var getRefreshBoundarySignature = (Refresh, moduleExports) => {\n const signature = [];\n signature.push(Refresh.getFamilyByType(moduleExports));\n if (moduleExports == null || typeof moduleExports !== \"object\") {\n return signature;\n }\n for (const key in moduleExports) {\n if (key === \"__esModule\") {\n continue;\n }\n const desc = Object.getOwnPropertyDescriptor(moduleExports, key);\n if (desc && desc.get) {\n continue;\n }\n const exportValue = moduleExports[key];\n signature.push(key);\n signature.push(Refresh.getFamilyByType(exportValue));\n }\n return signature;\n };\n var registerExportsForReactRefresh = (Refresh, moduleExports, moduleID) => {\n Refresh.register(moduleExports, moduleID + \" %exports%\");\n if (moduleExports == null || typeof moduleExports !== \"object\") {\n return;\n }\n for (const key in moduleExports) {\n const desc = Object.getOwnPropertyDescriptor(moduleExports, key);\n if (desc && desc.get) {\n continue;\n }\n const exportValue = moduleExports[key];\n const typeID = moduleID + \" %exports% \" + key;\n Refresh.register(exportValue, typeID);\n }\n };\n global.__accept = metroHotUpdateModule;\n}\nif (__DEV__) {\n var requireSystrace = function requireSystrace() {\n return (\n global[__METRO_GLOBAL_PREFIX__ + \"__SYSTRACE\"] || metroRequire.Systrace\n );\n };\n var requireRefresh = function requireRefresh() {\n return (\n global[__METRO_GLOBAL_PREFIX__ + \"__ReactRefresh\"] || metroRequire.Refresh\n );\n };\n}\n","global.$$require_external = typeof window === \"undefined\" ? require : () => null;","//","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n * @flow strict\n * @polyfill\n */\n\nlet _inGuard = 0;\n\ntype ErrorHandler = (error: mixed, isFatal: boolean) => void;\ntype Fn = (...Args) => Return;\n\n/**\n * This is the error handler that is called when we encounter an exception\n * when loading a module. This will report any errors encountered before\n * ExceptionsManager is configured.\n */\nlet _globalHandler: ErrorHandler = function onError(\n e: mixed,\n isFatal: boolean,\n) {\n throw e;\n};\n\n/**\n * The particular require runtime that we are using looks for a global\n * `ErrorUtils` object and if it exists, then it requires modules with the\n * error handler specified via ErrorUtils.setGlobalHandler by calling the\n * require function with applyWithGuard. Since the require module is loaded\n * before any of the modules, this ErrorUtils must be defined (and the handler\n * set) globally before requiring anything.\n */\nconst ErrorUtils = {\n setGlobalHandler(fun: ErrorHandler): void {\n _globalHandler = fun;\n },\n getGlobalHandler(): ErrorHandler {\n return _globalHandler;\n },\n reportError(error: mixed): void {\n _globalHandler && _globalHandler(error, false);\n },\n reportFatalError(error: mixed): void {\n // NOTE: This has an untyped call site in Metro.\n _globalHandler && _globalHandler(error, true);\n },\n applyWithGuard, TOut>(\n fun: Fn,\n context?: ?mixed,\n args?: ?TArgs,\n // Unused, but some code synced from www sets it to null.\n unused_onError?: null,\n // Some callers pass a name here, which we ignore.\n unused_name?: ?string,\n ): ?TOut {\n try {\n _inGuard++;\n /* $FlowFixMe[incompatible-call] : TODO T48204745 (1) apply(context,\n * null) is fine. (2) array -> rest array should work */\n /* $FlowFixMe[incompatible-type] : TODO T48204745 (1) apply(context,\n * null) is fine. (2) array -> rest array should work */\n return fun.apply(context, args);\n } catch (e) {\n ErrorUtils.reportError(e);\n } finally {\n _inGuard--;\n }\n return null;\n },\n applyWithGuardIfNeeded, TOut>(\n fun: Fn,\n context?: ?mixed,\n args?: ?TArgs,\n ): ?TOut {\n if (ErrorUtils.inGuard()) {\n /* $FlowFixMe[incompatible-call] : TODO T48204745 (1) apply(context,\n * null) is fine. (2) array -> rest array should work */\n /* $FlowFixMe[incompatible-type] : TODO T48204745 (1) apply(context,\n * null) is fine. (2) array -> rest array should work */\n return fun.apply(context, args);\n } else {\n ErrorUtils.applyWithGuard(fun, context, args);\n }\n return null;\n },\n inGuard(): boolean {\n return !!_inGuard;\n },\n guard, TOut>(\n fun: Fn,\n name?: ?string,\n context?: ?mixed,\n ): ?(...TArgs) => ?TOut {\n // TODO: (moti) T48204753 Make sure this warning is never hit and remove it - types\n // should be sufficient.\n if (typeof fun !== 'function') {\n console.warn('A function must be passed to ErrorUtils.guard, got ', fun);\n return null;\n }\n const guardName = name ?? fun.name ?? '';\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n function guarded(...args: TArgs): ?TOut {\n return ErrorUtils.applyWithGuard(\n fun,\n context ?? this,\n args,\n null,\n guardName,\n );\n }\n\n return guarded;\n },\n};\n\nglobal.ErrorUtils = ErrorUtils;\n\nexport type ErrorUtilsT = typeof ErrorUtils;\n","import registerRootComponent from 'expo/src/launch/registerRootComponent';\n\nimport App from '../../App';\n\nregisterRootComponent(App);\n","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","import '../Expo.fx';\n\nimport { type ComponentType } from 'react';\nimport { AppRegistry, Platform } from 'react-native';\n\ntype InitialProps = {\n exp?: {\n notification?: any;\n manifestString?: string;\n [key: string]: any;\n };\n shell?: boolean;\n shellManifestUrl?: string;\n [key: string]: any;\n};\n\n// @needsAudit\n/**\n * Sets the initial React component to render natively in the app's root React Native view on Android, iOS, tvOS and the web.\n *\n * This method does the following:\n * - Invokes React Native's `AppRegistry.registerComponent`.\n * - Invokes React Native web's `AppRegistry.runApplication` on web to render to the root `index.html` file.\n * - Polyfills the `process.nextTick` function globally.\n *\n * This method also adds the following dev-only features that are removed in production bundles.\n * - Adds the Fast Refresh and bundle splitting indicator to the app.\n * - Asserts if the `expo-updates` package is misconfigured.\n * - Asserts if `react-native` is not aliased to `react-native-web` when running in the browser.\n * @param component The React component class that renders the rest of your app.\n */\nexport default function registerRootComponent

(\n component: ComponentType

\n): void {\n let qualifiedComponent = component;\n\n if (process.env.NODE_ENV !== 'production') {\n const { withDevTools } = require('./withDevTools') as typeof import('./withDevTools');\n qualifiedComponent = withDevTools(component);\n }\n\n AppRegistry.registerComponent('main', () => qualifiedComponent);\n // Skip querying the DOM if we're in a Node.js environment.\n if (Platform.OS === 'web' && typeof window !== 'undefined') {\n const rootTag = document.getElementById('root');\n if (process.env.NODE_ENV !== 'production') {\n if (!rootTag) {\n throw new Error('Required HTML element with id \"root\" was not found in the document HTML.');\n }\n }\n\n AppRegistry.runApplication('main', {\n rootTag,\n // Injected by SSR HTML tags.\n hydrate: globalThis.__EXPO_ROUTER_HYDRATE__,\n });\n }\n}\n","// When users dangerously import a file inside of react-native, it breaks the web alias.\n// This is one of the most common, and cryptic web errors that users encounter.\n// This conditional side-effect provides a more helpful error message for debugging.\n// Use a wrapper `__DEV__` to remove this entire block in production.\nif (__DEV__) {\n if (\n // Skip mocking if someone is shimming this value out.\n !('__fbBatchedBridgeConfig' in global)\n ) {\n Object.defineProperty(global, '__fbBatchedBridgeConfig', {\n get() {\n throw new Error(\n \"Your web project is importing a module from 'react-native' instead of 'react-native-web'. Learn more: https://expo.fyi/fb-batched-bridge-config-web\"\n );\n },\n });\n }\n}\n","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\n'use client';\n\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport invariant from 'fbjs/lib/invariant';\nimport unmountComponentAtNode from '../unmountComponentAtNode';\nimport renderApplication, { getApplication as _getApplication } from './renderApplication';\nvar emptyObject = {};\nvar runnables = {};\nvar componentProviderInstrumentationHook = component => component();\nvar wrapperComponentProvider;\n\n/**\n * `AppRegistry` is the JS entry point to running all React Native apps.\n */\nexport default class AppRegistry {\n static getAppKeys() {\n return Object.keys(runnables);\n }\n static getApplication(appKey, appParameters) {\n invariant(runnables[appKey] && runnables[appKey].getApplication, \"Application \" + appKey + \" has not been registered. \" + 'This is either due to an import error during initialization or failure to call AppRegistry.registerComponent.');\n return runnables[appKey].getApplication(appParameters);\n }\n static registerComponent(appKey, componentProvider) {\n runnables[appKey] = {\n getApplication: appParameters => _getApplication(componentProviderInstrumentationHook(componentProvider), appParameters ? appParameters.initialProps : emptyObject, wrapperComponentProvider && wrapperComponentProvider(appParameters)),\n run: appParameters => renderApplication(componentProviderInstrumentationHook(componentProvider), wrapperComponentProvider && wrapperComponentProvider(appParameters), appParameters.callback, {\n hydrate: appParameters.hydrate || false,\n initialProps: appParameters.initialProps || emptyObject,\n mode: appParameters.mode || 'concurrent',\n rootTag: appParameters.rootTag\n })\n };\n return appKey;\n }\n static registerConfig(config) {\n config.forEach(_ref => {\n var appKey = _ref.appKey,\n component = _ref.component,\n run = _ref.run;\n if (run) {\n AppRegistry.registerRunnable(appKey, run);\n } else {\n invariant(component, 'No component provider passed in');\n AppRegistry.registerComponent(appKey, component);\n }\n });\n }\n\n // TODO: fix style sheet creation when using this method\n static registerRunnable(appKey, run) {\n runnables[appKey] = {\n run\n };\n return appKey;\n }\n static runApplication(appKey, appParameters) {\n var isDevelopment = process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test';\n if (isDevelopment) {\n var params = _objectSpread({}, appParameters);\n params.rootTag = \"#\" + params.rootTag.id;\n console.log(\"Running application \\\"\" + appKey + \"\\\" with appParams:\\n\", params, \"\\nDevelopment-level warnings: \" + (isDevelopment ? 'ON' : 'OFF') + \".\" + (\"\\nPerformance optimizations: \" + (isDevelopment ? 'OFF' : 'ON') + \".\"));\n }\n invariant(runnables[appKey] && runnables[appKey].run, \"Application \\\"\" + appKey + \"\\\" has not been registered. \" + 'This is either due to an import error during initialization or failure to call AppRegistry.registerComponent.');\n return runnables[appKey].run(appParameters);\n }\n static setComponentProviderInstrumentationHook(hook) {\n componentProviderInstrumentationHook = hook;\n }\n static setWrapperComponentProvider(provider) {\n wrapperComponentProvider = provider;\n }\n static unmountApplicationComponentAtRootTag(rootTag) {\n unmountComponentAtNode(rootTag);\n }\n}","var defineProperty = require(\"./defineProperty.js\");\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 _objectSpread2(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}\nmodule.exports = _objectSpread2, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toPropertyKey = require(\"./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}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nmodule.exports = toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _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 }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\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}\nmodule.exports = toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/**\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 */\n'use strict';\n\nvar validateFormat = process.env.NODE_ENV !== \"production\" ? function (format) {\n if (format === undefined) {\n throw new Error('invariant(...): Second argument must be a string.');\n }\n} : function (format) {};\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments to provide\n * information about what broke and what you were expecting.\n *\n * The invariant message will be stripped in production, but the invariant will\n * remain to ensure logic does not differ in production.\n */\n\nfunction invariant(condition, format) {\n for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n validateFormat(format);\n\n if (!condition) {\n var error;\n\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return String(args[argIndex++]);\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // Skip invariant's own stack frame.\n\n throw error;\n }\n}\n\nmodule.exports = invariant;","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nimport { unmountComponentAtNode } from 'react-dom';\nexport default unmountComponentAtNode;","'use strict';\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (process.env.NODE_ENV === 'production') {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = require('./cjs/react-dom.production.min.js');\n} else {\n module.exports = require('./cjs/react-dom.development.js');\n}\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';var aa=require(\"react\"),ca=require(\"scheduler\");function p(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cb}return!1}function v(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var z={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){z[a]=new v(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];z[b]=new v(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){z[a]=new v(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){z[a]=new v(a,2,!1,a,null,!1,!1)});\"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){z[a]=new v(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){z[a]=new v(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){z[a]=new v(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){z[a]=new v(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){z[a]=new v(a,5,!1,a.toLowerCase(),null,!1,!1)});var ra=/[\\-:]([a-z])/g;function sa(a){return a[1].toUpperCase()}\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){var b=a.replace(ra,\nsa);z[b]=new v(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!1,!1)});\nz.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction ta(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2h||e[g]!==f[h]){var k=\"\\n\"+e[g].replace(\" at new \",\" at \");a.displayName&&k.includes(\"\")&&(k=k.replace(\"\",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{Na=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Ma(a):\"\"}\nfunction Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma(\"Lazy\");case 13:return Ma(\"Suspense\");case 19:return Ma(\"SuspenseList\");case 0:case 2:case 15:return a=Oa(a.type,!1),a;case 11:return a=Oa(a.type.render,!1),a;case 1:return a=Oa(a.type,!0),a;default:return\"\"}}\nfunction Qa(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ya:return\"Fragment\";case wa:return\"Portal\";case Aa:return\"Profiler\";case za:return\"StrictMode\";case Ea:return\"Suspense\";case Fa:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case Ca:return(a.displayName||\"Context\")+\".Consumer\";case Ba:return(a._context.displayName||\"Context\")+\".Provider\";case Da:var b=a.render;a=a.displayName;a||(a=b.displayName||\nb.name||\"\",a=\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");return a;case Ga:return b=a.displayName||null,null!==b?b:Qa(a.type)||\"Memo\";case Ha:b=a._payload;a=a._init;try{return Qa(a(b))}catch(c){}}return null}\nfunction Ra(a){var b=a.type;switch(a.tag){case 24:return\"Cache\";case 9:return(b.displayName||\"Context\")+\".Consumer\";case 10:return(b._context.displayName||\"Context\")+\".Provider\";case 18:return\"DehydratedFragment\";case 11:return a=b.render,a=a.displayName||a.name||\"\",b.displayName||(\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");case 7:return\"Fragment\";case 5:return b;case 4:return\"Portal\";case 3:return\"Root\";case 6:return\"Text\";case 16:return Qa(b);case 8:return b===za?\"StrictMode\":\"Mode\";case 22:return\"Offscreen\";\ncase 12:return\"Profiler\";case 21:return\"Scope\";case 13:return\"Suspense\";case 19:return\"SuspenseList\";case 25:return\"TracingMarker\";case 1:case 0:case 17:case 2:case 14:case 15:if(\"function\"===typeof b)return b.displayName||b.name||null;if(\"string\"===typeof b)return b}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"string\":case \"undefined\":return a;case \"object\":return a;default:return\"\"}}\nfunction Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return A({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function ab(a,b){b=b.checked;null!=b&&ta(a,\"checked\",b,!1)}\nfunction bb(a,b){ab(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?cb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&cb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction db(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction cb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}var eb=Array.isArray;\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e\"+b.valueOf().toString()+\"\";for(b=mb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction ob(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,\nzoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(pb).forEach(function(a){qb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pb[b]=pb[a]})});function rb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||pb.hasOwnProperty(a)&&pb[a]?(\"\"+b).trim():b+\"px\"}\nfunction sb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=rb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var tb=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction ub(a,b){if(b){if(tb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if(\"object\"!==typeof b.dangerouslySetInnerHTML||!(\"__html\"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(p(62));}}\nfunction vb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}var wb=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(p(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a>>=0;return 0===a?32:31-(pc(a)/qc|0)|0}var rc=64,sc=4194304;\nfunction tc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;\ndefault:return a}}function uc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=tc(h):(f&=g,0!==f&&(d=tc(f)))}else g=c&~e,0!==g?d=tc(g):0!==f&&(d=tc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0c;c++)b.push(a);return b}\nfunction Ac(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-oc(b);a[b]=c}function Bc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Je(c)}}function Le(a,b){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}\nfunction Me(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nfunction Oe(a){var b=Me(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Le(c.ownerDocument.documentElement,c)){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){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ke(c,f);var g=Ke(c,\nd);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)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});\"function\"===typeof c.focus&&c.focus();for(c=0;c=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Ne(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Ie(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0Tf||(a.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(a,b){Tf++;Sf[Tf]=a.current;a.current=b}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(a,b){var c=a.type.contextTypes;if(!c)return Vf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}\nfunction Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a}function $f(){E(Wf);E(H)}function ag(a,b,c){if(H.current!==Vf)throw Error(p(168));G(H,b);G(Wf,c)}function bg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,Ra(a)||\"Unknown\",e));return A({},c,d)}\nfunction cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vf;Xf=H.current;G(H,a);G(Wf,Wf.current);return!0}function dg(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=bg(a,b,Xf),d.__reactInternalMemoizedMergedChildContext=a,E(Wf),E(H),G(H,a)):E(Wf);G(Wf,c)}var eg=null,fg=!1,gg=!1;function hg(a){null===eg?eg=[a]:eg.push(a)}function ig(a){fg=!0;hg(a)}\nfunction jg(){if(!gg&&null!==eg){gg=!0;var a=0,b=C;try{var c=eg;for(C=1;a>=g;e-=g;rg=1<<32-oc(b)+e|c<w?(x=u,u=null):x=u.sibling;var n=r(e,u,h[w],k);if(null===n){null===u&&(u=x);break}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,w);null===m?l=n:m.sibling=n;m=n;u=x}if(w===h.length)return c(e,u),I&&tg(e,w),l;if(null===u){for(;ww?(x=m,m=null):x=m.sibling;var t=r(e,m,n.value,k);if(null===t){null===m&&(m=x);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,w);null===u?l=t:u.sibling=t;u=t;m=x}if(n.done)return c(e,\nm),I&&tg(e,w),l;if(null===m){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);I&&tg(e,w);return l}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);a&&m.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function J(a,d,f,h){\"object\"===typeof f&&null!==f&&f.type===ya&&null===f.key&&(f=f.props.children);if(\"object\"===typeof f&&null!==f){switch(f.$$typeof){case va:a:{for(var k=\nf.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ya){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||\"object\"===typeof k&&null!==k&&k.$$typeof===Ha&&Ng(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=Lg(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}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)}return g(a);case wa:a:{for(l=f.key;null!==\nd;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=Sg(f,a.mode,h);d.return=a;a=d}return g(a);case Ha:return l=f._init,J(a,d,l(f._payload),h)}if(eb(f))return n(a,d,f,h);if(Ka(f))return t(a,d,f,h);Mg(a,f)}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):\n(c(a,d),d=Qg(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return J}var Ug=Og(!0),Vg=Og(!1),Wg=Uf(null),Xg=null,Yg=null,Zg=null;function $g(){Zg=Yg=Xg=null}function ah(a){var b=Wg.current;E(Wg);a._currentValue=b}function bh(a,b,c){for(;null!==a;){var d=a.alternate;(a.childLanes&b)!==b?(a.childLanes|=b,null!==d&&(d.childLanes|=b)):null!==d&&(d.childLanes&b)!==b&&(d.childLanes|=b);if(a===c)break;a=a.return}}\nfunction ch(a,b){Xg=a;Zg=Yg=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(dh=!0),a.firstContext=null)}function eh(a){var b=a._currentValue;if(Zg!==a)if(a={context:a,memoizedValue:b,next:null},null===Yg){if(null===Xg)throw Error(p(308));Yg=a;Xg.dependencies={lanes:0,firstContext:a}}else Yg=Yg.next=a;return b}var fh=null;function gh(a){null===fh?fh=[a]:fh.push(a)}\nfunction hh(a,b,c,d){var e=b.interleaved;null===e?(c.next=c,gh(b)):(c.next=e.next,e.next=c);b.interleaved=c;return ih(a,d)}function ih(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);c=a;for(a=a.return;null!==a;)a.childLanes|=b,c=a.alternate,null!==c&&(c.childLanes|=b),c=a,a=a.return;return 3===c.tag?c.stateNode:null}var jh=!1;function kh(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}\nfunction lh(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function mh(a,b){return{eventTime:a,lane:b,tag:0,payload:null,callback:null,next:null}}\nfunction nh(a,b,c){var d=a.updateQueue;if(null===d)return null;d=d.shared;if(0!==(K&2)){var e=d.pending;null===e?b.next=b:(b.next=e.next,e.next=b);d.pending=b;return ih(a,c)}e=d.interleaved;null===e?(b.next=b,gh(d)):(b.next=e.next,e.next=b);d.interleaved=b;return ih(a,c)}function oh(a,b,c){b=b.updateQueue;if(null!==b&&(b=b.shared,0!==(c&4194240))){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}}\nfunction ph(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,shared:d.shared,effects:d.effects};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next=\nb;c.lastBaseUpdate=b}\nfunction qh(a,b,c,d){var e=a.updateQueue;jh=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,l=k.next;k.next=null;null===g?f=l:g.next=l;g=k;var m=a.alternate;null!==m&&(m=m.updateQueue,h=m.lastBaseUpdate,h!==g&&(null===h?m.firstBaseUpdate=l:h.next=l,m.lastBaseUpdate=k))}if(null!==f){var q=e.baseState;g=0;m=l=k=null;h=f;do{var r=h.lane,y=h.eventTime;if((d&r)===r){null!==m&&(m=m.next={eventTime:y,lane:0,tag:h.tag,payload:h.payload,callback:h.callback,\nnext:null});a:{var n=a,t=h;r=b;y=c;switch(t.tag){case 1:n=t.payload;if(\"function\"===typeof n){q=n.call(y,q,r);break a}q=n;break a;case 3:n.flags=n.flags&-65537|128;case 0:n=t.payload;r=\"function\"===typeof n?n.call(y,q,r):n;if(null===r||void 0===r)break a;q=A({},q,r);break a;case 2:jh=!0}}null!==h.callback&&0!==h.lane&&(a.flags|=64,r=e.effects,null===r?e.effects=[h]:r.push(h))}else y={eventTime:y,lane:r,tag:h.tag,payload:h.payload,callback:h.callback,next:null},null===m?(l=m=y,k=q):m=m.next=y,g|=r;\nh=h.next;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}while(1);null===m&&(k=q);e.baseState=k;e.firstBaseUpdate=l;e.lastBaseUpdate=m;b=e.shared.interleaved;if(null!==b){e=b;do g|=e.lane,e=e.next;while(e!==b)}else null===f&&(e.shared.lanes=0);rh|=g;a.lanes=g;a.memoizedState=q}}\nfunction sh(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;bc?c:4;a(!0);var d=Gh.transition;Gh.transition={};try{a(!1),b()}finally{C=c,Gh.transition=d}}function wi(){return Uh().memoizedState}\nfunction xi(a,b,c){var d=yi(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(zi(a))Ai(b,c);else if(c=hh(a,b,c,d),null!==c){var e=R();gi(c,a,d,e);Bi(c,b,d)}}\nfunction ii(a,b,c){var d=yi(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(zi(a))Ai(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(He(h,g)){var k=b.interleaved;null===k?(e.next=e,gh(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=hh(a,b,e,d);null!==c&&(e=R(),gi(c,a,d,e),Bi(c,b,d))}}\nfunction zi(a){var b=a.alternate;return a===M||null!==b&&b===M}function Ai(a,b){Jh=Ih=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Bi(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}}\nvar Rh={readContext:eh,useCallback:P,useContext:P,useEffect:P,useImperativeHandle:P,useInsertionEffect:P,useLayoutEffect:P,useMemo:P,useReducer:P,useRef:P,useState:P,useDebugValue:P,useDeferredValue:P,useTransition:P,useMutableSource:P,useSyncExternalStore:P,useId:P,unstable_isNewReconciler:!1},Oh={readContext:eh,useCallback:function(a,b){Th().memoizedState=[a,void 0===b?null:b];return a},useContext:eh,useEffect:mi,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ki(4194308,\n4,pi.bind(null,b,a),c)},useLayoutEffect:function(a,b){return ki(4194308,4,a,b)},useInsertionEffect:function(a,b){return ki(4,2,a,b)},useMemo:function(a,b){var c=Th();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=Th();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=xi.bind(null,M,a);return[d.memoizedState,a]},useRef:function(a){var b=\nTh();a={current:a};return b.memoizedState=a},useState:hi,useDebugValue:ri,useDeferredValue:function(a){return Th().memoizedState=a},useTransition:function(){var a=hi(!1),b=a[0];a=vi.bind(null,a[1]);Th().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=M,e=Th();if(I){if(void 0===c)throw Error(p(407));c=c()}else{c=b();if(null===Q)throw Error(p(349));0!==(Hh&30)||di(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;mi(ai.bind(null,d,\nf,a),[a]);d.flags|=2048;bi(9,ci.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=Th(),b=Q.identifierPrefix;if(I){var c=sg;var d=rg;c=(d&~(1<<32-oc(d)-1)).toString(32)+c;b=\":\"+b+\"R\"+c;c=Kh++;0\\x3c/script>\",a=a.removeChild(a.firstChild)):\n\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Of]=b;a[Pf]=d;zj(a,b,!1,!1);b.stateNode=a;a:{g=vb(c,d);switch(c){case \"dialog\":D(\"cancel\",a);D(\"close\",a);e=d;break;case \"iframe\":case \"object\":case \"embed\":D(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;eGj&&(b.flags|=128,d=!0,Dj(f,!1),b.lanes=4194304)}else{if(!d)if(a=Ch(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Dj(f,!0),null===f.tail&&\"hidden\"===f.tailMode&&!g.alternate&&!I)return S(b),null}else 2*B()-f.renderingStartTime>Gj&&1073741824!==c&&(b.flags|=128,d=!0,Dj(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g)}if(null!==f.tail)return b=f.tail,f.rendering=\nb,f.tail=b.sibling,f.renderingStartTime=B(),b.sibling=null,c=L.current,G(L,d?c&1|2:c&1),b;S(b);return null;case 22:case 23:return Hj(),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(fj&1073741824)&&(S(b),b.subtreeFlags&6&&(b.flags|=8192)):S(b),null;case 24:return null;case 25:return null}throw Error(p(156,b.tag));}\nfunction Ij(a,b){wg(b);switch(b.tag){case 1:return Zf(b.type)&&$f(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return zh(),E(Wf),E(H),Eh(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Bh(b),null;case 13:E(L);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Ig()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return E(L),null;case 4:return zh(),null;case 10:return ah(b.type._context),null;case 22:case 23:return Hj(),\nnull;case 24:return null;default:return null}}var Jj=!1,U=!1,Kj=\"function\"===typeof WeakSet?WeakSet:Set,V=null;function Lj(a,b){var c=a.ref;if(null!==c)if(\"function\"===typeof c)try{c(null)}catch(d){W(a,b,d)}else c.current=null}function Mj(a,b,c){try{c()}catch(d){W(a,b,d)}}var Nj=!1;\nfunction Oj(a,b){Cf=dd;a=Me();if(Ne(a)){if(\"selectionStart\"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(F){c=null;break a}var g=0,h=-1,k=-1,l=0,m=0,q=a,r=null;b:for(;;){for(var y;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+=\nq.nodeValue.length);if(null===(y=q.firstChild))break;r=q;q=y}for(;;){if(q===a)break b;r===c&&++l===e&&(h=g);r===f&&++m===d&&(k=g);if(null!==(y=q.nextSibling))break;q=r;r=q.parentNode}q=y}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Df={focusedElem:a,selectionRange:c};dd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break;\ncase 1:if(null!==n){var t=n.memoizedProps,J=n.memoizedState,x=b.stateNode,w=x.getSnapshotBeforeUpdate(b.elementType===b.type?t:Ci(b.type,t),J);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var u=b.stateNode.containerInfo;1===u.nodeType?u.textContent=\"\":9===u.nodeType&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163));}}catch(F){W(b,b.return,F)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}n=Nj;Nj=!1;return n}\nfunction Pj(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Mj(b,c,f)}e=e.next}while(e!==d)}}function Qj(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Rj(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}\"function\"===typeof b?b(a):b.current=a}}\nfunction Sj(a){var b=a.alternate;null!==b&&(a.alternate=null,Sj(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Of],delete b[Pf],delete b[of],delete b[Qf],delete b[Rf]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Tj(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction Uj(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Tj(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}\nfunction Vj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Bf));else if(4!==d&&(a=a.child,null!==a))for(Vj(a,b,c),a=a.sibling;null!==a;)Vj(a,b,c),a=a.sibling}\nfunction Wj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Wj(a,b,c),a=a.sibling;null!==a;)Wj(a,b,c),a=a.sibling}var X=null,Xj=!1;function Yj(a,b,c){for(c=c.child;null!==c;)Zj(a,b,c),c=c.sibling}\nfunction Zj(a,b,c){if(lc&&\"function\"===typeof lc.onCommitFiberUnmount)try{lc.onCommitFiberUnmount(kc,c)}catch(h){}switch(c.tag){case 5:U||Lj(c,b);case 6:var d=X,e=Xj;X=null;Yj(a,b,c);X=d;Xj=e;null!==X&&(Xj?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Xj?(a=X,c=c.stateNode,8===a.nodeType?Kf(a.parentNode,c):1===a.nodeType&&Kf(a,c),bd(a)):Kf(X,c.stateNode));break;case 4:d=X;e=Xj;X=c.stateNode.containerInfo;Xj=!0;\nYj(a,b,c);X=d;Xj=e;break;case 0:case 11:case 14:case 15:if(!U&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Mj(c,b,g):0!==(f&4)&&Mj(c,b,g));e=e.next}while(e!==d)}Yj(a,b,c);break;case 1:if(!U&&(Lj(c,b),d=c.stateNode,\"function\"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){W(c,b,h)}Yj(a,b,c);break;case 21:Yj(a,b,c);break;case 22:c.mode&1?(U=(d=U)||null!==\nc.memoizedState,Yj(a,b,c),U=d):Yj(a,b,c);break;default:Yj(a,b,c)}}function ak(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Kj);b.forEach(function(b){var d=bk.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction ck(a,b){var c=b.deletions;if(null!==c)for(var d=0;de&&(e=g);d&=~f}d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*lk(d/1960))-d;if(10a?16:a;if(null===wk)var d=!1;else{a=wk;wk=null;xk=0;if(0!==(K&6))throw Error(p(331));var e=K;K|=4;for(V=a.current;null!==V;){var f=V,g=f.child;if(0!==(V.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;kB()-fk?Kk(a,0):rk|=c);Dk(a,b)}function Yk(a,b){0===b&&(0===(a.mode&1)?b=1:(b=sc,sc<<=1,0===(sc&130023424)&&(sc=4194304)));var c=R();a=ih(a,b);null!==a&&(Ac(a,b,c),Dk(a,c))}function uj(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Yk(a,c)}\nfunction bk(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(p(314));}null!==d&&d.delete(b);Yk(a,c)}var Vk;\nVk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Wf.current)dh=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return dh=!1,yj(a,b,c);dh=0!==(a.flags&131072)?!0:!1}else dh=!1,I&&0!==(b.flags&1048576)&&ug(b,ng,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;ij(a,b);a=b.pendingProps;var e=Yf(b,H.current);ch(b,c);e=Nh(null,b,d,a,e,c);var f=Sh();b.flags|=1;\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=\nnull,Zf(d)?(f=!0,cg(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,kh(b),e.updater=Ei,b.stateNode=e,e._reactInternals=b,Ii(b,d,a,c),b=jj(null,b,d,!0,f,c)):(b.tag=0,I&&f&&vg(b),Xi(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{ij(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=Zk(d);a=Ci(d,a);switch(e){case 0:b=cj(null,b,d,a,c);break a;case 1:b=hj(null,b,d,a,c);break a;case 11:b=Yi(null,b,d,a,c);break a;case 14:b=$i(null,b,d,Ci(d.type,a),c);break a}throw Error(p(306,\nd,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),cj(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),hj(a,b,d,e,c);case 3:a:{kj(b);if(null===a)throw Error(p(387));d=b.pendingProps;f=b.memoizedState;e=f.element;lh(a,b);qh(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=\nf,b.memoizedState=f,b.flags&256){e=Ji(Error(p(423)),b);b=lj(a,b,d,c,e);break a}else if(d!==e){e=Ji(Error(p(424)),b);b=lj(a,b,d,c,e);break a}else for(yg=Lf(b.stateNode.containerInfo.firstChild),xg=b,I=!0,zg=null,c=Vg(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ig();if(d===e){b=Zi(a,b,c);break a}Xi(a,b,d,c)}b=b.child}return b;case 5:return Ah(b),null===a&&Eg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ef(d,e)?g=null:null!==f&&Ef(d,f)&&(b.flags|=32),\ngj(a,b),Xi(a,b,g,c),b.child;case 6:return null===a&&Eg(b),null;case 13:return oj(a,b,c);case 4:return yh(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Ug(b,null,d,c):Xi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),Yi(a,b,d,e,c);case 7:return Xi(a,b,b.pendingProps,c),b.child;case 8:return Xi(a,b,b.pendingProps.children,c),b.child;case 12:return Xi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;\ng=e.value;G(Wg,d._currentValue);d._currentValue=g;if(null!==f)if(He(f.value,g)){if(f.children===e.children&&!Wf.current){b=Zi(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=mh(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var m=l.pending;null===m?k.next=k:(k.next=m.next,m.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);bh(f.return,\nc,b);h.lanes|=c;break}k=k.next}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(p(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);bh(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}Xi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,ch(b,c),e=eh(e),d=d(e),b.flags|=1,Xi(a,b,d,c),\nb.child;case 14:return d=b.type,e=Ci(d,b.pendingProps),e=Ci(d.type,e),$i(a,b,d,e,c);case 15:return bj(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),ij(a,b),b.tag=1,Zf(d)?(a=!0,cg(b)):a=!1,ch(b,c),Gi(b,d,e),Ii(b,d,e,c),jj(null,b,d,!0,a,c);case 19:return xj(a,b,c);case 22:return dj(a,b,c)}throw Error(p(156,b.tag));};function Fk(a,b){return ac(a,b)}\nfunction $k(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function Bg(a,b,c,d){return new $k(a,b,c,d)}function aj(a){a=a.prototype;return!(!a||!a.isReactComponent)}\nfunction Zk(a){if(\"function\"===typeof a)return aj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Da)return 11;if(a===Ga)return 14}return 2}\nfunction Pg(a,b){var c=a.alternate;null===c?(c=Bg(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};\nc.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction Rg(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)aj(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case ya:return Tg(c.children,e,f,b);case za:g=8;e|=8;break;case Aa:return a=Bg(12,c,b,e|2),a.elementType=Aa,a.lanes=f,a;case Ea:return a=Bg(13,c,b,e),a.elementType=Ea,a.lanes=f,a;case Fa:return a=Bg(19,c,b,e),a.elementType=Fa,a.lanes=f,a;case Ia:return pj(c,e,f,b);default:if(\"object\"===typeof a&&null!==a)switch(a.$$typeof){case Ba:g=10;break a;case Ca:g=9;break a;case Da:g=11;\nbreak a;case Ga:g=14;break a;case Ha:g=16;d=null;break a}throw Error(p(130,null==a?a:typeof a,\"\"));}b=Bg(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Tg(a,b,c,d){a=Bg(7,a,d,b);a.lanes=c;return a}function pj(a,b,c,d){a=Bg(22,a,d,b);a.elementType=Ia;a.lanes=c;a.stateNode={isHidden:!1};return a}function Qg(a,b,c){a=Bg(6,a,null,b);a.lanes=c;return a}\nfunction Sg(a,b,c){b=Bg(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction al(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=zc(0);this.expirationTimes=zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=zc(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData=\nnull}function bl(a,b,c,d,e,f,g,h,k){a=new al(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=Bg(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};kh(f);return a}function cl(a,b,c){var d=3>>1,e=a[d];if(0>>1;dg(C,c))ng(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(ng(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D=\"function\"===typeof setTimeout?setTimeout:null,E=\"function\"===typeof clearTimeout?clearTimeout:null,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);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if(\"function\"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||125d?(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)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","import _extends from \"@babel/runtime/helpers/extends\";\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nimport AppContainer from './AppContainer';\nimport invariant from 'fbjs/lib/invariant';\nimport renderLegacy, { hydrateLegacy, render, hydrate } from '../render';\nimport StyleSheet from '../StyleSheet';\nimport React from 'react';\nexport default function renderApplication(RootComponent, WrapperComponent, callback, options) {\n var shouldHydrate = options.hydrate,\n initialProps = options.initialProps,\n mode = options.mode,\n rootTag = options.rootTag;\n var renderFn = shouldHydrate ? mode === 'concurrent' ? hydrate : hydrateLegacy : mode === 'concurrent' ? render : renderLegacy;\n invariant(rootTag, 'Expect to have a valid rootTag, instead got ', rootTag);\n return renderFn(/*#__PURE__*/React.createElement(AppContainer, {\n WrapperComponent: WrapperComponent,\n ref: callback,\n rootTag: rootTag\n }, /*#__PURE__*/React.createElement(RootComponent, initialProps)), rootTag);\n}\nexport function getApplication(RootComponent, initialProps, WrapperComponent) {\n var element = /*#__PURE__*/React.createElement(AppContainer, {\n WrapperComponent: WrapperComponent,\n rootTag: {}\n }, /*#__PURE__*/React.createElement(RootComponent, initialProps));\n // Don't escape CSS text\n var getStyleElement = props => {\n var sheet = StyleSheet.getSheet();\n return /*#__PURE__*/React.createElement(\"style\", _extends({}, props, {\n dangerouslySetInnerHTML: {\n __html: sheet.textContent\n },\n id: sheet.id\n }));\n };\n return {\n element,\n getStyleElement\n };\n}","function _extends() {\n return module.exports = _extends = Object.assign ? Object.assign.bind() : 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 }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _extends.apply(null, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// NOTE(EvanBacon): `react-native-web` adds a extra `div`s around the root HTML, these\n// make static rendering much harder as we expect the root element to be ``.\n// This resolution will alias to a simple in-out component to avoid the extra HTML.\nfunction AppContainer({ children }) {\n return children;\n}\n\nif (process.env.NODE_ENV !== 'production') {\n AppContainer.displayName = 'AppContainer';\n}\n\nexport default AppContainer;\n","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\n'use client';\n\nimport { hydrate as domLegacyHydrate, render as domLegacyRender } from 'react-dom';\nimport { createRoot as domCreateRoot, hydrateRoot as domHydrateRoot } from 'react-dom/client';\nimport unmountComponentAtNode from '../unmountComponentAtNode';\nimport { createSheet } from '../StyleSheet/dom';\nexport function hydrate(element, root) {\n createSheet(root);\n return domHydrateRoot(root, element);\n}\nexport function render(element, root) {\n createSheet(root);\n var reactRoot = domCreateRoot(root);\n reactRoot.render(element);\n return reactRoot;\n}\nexport function hydrateLegacy(element, root, callback) {\n createSheet(root);\n domLegacyHydrate(element, root, callback);\n return {\n unmount: function unmount() {\n return unmountComponentAtNode(root);\n }\n };\n}\nexport default function renderLegacy(element, root, callback) {\n createSheet(root);\n domLegacyRender(element, root, callback);\n return {\n unmount: function unmount() {\n return unmountComponentAtNode(root);\n }\n };\n}","'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n exports.createRoot = m.createRoot;\n exports.hydrateRoot = m.hydrateRoot;\n} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function(c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function(c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n}\n","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nimport canUseDOM from '../../../modules/canUseDom';\nimport createCSSStyleSheet from './createCSSStyleSheet';\nimport createOrderedCSSStyleSheet from './createOrderedCSSStyleSheet';\nvar defaultId = 'react-native-stylesheet';\nvar roots = new WeakMap();\nvar sheets = [];\nvar initialRules = [\n// minimal top-level reset\n'html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}', 'body{margin:0;}',\n// minimal form pseudo-element reset\n'button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}', 'input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;}'];\nexport function createSheet(root, id) {\n if (id === void 0) {\n id = defaultId;\n }\n var sheet;\n if (canUseDOM) {\n var rootNode = root != null ? root.getRootNode() : document;\n // Create the initial style sheet\n if (sheets.length === 0) {\n sheet = createOrderedCSSStyleSheet(createCSSStyleSheet(id));\n initialRules.forEach(rule => {\n sheet.insert(rule, 0);\n });\n roots.set(rootNode, sheets.length);\n sheets.push(sheet);\n } else {\n var index = roots.get(rootNode);\n if (index == null) {\n var initialSheet = sheets[0];\n // If we're creating a new sheet, populate it with existing styles\n var textContent = initialSheet != null ? initialSheet.getTextContent() : '';\n // Cast rootNode to 'any' because Flow types for getRootNode are wrong\n sheet = createOrderedCSSStyleSheet(createCSSStyleSheet(id, rootNode, textContent));\n roots.set(rootNode, sheets.length);\n sheets.push(sheet);\n } else {\n sheet = sheets[index];\n }\n }\n } else {\n // Create the initial style sheet\n if (sheets.length === 0) {\n sheet = createOrderedCSSStyleSheet(createCSSStyleSheet(id));\n initialRules.forEach(rule => {\n sheet.insert(rule, 0);\n });\n sheets.push(sheet);\n } else {\n sheet = sheets[0];\n }\n }\n return {\n getTextContent() {\n return sheet.getTextContent();\n },\n id,\n insert(cssText, groupValue) {\n sheets.forEach(s => {\n s.insert(cssText, groupValue);\n });\n }\n };\n}","/**\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nexport default canUseDOM;","/**\n * Copyright (c) Nicolas Gallagher.\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 */\nimport canUseDOM from '../../../modules/canUseDom';\n\n// $FlowFixMe: HTMLStyleElement is incorrectly typed - https://github.com/facebook/flow/issues/2696\nexport default function createCSSStyleSheet(id, rootNode, textContent) {\n if (canUseDOM) {\n var root = rootNode != null ? rootNode : document;\n var element = root.getElementById(id);\n if (element == null) {\n element = document.createElement('style');\n element.setAttribute('id', id);\n if (typeof textContent === 'string') {\n element.appendChild(document.createTextNode(textContent));\n }\n if (root instanceof ShadowRoot) {\n root.insertBefore(element, root.firstChild);\n } else {\n var head = root.head;\n if (head) {\n head.insertBefore(element, head.firstChild);\n }\n }\n }\n // $FlowFixMe: HTMLElement is incorrectly typed\n return element.sheet;\n } else {\n return null;\n }\n}","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nvar slice = Array.prototype.slice;\n\n/**\n * Order-based insertion of CSS.\n *\n * Each rule is associated with a numerically defined group.\n * Groups are ordered within the style sheet according to their number, with the\n * lowest first.\n *\n * Groups are implemented using marker rules. The selector of the first rule of\n * each group is used only to encode the group number for hydration. An\n * alternative implementation could rely on CSSMediaRule, allowing groups to be\n * treated as a sub-sheet, but the Edge implementation of CSSMediaRule is\n * broken.\n * https://developer.mozilla.org/en-US/docs/Web/API/CSSMediaRule\n * https://gist.github.com/necolas/aa0c37846ad6bd3b05b727b959e82674\n */\nexport default function createOrderedCSSStyleSheet(sheet) {\n var groups = {};\n var selectors = {};\n\n /**\n * Hydrate approximate record from any existing rules in the sheet.\n */\n if (sheet != null) {\n var group;\n slice.call(sheet.cssRules).forEach((cssRule, i) => {\n var cssText = cssRule.cssText;\n // Create record of existing selectors and rules\n if (cssText.indexOf('stylesheet-group') > -1) {\n group = decodeGroupRule(cssRule);\n groups[group] = {\n start: i,\n rules: [cssText]\n };\n } else {\n var selectorText = getSelectorText(cssText);\n if (selectorText != null) {\n selectors[selectorText] = true;\n groups[group].rules.push(cssText);\n }\n }\n });\n }\n function sheetInsert(sheet, group, text) {\n var orderedGroups = getOrderedGroups(groups);\n var groupIndex = orderedGroups.indexOf(group);\n var nextGroupIndex = groupIndex + 1;\n var nextGroup = orderedGroups[nextGroupIndex];\n // Insert rule before the next group, or at the end of the stylesheet\n var position = nextGroup != null && groups[nextGroup].start != null ? groups[nextGroup].start : sheet.cssRules.length;\n var isInserted = insertRuleAt(sheet, text, position);\n if (isInserted) {\n // Set the starting index of the new group\n if (groups[group].start == null) {\n groups[group].start = position;\n }\n // Increment the starting index of all subsequent groups\n for (var i = nextGroupIndex; i < orderedGroups.length; i += 1) {\n var groupNumber = orderedGroups[i];\n var previousStart = groups[groupNumber].start || 0;\n groups[groupNumber].start = previousStart + 1;\n }\n }\n return isInserted;\n }\n var OrderedCSSStyleSheet = {\n /**\n * The textContent of the style sheet.\n */\n getTextContent() {\n return getOrderedGroups(groups).map(group => {\n var rules = groups[group].rules;\n // Sorting provides deterministic order of styles in group for\n // build-time extraction of the style sheet.\n var marker = rules.shift();\n rules.sort();\n rules.unshift(marker);\n return rules.join('\\n');\n }).join('\\n');\n },\n /**\n * Insert a rule into the style sheet\n */\n insert(cssText, groupValue) {\n var group = Number(groupValue);\n\n // Create a new group.\n if (groups[group] == null) {\n var markerRule = encodeGroupRule(group);\n // Create the internal record.\n groups[group] = {\n start: null,\n rules: [markerRule]\n };\n // Update CSSOM.\n if (sheet != null) {\n sheetInsert(sheet, group, markerRule);\n }\n }\n\n // selectorText is more reliable than cssText for insertion checks. The\n // browser excludes vendor-prefixed properties and rewrites certain values\n // making cssText more likely to be different from what was inserted.\n var selectorText = getSelectorText(cssText);\n if (selectorText != null && selectors[selectorText] == null) {\n // Update the internal records.\n selectors[selectorText] = true;\n groups[group].rules.push(cssText);\n // Update CSSOM.\n if (sheet != null) {\n var isInserted = sheetInsert(sheet, group, cssText);\n if (!isInserted) {\n // Revert internal record change if a rule was rejected (e.g.,\n // unrecognized pseudo-selector)\n groups[group].rules.pop();\n }\n }\n }\n }\n };\n return OrderedCSSStyleSheet;\n}\n\n/**\n * Helper functions\n */\n\nfunction encodeGroupRule(group) {\n return \"[stylesheet-group=\\\"\" + group + \"\\\"]{}\";\n}\nvar groupPattern = /[\"']/g;\nfunction decodeGroupRule(cssRule) {\n return Number(cssRule.selectorText.split(groupPattern)[1]);\n}\nfunction getOrderedGroups(obj) {\n return Object.keys(obj).map(Number).sort((a, b) => a > b ? 1 : -1);\n}\nvar selectorPattern = /\\s*([,])\\s*/g;\nfunction getSelectorText(cssText) {\n var selector = cssText.split('{')[0].trim();\n return selector !== '' ? selector.replace(selectorPattern, '$1') : null;\n}\nfunction insertRuleAt(root, cssText, position) {\n try {\n // $FlowFixMe: Flow is missing CSSOM types needed to type 'root'.\n root.insertRule(cssText, position);\n return true;\n } catch (e) {\n // JSDOM doesn't support `CSSSMediaRule#insertRule`.\n // Also ignore errors that occur from attempting to insert vendor-prefixed selectors.\n return false;\n }\n}","import _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"writingDirection\"];\n/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nimport { atomic, classic, inline } from './compiler';\nimport { createSheet } from './dom';\nimport { localizeStyle } from 'styleq/transform-localize-style';\nimport { preprocess } from './preprocess';\nimport { styleq } from 'styleq';\nimport { validate } from './validate';\nimport canUseDOM from '../../modules/canUseDom';\nvar staticStyleMap = new WeakMap();\nvar sheet = createSheet();\nvar defaultPreprocessOptions = {\n shadow: true,\n textShadow: true\n};\nfunction customStyleq(styles, options) {\n if (options === void 0) {\n options = {};\n }\n var _options = options,\n writingDirection = _options.writingDirection,\n preprocessOptions = _objectWithoutPropertiesLoose(_options, _excluded);\n var isRTL = writingDirection === 'rtl';\n return styleq.factory({\n transform(style) {\n var compiledStyle = staticStyleMap.get(style);\n if (compiledStyle != null) {\n return localizeStyle(compiledStyle, isRTL);\n }\n return preprocess(style, _objectSpread(_objectSpread({}, defaultPreprocessOptions), preprocessOptions));\n }\n })(styles);\n}\nfunction insertRules(compiledOrderedRules) {\n compiledOrderedRules.forEach(_ref => {\n var rules = _ref[0],\n order = _ref[1];\n if (sheet != null) {\n rules.forEach(rule => {\n sheet.insert(rule, order);\n });\n }\n });\n}\nfunction compileAndInsertAtomic(style) {\n var _atomic = atomic(preprocess(style, defaultPreprocessOptions)),\n compiledStyle = _atomic[0],\n compiledOrderedRules = _atomic[1];\n insertRules(compiledOrderedRules);\n return compiledStyle;\n}\nfunction compileAndInsertReset(style, key) {\n var _classic = classic(style, key),\n compiledStyle = _classic[0],\n compiledOrderedRules = _classic[1];\n insertRules(compiledOrderedRules);\n return compiledStyle;\n}\n\n/* ----- API ----- */\n\nvar absoluteFillObject = {\n position: 'absolute',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n};\nvar absoluteFill = create({\n x: _objectSpread({}, absoluteFillObject)\n}).x;\n\n/**\n * create\n */\nfunction create(styles) {\n Object.keys(styles).forEach(key => {\n var styleObj = styles[key];\n // Only compile at runtime if the style is not already compiled\n if (styleObj != null && styleObj.$$css !== true) {\n var compiledStyles;\n if (key.indexOf('$raw') > -1) {\n compiledStyles = compileAndInsertReset(styleObj, key.split('$raw')[0]);\n } else {\n if (process.env.NODE_ENV !== 'production') {\n validate(styleObj);\n styles[key] = Object.freeze(styleObj);\n }\n compiledStyles = compileAndInsertAtomic(styleObj);\n }\n staticStyleMap.set(styleObj, compiledStyles);\n }\n });\n return styles;\n}\n\n/**\n * compose\n */\nfunction compose(style1, style2) {\n if (process.env.NODE_ENV !== 'production') {\n /* eslint-disable prefer-rest-params */\n var len = arguments.length;\n if (len > 2) {\n var readableStyles = [...arguments].map(a => flatten(a));\n throw new Error(\"StyleSheet.compose() only accepts 2 arguments, received \" + len + \": \" + JSON.stringify(readableStyles));\n }\n /* eslint-enable prefer-rest-params */\n /*\n console.warn(\n 'StyleSheet.compose(a, b) is deprecated; use array syntax, i.e., [a,b].'\n );\n */\n }\n return [style1, style2];\n}\n\n/**\n * flatten\n */\nfunction flatten() {\n for (var _len = arguments.length, styles = new Array(_len), _key = 0; _key < _len; _key++) {\n styles[_key] = arguments[_key];\n }\n var flatArray = styles.flat(Infinity);\n var result = {};\n for (var i = 0; i < flatArray.length; i++) {\n var style = flatArray[i];\n if (style != null && typeof style === 'object') {\n // $FlowFixMe\n Object.assign(result, style);\n }\n }\n return result;\n}\n\n/**\n * getSheet\n */\nfunction getSheet() {\n return {\n id: sheet.id,\n textContent: sheet.getTextContent()\n };\n}\n\n/**\n * resolve\n */\n\nfunction StyleSheet(styles, options) {\n if (options === void 0) {\n options = {};\n }\n var isRTL = options.writingDirection === 'rtl';\n var styleProps = customStyleq(styles, options);\n if (Array.isArray(styleProps) && styleProps[1] != null) {\n styleProps[1] = inline(styleProps[1], isRTL);\n }\n return styleProps;\n}\nStyleSheet.absoluteFill = absoluteFill;\nStyleSheet.absoluteFillObject = absoluteFillObject;\nStyleSheet.create = create;\nStyleSheet.compose = compose;\nStyleSheet.flatten = flatten;\nStyleSheet.getSheet = getSheet;\n// `hairlineWidth` is not implemented using screen density as browsers may\n// round sub-pixel values down to `0`, causing the line not to be rendered.\nStyleSheet.hairlineWidth = 1;\nif (canUseDOM && window.__REACT_DEVTOOLS_GLOBAL_HOOK__) {\n window.__REACT_DEVTOOLS_GLOBAL_HOOK__.resolveRNStyle = StyleSheet.flatten;\n}\nvar stylesheet = StyleSheet;\nexport default stylesheet;","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","import _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"animationKeyframes\"];\n/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nimport createReactDOMStyle from './createReactDOMStyle';\nimport hash from './hash';\nimport hyphenateStyleName from './hyphenateStyleName';\nimport normalizeValueWithProperty from './normalizeValueWithProperty';\nimport prefixStyles from '../../../modules/prefixStyles';\nvar cache = new Map();\nvar emptyObject = {};\nvar classicGroup = 1;\nvar atomicGroup = 3;\nvar customGroup = {\n borderColor: 2,\n borderRadius: 2,\n borderStyle: 2,\n borderWidth: 2,\n display: 2,\n flex: 2,\n inset: 2,\n margin: 2,\n overflow: 2,\n overscrollBehavior: 2,\n padding: 2,\n insetBlock: 2.1,\n insetInline: 2.1,\n marginInline: 2.1,\n marginBlock: 2.1,\n paddingInline: 2.1,\n paddingBlock: 2.1,\n borderBlockStartColor: 2.2,\n borderBlockStartStyle: 2.2,\n borderBlockStartWidth: 2.2,\n borderBlockEndColor: 2.2,\n borderBlockEndStyle: 2.2,\n borderBlockEndWidth: 2.2,\n borderInlineStartColor: 2.2,\n borderInlineStartStyle: 2.2,\n borderInlineStartWidth: 2.2,\n borderInlineEndColor: 2.2,\n borderInlineEndStyle: 2.2,\n borderInlineEndWidth: 2.2,\n borderEndStartRadius: 2.2,\n borderEndEndRadius: 2.2,\n borderStartStartRadius: 2.2,\n borderStartEndRadius: 2.2,\n insetBlockEnd: 2.2,\n insetBlockStart: 2.2,\n insetInlineEnd: 2.2,\n insetInlineStart: 2.2,\n marginBlockStart: 2.2,\n marginBlockEnd: 2.2,\n marginInlineStart: 2.2,\n marginInlineEnd: 2.2,\n paddingBlockStart: 2.2,\n paddingBlockEnd: 2.2,\n paddingInlineStart: 2.2,\n paddingInlineEnd: 2.2\n};\nvar borderTopLeftRadius = 'borderTopLeftRadius';\nvar borderTopRightRadius = 'borderTopRightRadius';\nvar borderBottomLeftRadius = 'borderBottomLeftRadius';\nvar borderBottomRightRadius = 'borderBottomRightRadius';\nvar borderLeftColor = 'borderLeftColor';\nvar borderLeftStyle = 'borderLeftStyle';\nvar borderLeftWidth = 'borderLeftWidth';\nvar borderRightColor = 'borderRightColor';\nvar borderRightStyle = 'borderRightStyle';\nvar borderRightWidth = 'borderRightWidth';\nvar right = 'right';\nvar marginLeft = 'marginLeft';\nvar marginRight = 'marginRight';\nvar paddingLeft = 'paddingLeft';\nvar paddingRight = 'paddingRight';\nvar left = 'left';\n\n// Map of LTR property names to their BiDi equivalent.\nvar PROPERTIES_FLIP = {\n [borderTopLeftRadius]: borderTopRightRadius,\n [borderTopRightRadius]: borderTopLeftRadius,\n [borderBottomLeftRadius]: borderBottomRightRadius,\n [borderBottomRightRadius]: borderBottomLeftRadius,\n [borderLeftColor]: borderRightColor,\n [borderLeftStyle]: borderRightStyle,\n [borderLeftWidth]: borderRightWidth,\n [borderRightColor]: borderLeftColor,\n [borderRightStyle]: borderLeftStyle,\n [borderRightWidth]: borderLeftWidth,\n [left]: right,\n [marginLeft]: marginRight,\n [marginRight]: marginLeft,\n [paddingLeft]: paddingRight,\n [paddingRight]: paddingLeft,\n [right]: left\n};\n\n// Map of I18N property names to their LTR equivalent.\nvar PROPERTIES_I18N = {\n borderStartStartRadius: borderTopLeftRadius,\n borderStartEndRadius: borderTopRightRadius,\n borderEndStartRadius: borderBottomLeftRadius,\n borderEndEndRadius: borderBottomRightRadius,\n borderInlineStartColor: borderLeftColor,\n borderInlineStartStyle: borderLeftStyle,\n borderInlineStartWidth: borderLeftWidth,\n borderInlineEndColor: borderRightColor,\n borderInlineEndStyle: borderRightStyle,\n borderInlineEndWidth: borderRightWidth,\n insetInlineEnd: right,\n insetInlineStart: left,\n marginInlineStart: marginLeft,\n marginInlineEnd: marginRight,\n paddingInlineStart: paddingLeft,\n paddingInlineEnd: paddingRight\n};\nvar PROPERTIES_VALUE = ['clear', 'float', 'textAlign'];\nexport function atomic(style) {\n var compiledStyle = {\n $$css: true\n };\n var compiledRules = [];\n function atomicCompile(srcProp, prop, value) {\n var valueString = stringifyValueWithProperty(value, prop);\n var cacheKey = prop + valueString;\n var cachedResult = cache.get(cacheKey);\n var identifier;\n if (cachedResult != null) {\n identifier = cachedResult[0];\n compiledRules.push(cachedResult[1]);\n } else {\n var v = srcProp !== prop ? cacheKey : valueString;\n identifier = createIdentifier('r', srcProp, v);\n var order = customGroup[srcProp] || atomicGroup;\n var rules = createAtomicRules(identifier, prop, value);\n var orderedRules = [rules, order];\n compiledRules.push(orderedRules);\n cache.set(cacheKey, [identifier, orderedRules]);\n }\n return identifier;\n }\n Object.keys(style).sort().forEach(srcProp => {\n var value = style[srcProp];\n if (value != null) {\n var localizeableValue;\n // BiDi flip values\n if (PROPERTIES_VALUE.indexOf(srcProp) > -1) {\n var _left = atomicCompile(srcProp, srcProp, 'left');\n var _right = atomicCompile(srcProp, srcProp, 'right');\n if (value === 'start') {\n localizeableValue = [_left, _right];\n } else if (value === 'end') {\n localizeableValue = [_right, _left];\n }\n }\n // BiDi flip properties\n var propPolyfill = PROPERTIES_I18N[srcProp];\n if (propPolyfill != null) {\n var ltr = atomicCompile(srcProp, propPolyfill, value);\n var rtl = atomicCompile(srcProp, PROPERTIES_FLIP[propPolyfill], value);\n localizeableValue = [ltr, rtl];\n }\n // BiDi flip transitionProperty value\n if (srcProp === 'transitionProperty') {\n var values = Array.isArray(value) ? value : [value];\n var polyfillIndices = [];\n for (var i = 0; i < values.length; i++) {\n var val = values[i];\n if (typeof val === 'string' && PROPERTIES_I18N[val] != null) {\n polyfillIndices.push(i);\n }\n }\n if (polyfillIndices.length > 0) {\n var ltrPolyfillValues = [...values];\n var rtlPolyfillValues = [...values];\n polyfillIndices.forEach(i => {\n var ltrVal = ltrPolyfillValues[i];\n if (typeof ltrVal === 'string') {\n var ltrPolyfill = PROPERTIES_I18N[ltrVal];\n var rtlPolyfill = PROPERTIES_FLIP[ltrPolyfill];\n ltrPolyfillValues[i] = ltrPolyfill;\n rtlPolyfillValues[i] = rtlPolyfill;\n var _ltr = atomicCompile(srcProp, srcProp, ltrPolyfillValues);\n var _rtl = atomicCompile(srcProp, srcProp, rtlPolyfillValues);\n localizeableValue = [_ltr, _rtl];\n }\n });\n }\n }\n if (localizeableValue == null) {\n localizeableValue = atomicCompile(srcProp, srcProp, value);\n } else {\n compiledStyle['$$css$localize'] = true;\n }\n compiledStyle[srcProp] = localizeableValue;\n }\n });\n return [compiledStyle, compiledRules];\n}\n\n/**\n * Compile simple style object to classic CSS rules.\n * No support for 'placeholderTextColor', 'scrollbarWidth', or 'pointerEvents'.\n */\nexport function classic(style, name) {\n var compiledStyle = {\n $$css: true\n };\n var compiledRules = [];\n var animationKeyframes = style.animationKeyframes,\n rest = _objectWithoutPropertiesLoose(style, _excluded);\n var identifier = createIdentifier('css', name, JSON.stringify(style));\n var selector = \".\" + identifier;\n var animationName;\n if (animationKeyframes != null) {\n var _processKeyframesValu = processKeyframesValue(animationKeyframes),\n animationNames = _processKeyframesValu[0],\n keyframesRules = _processKeyframesValu[1];\n animationName = animationNames.join(',');\n compiledRules.push(...keyframesRules);\n }\n var block = createDeclarationBlock(_objectSpread(_objectSpread({}, rest), {}, {\n animationName\n }));\n compiledRules.push(\"\" + selector + block);\n compiledStyle[identifier] = identifier;\n return [compiledStyle, [[compiledRules, classicGroup]]];\n}\n\n/**\n * Compile simple style object to inline DOM styles.\n * No support for 'animationKeyframes', 'placeholderTextColor', 'scrollbarWidth', or 'pointerEvents'.\n */\nexport function inline(originalStyle, isRTL) {\n var style = originalStyle || emptyObject;\n var frozenProps = {};\n var nextStyle = {};\n var _loop = function _loop() {\n var originalValue = style[originalProp];\n var prop = originalProp;\n var value = originalValue;\n if (!Object.prototype.hasOwnProperty.call(style, originalProp) || originalValue == null) {\n return \"continue\";\n }\n\n // BiDi flip values\n if (PROPERTIES_VALUE.indexOf(originalProp) > -1) {\n if (originalValue === 'start') {\n value = isRTL ? 'right' : 'left';\n } else if (originalValue === 'end') {\n value = isRTL ? 'left' : 'right';\n }\n }\n // BiDi flip properties\n var propPolyfill = PROPERTIES_I18N[originalProp];\n if (propPolyfill != null) {\n prop = isRTL ? PROPERTIES_FLIP[propPolyfill] : propPolyfill;\n }\n // BiDi flip transitionProperty value\n if (originalProp === 'transitionProperty') {\n // $FlowFixMe\n var originalValues = Array.isArray(originalValue) ? originalValue : [originalValue];\n originalValues.forEach((val, i) => {\n if (typeof val === 'string') {\n var valuePolyfill = PROPERTIES_I18N[val];\n if (valuePolyfill != null) {\n originalValues[i] = isRTL ? PROPERTIES_FLIP[valuePolyfill] : valuePolyfill;\n value = originalValues.join(' ');\n }\n }\n });\n }\n\n // Create finalized style\n if (!frozenProps[prop]) {\n nextStyle[prop] = value;\n }\n if (prop === originalProp) {\n frozenProps[prop] = true;\n }\n\n // if (PROPERTIES_I18N.hasOwnProperty(originalProp)) {\n // frozenProps[prop] = true;\n //}\n };\n for (var originalProp in style) {\n var _ret = _loop();\n if (_ret === \"continue\") continue;\n }\n return createReactDOMStyle(nextStyle, true);\n}\n\n/**\n * Create a value string that normalizes different input values with a common\n * output.\n */\nexport function stringifyValueWithProperty(value, property) {\n // e.g., 0 => '0px', 'black' => 'rgba(0,0,0,1)'\n var normalizedValue = normalizeValueWithProperty(value, property);\n return typeof normalizedValue !== 'string' ? JSON.stringify(normalizedValue || '') : normalizedValue;\n}\n\n/**\n * Create the Atomic CSS rules needed for a given StyleSheet rule.\n * Translates StyleSheet declarations to CSS.\n */\nfunction createAtomicRules(identifier, property, value) {\n var rules = [];\n var selector = \".\" + identifier;\n\n // Handle non-standard properties and object values that require multiple\n // CSS rules to be created.\n switch (property) {\n case 'animationKeyframes':\n {\n var _processKeyframesValu2 = processKeyframesValue(value),\n animationNames = _processKeyframesValu2[0],\n keyframesRules = _processKeyframesValu2[1];\n var block = createDeclarationBlock({\n animationName: animationNames.join(',')\n });\n rules.push(\"\" + selector + block, ...keyframesRules);\n break;\n }\n\n // Equivalent to using '::placeholder'\n case 'placeholderTextColor':\n {\n var _block = createDeclarationBlock({\n color: value,\n opacity: 1\n });\n rules.push(selector + \"::-webkit-input-placeholder\" + _block, selector + \"::-moz-placeholder\" + _block, selector + \":-ms-input-placeholder\" + _block, selector + \"::placeholder\" + _block);\n break;\n }\n\n // Polyfill for additional 'pointer-events' values\n // See d13f78622b233a0afc0c7a200c0a0792c8ca9e58\n case 'pointerEvents':\n {\n var finalValue = value;\n if (value === 'auto' || value === 'box-only') {\n finalValue = 'auto!important';\n if (value === 'box-only') {\n var _block2 = createDeclarationBlock({\n pointerEvents: 'none'\n });\n rules.push(selector + \">*\" + _block2);\n }\n } else if (value === 'none' || value === 'box-none') {\n finalValue = 'none!important';\n if (value === 'box-none') {\n var _block3 = createDeclarationBlock({\n pointerEvents: 'auto'\n });\n rules.push(selector + \">*\" + _block3);\n }\n }\n var _block4 = createDeclarationBlock({\n pointerEvents: finalValue\n });\n rules.push(\"\" + selector + _block4);\n break;\n }\n\n // Polyfill for draft spec\n // https://drafts.csswg.org/css-scrollbars-1/\n case 'scrollbarWidth':\n {\n if (value === 'none') {\n rules.push(selector + \"::-webkit-scrollbar{display:none}\");\n }\n var _block5 = createDeclarationBlock({\n scrollbarWidth: value\n });\n rules.push(\"\" + selector + _block5);\n break;\n }\n default:\n {\n var _block6 = createDeclarationBlock({\n [property]: value\n });\n rules.push(\"\" + selector + _block6);\n break;\n }\n }\n return rules;\n}\n\n/**\n * Creates a CSS declaration block from a StyleSheet object.\n */\nfunction createDeclarationBlock(style) {\n var domStyle = prefixStyles(createReactDOMStyle(style));\n var declarationsString = Object.keys(domStyle).map(property => {\n var value = domStyle[property];\n var prop = hyphenateStyleName(property);\n // The prefixer may return an array of values:\n // { display: [ '-webkit-flex', 'flex' ] }\n // to represent \"fallback\" declarations\n // { display: -webkit-flex; display: flex; }\n if (Array.isArray(value)) {\n return value.map(v => prop + \":\" + v).join(';');\n } else {\n return prop + \":\" + value;\n }\n })\n // Once properties are hyphenated, this will put the vendor\n // prefixed and short-form properties first in the list.\n .sort().join(';');\n return \"{\" + declarationsString + \";}\";\n}\n\n/**\n * An identifier is associated with a unique set of styles.\n */\nfunction createIdentifier(prefix, name, key) {\n var hashedString = hash(name + key);\n return process.env.NODE_ENV !== 'production' ? prefix + \"-\" + name + \"-\" + hashedString : prefix + \"-\" + hashedString;\n}\n\n/**\n * Create individual CSS keyframes rules.\n */\nfunction createKeyframes(keyframes) {\n var prefixes = ['-webkit-', ''];\n var identifier = createIdentifier('r', 'animation', JSON.stringify(keyframes));\n var steps = '{' + Object.keys(keyframes).map(stepName => {\n var rule = keyframes[stepName];\n var block = createDeclarationBlock(rule);\n return \"\" + stepName + block;\n }).join('') + '}';\n var rules = prefixes.map(prefix => {\n return \"@\" + prefix + \"keyframes \" + identifier + steps;\n });\n return [identifier, rules];\n}\n\n/**\n * Create CSS keyframes rules and names from a StyleSheet keyframes object.\n */\nfunction processKeyframesValue(keyframesValue) {\n if (typeof keyframesValue === 'number') {\n throw new Error(\"Invalid CSS keyframes type: \" + typeof keyframesValue);\n }\n var animationNames = [];\n var rules = [];\n var value = Array.isArray(keyframesValue) ? keyframesValue : [keyframesValue];\n value.forEach(keyframes => {\n if (typeof keyframes === 'string') {\n // Support external animation libraries (identifiers only)\n animationNames.push(keyframes);\n } else {\n // Create rules for each of the keyframes\n var _createKeyframes = createKeyframes(keyframes),\n identifier = _createKeyframes[0],\n keyframesRules = _createKeyframes[1];\n animationNames.push(identifier);\n rules.push(...keyframesRules);\n }\n });\n return [animationNames, rules];\n}","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nimport normalizeValueWithProperty from './normalizeValueWithProperty';\nimport canUseDOM from '../../../modules/canUseDom';\n/**\n * The browser implements the CSS cascade, where the order of properties is a\n * factor in determining which styles to paint. React Native is different. It\n * gives giving precedence to the more specific style property. For example,\n * the value of `paddingTop` takes precedence over that of `padding`.\n *\n * This module creates mutally exclusive style declarations by expanding all of\n * React Native's supported shortform properties (e.g. `padding`) to their\n * longfrom equivalents.\n */\n\nvar emptyObject = {};\nvar supportsCSS3TextDecoration = !canUseDOM || window.CSS != null && window.CSS.supports != null && (window.CSS.supports('text-decoration-line', 'none') || window.CSS.supports('-webkit-text-decoration-line', 'none'));\nvar MONOSPACE_FONT_STACK = 'monospace,monospace';\nvar SYSTEM_FONT_STACK = '-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif';\nvar STYLE_SHORT_FORM_EXPANSIONS = {\n borderColor: ['borderTopColor', 'borderRightColor', 'borderBottomColor', 'borderLeftColor'],\n borderBlockColor: ['borderTopColor', 'borderBottomColor'],\n borderInlineColor: ['borderRightColor', 'borderLeftColor'],\n borderRadius: ['borderTopLeftRadius', 'borderTopRightRadius', 'borderBottomRightRadius', 'borderBottomLeftRadius'],\n borderStyle: ['borderTopStyle', 'borderRightStyle', 'borderBottomStyle', 'borderLeftStyle'],\n borderBlockStyle: ['borderTopStyle', 'borderBottomStyle'],\n borderInlineStyle: ['borderRightStyle', 'borderLeftStyle'],\n borderWidth: ['borderTopWidth', 'borderRightWidth', 'borderBottomWidth', 'borderLeftWidth'],\n borderBlockWidth: ['borderTopWidth', 'borderBottomWidth'],\n borderInlineWidth: ['borderRightWidth', 'borderLeftWidth'],\n insetBlock: ['top', 'bottom'],\n insetInline: ['left', 'right'],\n marginBlock: ['marginTop', 'marginBottom'],\n marginInline: ['marginRight', 'marginLeft'],\n paddingBlock: ['paddingTop', 'paddingBottom'],\n paddingInline: ['paddingRight', 'paddingLeft'],\n overflow: ['overflowX', 'overflowY'],\n overscrollBehavior: ['overscrollBehaviorX', 'overscrollBehaviorY'],\n borderBlockStartColor: ['borderTopColor'],\n borderBlockStartStyle: ['borderTopStyle'],\n borderBlockStartWidth: ['borderTopWidth'],\n borderBlockEndColor: ['borderBottomColor'],\n borderBlockEndStyle: ['borderBottomStyle'],\n borderBlockEndWidth: ['borderBottomWidth'],\n //borderInlineStartColor: ['borderLeftColor'],\n //borderInlineStartStyle: ['borderLeftStyle'],\n //borderInlineStartWidth: ['borderLeftWidth'],\n //borderInlineEndColor: ['borderRightColor'],\n //borderInlineEndStyle: ['borderRightStyle'],\n //borderInlineEndWidth: ['borderRightWidth'],\n borderEndStartRadius: ['borderBottomLeftRadius'],\n borderEndEndRadius: ['borderBottomRightRadius'],\n borderStartStartRadius: ['borderTopLeftRadius'],\n borderStartEndRadius: ['borderTopRightRadius'],\n insetBlockEnd: ['bottom'],\n insetBlockStart: ['top'],\n //insetInlineEnd: ['right'],\n //insetInlineStart: ['left'],\n marginBlockStart: ['marginTop'],\n marginBlockEnd: ['marginBottom'],\n //marginInlineStart: ['marginLeft'],\n //marginInlineEnd: ['marginRight'],\n paddingBlockStart: ['paddingTop'],\n paddingBlockEnd: ['paddingBottom']\n //paddingInlineStart: ['marginLeft'],\n //paddingInlineEnd: ['marginRight'],\n};\n\n/**\n * Reducer\n */\n\nvar createReactDOMStyle = (style, isInline) => {\n if (!style) {\n return emptyObject;\n }\n var resolvedStyle = {};\n var _loop = function _loop() {\n var value = style[prop];\n if (\n // Ignore everything with a null value\n value == null) {\n return \"continue\";\n }\n if (prop === 'backgroundClip') {\n // TODO: remove once this issue is fixed\n // https://github.com/rofrischmann/inline-style-prefixer/issues/159\n if (value === 'text') {\n resolvedStyle.backgroundClip = value;\n resolvedStyle.WebkitBackgroundClip = value;\n }\n } else if (prop === 'flex') {\n if (value === -1) {\n resolvedStyle.flexGrow = 0;\n resolvedStyle.flexShrink = 1;\n resolvedStyle.flexBasis = 'auto';\n } else {\n resolvedStyle.flex = value;\n }\n } else if (prop === 'font') {\n resolvedStyle[prop] = value.replace('System', SYSTEM_FONT_STACK);\n } else if (prop === 'fontFamily') {\n if (value.indexOf('System') > -1) {\n var stack = value.split(/,\\s*/);\n stack[stack.indexOf('System')] = SYSTEM_FONT_STACK;\n resolvedStyle[prop] = stack.join(',');\n } else if (value === 'monospace') {\n resolvedStyle[prop] = MONOSPACE_FONT_STACK;\n } else {\n resolvedStyle[prop] = value;\n }\n } else if (prop === 'textDecorationLine') {\n // use 'text-decoration' for browsers that only support CSS2\n // text-decoration (e.g., IE, Edge)\n if (!supportsCSS3TextDecoration) {\n resolvedStyle.textDecoration = value;\n } else {\n resolvedStyle.textDecorationLine = value;\n }\n } else if (prop === 'writingDirection') {\n resolvedStyle.direction = value;\n } else {\n var _value = normalizeValueWithProperty(style[prop], prop);\n var longFormProperties = STYLE_SHORT_FORM_EXPANSIONS[prop];\n if (isInline && prop === 'inset') {\n if (style.insetInline == null) {\n resolvedStyle.left = _value;\n resolvedStyle.right = _value;\n }\n if (style.insetBlock == null) {\n resolvedStyle.top = _value;\n resolvedStyle.bottom = _value;\n }\n } else if (isInline && prop === 'margin') {\n if (style.marginInline == null) {\n resolvedStyle.marginLeft = _value;\n resolvedStyle.marginRight = _value;\n }\n if (style.marginBlock == null) {\n resolvedStyle.marginTop = _value;\n resolvedStyle.marginBottom = _value;\n }\n } else if (isInline && prop === 'padding') {\n if (style.paddingInline == null) {\n resolvedStyle.paddingLeft = _value;\n resolvedStyle.paddingRight = _value;\n }\n if (style.paddingBlock == null) {\n resolvedStyle.paddingTop = _value;\n resolvedStyle.paddingBottom = _value;\n }\n } else if (longFormProperties) {\n longFormProperties.forEach((longForm, i) => {\n // The value of any longform property in the original styles takes\n // precedence over the shortform's value.\n if (style[longForm] == null) {\n resolvedStyle[longForm] = _value;\n }\n });\n } else {\n resolvedStyle[prop] = _value;\n }\n }\n };\n for (var prop in style) {\n var _ret = _loop();\n if (_ret === \"continue\") continue;\n }\n return resolvedStyle;\n};\nexport default createReactDOMStyle;","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nimport unitlessNumbers from './unitlessNumbers';\nimport normalizeColor from './normalizeColor';\nvar colorProps = {\n backgroundColor: true,\n borderColor: true,\n borderTopColor: true,\n borderRightColor: true,\n borderBottomColor: true,\n borderLeftColor: true,\n color: true,\n shadowColor: true,\n textDecorationColor: true,\n textShadowColor: true\n};\nexport default function normalizeValueWithProperty(value, property) {\n var returnValue = value;\n if ((property == null || !unitlessNumbers[property]) && typeof value === 'number') {\n returnValue = value + \"px\";\n } else if (property != null && colorProps[property]) {\n returnValue = normalizeColor(value);\n }\n return returnValue;\n}","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nvar unitlessNumbers = {\n animationIterationCount: true,\n aspectRatio: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n boxFlex: true,\n boxFlexGroup: true,\n boxOrdinalGroup: true,\n columnCount: true,\n flex: true,\n flexGrow: true,\n flexOrder: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n fontWeight: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowGap: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnGap: true,\n gridColumnStart: true,\n lineClamp: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n // SVG-related\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true,\n // transform types\n scale: true,\n scaleX: true,\n scaleY: true,\n scaleZ: true,\n // RN properties\n shadowOpacity: true\n};\n\n/**\n * Support style names that may come passed in prefixed by adding permutations\n * of vendor prefixes.\n */\nvar prefixes = ['ms', 'Moz', 'O', 'Webkit'];\nvar prefixKey = (prefix, key) => {\n return prefix + key.charAt(0).toUpperCase() + key.substring(1);\n};\nObject.keys(unitlessNumbers).forEach(prop => {\n prefixes.forEach(prefix => {\n unitlessNumbers[prefixKey(prefix, prop)] = unitlessNumbers[prop];\n });\n});\nexport default unitlessNumbers;","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nimport isWebColor from '../../../modules/isWebColor';\nimport processColor from '../../../exports/processColor';\nvar normalizeColor = function normalizeColor(color, opacity) {\n if (opacity === void 0) {\n opacity = 1;\n }\n if (color == null) return;\n if (typeof color === 'string' && isWebColor(color)) {\n return color;\n }\n var colorInt = processColor(color);\n if (colorInt != null) {\n var r = colorInt >> 16 & 255;\n var g = colorInt >> 8 & 255;\n var b = colorInt & 255;\n var a = (colorInt >> 24 & 255) / 255;\n var alpha = (a * opacity).toFixed(2);\n return \"rgba(\" + r + \",\" + g + \",\" + b + \",\" + alpha + \")\";\n }\n};\nexport default normalizeColor;","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nvar isWebColor = color => color === 'currentcolor' || color === 'currentColor' || color === 'inherit' || color.indexOf('var(') === 0;\nexport default isWebColor;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nimport normalizeColor from '@react-native/normalize-colors';\nvar processColor = color => {\n if (color === undefined || color === null) {\n return color;\n }\n\n // convert number and hex\n var int32Color = normalizeColor(color);\n if (int32Color === undefined || int32Color === null) {\n return undefined;\n }\n int32Color = (int32Color << 24 | int32Color >>> 8) >>> 0;\n return int32Color;\n};\nexport default processColor;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n * @noflow\n */\n\n/* eslint no-bitwise: 0 */\n\n'use strict';\n\nfunction normalizeColor(color) {\n if (typeof color === 'number') {\n if (color >>> 0 === color && color >= 0 && color <= 0xffffffff) {\n return color;\n }\n return null;\n }\n\n if (typeof color !== 'string') {\n return null;\n }\n\n const matchers = getMatchers();\n let match;\n\n // Ordered based on occurrences on Facebook codebase\n if ((match = matchers.hex6.exec(color))) {\n return parseInt(match[1] + 'ff', 16) >>> 0;\n }\n\n const colorFromKeyword = normalizeKeyword(color);\n if (colorFromKeyword != null) {\n return colorFromKeyword;\n }\n\n if ((match = matchers.rgb.exec(color))) {\n return (\n ((parse255(match[1]) << 24) | // r\n (parse255(match[2]) << 16) | // g\n (parse255(match[3]) << 8) | // b\n 0x000000ff) >>> // a\n 0\n );\n }\n\n if ((match = matchers.rgba.exec(color))) {\n // rgba(R G B / A) notation\n if (match[6] !== undefined) {\n return (\n ((parse255(match[6]) << 24) | // r\n (parse255(match[7]) << 16) | // g\n (parse255(match[8]) << 8) | // b\n parse1(match[9])) >>> // a\n 0\n );\n }\n\n // rgba(R, G, B, A) notation\n return (\n ((parse255(match[2]) << 24) | // r\n (parse255(match[3]) << 16) | // g\n (parse255(match[4]) << 8) | // b\n parse1(match[5])) >>> // a\n 0\n );\n }\n\n if ((match = matchers.hex3.exec(color))) {\n return (\n parseInt(\n match[1] +\n match[1] + // r\n match[2] +\n match[2] + // g\n match[3] +\n match[3] + // b\n 'ff', // a\n 16,\n ) >>> 0\n );\n }\n\n // https://drafts.csswg.org/css-color-4/#hex-notation\n if ((match = matchers.hex8.exec(color))) {\n return parseInt(match[1], 16) >>> 0;\n }\n\n if ((match = matchers.hex4.exec(color))) {\n return (\n parseInt(\n match[1] +\n match[1] + // r\n match[2] +\n match[2] + // g\n match[3] +\n match[3] + // b\n match[4] +\n match[4], // a\n 16,\n ) >>> 0\n );\n }\n\n if ((match = matchers.hsl.exec(color))) {\n return (\n (hslToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]), // l\n ) |\n 0x000000ff) >>> // a\n 0\n );\n }\n\n if ((match = matchers.hsla.exec(color))) {\n // hsla(H S L / A) notation\n if (match[6] !== undefined) {\n return (\n (hslToRgb(\n parse360(match[6]), // h\n parsePercentage(match[7]), // s\n parsePercentage(match[8]), // l\n ) |\n parse1(match[9])) >>> // a\n 0\n );\n }\n\n // hsla(H, S, L, A) notation\n return (\n (hslToRgb(\n parse360(match[2]), // h\n parsePercentage(match[3]), // s\n parsePercentage(match[4]), // l\n ) |\n parse1(match[5])) >>> // a\n 0\n );\n }\n\n if ((match = matchers.hwb.exec(color))) {\n return (\n (hwbToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // w\n parsePercentage(match[3]), // b\n ) |\n 0x000000ff) >>> // a\n 0\n );\n }\n\n return null;\n}\n\nfunction hue2rgb(p, q, t) {\n if (t < 0) {\n t += 1;\n }\n if (t > 1) {\n t -= 1;\n }\n if (t < 1 / 6) {\n return p + (q - p) * 6 * t;\n }\n if (t < 1 / 2) {\n return q;\n }\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n return p;\n}\n\nfunction hslToRgb(h, s, l) {\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n const r = hue2rgb(p, q, h + 1 / 3);\n const g = hue2rgb(p, q, h);\n const b = hue2rgb(p, q, h - 1 / 3);\n\n return (\n (Math.round(r * 255) << 24) |\n (Math.round(g * 255) << 16) |\n (Math.round(b * 255) << 8)\n );\n}\n\nfunction hwbToRgb(h, w, b) {\n if (w + b >= 1) {\n const gray = Math.round((w * 255) / (w + b));\n\n return (gray << 24) | (gray << 16) | (gray << 8);\n }\n\n const red = hue2rgb(0, 1, h + 1 / 3) * (1 - w - b) + w;\n const green = hue2rgb(0, 1, h) * (1 - w - b) + w;\n const blue = hue2rgb(0, 1, h - 1 / 3) * (1 - w - b) + w;\n\n return (\n (Math.round(red * 255) << 24) |\n (Math.round(green * 255) << 16) |\n (Math.round(blue * 255) << 8)\n );\n}\n\nconst NUMBER = '[-+]?\\\\d*\\\\.?\\\\d+';\nconst PERCENTAGE = NUMBER + '%';\n\nfunction call(...args) {\n return '\\\\(\\\\s*(' + args.join(')\\\\s*,?\\\\s*(') + ')\\\\s*\\\\)';\n}\n\nfunction callWithSlashSeparator(...args) {\n return (\n '\\\\(\\\\s*(' +\n args.slice(0, args.length - 1).join(')\\\\s*,?\\\\s*(') +\n ')\\\\s*/\\\\s*(' +\n args[args.length - 1] +\n ')\\\\s*\\\\)'\n );\n}\n\nfunction commaSeparatedCall(...args) {\n return '\\\\(\\\\s*(' + args.join(')\\\\s*,\\\\s*(') + ')\\\\s*\\\\)';\n}\n\nlet cachedMatchers;\n\nfunction getMatchers() {\n if (cachedMatchers === undefined) {\n cachedMatchers = {\n rgb: new RegExp('rgb' + call(NUMBER, NUMBER, NUMBER)),\n rgba: new RegExp(\n 'rgba(' +\n commaSeparatedCall(NUMBER, NUMBER, NUMBER, NUMBER) +\n '|' +\n callWithSlashSeparator(NUMBER, NUMBER, NUMBER, NUMBER) +\n ')',\n ),\n hsl: new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE)),\n hsla: new RegExp(\n 'hsla(' +\n commaSeparatedCall(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER) +\n '|' +\n callWithSlashSeparator(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER) +\n ')',\n ),\n hwb: new RegExp('hwb' + call(NUMBER, PERCENTAGE, PERCENTAGE)),\n hex3: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex4: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#([0-9a-fA-F]{6})$/,\n hex8: /^#([0-9a-fA-F]{8})$/,\n };\n }\n return cachedMatchers;\n}\n\nfunction parse255(str) {\n const int = parseInt(str, 10);\n if (int < 0) {\n return 0;\n }\n if (int > 255) {\n return 255;\n }\n return int;\n}\n\nfunction parse360(str) {\n const int = parseFloat(str);\n return (((int % 360) + 360) % 360) / 360;\n}\n\nfunction parse1(str) {\n const num = parseFloat(str);\n if (num < 0) {\n return 0;\n }\n if (num > 1) {\n return 255;\n }\n return Math.round(num * 255);\n}\n\nfunction parsePercentage(str) {\n // parseFloat conveniently ignores the final %\n const int = parseFloat(str);\n if (int < 0) {\n return 0;\n }\n if (int > 100) {\n return 1;\n }\n return int / 100;\n}\n\nfunction normalizeKeyword(name) {\n // prettier-ignore\n switch (name) {\n case 'transparent': return 0x00000000;\n // http://www.w3.org/TR/css3-color/#svg-color\n case 'aliceblue': return 0xf0f8ffff;\n case 'antiquewhite': return 0xfaebd7ff;\n case 'aqua': return 0x00ffffff;\n case 'aquamarine': return 0x7fffd4ff;\n case 'azure': return 0xf0ffffff;\n case 'beige': return 0xf5f5dcff;\n case 'bisque': return 0xffe4c4ff;\n case 'black': return 0x000000ff;\n case 'blanchedalmond': return 0xffebcdff;\n case 'blue': return 0x0000ffff;\n case 'blueviolet': return 0x8a2be2ff;\n case 'brown': return 0xa52a2aff;\n case 'burlywood': return 0xdeb887ff;\n case 'burntsienna': return 0xea7e5dff;\n case 'cadetblue': return 0x5f9ea0ff;\n case 'chartreuse': return 0x7fff00ff;\n case 'chocolate': return 0xd2691eff;\n case 'coral': return 0xff7f50ff;\n case 'cornflowerblue': return 0x6495edff;\n case 'cornsilk': return 0xfff8dcff;\n case 'crimson': return 0xdc143cff;\n case 'cyan': return 0x00ffffff;\n case 'darkblue': return 0x00008bff;\n case 'darkcyan': return 0x008b8bff;\n case 'darkgoldenrod': return 0xb8860bff;\n case 'darkgray': return 0xa9a9a9ff;\n case 'darkgreen': return 0x006400ff;\n case 'darkgrey': return 0xa9a9a9ff;\n case 'darkkhaki': return 0xbdb76bff;\n case 'darkmagenta': return 0x8b008bff;\n case 'darkolivegreen': return 0x556b2fff;\n case 'darkorange': return 0xff8c00ff;\n case 'darkorchid': return 0x9932ccff;\n case 'darkred': return 0x8b0000ff;\n case 'darksalmon': return 0xe9967aff;\n case 'darkseagreen': return 0x8fbc8fff;\n case 'darkslateblue': return 0x483d8bff;\n case 'darkslategray': return 0x2f4f4fff;\n case 'darkslategrey': return 0x2f4f4fff;\n case 'darkturquoise': return 0x00ced1ff;\n case 'darkviolet': return 0x9400d3ff;\n case 'deeppink': return 0xff1493ff;\n case 'deepskyblue': return 0x00bfffff;\n case 'dimgray': return 0x696969ff;\n case 'dimgrey': return 0x696969ff;\n case 'dodgerblue': return 0x1e90ffff;\n case 'firebrick': return 0xb22222ff;\n case 'floralwhite': return 0xfffaf0ff;\n case 'forestgreen': return 0x228b22ff;\n case 'fuchsia': return 0xff00ffff;\n case 'gainsboro': return 0xdcdcdcff;\n case 'ghostwhite': return 0xf8f8ffff;\n case 'gold': return 0xffd700ff;\n case 'goldenrod': return 0xdaa520ff;\n case 'gray': return 0x808080ff;\n case 'green': return 0x008000ff;\n case 'greenyellow': return 0xadff2fff;\n case 'grey': return 0x808080ff;\n case 'honeydew': return 0xf0fff0ff;\n case 'hotpink': return 0xff69b4ff;\n case 'indianred': return 0xcd5c5cff;\n case 'indigo': return 0x4b0082ff;\n case 'ivory': return 0xfffff0ff;\n case 'khaki': return 0xf0e68cff;\n case 'lavender': return 0xe6e6faff;\n case 'lavenderblush': return 0xfff0f5ff;\n case 'lawngreen': return 0x7cfc00ff;\n case 'lemonchiffon': return 0xfffacdff;\n case 'lightblue': return 0xadd8e6ff;\n case 'lightcoral': return 0xf08080ff;\n case 'lightcyan': return 0xe0ffffff;\n case 'lightgoldenrodyellow': return 0xfafad2ff;\n case 'lightgray': return 0xd3d3d3ff;\n case 'lightgreen': return 0x90ee90ff;\n case 'lightgrey': return 0xd3d3d3ff;\n case 'lightpink': return 0xffb6c1ff;\n case 'lightsalmon': return 0xffa07aff;\n case 'lightseagreen': return 0x20b2aaff;\n case 'lightskyblue': return 0x87cefaff;\n case 'lightslategray': return 0x778899ff;\n case 'lightslategrey': return 0x778899ff;\n case 'lightsteelblue': return 0xb0c4deff;\n case 'lightyellow': return 0xffffe0ff;\n case 'lime': return 0x00ff00ff;\n case 'limegreen': return 0x32cd32ff;\n case 'linen': return 0xfaf0e6ff;\n case 'magenta': return 0xff00ffff;\n case 'maroon': return 0x800000ff;\n case 'mediumaquamarine': return 0x66cdaaff;\n case 'mediumblue': return 0x0000cdff;\n case 'mediumorchid': return 0xba55d3ff;\n case 'mediumpurple': return 0x9370dbff;\n case 'mediumseagreen': return 0x3cb371ff;\n case 'mediumslateblue': return 0x7b68eeff;\n case 'mediumspringgreen': return 0x00fa9aff;\n case 'mediumturquoise': return 0x48d1ccff;\n case 'mediumvioletred': return 0xc71585ff;\n case 'midnightblue': return 0x191970ff;\n case 'mintcream': return 0xf5fffaff;\n case 'mistyrose': return 0xffe4e1ff;\n case 'moccasin': return 0xffe4b5ff;\n case 'navajowhite': return 0xffdeadff;\n case 'navy': return 0x000080ff;\n case 'oldlace': return 0xfdf5e6ff;\n case 'olive': return 0x808000ff;\n case 'olivedrab': return 0x6b8e23ff;\n case 'orange': return 0xffa500ff;\n case 'orangered': return 0xff4500ff;\n case 'orchid': return 0xda70d6ff;\n case 'palegoldenrod': return 0xeee8aaff;\n case 'palegreen': return 0x98fb98ff;\n case 'paleturquoise': return 0xafeeeeff;\n case 'palevioletred': return 0xdb7093ff;\n case 'papayawhip': return 0xffefd5ff;\n case 'peachpuff': return 0xffdab9ff;\n case 'peru': return 0xcd853fff;\n case 'pink': return 0xffc0cbff;\n case 'plum': return 0xdda0ddff;\n case 'powderblue': return 0xb0e0e6ff;\n case 'purple': return 0x800080ff;\n case 'rebeccapurple': return 0x663399ff;\n case 'red': return 0xff0000ff;\n case 'rosybrown': return 0xbc8f8fff;\n case 'royalblue': return 0x4169e1ff;\n case 'saddlebrown': return 0x8b4513ff;\n case 'salmon': return 0xfa8072ff;\n case 'sandybrown': return 0xf4a460ff;\n case 'seagreen': return 0x2e8b57ff;\n case 'seashell': return 0xfff5eeff;\n case 'sienna': return 0xa0522dff;\n case 'silver': return 0xc0c0c0ff;\n case 'skyblue': return 0x87ceebff;\n case 'slateblue': return 0x6a5acdff;\n case 'slategray': return 0x708090ff;\n case 'slategrey': return 0x708090ff;\n case 'snow': return 0xfffafaff;\n case 'springgreen': return 0x00ff7fff;\n case 'steelblue': return 0x4682b4ff;\n case 'tan': return 0xd2b48cff;\n case 'teal': return 0x008080ff;\n case 'thistle': return 0xd8bfd8ff;\n case 'tomato': return 0xff6347ff;\n case 'turquoise': return 0x40e0d0ff;\n case 'violet': return 0xee82eeff;\n case 'wheat': return 0xf5deb3ff;\n case 'white': return 0xffffffff;\n case 'whitesmoke': return 0xf5f5f5ff;\n case 'yellow': return 0xffff00ff;\n case 'yellowgreen': return 0x9acd32ff;\n }\n return null;\n}\n\nmodule.exports = normalizeColor;\n","/* eslint-disable */\n\n/**\n * JS Implementation of MurmurHash2\n *\n * @author Gary Court\n * @see http://github.com/garycourt/murmurhash-js\n * @author Austin Appleby\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {string} str ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n *\n * \n */\n\nfunction murmurhash2_32_gc(str, seed) {\n var l = str.length,\n h = seed ^ l,\n i = 0,\n k;\n while (l >= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n k ^= k >>> 24;\n k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16) ^ k;\n l -= 4;\n ++i;\n }\n switch (l) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n }\n h ^= h >>> 13;\n h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n h ^= h >>> 15;\n return h >>> 0;\n}\nvar hash = str => murmurhash2_32_gc(str, 1).toString(36);\nexport default hash;","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nvar uppercasePattern = /[A-Z]/g;\nvar msPattern = /^ms-/;\nvar cache = {};\nfunction toHyphenLower(match) {\n return '-' + match.toLowerCase();\n}\nfunction hyphenateStyleName(name) {\n if (name in cache) {\n return cache[name];\n }\n var hName = name.replace(uppercasePattern, toHyphenLower);\n return cache[name] = msPattern.test(hName) ? '-' + hName : hName;\n}\nexport default hyphenateStyleName;","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nimport createPrefixer from 'inline-style-prefixer/lib/createPrefixer';\nimport staticData from './static';\nvar prefixAll = createPrefixer(staticData);\nexport default prefixAll;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createPrefixer;\n\nvar _prefixProperty = require('./utils/prefixProperty');\n\nvar _prefixProperty2 = _interopRequireDefault(_prefixProperty);\n\nvar _prefixValue = require('./utils/prefixValue');\n\nvar _prefixValue2 = _interopRequireDefault(_prefixValue);\n\nvar _addNewValuesOnly = require('./utils/addNewValuesOnly');\n\nvar _addNewValuesOnly2 = _interopRequireDefault(_addNewValuesOnly);\n\nvar _isObject = require('./utils/isObject');\n\nvar _isObject2 = _interopRequireDefault(_isObject);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction createPrefixer(_ref) {\n var prefixMap = _ref.prefixMap,\n plugins = _ref.plugins;\n\n return function prefix(style) {\n for (var property in style) {\n var value = style[property];\n\n // handle nested objects\n if ((0, _isObject2.default)(value)) {\n style[property] = prefix(value);\n // handle array values\n } else if (Array.isArray(value)) {\n var combinedValue = [];\n\n for (var i = 0, len = value.length; i < len; ++i) {\n var processedValue = (0, _prefixValue2.default)(plugins, property, value[i], style, prefixMap);\n\n (0, _addNewValuesOnly2.default)(combinedValue, processedValue || value[i]);\n }\n\n // only modify the value if it was touched\n // by any plugin to prevent unnecessary mutations\n if (combinedValue.length > 0) {\n style[property] = combinedValue;\n }\n } else {\n var _processedValue = (0, _prefixValue2.default)(plugins, property, value, style, prefixMap);\n\n // only modify the value if it was touched\n // by any plugin to prevent unnecessary mutations\n if (_processedValue) {\n style[property] = _processedValue;\n }\n\n style = (0, _prefixProperty2.default)(prefixMap, property, style);\n }\n }\n\n return style;\n };\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = prefixProperty;\n\nvar _capitalizeString = require('./capitalizeString');\n\nvar _capitalizeString2 = _interopRequireDefault(_capitalizeString);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction prefixProperty(prefixProperties, property, style) {\n var requiredPrefixes = prefixProperties[property];\n\n if (requiredPrefixes && style.hasOwnProperty(property)) {\n var capitalizedProperty = (0, _capitalizeString2.default)(property);\n\n for (var i = 0; i < requiredPrefixes.length; ++i) {\n var prefixedProperty = requiredPrefixes[i] + capitalizedProperty;\n\n if (!style[prefixedProperty]) {\n style[prefixedProperty] = style[property];\n }\n }\n }\n\n return style;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = capitalizeString;\nfunction capitalizeString(str) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = prefixValue;\nfunction prefixValue(plugins, property, value, style, metaData) {\n for (var i = 0, len = plugins.length; i < len; ++i) {\n var processedValue = plugins[i](property, value, style, metaData);\n\n // we can stop processing if a value is returned\n // as all plugin criteria are unique\n if (processedValue) {\n return processedValue;\n }\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = addNewValuesOnly;\nfunction addIfNew(list, value) {\n if (list.indexOf(value) === -1) {\n list.push(value);\n }\n}\n\nfunction addNewValuesOnly(list, values) {\n if (Array.isArray(values)) {\n for (var i = 0, len = values.length; i < len; ++i) {\n addIfNew(list, values[i]);\n }\n } else {\n addIfNew(list, values);\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isObject;\nfunction isObject(value) {\n return value instanceof Object && !Array.isArray(value);\n}","import backgroundClip from 'inline-style-prefixer/lib/plugins/backgroundClip';\nimport crossFade from 'inline-style-prefixer/lib/plugins/crossFade';\nimport cursor from 'inline-style-prefixer/lib/plugins/cursor';\nimport filter from 'inline-style-prefixer/lib/plugins/filter';\nimport imageSet from 'inline-style-prefixer/lib/plugins/imageSet';\nimport logical from 'inline-style-prefixer/lib/plugins/logical';\nimport position from 'inline-style-prefixer/lib/plugins/position';\nimport sizing from 'inline-style-prefixer/lib/plugins/sizing';\nimport transition from 'inline-style-prefixer/lib/plugins/transition';\nvar w = ['Webkit'];\nvar m = ['Moz'];\nvar wm = ['Webkit', 'Moz'];\nvar wms = ['Webkit', 'ms'];\nvar wmms = ['Webkit', 'Moz', 'ms'];\nexport default {\n plugins: [backgroundClip, crossFade, cursor, filter, imageSet, logical, position, sizing, transition],\n prefixMap: {\n appearance: wmms,\n userSelect: wm,\n textEmphasisPosition: wms,\n textEmphasis: wms,\n textEmphasisStyle: wms,\n textEmphasisColor: wms,\n boxDecorationBreak: wms,\n clipPath: w,\n maskImage: wms,\n maskMode: wms,\n maskRepeat: wms,\n maskPosition: wms,\n maskClip: wms,\n maskOrigin: wms,\n maskSize: wms,\n maskComposite: wms,\n mask: wms,\n maskBorderSource: wms,\n maskBorderMode: wms,\n maskBorderSlice: wms,\n maskBorderWidth: wms,\n maskBorderOutset: wms,\n maskBorderRepeat: wms,\n maskBorder: wms,\n maskType: wms,\n textDecorationStyle: w,\n textDecorationSkip: w,\n textDecorationLine: w,\n textDecorationColor: w,\n filter: w,\n breakAfter: w,\n breakBefore: w,\n breakInside: w,\n columnCount: w,\n columnFill: w,\n columnGap: w,\n columnRule: w,\n columnRuleColor: w,\n columnRuleStyle: w,\n columnRuleWidth: w,\n columns: w,\n columnSpan: w,\n columnWidth: w,\n backdropFilter: w,\n hyphens: w,\n flowInto: w,\n flowFrom: w,\n regionFragment: w,\n textOrientation: w,\n tabSize: m,\n fontKerning: w,\n textSizeAdjust: w\n }\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = backgroundClip;\nfunction backgroundClip() {\n return null;\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = crossFade;\n\nvar _cssInJsUtils = require('css-in-js-utils');\n\nvar CROSS_FADE_REGEX = /cross-fade\\(/g;\n// http://caniuse.com/#search=cross-fade\nvar prefixes = ['-webkit-', ''];\n\nfunction crossFade(property, value) {\n if (typeof value === 'string' && !(0, _cssInJsUtils.isPrefixedValue)(value) && value.indexOf('cross-fade(') !== -1) {\n return prefixes.map(function (prefix) {\n return value.replace(CROSS_FADE_REGEX, prefix + 'cross-fade(');\n });\n }\n}","import assignStyle from './assignStyle';\nimport camelCaseProperty from './camelCaseProperty';\nimport cssifyDeclaration from './cssifyDeclaration';\nimport cssifyObject from './cssifyObject';\nimport hyphenateProperty from './hyphenateProperty';\nimport isPrefixedProperty from './isPrefixedProperty';\nimport isPrefixedValue from './isPrefixedValue';\nimport isUnitlessProperty from './isUnitlessProperty';\nimport normalizeProperty from './normalizeProperty';\nimport resolveArrayValue from './resolveArrayValue';\nimport unprefixProperty from './unprefixProperty';\nimport unprefixValue from './unprefixValue';\nexport { assignStyle, camelCaseProperty, cssifyDeclaration, cssifyObject, hyphenateProperty, isPrefixedProperty, isPrefixedValue, isUnitlessProperty, normalizeProperty, resolveArrayValue, unprefixProperty, unprefixValue };","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { 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(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(n); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction filterUniqueArray(arr) {\n return arr.filter(function (val, index) {\n return arr.lastIndexOf(val) === index;\n });\n}\n\nexport default function assignStyle(base) {\n for (var i = 0, len = arguments.length <= 1 ? 0 : arguments.length - 1; i < len; ++i) {\n var style = i + 1 < 1 || arguments.length <= i + 1 ? undefined : arguments[i + 1];\n\n for (var property in style) {\n var value = style[property];\n var baseValue = base[property];\n\n if (baseValue && value) {\n if (Array.isArray(baseValue)) {\n base[property] = filterUniqueArray(baseValue.concat(value));\n continue;\n }\n\n if (Array.isArray(value)) {\n base[property] = filterUniqueArray([baseValue].concat(_toConsumableArray(value)));\n continue;\n }\n\n if (_typeof(value) === 'object') {\n base[property] = assignStyle({}, baseValue, value);\n continue;\n }\n }\n\n base[property] = value;\n }\n }\n\n return base;\n}","var DASH = /-([a-z])/g;\nvar MS = /^Ms/g;\nvar cache = {};\n\nfunction toUpper(match) {\n return match[1].toUpperCase();\n}\n\nexport default function camelCaseProperty(property) {\n if (cache.hasOwnProperty(property)) {\n return cache[property];\n }\n\n var camelProp = property.replace(DASH, toUpper).replace(MS, 'ms');\n cache[property] = camelProp;\n return camelProp;\n}","import hyphenateProperty from './hyphenateProperty';\nexport default function cssifyDeclaration(property, value) {\n return hyphenateProperty(property) + ':' + value;\n}","import hyphenateStyleName from 'hyphenate-style-name';\nexport default function hyphenateProperty(property) {\n return hyphenateStyleName(property);\n}","/* eslint-disable no-var, prefer-template */\nvar uppercasePattern = /[A-Z]/g\nvar msPattern = /^ms-/\nvar cache = {}\n\nfunction toHyphenLower(match) {\n return '-' + match.toLowerCase()\n}\n\nfunction hyphenateStyleName(name) {\n if (cache.hasOwnProperty(name)) {\n return cache[name]\n }\n\n var hName = name.replace(uppercasePattern, toHyphenLower)\n return (cache[name] = msPattern.test(hName) ? '-' + hName : hName)\n}\n\nexport default hyphenateStyleName\n","import cssifyDeclaration from './cssifyDeclaration';\nexport default function cssifyObject(style) {\n var css = '';\n\n for (var property in style) {\n var value = style[property];\n\n if (typeof value !== 'string' && typeof value !== 'number') {\n continue;\n } // prevents the semicolon after\n // the last rule declaration\n\n\n if (css) {\n css += ';';\n }\n\n css += cssifyDeclaration(property, value);\n }\n\n return css;\n}","var RE = /^(Webkit|Moz|O|ms)/;\nexport default function isPrefixedProperty(property) {\n return RE.test(property);\n}","var RE = /-webkit-|-moz-|-ms-/;\nexport default function isPrefixedValue(value) {\n return typeof value === 'string' && RE.test(value);\n}","import hyphenateProperty from './hyphenateProperty';\nvar unitlessProperties = {\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n fontWeight: true,\n lineHeight: true,\n opacity: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n // SVG-related properties\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true\n};\nvar prefixedUnitlessProperties = ['animationIterationCount', 'boxFlex', 'boxFlexGroup', 'boxOrdinalGroup', 'columnCount', 'flex', 'flexGrow', 'flexPositive', 'flexShrink', 'flexNegative', 'flexOrder', 'gridColumn', 'gridColumnEnd', 'gridColumnStart', 'gridRow', 'gridRowEnd', 'gridRowStart', 'lineClamp', 'order'];\nvar prefixes = ['Webkit', 'ms', 'Moz', 'O'];\n\nfunction getPrefixedProperty(prefix, property) {\n return prefix + property.charAt(0).toUpperCase() + property.slice(1);\n} // add all prefixed properties to the unitless properties\n\n\nfor (var i = 0, len = prefixedUnitlessProperties.length; i < len; ++i) {\n var property = prefixedUnitlessProperties[i];\n unitlessProperties[property] = true;\n\n for (var j = 0, jLen = prefixes.length; j < jLen; ++j) {\n unitlessProperties[getPrefixedProperty(prefixes[j], property)] = true;\n }\n} // add all hypenated properties as well\n\n\nfor (var _property in unitlessProperties) {\n unitlessProperties[hyphenateProperty(_property)] = true;\n}\n\nexport default function isUnitlessProperty(property) {\n return unitlessProperties.hasOwnProperty(property);\n}","import camelCaseProperty from './camelCaseProperty';\nimport unprefixProperty from './unprefixProperty';\nexport default function normalizeProperty(property) {\n return unprefixProperty(camelCaseProperty(property));\n}","var RE = /^(ms|Webkit|Moz|O)/;\nexport default function unprefixProperty(property) {\n var propertyWithoutPrefix = property.replace(RE, '');\n return propertyWithoutPrefix.charAt(0).toLowerCase() + propertyWithoutPrefix.slice(1);\n}","import hyphenateProperty from './hyphenateProperty';\nexport default function resolveArrayValue(property, value) {\n return value.join(';' + hyphenateProperty(property) + ':');\n}","var RE = /(-ms-|-webkit-|-moz-|-o-)/g;\nexport default function unprefixValue(value) {\n if (typeof value === 'string') {\n return value.replace(RE, '');\n }\n\n return value;\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = cursor;\nvar prefixes = ['-webkit-', '-moz-', ''];\n\nvar values = {\n 'zoom-in': true,\n 'zoom-out': true,\n grab: true,\n grabbing: true\n};\n\nfunction cursor(property, value) {\n if (property === 'cursor' && values.hasOwnProperty(value)) {\n return prefixes.map(function (prefix) {\n return prefix + value;\n });\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = filter;\n\nvar _cssInJsUtils = require('css-in-js-utils');\n\nvar FILTER_REGEX = /filter\\(/g;\n// http://caniuse.com/#feat=css-filter-function\nvar prefixes = ['-webkit-', ''];\n\nfunction filter(property, value) {\n if (typeof value === 'string' && !(0, _cssInJsUtils.isPrefixedValue)(value) && value.indexOf('filter(') !== -1) {\n return prefixes.map(function (prefix) {\n return value.replace(FILTER_REGEX, prefix + 'filter(');\n });\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = imageSet;\n\nvar _isPrefixedValue = require('css-in-js-utils/lib/isPrefixedValue');\n\nvar _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// http://caniuse.com/#feat=css-image-set\nvar prefixes = ['-webkit-', ''];\n\nfunction imageSet(property, value) {\n if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('image-set(') > -1) {\n return prefixes.map(function (prefix) {\n return value.replace(/image-set\\(/g, prefix + 'image-set(');\n });\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = isPrefixedValue;\nvar RE = /-webkit-|-moz-|-ms-/;\n\nfunction isPrefixedValue(value) {\n return typeof value === 'string' && RE.test(value);\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = logical;\nvar alternativeProps = {\n marginBlockStart: ['WebkitMarginBefore'],\n marginBlockEnd: ['WebkitMarginAfter'],\n marginInlineStart: ['WebkitMarginStart', 'MozMarginStart'],\n marginInlineEnd: ['WebkitMarginEnd', 'MozMarginEnd'],\n paddingBlockStart: ['WebkitPaddingBefore'],\n paddingBlockEnd: ['WebkitPaddingAfter'],\n paddingInlineStart: ['WebkitPaddingStart', 'MozPaddingStart'],\n paddingInlineEnd: ['WebkitPaddingEnd', 'MozPaddingEnd'],\n borderBlockStart: ['WebkitBorderBefore'],\n borderBlockStartColor: ['WebkitBorderBeforeColor'],\n borderBlockStartStyle: ['WebkitBorderBeforeStyle'],\n borderBlockStartWidth: ['WebkitBorderBeforeWidth'],\n borderBlockEnd: ['WebkitBorderAfter'],\n borderBlockEndColor: ['WebkitBorderAfterColor'],\n borderBlockEndStyle: ['WebkitBorderAfterStyle'],\n borderBlockEndWidth: ['WebkitBorderAfterWidth'],\n borderInlineStart: ['WebkitBorderStart', 'MozBorderStart'],\n borderInlineStartColor: ['WebkitBorderStartColor', 'MozBorderStartColor'],\n borderInlineStartStyle: ['WebkitBorderStartStyle', 'MozBorderStartStyle'],\n borderInlineStartWidth: ['WebkitBorderStartWidth', 'MozBorderStartWidth'],\n borderInlineEnd: ['WebkitBorderEnd', 'MozBorderEnd'],\n borderInlineEndColor: ['WebkitBorderEndColor', 'MozBorderEndColor'],\n borderInlineEndStyle: ['WebkitBorderEndStyle', 'MozBorderEndStyle'],\n borderInlineEndWidth: ['WebkitBorderEndWidth', 'MozBorderEndWidth']\n};\n\nfunction logical(property, value, style) {\n if (Object.prototype.hasOwnProperty.call(alternativeProps, property)) {\n var alternativePropList = alternativeProps[property];\n for (var i = 0, len = alternativePropList.length; i < len; ++i) {\n style[alternativePropList[i]] = value;\n }\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = position;\nfunction position(property, value) {\n if (property === 'position' && value === 'sticky') {\n return ['-webkit-sticky', 'sticky'];\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = sizing;\nvar prefixes = ['-webkit-', '-moz-', ''];\n\nvar properties = {\n maxHeight: true,\n maxWidth: true,\n width: true,\n height: true,\n columnWidth: true,\n minWidth: true,\n minHeight: true\n};\nvar values = {\n 'min-content': true,\n 'max-content': true,\n 'fill-available': true,\n 'fit-content': true,\n 'contain-floats': true\n};\n\nfunction sizing(property, value) {\n if (properties.hasOwnProperty(property) && values.hasOwnProperty(value)) {\n return prefixes.map(function (prefix) {\n return prefix + value;\n });\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n\nvar _hyphenateProperty = require('css-in-js-utils/lib/hyphenateProperty');\n\nvar _hyphenateProperty2 = _interopRequireDefault(_hyphenateProperty);\n\nvar _isPrefixedValue = require('css-in-js-utils/lib/isPrefixedValue');\n\nvar _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);\n\nvar _capitalizeString = require('../utils/capitalizeString');\n\nvar _capitalizeString2 = _interopRequireDefault(_capitalizeString);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar properties = {\n transition: true,\n transitionProperty: true,\n WebkitTransition: true,\n WebkitTransitionProperty: true,\n MozTransition: true,\n MozTransitionProperty: true\n};\n\nvar prefixMapping = {\n Webkit: '-webkit-',\n Moz: '-moz-',\n ms: '-ms-'\n};\n\nfunction prefixValue(value, propertyPrefixMap) {\n if ((0, _isPrefixedValue2.default)(value)) {\n return value;\n }\n\n // only split multi values, not cubic beziers\n var multipleValues = value.split(/,(?![^()]*(?:\\([^()]*\\))?\\))/g);\n\n for (var i = 0, len = multipleValues.length; i < len; ++i) {\n var singleValue = multipleValues[i];\n var values = [singleValue];\n for (var property in propertyPrefixMap) {\n var dashCaseProperty = (0, _hyphenateProperty2.default)(property);\n\n if (singleValue.indexOf(dashCaseProperty) > -1 && dashCaseProperty !== 'order') {\n var prefixes = propertyPrefixMap[property];\n for (var j = 0, pLen = prefixes.length; j < pLen; ++j) {\n // join all prefixes and create a new value\n values.unshift(singleValue.replace(dashCaseProperty, prefixMapping[prefixes[j]] + dashCaseProperty));\n }\n }\n }\n\n multipleValues[i] = values.join(',');\n }\n\n return multipleValues.join(',');\n}\n\nfunction transition(property, value, style, propertyPrefixMap) {\n // also check for already prefixed transitions\n if (typeof value === 'string' && properties.hasOwnProperty(property)) {\n var outputValue = prefixValue(value, propertyPrefixMap);\n // if the property is already prefixed\n var webkitOutput = outputValue.split(/,(?![^()]*(?:\\([^()]*\\))?\\))/g).filter(function (val) {\n return !/-moz-|-ms-/.test(val);\n }).join(',');\n\n if (property.indexOf('Webkit') > -1) {\n return webkitOutput;\n }\n\n var mozOutput = outputValue.split(/,(?![^()]*(?:\\([^()]*\\))?\\))/g).filter(function (val) {\n return !/-webkit-|-ms-/.test(val);\n }).join(',');\n\n if (property.indexOf('Moz') > -1) {\n return mozOutput;\n }\n\n style['Webkit' + (0, _capitalizeString2.default)(property)] = webkitOutput;\n style['Moz' + (0, _capitalizeString2.default)(property)] = mozOutput;\n return outputValue;\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = hyphenateProperty;\n\nvar _hyphenateStyleName = require(\"hyphenate-style-name\");\n\nvar _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction hyphenateProperty(property) {\n return (0, _hyphenateStyleName2[\"default\"])(property);\n}","/**\n * Copyright (c) Nicolas Gallagher\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\nmodule.exports = require('./dist/transform-localize-style');\n","/**\n * Copyright (c) Nicolas Gallagher\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\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.localizeStyle = localizeStyle;\nvar cache = new WeakMap();\nvar markerProp = '$$css$localize';\n/**\n * The compiler polyfills logical properties and values, generating a class\n * name for both writing directions. The style objects are annotated by\n * the compiler as needing this runtime transform. The results are memoized.\n *\n * { '$$css$localize': true, float: [ 'float-left', 'float-right' ] }\n * => { float: 'float-left' }\n */\n\nfunction compileStyle(style, isRTL) {\n // Create a new compiled style for styleq\n var compiledStyle = {};\n\n for (var prop in style) {\n if (prop !== markerProp) {\n var value = style[prop];\n\n if (Array.isArray(value)) {\n compiledStyle[prop] = isRTL ? value[1] : value[0];\n } else {\n compiledStyle[prop] = value;\n }\n }\n }\n\n return compiledStyle;\n}\n\nfunction localizeStyle(style, isRTL) {\n if (style[markerProp] != null) {\n var compiledStyleIndex = isRTL ? 1 : 0; // Check the cache in case we've already seen this object\n\n if (cache.has(style)) {\n var _cachedStyles = cache.get(style);\n\n var _compiledStyle = _cachedStyles[compiledStyleIndex];\n\n if (_compiledStyle == null) {\n // Update the missing cache entry\n _compiledStyle = compileStyle(style, isRTL);\n _cachedStyles[compiledStyleIndex] = _compiledStyle;\n cache.set(style, _cachedStyles);\n }\n\n return _compiledStyle;\n } // Create a new compiled style for styleq\n\n\n var compiledStyle = compileStyle(style, isRTL);\n var cachedStyles = new Array(2);\n cachedStyles[compiledStyleIndex] = compiledStyle;\n cache.set(style, cachedStyles);\n return compiledStyle;\n }\n\n return style;\n}","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nimport normalizeColor from './compiler/normalizeColor';\nimport normalizeValueWithProperty from './compiler/normalizeValueWithProperty';\nimport { warnOnce } from '../../modules/warnOnce';\nvar emptyObject = {};\n\n/**\n * Shadows\n */\n\nvar defaultOffset = {\n height: 0,\n width: 0\n};\nexport var createBoxShadowValue = style => {\n var shadowColor = style.shadowColor,\n shadowOffset = style.shadowOffset,\n shadowOpacity = style.shadowOpacity,\n shadowRadius = style.shadowRadius;\n var _ref = shadowOffset || defaultOffset,\n height = _ref.height,\n width = _ref.width;\n var offsetX = normalizeValueWithProperty(width);\n var offsetY = normalizeValueWithProperty(height);\n var blurRadius = normalizeValueWithProperty(shadowRadius || 0);\n var color = normalizeColor(shadowColor || 'black', shadowOpacity);\n if (color != null && offsetX != null && offsetY != null && blurRadius != null) {\n return offsetX + \" \" + offsetY + \" \" + blurRadius + \" \" + color;\n }\n};\nexport var createTextShadowValue = style => {\n var textShadowColor = style.textShadowColor,\n textShadowOffset = style.textShadowOffset,\n textShadowRadius = style.textShadowRadius;\n var _ref2 = textShadowOffset || defaultOffset,\n height = _ref2.height,\n width = _ref2.width;\n var radius = textShadowRadius || 0;\n var offsetX = normalizeValueWithProperty(width);\n var offsetY = normalizeValueWithProperty(height);\n var blurRadius = normalizeValueWithProperty(radius);\n var color = normalizeValueWithProperty(textShadowColor, 'textShadowColor');\n if (color && (height !== 0 || width !== 0 || radius !== 0) && offsetX != null && offsetY != null && blurRadius != null) {\n return offsetX + \" \" + offsetY + \" \" + blurRadius + \" \" + color;\n }\n};\n\n// { scale: 2 } => 'scale(2)'\n// { translateX: 20 } => 'translateX(20px)'\n// { matrix: [1,2,3,4,5,6] } => 'matrix(1,2,3,4,5,6)'\nvar mapTransform = transform => {\n var type = Object.keys(transform)[0];\n var value = transform[type];\n if (type === 'matrix' || type === 'matrix3d') {\n return type + \"(\" + value.join(',') + \")\";\n } else {\n var normalizedValue = normalizeValueWithProperty(value, type);\n return type + \"(\" + normalizedValue + \")\";\n }\n};\nexport var createTransformValue = value => {\n return value.map(mapTransform).join(' ');\n};\nvar PROPERTIES_STANDARD = {\n borderBottomEndRadius: 'borderEndEndRadius',\n borderBottomStartRadius: 'borderEndStartRadius',\n borderTopEndRadius: 'borderStartEndRadius',\n borderTopStartRadius: 'borderStartStartRadius',\n borderEndColor: 'borderInlineEndColor',\n borderEndStyle: 'borderInlineEndStyle',\n borderEndWidth: 'borderInlineEndWidth',\n borderStartColor: 'borderInlineStartColor',\n borderStartStyle: 'borderInlineStartStyle',\n borderStartWidth: 'borderInlineStartWidth',\n end: 'insetInlineEnd',\n marginEnd: 'marginInlineEnd',\n marginHorizontal: 'marginInline',\n marginStart: 'marginInlineStart',\n marginVertical: 'marginBlock',\n paddingEnd: 'paddingInlineEnd',\n paddingHorizontal: 'paddingInline',\n paddingStart: 'paddingInlineStart',\n paddingVertical: 'paddingBlock',\n start: 'insetInlineStart'\n};\nvar ignoredProps = {\n elevation: true,\n overlayColor: true,\n resizeMode: true,\n tintColor: true\n};\n\n/**\n * Preprocess styles\n */\nexport var preprocess = function preprocess(originalStyle, options) {\n if (options === void 0) {\n options = {};\n }\n var style = originalStyle || emptyObject;\n var nextStyle = {};\n\n // Convert shadow styles\n if (options.shadow === true, style.shadowColor != null || style.shadowOffset != null || style.shadowOpacity != null || style.shadowRadius != null) {\n warnOnce('shadowStyles', \"\\\"shadow*\\\" style props are deprecated. Use \\\"boxShadow\\\".\");\n var boxShadowValue = createBoxShadowValue(style);\n if (boxShadowValue != null && nextStyle.boxShadow == null) {\n var boxShadow = style.boxShadow;\n var value = boxShadow ? boxShadow + \", \" + boxShadowValue : boxShadowValue;\n nextStyle.boxShadow = value;\n }\n }\n\n // Convert text shadow styles\n if (options.textShadow === true, style.textShadowColor != null || style.textShadowOffset != null || style.textShadowRadius != null) {\n warnOnce('textShadowStyles', \"\\\"textShadow*\\\" style props are deprecated. Use \\\"textShadow\\\".\");\n var textShadowValue = createTextShadowValue(style);\n if (textShadowValue != null && nextStyle.textShadow == null) {\n var textShadow = style.textShadow;\n var _value = textShadow ? textShadow + \", \" + textShadowValue : textShadowValue;\n nextStyle.textShadow = _value;\n }\n }\n for (var originalProp in style) {\n if (\n // Ignore some React Native styles\n ignoredProps[originalProp] != null || originalProp === 'shadowColor' || originalProp === 'shadowOffset' || originalProp === 'shadowOpacity' || originalProp === 'shadowRadius' || originalProp === 'textShadowColor' || originalProp === 'textShadowOffset' || originalProp === 'textShadowRadius') {\n continue;\n }\n var originalValue = style[originalProp];\n var prop = PROPERTIES_STANDARD[originalProp] || originalProp;\n var _value2 = originalValue;\n if (!Object.prototype.hasOwnProperty.call(style, originalProp) || prop !== originalProp && style[prop] != null) {\n continue;\n }\n if (prop === 'aspectRatio' && typeof _value2 === 'number') {\n nextStyle[prop] = _value2.toString();\n } else if (prop === 'fontVariant') {\n if (Array.isArray(_value2) && _value2.length > 0) {\n /*\n warnOnce(\n 'fontVariant',\n '\"fontVariant\" style array value is deprecated. Use space-separated values.'\n );\n */\n _value2 = _value2.join(' ');\n }\n nextStyle[prop] = _value2;\n } else if (prop === 'textAlignVertical') {\n /*\n warnOnce(\n 'textAlignVertical',\n '\"textAlignVertical\" style is deprecated. Use \"verticalAlign\".'\n );\n */\n if (style.verticalAlign == null) {\n nextStyle.verticalAlign = _value2 === 'center' ? 'middle' : _value2;\n }\n } else if (prop === 'transform') {\n if (Array.isArray(_value2)) {\n _value2 = createTransformValue(_value2);\n }\n nextStyle.transform = _value2;\n } else {\n nextStyle[prop] = _value2;\n }\n }\n\n // $FlowIgnore\n return nextStyle;\n};\nexport default preprocess;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nvar warnedKeys = {};\n\n/**\n * A simple function that prints a warning message once per session.\n *\n * @param {string} key - The key used to ensure the message is printed once.\n * This should be unique to the callsite.\n * @param {string} message - The message to print\n */\nexport function warnOnce(key, message) {\n if (process.env.NODE_ENV !== 'production') {\n if (warnedKeys[key]) {\n return;\n }\n console.warn(message);\n warnedKeys[key] = true;\n }\n}","/**\n * Copyright (c) Nicolas Gallagher\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 */\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.styleq = void 0;\nvar cache = new WeakMap();\nvar compiledKey = '$$css';\n\nfunction createStyleq(options) {\n var disableCache;\n var disableMix;\n var transform;\n\n if (options != null) {\n disableCache = options.disableCache === true;\n disableMix = options.disableMix === true;\n transform = options.transform;\n }\n\n return function styleq() {\n // Keep track of property commits to the className\n var definedProperties = []; // The className and inline style to build up\n\n var className = '';\n var inlineStyle = null; // The current position in the cache graph\n\n var nextCache = disableCache ? null : cache; // This way of creating an array from arguments is fastest\n\n var styles = new Array(arguments.length);\n\n for (var i = 0; i < arguments.length; i++) {\n styles[i] = arguments[i];\n } // Iterate over styles from last to first\n\n\n while (styles.length > 0) {\n var possibleStyle = styles.pop(); // Skip empty items\n\n if (possibleStyle == null || possibleStyle === false) {\n continue;\n } // Push nested styles back onto the stack to be processed\n\n\n if (Array.isArray(possibleStyle)) {\n for (var _i = 0; _i < possibleStyle.length; _i++) {\n styles.push(possibleStyle[_i]);\n }\n\n continue;\n } // Process an individual style object\n\n\n var style = transform != null ? transform(possibleStyle) : possibleStyle;\n\n if (style.$$css) {\n // Build up the class names defined by this object\n var classNameChunk = ''; // Check the cache to see if we've already done this work\n\n if (nextCache != null && nextCache.has(style)) {\n // Cache: read\n var cacheEntry = nextCache.get(style);\n\n if (cacheEntry != null) {\n classNameChunk = cacheEntry[0]; // $FlowIgnore\n\n definedProperties.push.apply(definedProperties, cacheEntry[1]);\n nextCache = cacheEntry[2];\n }\n } // Update the chunks with data from this object\n else {\n // The properties defined by this object\n var definedPropertiesChunk = [];\n\n for (var prop in style) {\n var value = style[prop];\n if (prop === compiledKey) continue; // Each property value is used as an HTML class name\n // { 'debug.string': 'debug.string', opacity: 's-jskmnoqp' }\n\n if (typeof value === 'string' || value === null) {\n // Only add to chunks if this property hasn't already been seen\n if (!definedProperties.includes(prop)) {\n definedProperties.push(prop);\n\n if (nextCache != null) {\n definedPropertiesChunk.push(prop);\n }\n\n if (typeof value === 'string') {\n classNameChunk += classNameChunk ? ' ' + value : value;\n }\n }\n } // If we encounter a value that isn't a string or `null`\n else {\n console.error(\"styleq: \".concat(prop, \" typeof \").concat(String(value), \" is not \\\"string\\\" or \\\"null\\\".\"));\n }\n } // Cache: write\n\n\n if (nextCache != null) {\n // Create the next WeakMap for this sequence of styles\n var weakMap = new WeakMap();\n nextCache.set(style, [classNameChunk, definedPropertiesChunk, weakMap]);\n nextCache = weakMap;\n }\n } // Order of classes in chunks matches property-iteration order of style\n // object. Order of chunks matches passed order of styles from first to\n // last (which we iterate over in reverse).\n\n\n if (classNameChunk) {\n className = className ? classNameChunk + ' ' + className : classNameChunk;\n }\n } // ----- DYNAMIC: Process inline style object -----\n else {\n if (disableMix) {\n if (inlineStyle == null) {\n inlineStyle = {};\n }\n\n inlineStyle = Object.assign({}, style, inlineStyle);\n } else {\n var subStyle = null;\n\n for (var _prop in style) {\n var _value = style[_prop];\n\n if (_value !== undefined) {\n if (!definedProperties.includes(_prop)) {\n if (_value != null) {\n if (inlineStyle == null) {\n inlineStyle = {};\n }\n\n if (subStyle == null) {\n subStyle = {};\n }\n\n subStyle[_prop] = _value;\n }\n\n definedProperties.push(_prop); // Cache is unnecessary overhead if results can't be reused.\n\n nextCache = null;\n }\n }\n }\n\n if (subStyle != null) {\n inlineStyle = Object.assign(subStyle, inlineStyle);\n }\n }\n }\n }\n\n var styleProps = [className, inlineStyle];\n return styleProps;\n };\n}\n\nvar styleq = createStyleq();\nexports.styleq = styleq;\nstyleq.factory = createStyleq;","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nimport valueParser from 'postcss-value-parser';\nvar invalidShortforms = {\n background: true,\n borderBottom: true,\n borderLeft: true,\n borderRight: true,\n borderTop: true,\n font: true,\n grid: true,\n outline: true,\n textDecoration: true\n};\nvar invalidMultiValueShortforms = {\n flex: true,\n margin: true,\n padding: true,\n borderColor: true,\n borderRadius: true,\n borderStyle: true,\n borderWidth: true,\n inset: true,\n insetBlock: true,\n insetInline: true,\n marginBlock: true,\n marginInline: true,\n marginHorizontal: true,\n marginVertical: true,\n paddingBlock: true,\n paddingInline: true,\n paddingHorizontal: true,\n paddingVertical: true,\n overflow: true,\n overscrollBehavior: true,\n backgroundPosition: true\n};\nfunction error(message) {\n console.error(message);\n}\nexport function validate(obj) {\n for (var k in obj) {\n var prop = k.trim();\n var value = obj[prop];\n var isInvalid = false;\n if (value === null) {\n continue;\n }\n if (typeof value === 'string' && value.indexOf('!important') > -1) {\n error(\"Invalid style declaration \\\"\" + prop + \":\" + value + \"\\\". Values cannot include \\\"!important\\\"\");\n isInvalid = true;\n } else {\n var suggestion = '';\n if (prop === 'animation' || prop === 'animationName') {\n suggestion = 'Did you mean \"animationKeyframes\"?';\n isInvalid = true;\n } else if (prop === 'direction') {\n suggestion = 'Did you mean \"writingDirection\"?';\n isInvalid = true;\n } else if (invalidShortforms[prop]) {\n suggestion = 'Please use long-form properties.';\n isInvalid = true;\n } else if (invalidMultiValueShortforms[prop]) {\n if (typeof value === 'string' && valueParser(value).nodes.length > 1) {\n suggestion = \"Value is \\\"\" + value + \"\\\" but only single values are supported.\";\n isInvalid = true;\n }\n }\n if (suggestion !== '') {\n error(\"Invalid style property of \\\"\" + prop + \"\\\". \" + suggestion);\n }\n }\n if (isInvalid) {\n delete obj[k];\n }\n }\n}","var parse = require(\"./parse\");\nvar walk = require(\"./walk\");\nvar stringify = require(\"./stringify\");\n\nfunction ValueParser(value) {\n if (this instanceof ValueParser) {\n this.nodes = parse(value);\n return this;\n }\n return new ValueParser(value);\n}\n\nValueParser.prototype.toString = function() {\n return Array.isArray(this.nodes) ? stringify(this.nodes) : \"\";\n};\n\nValueParser.prototype.walk = function(cb, bubble) {\n walk(this.nodes, cb, bubble);\n return this;\n};\n\nValueParser.unit = require(\"./unit\");\n\nValueParser.walk = walk;\n\nValueParser.stringify = stringify;\n\nmodule.exports = ValueParser;\n","var openParentheses = \"(\".charCodeAt(0);\nvar closeParentheses = \")\".charCodeAt(0);\nvar singleQuote = \"'\".charCodeAt(0);\nvar doubleQuote = '\"'.charCodeAt(0);\nvar backslash = \"\\\\\".charCodeAt(0);\nvar slash = \"/\".charCodeAt(0);\nvar comma = \",\".charCodeAt(0);\nvar colon = \":\".charCodeAt(0);\nvar star = \"*\".charCodeAt(0);\nvar uLower = \"u\".charCodeAt(0);\nvar uUpper = \"U\".charCodeAt(0);\nvar plus = \"+\".charCodeAt(0);\nvar isUnicodeRange = /^[a-f0-9?-]+$/i;\n\nmodule.exports = function(input) {\n var tokens = [];\n var value = input;\n\n var next,\n quote,\n prev,\n token,\n escape,\n escapePos,\n whitespacePos,\n parenthesesOpenPos;\n var pos = 0;\n var code = value.charCodeAt(pos);\n var max = value.length;\n var stack = [{ nodes: tokens }];\n var balanced = 0;\n var parent;\n\n var name = \"\";\n var before = \"\";\n var after = \"\";\n\n while (pos < max) {\n // Whitespaces\n if (code <= 32) {\n next = pos;\n do {\n next += 1;\n code = value.charCodeAt(next);\n } while (code <= 32);\n token = value.slice(pos, next);\n\n prev = tokens[tokens.length - 1];\n if (code === closeParentheses && balanced) {\n after = token;\n } else if (prev && prev.type === \"div\") {\n prev.after = token;\n prev.sourceEndIndex += token.length;\n } else if (\n code === comma ||\n code === colon ||\n (code === slash &&\n value.charCodeAt(next + 1) !== star &&\n (!parent ||\n (parent && parent.type === \"function\" && parent.value !== \"calc\")))\n ) {\n before = token;\n } else {\n tokens.push({\n type: \"space\",\n sourceIndex: pos,\n sourceEndIndex: next,\n value: token\n });\n }\n\n pos = next;\n\n // Quotes\n } else if (code === singleQuote || code === doubleQuote) {\n next = pos;\n quote = code === singleQuote ? \"'\" : '\"';\n token = {\n type: \"string\",\n sourceIndex: pos,\n quote: quote\n };\n do {\n escape = false;\n next = value.indexOf(quote, next + 1);\n if (~next) {\n escapePos = next;\n while (value.charCodeAt(escapePos - 1) === backslash) {\n escapePos -= 1;\n escape = !escape;\n }\n } else {\n value += quote;\n next = value.length - 1;\n token.unclosed = true;\n }\n } while (escape);\n token.value = value.slice(pos + 1, next);\n token.sourceEndIndex = token.unclosed ? next : next + 1;\n tokens.push(token);\n pos = next + 1;\n code = value.charCodeAt(pos);\n\n // Comments\n } else if (code === slash && value.charCodeAt(pos + 1) === star) {\n next = value.indexOf(\"*/\", pos);\n\n token = {\n type: \"comment\",\n sourceIndex: pos,\n sourceEndIndex: next + 2\n };\n\n if (next === -1) {\n token.unclosed = true;\n next = value.length;\n token.sourceEndIndex = next;\n }\n\n token.value = value.slice(pos + 2, next);\n tokens.push(token);\n\n pos = next + 2;\n code = value.charCodeAt(pos);\n\n // Operation within calc\n } else if (\n (code === slash || code === star) &&\n parent &&\n parent.type === \"function\" &&\n parent.value === \"calc\"\n ) {\n token = value[pos];\n tokens.push({\n type: \"word\",\n sourceIndex: pos - before.length,\n sourceEndIndex: pos + token.length,\n value: token\n });\n pos += 1;\n code = value.charCodeAt(pos);\n\n // Dividers\n } else if (code === slash || code === comma || code === colon) {\n token = value[pos];\n\n tokens.push({\n type: \"div\",\n sourceIndex: pos - before.length,\n sourceEndIndex: pos + token.length,\n value: token,\n before: before,\n after: \"\"\n });\n before = \"\";\n\n pos += 1;\n code = value.charCodeAt(pos);\n\n // Open parentheses\n } else if (openParentheses === code) {\n // Whitespaces after open parentheses\n next = pos;\n do {\n next += 1;\n code = value.charCodeAt(next);\n } while (code <= 32);\n parenthesesOpenPos = pos;\n token = {\n type: \"function\",\n sourceIndex: pos - name.length,\n value: name,\n before: value.slice(parenthesesOpenPos + 1, next)\n };\n pos = next;\n\n if (name === \"url\" && code !== singleQuote && code !== doubleQuote) {\n next -= 1;\n do {\n escape = false;\n next = value.indexOf(\")\", next + 1);\n if (~next) {\n escapePos = next;\n while (value.charCodeAt(escapePos - 1) === backslash) {\n escapePos -= 1;\n escape = !escape;\n }\n } else {\n value += \")\";\n next = value.length - 1;\n token.unclosed = true;\n }\n } while (escape);\n // Whitespaces before closed\n whitespacePos = next;\n do {\n whitespacePos -= 1;\n code = value.charCodeAt(whitespacePos);\n } while (code <= 32);\n if (parenthesesOpenPos < whitespacePos) {\n if (pos !== whitespacePos + 1) {\n token.nodes = [\n {\n type: \"word\",\n sourceIndex: pos,\n sourceEndIndex: whitespacePos + 1,\n value: value.slice(pos, whitespacePos + 1)\n }\n ];\n } else {\n token.nodes = [];\n }\n if (token.unclosed && whitespacePos + 1 !== next) {\n token.after = \"\";\n token.nodes.push({\n type: \"space\",\n sourceIndex: whitespacePos + 1,\n sourceEndIndex: next,\n value: value.slice(whitespacePos + 1, next)\n });\n } else {\n token.after = value.slice(whitespacePos + 1, next);\n token.sourceEndIndex = next;\n }\n } else {\n token.after = \"\";\n token.nodes = [];\n }\n pos = next + 1;\n token.sourceEndIndex = token.unclosed ? next : pos;\n code = value.charCodeAt(pos);\n tokens.push(token);\n } else {\n balanced += 1;\n token.after = \"\";\n token.sourceEndIndex = pos + 1;\n tokens.push(token);\n stack.push(token);\n tokens = token.nodes = [];\n parent = token;\n }\n name = \"\";\n\n // Close parentheses\n } else if (closeParentheses === code && balanced) {\n pos += 1;\n code = value.charCodeAt(pos);\n\n parent.after = after;\n parent.sourceEndIndex += after.length;\n after = \"\";\n balanced -= 1;\n stack[stack.length - 1].sourceEndIndex = pos;\n stack.pop();\n parent = stack[balanced];\n tokens = parent.nodes;\n\n // Words\n } else {\n next = pos;\n do {\n if (code === backslash) {\n next += 1;\n }\n next += 1;\n code = value.charCodeAt(next);\n } while (\n next < max &&\n !(\n code <= 32 ||\n code === singleQuote ||\n code === doubleQuote ||\n code === comma ||\n code === colon ||\n code === slash ||\n code === openParentheses ||\n (code === star &&\n parent &&\n parent.type === \"function\" &&\n parent.value === \"calc\") ||\n (code === slash &&\n parent.type === \"function\" &&\n parent.value === \"calc\") ||\n (code === closeParentheses && balanced)\n )\n );\n token = value.slice(pos, next);\n\n if (openParentheses === code) {\n name = token;\n } else if (\n (uLower === token.charCodeAt(0) || uUpper === token.charCodeAt(0)) &&\n plus === token.charCodeAt(1) &&\n isUnicodeRange.test(token.slice(2))\n ) {\n tokens.push({\n type: \"unicode-range\",\n sourceIndex: pos,\n sourceEndIndex: next,\n value: token\n });\n } else {\n tokens.push({\n type: \"word\",\n sourceIndex: pos,\n sourceEndIndex: next,\n value: token\n });\n }\n\n pos = next;\n }\n }\n\n for (pos = stack.length - 1; pos; pos -= 1) {\n stack[pos].unclosed = true;\n stack[pos].sourceEndIndex = value.length;\n }\n\n return stack[0].nodes;\n};\n","module.exports = function walk(nodes, cb, bubble) {\n var i, max, node, result;\n\n for (i = 0, max = nodes.length; i < max; i += 1) {\n node = nodes[i];\n if (!bubble) {\n result = cb(node, i, nodes);\n }\n\n if (\n result !== false &&\n node.type === \"function\" &&\n Array.isArray(node.nodes)\n ) {\n walk(node.nodes, cb, bubble);\n }\n\n if (bubble) {\n cb(node, i, nodes);\n }\n }\n};\n","function stringifyNode(node, custom) {\n var type = node.type;\n var value = node.value;\n var buf;\n var customResult;\n\n if (custom && (customResult = custom(node)) !== undefined) {\n return customResult;\n } else if (type === \"word\" || type === \"space\") {\n return value;\n } else if (type === \"string\") {\n buf = node.quote || \"\";\n return buf + value + (node.unclosed ? \"\" : buf);\n } else if (type === \"comment\") {\n return \"/*\" + value + (node.unclosed ? \"\" : \"*/\");\n } else if (type === \"div\") {\n return (node.before || \"\") + value + (node.after || \"\");\n } else if (Array.isArray(node.nodes)) {\n buf = stringify(node.nodes, custom);\n if (type !== \"function\") {\n return buf;\n }\n return (\n value +\n \"(\" +\n (node.before || \"\") +\n buf +\n (node.after || \"\") +\n (node.unclosed ? \"\" : \")\")\n );\n }\n return value;\n}\n\nfunction stringify(nodes, custom) {\n var result, i;\n\n if (Array.isArray(nodes)) {\n result = \"\";\n for (i = nodes.length - 1; ~i; i -= 1) {\n result = stringifyNode(nodes[i], custom) + result;\n }\n return result;\n }\n return stringifyNode(nodes, custom);\n}\n\nmodule.exports = stringify;\n","var minus = \"-\".charCodeAt(0);\nvar plus = \"+\".charCodeAt(0);\nvar dot = \".\".charCodeAt(0);\nvar exp = \"e\".charCodeAt(0);\nvar EXP = \"E\".charCodeAt(0);\n\n// Check if three code points would start a number\n// https://www.w3.org/TR/css-syntax-3/#starts-with-a-number\nfunction likeNumber(value) {\n var code = value.charCodeAt(0);\n var nextCode;\n\n if (code === plus || code === minus) {\n nextCode = value.charCodeAt(1);\n\n if (nextCode >= 48 && nextCode <= 57) {\n return true;\n }\n\n var nextNextCode = value.charCodeAt(2);\n\n if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) {\n return true;\n }\n\n return false;\n }\n\n if (code === dot) {\n nextCode = value.charCodeAt(1);\n\n if (nextCode >= 48 && nextCode <= 57) {\n return true;\n }\n\n return false;\n }\n\n if (code >= 48 && code <= 57) {\n return true;\n }\n\n return false;\n}\n\n// Consume a number\n// https://www.w3.org/TR/css-syntax-3/#consume-number\nmodule.exports = function(value) {\n var pos = 0;\n var length = value.length;\n var code;\n var nextCode;\n var nextNextCode;\n\n if (length === 0 || !likeNumber(value)) {\n return false;\n }\n\n code = value.charCodeAt(pos);\n\n if (code === plus || code === minus) {\n pos++;\n }\n\n while (pos < length) {\n code = value.charCodeAt(pos);\n\n if (code < 48 || code > 57) {\n break;\n }\n\n pos += 1;\n }\n\n code = value.charCodeAt(pos);\n nextCode = value.charCodeAt(pos + 1);\n\n if (code === dot && nextCode >= 48 && nextCode <= 57) {\n pos += 2;\n\n while (pos < length) {\n code = value.charCodeAt(pos);\n\n if (code < 48 || code > 57) {\n break;\n }\n\n pos += 1;\n }\n }\n\n code = value.charCodeAt(pos);\n nextCode = value.charCodeAt(pos + 1);\n nextNextCode = value.charCodeAt(pos + 2);\n\n if (\n (code === exp || code === EXP) &&\n ((nextCode >= 48 && nextCode <= 57) ||\n ((nextCode === plus || nextCode === minus) &&\n nextNextCode >= 48 &&\n nextNextCode <= 57))\n ) {\n pos += nextCode === plus || nextCode === minus ? 3 : 2;\n\n while (pos < length) {\n code = value.charCodeAt(pos);\n\n if (code < 48 || code > 57) {\n break;\n }\n\n pos += 1;\n }\n }\n\n return {\n number: value.slice(0, pos),\n unit: value.slice(pos)\n };\n};\n","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nvar Platform = {\n OS: 'web',\n select: obj => 'web' in obj ? obj.web : obj.default,\n get isTesting() {\n if (process.env.NODE_ENV === 'test') {\n return true;\n }\n return false;\n }\n};\nexport default Platform;","// import 'core-js/stable';\nimport '@expo/metro-runtime';\nimport 'regenerator-runtime/runtime';\nimport useLoadAssets from './src/hooks/useLoadAssets';\nimport { ResetAppProvider } from './src/components/ResetAppProvider';\nimport { useEnvironment } from './src/hooks/useEnvironment';\nimport PrimaryRecordApp from './src/PrimaryRecordApp';\nimport { handle1UpHealthRedirect } from './src/utils/handle1UpHealthRedirect';\nimport { hideConsoleErrors } from './src/utils/hideConsoleErrors';\nimport { initPendo } from './src/utils/initPendo';\nimport { Platform, View } from 'react-native';\nimport React, { useEffect } from 'react';\nimport * as SplashScreen from 'expo-splash-screen';\n\n// reduce console noise of known and uncontrollable issues\nhideConsoleErrors();\n\nif (Platform.OS === 'web') {\n initPendo();\n}\n\nif (Platform.OS !== 'web') {\n // Keep the splash screen visible while we fetch resources\n SplashScreen.preventAutoHideAsync();\n\n // Set the animation options. This is optional.\n SplashScreen.setOptions({\n duration: 500,\n fade: true,\n });\n}\n\nconst blockAppLoadForOneUpHealthRedirect = handle1UpHealthRedirect().shouldBlockAppLoad;\n\nfunction App() {\n const { isAssetLoadComplete } = useLoadAssets();\n const environment = useEnvironment();\n const appStillPending = !isAssetLoadComplete || environment === 'loading' || blockAppLoadForOneUpHealthRedirect;\n\n if (appStillPending) return null;\n\n const onLayoutRootView = () => {\n if (Platform.OS !== 'web') {\n SplashScreen.hide();\n }\n };\n\n return (\n \n \n \n \n \n );\n}\n\nexport default App;\n","/**\n * Copyright © 2023 650 Industries.\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\nimport './location/install';\n// IMPORT POSITION MATTERS FOR FAST REFRESH ON WEB\nimport './effects';\n// vvv EVERYTHING ELSE vvv\nimport './async-require';\n\nimport '@expo/metro-runtime/rsc/virtual';\nimport '@expo/metro-runtime/rsc/runtime';\n","","// Only during development.\nif (process.env.NODE_ENV !== 'production') {\n if (\n // Disable for SSR\n typeof window !== 'undefined'\n ) {\n require('./setupFastRefresh');\n require('./setupHMR');\n require('./messageSocket');\n }\n}\n","/**\n * Copyright © 2024 650 Industries.\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 */\nimport { buildAsyncRequire } from './buildAsyncRequire';\n\nglobal[`${global.__METRO_GLOBAL_PREFIX__ ?? ''}__loadBundleAsync`] = buildAsyncRequire();\n","/**\n * Copyright © 2022 650 Industries.\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\nimport { loadBundleAsync } from './loadBundle';\n\n/**\n * Must satisfy the requirements of the Metro bundler.\n * https://github.com/react-native-community/discussions-and-proposals/blob/main/proposals/0605-lazy-bundling.md#__loadbundleasync-in-metro\n */\ntype AsyncRequire = (path: string) => Promise;\n\n/** Create an `loadBundleAsync` function in the expected shape for Metro bundler. */\nexport function buildAsyncRequire(): AsyncRequire {\n const cache = new Map>();\n\n return async function universal_loadBundleAsync(path: string): Promise {\n if (cache.has(path)) {\n return cache.get(path)!;\n }\n\n const promise = loadBundleAsync(path).catch((error) => {\n cache.delete(path);\n throw error;\n });\n\n cache.set(path, promise);\n\n return promise;\n };\n}\n","/**\n * Copyright © 2022 650 Industries.\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 */\nimport { buildUrlForBundle } from './buildUrlForBundle';\nimport { fetchThenEvalAsync } from './fetchThenEval';\n\n/**\n * Load a bundle for a URL using fetch + eval on native and script tag injection on web.\n *\n * @param bundlePath Given a statement like `import('./Bacon')` `bundlePath` would be `Bacon.bundle?params=from-metro`.\n */\nexport async function loadBundleAsync(bundlePath: string): Promise {\n const requestUrl = buildUrlForBundle(bundlePath);\n\n if (process.env.NODE_ENV === 'production') {\n return fetchThenEvalAsync(requestUrl);\n } else {\n return fetchThenEvalAsync(requestUrl).then(() => {\n const HMRClient = require('../HMRClient').default as typeof import('../HMRClient').default;\n HMRClient.registerBundle(requestUrl);\n });\n }\n}\n","/**\n * Copyright © 2022 650 Industries.\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/**\n * Given a path and some optional additional query parameters, create the dev server bundle URL.\n * @param bundlePath like `/foobar`\n * @param params like `{ platform: \"web\" }`\n * @returns a URL like \"/foobar.bundle?platform=android&modulesOnly=true&runModule=false&runtimeBytecodeVersion=null\"\n */\nexport function buildUrlForBundle(bundlePath: string): string {\n if (bundlePath.match(/^https?:\\/\\//)) {\n return bundlePath;\n }\n\n if (\n // @ts-expect-error\n typeof window.ReactNativeWebView !== 'undefined'\n ) {\n // In a webview, you cannot read from an absolute path.\n return bundlePath;\n }\n // NOTE(EvanBacon): This must come from the window origin (at least in dev mode).\n // Otherwise Metro will crash from attempting to load a bundle that doesn't exist.\n return '/' + bundlePath.replace(/^\\/+/, '');\n}\n","/**\n * Copyright © 2022 650 Industries.\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\nconst currentSrc =\n typeof document !== 'undefined' && document.currentScript\n ? ('src' in document.currentScript && document.currentScript.src) || null\n : null;\n\n// Basically `__webpack_require__.l`.\nexport function fetchThenEvalAsync(\n url: string,\n {\n scriptType,\n nonce,\n crossOrigin,\n }: { scriptType?: string; nonce?: string; crossOrigin?: string } = {}\n): Promise {\n if (\n typeof window === 'undefined' ||\n // In development, use the fetch/eval method to detect the server error codes and parse bundler errors for the error overlay.\n __DEV__\n ) {\n return require('./fetchThenEvalJs').fetchThenEvalAsync(url);\n }\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n if (scriptType) script.type = scriptType;\n if (nonce) script.setAttribute('nonce', nonce);\n // script.setAttribute('data-expo-metro', ...);\n script.src = url;\n\n if (crossOrigin && script.src.indexOf(window.location.origin + '/') !== 0) {\n script.crossOrigin = crossOrigin;\n }\n\n script.onload = () => {\n script.parentNode && script.parentNode.removeChild(script);\n resolve();\n };\n // Create a new error object to preserve the original stack trace.\n const error = new AsyncRequireError();\n\n // Server error or network error.\n script.onerror = (ev) => {\n let event: Event;\n\n if (typeof ev === 'string') {\n event = {\n type: 'error',\n target: {\n // @ts-expect-error\n src: event,\n },\n };\n } else {\n event = ev;\n }\n\n const errorType = event && (event.type === 'load' ? 'missing' : event.type);\n // @ts-expect-error\n const realSrc = event?.target?.src;\n\n error.message = 'Loading module ' + url + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n error.type = errorType;\n error.request = realSrc;\n\n script.parentNode && script.parentNode.removeChild(script);\n reject(error);\n };\n\n if (script.src === currentSrc) {\n // NOTE(kitten): We always prevent `fetchThenEval` from loading the \"current script\".\n // This points at our entrypoint bundle, and we should never reload and reevaluate the\n // entrypoint bundle\n resolve();\n } else {\n document.head.appendChild(script);\n }\n });\n}\n\nclass AsyncRequireError extends Error {\n readonly name = 'AsyncRequireError';\n type?: string;\n request?: string;\n}\n","// The contents of this file are added in Metro.\n","/**\n * Copyright © 2024 650 Industries.\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// React Native's error handling is full of bugs which cause the app to crash in production.\n// We'll disable their handling in production native builds to ensure missing modules are shown to the user.\nconst disableReactNativeMissingModuleHandling =\n !__DEV__ && (process.env.EXPO_OS !== 'web' || typeof window === 'undefined');\n\nglobalThis.__webpack_chunk_load__ = (id) => {\n return global[`${__METRO_GLOBAL_PREFIX__}__loadBundleAsync`](id);\n};\n\nglobalThis.__webpack_require__ = (id) => {\n // This logic can be tested by running a production iOS build without virtual client boundaries. This will result in all split chunks being missing and\n // errors being thrown on RSC load.\n\n const original = ErrorUtils.reportFatalError;\n if (disableReactNativeMissingModuleHandling) {\n ErrorUtils.reportFatalError = (err) => {\n // Throw the error so the __r function exits as expected. The error will then be caught by the nearest error boundary.\n throw err;\n };\n }\n try {\n return global[`${__METRO_GLOBAL_PREFIX__}__r`](id);\n } finally {\n // Restore the original error handling.\n if (disableReactNativeMissingModuleHandling) {\n ErrorUtils.reportFatalError = original;\n }\n }\n};\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\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; };\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n defineProperty(generator, \"_invoke\", { value: makeInvokeMethod(innerFn, self, context) });\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n defineProperty(Gp, \"constructor\", { value: GeneratorFunctionPrototype, configurable: true });\n defineProperty(\n GeneratorFunctionPrototype,\n \"constructor\",\n { value: GeneratorFunction, configurable: true }\n );\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n defineProperty(this, \"_invoke\", { value: enqueue });\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per GeneratorResume behavior specified since ES2015:\n // ES2015 spec, step 3: https://262.ecma-international.org/6.0/#sec-generatorresume\n // Latest spec, step 2: https://tc39.es/ecma262/#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var methodName = context.method;\n var method = delegate.iterator[methodName];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method, or a missing .next method, always terminate the\n // yield* loop.\n context.delegate = null;\n\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (methodName === \"throw\" && delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n if (methodName !== \"return\") {\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a '\" + methodName + \"' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(val) {\n var object = Object(val);\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable != null) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n throw new TypeError(typeof iterable + \" is not iterable\");\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","import { useFonts } from 'expo-font';\n\nexport type UseLoadAssetsReturnValue = {\n isAssetLoadComplete: boolean;\n};\n\nexport type FontWeight = 'light' | 'regular' | 'bold' | 'extrabold' | 'medium' | 'semi-bold';\nexport type FontFamilyNames =\n | 'OverpassRegular'\n | 'OverpassMedium'\n | 'OverpassBold'\n | 'OverpassSemibold'\n | 'OverpassLight'\n | 'OverpassExtraBold'\n | 'SuisseWorksBold';\nexport type FontFamily = 'Overpass' | 'SuisseWorks';\n\n/*\n Overpass does not center font vertically correctly on some browsers (such as Chrome on Windows). If the font needs to be changed for\n whatever reason, download the font, upload the files to https://transfonter.org/, and run a conversion. When converting toggle \"Fix vertical metrics\" to \"On\".\n This corrects the vertical alignment issue.\n*/\nexport const fontWeightToFontFamilyName: Record> = {\n Overpass: {\n light: 'OverpassLight',\n regular: 'OverpassRegular',\n medium: 'OverpassMedium',\n 'semi-bold': 'OverpassSemibold',\n bold: 'OverpassBold',\n extrabold: 'OverpassExtraBold',\n },\n SuisseWorks: {\n // For now, we only need bold, but make TS happy\n bold: 'SuisseWorksBold',\n light: 'SuisseWorksBold',\n regular: 'SuisseWorksBold',\n medium: 'SuisseWorksBold',\n 'semi-bold': 'SuisseWorksBold',\n extrabold: 'SuisseWorksBold',\n },\n};\nexport default function useLoadAssets(): UseLoadAssetsReturnValue {\n const [fontsLoaded] = useFonts({\n // OverpassLight: require('../assets/fonts/overpass-light.otf'),\n OverpassRegular: require('../assets/fonts/Overpass-Regular.ttf'),\n OverpassMedium: require('../assets/fonts/Overpass-Medium.ttf'),\n OverpassBold: require('../assets/fonts/Overpass-Bold.ttf'),\n OverpassSemibold: require('../assets/fonts/Overpass-SemiBold.ttf'),\n OverpassExtraBold: require('../assets/fonts/Overpass-ExtraBold.ttf'),\n SuisseWorksBold: require('../assets/fonts/suisseworks-bold.otf'),\n });\n\n return {\n isAssetLoadComplete: fontsLoaded,\n };\n}\n","export * from './Font';\nexport { useFonts } from './FontHooks';\n//# sourceMappingURL=index.js.map","import { CodedError, Platform, UnavailabilityError } from 'expo-modules-core';\nimport ExpoFontLoader from './ExpoFontLoader';\nimport { FontDisplay } from './Font.types';\nimport { getAssetForSource, loadSingleFontAsync } from './FontLoader';\nimport { isLoadedInCache, isLoadedNative, loadPromises, markLoaded, purgeCache, purgeFontFamilyFromCache, } from './memory';\nimport { registerStaticFont } from './server';\n// @needsAudit\n/**\n * Synchronously detect if the font for `fontFamily` has finished loading.\n *\n * @param fontFamily The name used to load the `FontResource`.\n * @return Returns `true` if the font has fully loaded.\n */\nexport function isLoaded(fontFamily) {\n if (Platform.OS === 'web') {\n return isLoadedInCache(fontFamily) || !!ExpoFontLoader.isLoaded(fontFamily);\n }\n return isLoadedNative(fontFamily);\n}\n/**\n * Synchronously get all the fonts that have been loaded.\n * This includes fonts that were bundled at build time using the config plugin, as well as those loaded at runtime using `loadAsync`.\n *\n * @returns Returns array of strings which you can use as `fontFamily` [style prop](https://reactnative.dev/docs/text#style).\n */\nexport function getLoadedFonts() {\n return ExpoFontLoader.getLoadedFonts();\n}\n// @needsAudit\n/**\n * Synchronously detect if the font for `fontFamily` is still being loaded.\n *\n * @param fontFamily The name used to load the `FontResource`.\n * @returns Returns `true` if the font is still loading.\n */\nexport function isLoading(fontFamily) {\n return fontFamily in loadPromises;\n}\n// @needsAudit\n/**\n * An efficient method for loading fonts from static or remote resources which can then be used\n * with the platform's native text elements. In the browser, this generates a `@font-face` block in\n * a shared style sheet for fonts. No CSS is needed to use this method.\n *\n * > **Note**: We recommend using the [config plugin](#configuration-in-appjsonappconfigjs) instead whenever possible.\n *\n * @param fontFamilyOrFontMap String or map of values that can be used as the `fontFamily` [style prop](https://reactnative.dev/docs/text#style)\n * with React Native `Text` elements.\n * @param source The font asset that should be loaded into the `fontFamily` namespace.\n *\n * @return Returns a promise that fulfils when the font has loaded. Often you may want to wrap the\n * method in a `try/catch/finally` to ensure the app continues if the font fails to load.\n */\nexport function loadAsync(fontFamilyOrFontMap, source) {\n // NOTE(EvanBacon): Static render pass on web must be synchronous to collect all fonts.\n // Because of this, `loadAsync` doesn't use the `async` keyword and deviates from the\n // standard Expo SDK style guide.\n const isServer = Platform.OS === 'web' && typeof window === 'undefined';\n if (typeof fontFamilyOrFontMap === 'object') {\n if (source) {\n return Promise.reject(new CodedError(`ERR_FONT_API`, `No fontFamily can be used for the provided source: ${source}. The second argument of \\`loadAsync()\\` can only be used with a \\`string\\` value as the first argument.`));\n }\n const fontMap = fontFamilyOrFontMap;\n const names = Object.keys(fontMap);\n if (isServer) {\n names.map((name) => registerStaticFont(name, fontMap[name]));\n return Promise.resolve();\n }\n return Promise.all(names.map((name) => loadFontInNamespaceAsync(name, fontMap[name]))).then(() => { });\n }\n if (isServer) {\n registerStaticFont(fontFamilyOrFontMap, source);\n return Promise.resolve();\n }\n return loadFontInNamespaceAsync(fontFamilyOrFontMap, source);\n}\nasync function loadFontInNamespaceAsync(fontFamily, source) {\n if (!source) {\n throw new CodedError(`ERR_FONT_SOURCE`, `Cannot load null or undefined font source: { \"${fontFamily}\": ${source} }. Expected asset of type \\`FontSource\\` for fontFamily of name: \"${fontFamily}\"`);\n }\n // we consult the native module to see if the font is already loaded\n // this is slower than checking the cache but can help avoid loading the same font n times\n if (isLoaded(fontFamily)) {\n return;\n }\n if (loadPromises.hasOwnProperty(fontFamily)) {\n return loadPromises[fontFamily];\n }\n // Important: we want all callers that concurrently try to load the same font to await the same\n // promise. If we're here, we haven't created the promise yet. To ensure we create only one\n // promise in the program, we need to create the promise synchronously without yielding the event\n // loop from this point.\n const asset = getAssetForSource(source);\n loadPromises[fontFamily] = (async () => {\n try {\n await loadSingleFontAsync(fontFamily, asset);\n markLoaded(fontFamily);\n }\n finally {\n delete loadPromises[fontFamily];\n }\n })();\n await loadPromises[fontFamily];\n}\n// @needsAudit\n/**\n * Unloads all the custom fonts. This is used for testing.\n * @hidden\n */\nexport async function unloadAllAsync() {\n if (!ExpoFontLoader.unloadAllAsync) {\n throw new UnavailabilityError('expo-font', 'unloadAllAsync');\n }\n if (Object.keys(loadPromises).length) {\n throw new CodedError(`ERR_UNLOAD`, `Cannot unload fonts while they're still loading: ${Object.keys(loadPromises).join(', ')}`);\n }\n purgeCache();\n await ExpoFontLoader.unloadAllAsync();\n}\n// @needsAudit\n/**\n * Unload custom fonts matching the `fontFamily`s and display values provided.\n * This is used for testing.\n *\n * @param fontFamilyOrFontMap The name or names of the custom fonts that will be unloaded.\n * @param options When `fontFamilyOrFontMap` is a string, this should be the font source used to load\n * the custom font originally.\n * @hidden\n */\nexport async function unloadAsync(fontFamilyOrFontMap, options) {\n if (!ExpoFontLoader.unloadAsync) {\n throw new UnavailabilityError('expo-font', 'unloadAsync');\n }\n if (typeof fontFamilyOrFontMap === 'object') {\n if (options) {\n throw new CodedError(`ERR_FONT_API`, `No fontFamily can be used for the provided options: ${options}. The second argument of \\`unloadAsync()\\` can only be used with a \\`string\\` value as the first argument.`);\n }\n const fontMap = fontFamilyOrFontMap;\n const names = Object.keys(fontMap);\n await Promise.all(names.map((name) => unloadFontInNamespaceAsync(name, fontMap[name])));\n return;\n }\n return await unloadFontInNamespaceAsync(fontFamilyOrFontMap, options);\n}\nasync function unloadFontInNamespaceAsync(fontFamily, options) {\n if (!isLoaded(fontFamily)) {\n return;\n }\n else {\n purgeFontFamilyFromCache(fontFamily);\n }\n // Important: we want all callers that concurrently try to load the same font to await the same\n // promise. If we're here, we haven't created the promise yet. To ensure we create only one\n // promise in the program, we need to create the promise synchronously without yielding the event\n // loop from this point.\n if (!fontFamily) {\n throw new CodedError(`ERR_FONT_FAMILY`, `Cannot unload an empty name`);\n }\n await ExpoFontLoader.unloadAsync(fontFamily, options);\n}\nexport { FontDisplay };\n//# sourceMappingURL=Font.js.map","import EventEmitter, { type EventSubscription } from './EventEmitter';\nimport { LegacyEventEmitter } from './LegacyEventEmitter';\nimport NativeModule from './NativeModule';\nimport NativeModulesProxy from './NativeModulesProxy';\nimport type { ProxyNativeModule } from './NativeModulesProxy.types';\nimport { requireNativeViewManager } from './NativeViewManagerAdapter';\nimport Platform from './Platform';\nimport SharedObject from './SharedObject';\nimport SharedRef from './SharedRef';\nimport { CodedError } from './errors/CodedError';\nimport { UnavailabilityError } from './errors/UnavailabilityError';\n\nimport './sweet/setUpErrorManager.fx';\nimport './web/index';\n\nexport type * from './ts-declarations/global';\n\nexport { default as uuid } from './uuid';\n\nexport {\n ProxyNativeModule,\n Platform,\n requireNativeViewManager,\n // Globals\n EventEmitter,\n SharedObject,\n SharedRef,\n NativeModule,\n // Errors\n CodedError,\n UnavailabilityError,\n // Types\n EventSubscription,\n // Deprecated\n NativeModulesProxy,\n LegacyEventEmitter,\n};\n\nexport * from './requireNativeModule';\nexport * from './registerWebModule';\nexport * from './TypedArrays.types';\n\nexport * from './PermissionsInterface';\nexport * from './PermissionsHook';\n\nexport * from './Refs';\n\nexport * from './hooks/useReleasingSharedObject';\nexport * from './reload';\n","'use client';\n\nimport { ensureNativeModulesAreInstalled } from './ensureNativeModulesAreInstalled';\nimport type { EventEmitter, EventSubscription } from './ts-declarations/EventEmitter';\n\nensureNativeModulesAreInstalled();\n\nexport { type EventSubscription };\nexport default globalThis.expo.EventEmitter as typeof EventEmitter;\n","import { NativeModules, Platform } from 'react-native';\n\nimport { registerWebGlobals } from './web/index';\n\n/**\n * Ensures that the native modules are installed in the current runtime.\n * Otherwise, it synchronously calls a native function that installs them.\n */\nexport function ensureNativeModulesAreInstalled(): void {\n if (globalThis.expo) {\n return;\n }\n try {\n if (Platform.OS === 'web') {\n // Requiring web folder sets up the `globalThis.expo` object.\n registerWebGlobals();\n } else {\n // TODO: ExpoModulesCore shouldn't be optional here,\n // but to keep backwards compatibility let's just ignore it in SDK 50.\n // In most cases the modules were already installed from the native side.\n NativeModules.ExpoModulesCore?.installModules();\n }\n } catch (error) {\n console.error(`Unable to install Expo modules: ${error}`);\n }\n}\n","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nimport UIManager from '../UIManager';\n\n// NativeModules shim\nvar NativeModules = {\n UIManager\n};\nexport default NativeModules;","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nimport getBoundingClientRect from '../../modules/getBoundingClientRect';\nimport setValueForStyles from '../../modules/setValueForStyles';\nvar getRect = node => {\n var height = node.offsetHeight;\n var width = node.offsetWidth;\n var left = node.offsetLeft;\n var top = node.offsetTop;\n node = node.offsetParent;\n while (node && node.nodeType === 1 /* Node.ELEMENT_NODE */) {\n left += node.offsetLeft + node.clientLeft - node.scrollLeft;\n top += node.offsetTop + node.clientTop - node.scrollTop;\n node = node.offsetParent;\n }\n top -= window.scrollY;\n left -= window.scrollX;\n return {\n width,\n height,\n top,\n left\n };\n};\nvar measureLayout = (node, relativeToNativeNode, callback) => {\n var relativeNode = relativeToNativeNode || node && node.parentNode;\n if (node && relativeNode) {\n setTimeout(() => {\n if (node.isConnected && relativeNode.isConnected) {\n var relativeRect = getRect(relativeNode);\n var _getRect = getRect(node),\n height = _getRect.height,\n left = _getRect.left,\n top = _getRect.top,\n width = _getRect.width;\n var x = left - relativeRect.left;\n var y = top - relativeRect.top;\n callback(x, y, width, height, left, top);\n }\n }, 0);\n }\n};\nvar elementsToIgnore = {\n A: true,\n BODY: true,\n INPUT: true,\n SELECT: true,\n TEXTAREA: true\n};\nvar UIManager = {\n blur(node) {\n try {\n node.blur();\n } catch (err) {}\n },\n focus(node) {\n try {\n var name = node.nodeName;\n // A tabIndex of -1 allows element to be programmatically focused but\n // prevents keyboard focus. We don't want to set the tabindex value on\n // elements that should not prevent keyboard focus.\n if (node.getAttribute('tabIndex') == null && node.isContentEditable !== true && elementsToIgnore[name] == null) {\n node.setAttribute('tabIndex', '-1');\n }\n node.focus();\n } catch (err) {}\n },\n measure(node, callback) {\n measureLayout(node, null, callback);\n },\n measureInWindow(node, callback) {\n if (node) {\n setTimeout(() => {\n var _getBoundingClientRec = getBoundingClientRect(node),\n height = _getBoundingClientRec.height,\n left = _getBoundingClientRec.left,\n top = _getBoundingClientRec.top,\n width = _getBoundingClientRec.width;\n callback(left, top, width, height);\n }, 0);\n }\n },\n measureLayout(node, relativeToNativeNode, onFail, onSuccess) {\n measureLayout(node, relativeToNativeNode, onSuccess);\n },\n updateView(node, props) {\n for (var prop in props) {\n if (!Object.prototype.hasOwnProperty.call(props, prop)) {\n continue;\n }\n var value = props[prop];\n switch (prop) {\n case 'style':\n {\n setValueForStyles(node, value);\n break;\n }\n case 'class':\n case 'className':\n {\n node.setAttribute('class', value);\n break;\n }\n case 'text':\n case 'value':\n // native platforms use `text` prop to replace text input value\n node.value = value;\n break;\n default:\n node.setAttribute(prop, value);\n }\n }\n },\n configureNextLayoutAnimation(config, onAnimationDidEnd) {\n onAnimationDidEnd();\n },\n // mocks\n setLayoutAnimationEnabledExperimental() {}\n};\nexport default UIManager;","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nvar getBoundingClientRect = node => {\n if (node != null) {\n var isElement = node.nodeType === 1; /* Node.ELEMENT_NODE */\n if (isElement && typeof node.getBoundingClientRect === 'function') {\n return node.getBoundingClientRect();\n }\n }\n};\nexport default getBoundingClientRect;","/* eslint-disable */\n\n/**\n * Copyright (c) Meta Platforms, Inc. and 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 * From React 16.3.0\n * \n */\n\nimport dangerousStyleValue from './dangerousStyleValue';\n\n/**\n * Sets the value for multiple styles on a node. If a value is specified as\n * '' (empty string), the corresponding style property will be unset.\n *\n * @param {DOMElement} node\n * @param {object} styles\n */\nfunction setValueForStyles(node, styles) {\n var style = node.style;\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n var isCustomProperty = styleName.indexOf('--') === 0;\n var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);\n if (styleName === 'float') {\n styleName = 'cssFloat';\n }\n if (isCustomProperty) {\n style.setProperty(styleName, styleValue);\n } else {\n style[styleName] = styleValue;\n }\n }\n}\nexport default setValueForStyles;","/* eslint-disable */\n\n/**\n * Copyright (c) Meta Platforms, Inc. and 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 * From React 16.0.0\n * \n */\n\nimport isUnitlessNumber from '../unitlessNumbers';\n\n/**\n * Convert a value into the proper css writable value. The style name `name`\n * should be logical (no hyphens), as specified\n * in `CSSProperty.isUnitlessNumber`.\n *\n * @param {string} name CSS property name such as `topMargin`.\n * @param {*} value CSS property value such as `10px`.\n * @return {string} Normalized style value with dimensions applied.\n */\nfunction dangerousStyleValue(name, value, isCustomProperty) {\n // Note that we've removed escapeTextForBrowser() calls here since the\n // whole string will be escaped when the attribute is injected into\n // the markup. If you provide unsafe user data here they can inject\n // arbitrary CSS which may be problematic (I couldn't repro this):\n // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet\n // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/\n // This is not an XSS hole but instead a potential CSS injection issue\n // which has lead to a greater discussion about how we're going to\n // trust URLs moving forward. See #2115901\n\n var isEmpty = value == null || typeof value === 'boolean' || value === '';\n if (isEmpty) {\n return '';\n }\n if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {\n return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers\n }\n return ('' + value).trim();\n}\nexport default dangerousStyleValue;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nvar unitlessNumbers = {\n animationIterationCount: true,\n aspectRatio: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n boxFlex: true,\n boxFlexGroup: true,\n boxOrdinalGroup: true,\n columnCount: true,\n flex: true,\n flexGrow: true,\n flexOrder: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n fontWeight: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowGap: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnGap: true,\n gridColumnStart: true,\n lineClamp: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n // SVG-related\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true,\n // transform types\n scale: true,\n scaleX: true,\n scaleY: true,\n scaleZ: true,\n // RN properties\n shadowOpacity: true\n};\n\n/**\n * Support style names that may come passed in prefixed by adding permutations\n * of vendor prefixes.\n */\nvar prefixes = ['ms', 'Moz', 'O', 'Webkit'];\nvar prefixKey = (prefix, key) => {\n return prefix + key.charAt(0).toUpperCase() + key.substring(1);\n};\nObject.keys(unitlessNumbers).forEach(prop => {\n prefixes.forEach(prefix => {\n unitlessNumbers[prefixKey(prefix, prop)] = unitlessNumbers[prop];\n });\n});\nexport default unitlessNumbers;","import { EventEmitter, NativeModule, SharedObject, SharedRef } from './CoreModule';\nimport uuid from '../uuid';\n\n// jest-expo imports to this file directly without going through the global types\n// Exporting the types to let jest-expo to know the globalThis types\nexport * from '../ts-declarations/global';\n\nexport function registerWebGlobals() {\n if (globalThis.expo) return;\n globalThis.expo = {\n EventEmitter,\n NativeModule,\n SharedObject,\n SharedRef,\n modules: globalThis.ExpoDomWebView?.expoModulesProxy ?? {},\n uuidv4: uuid.v4,\n uuidv5: uuid.v5,\n getViewConfig: () => {\n throw new Error('Method not implemented.');\n },\n reloadAppAsync: async () => {\n window.location.reload();\n },\n };\n}\n\nregisterWebGlobals();\n","import type {\n EventEmitter as EventEmitterType,\n EventSubscription,\n EventsMap,\n} from '../ts-declarations/EventEmitter';\nimport type { NativeModule as NativeModuleType } from '../ts-declarations/NativeModule';\nimport type { SharedObject as SharedObjectType } from '../ts-declarations/SharedObject';\nimport type { SharedRef as SharedRefType } from '../ts-declarations/SharedRef';\n\nexport class EventEmitter implements EventEmitterType {\n private listeners?: Map>;\n\n addListener(\n eventName: EventName,\n listener: TEventsMap[EventName]\n ): EventSubscription {\n if (!this.listeners) {\n this.listeners = new Map();\n }\n if (!this.listeners?.has(eventName)) {\n this.listeners?.set(eventName, new Set());\n }\n\n const previousListenerCount = this.listenerCount(eventName);\n\n this.listeners?.get(eventName)?.add(listener);\n\n if (previousListenerCount === 0 && this.listenerCount(eventName) === 1) {\n this.startObserving(eventName);\n }\n\n return {\n remove: () => {\n this.removeListener(eventName, listener);\n },\n };\n }\n\n removeListener(\n eventName: EventName,\n listener: TEventsMap[EventName]\n ): void {\n const hasRemovedListener = this.listeners?.get(eventName)?.delete(listener);\n if (this.listenerCount(eventName) === 0 && hasRemovedListener) {\n this.stopObserving(eventName);\n }\n }\n\n removeAllListeners(eventName: EventName): void {\n const previousListenerCount = this.listenerCount(eventName);\n this.listeners?.get(eventName)?.clear();\n if (previousListenerCount > 0) {\n this.stopObserving(eventName);\n }\n }\n\n emit(\n eventName: EventName,\n ...args: Parameters\n ): void {\n const listeners = new Set(this.listeners?.get(eventName));\n\n listeners.forEach((listener) => {\n // When the listener throws an error, don't stop the execution of subsequent listeners and\n // don't propagate the error to the `emit` function. The motivation behind this is that\n // errors thrown from a module or user's code shouldn't affect other modules' behavior.\n try {\n listener(...args);\n } catch (error) {\n console.error(error);\n }\n });\n }\n\n listenerCount(eventName: EventName): number {\n return this.listeners?.get(eventName)?.size ?? 0;\n }\n\n startObserving(eventName: EventName): void {}\n\n stopObserving(eventName: EventName): void {}\n}\n\nexport class NativeModule>\n extends EventEmitter\n implements NativeModuleType\n{\n [key: string]: any;\n ViewPrototype?: object | undefined;\n __expo_module_name__?: string;\n}\n\nexport class SharedObject>\n extends EventEmitter\n implements SharedObjectType\n{\n release(): void {\n // no-op on Web, but subclasses can override it if needed.\n }\n}\n\nexport class SharedRef<\n TNativeRefType extends string = 'unknown',\n TEventsMap extends EventsMap = Record,\n >\n extends SharedObject\n implements SharedRefType\n{\n nativeRefType: string = 'unknown';\n}\n","export { default } from './uuid';\n","import sha1 from './lib/sha1';\nimport v35 from './lib/v35';\nimport { UUID, Uuidv5Namespace } from './uuid.types';\n\nfunction uuidv4(): string {\n if (\n // We use this code path in jest-expo.\n process.env.NODE_ENV === 'test' ||\n // Node.js has supported global crypto since v15.\n (typeof crypto === 'undefined' &&\n // Only use abstract imports in server environments.\n typeof window === 'undefined')\n ) {\n // NOTE: Metro statically extracts all `require` statements to resolve them for environments\n // that don't support `require` natively. Here we check if we're running in a server environment\n // by using the standard `typeof window` check, then running `eval` to skip Metro's static\n // analysis and keep the `require` statement intact for runtime evaluation.\n // eslint-disable-next-line no-eval\n return eval('require')('node:crypto').randomUUID();\n }\n\n return crypto.randomUUID();\n}\n\nconst uuid: UUID = {\n v4: uuidv4,\n v5: v35('v5', 0x50, sha1),\n namespace: Uuidv5Namespace,\n};\n\nexport default uuid;\n","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\n'use strict';\n\nfunction f(s: number, x: number, y: number, z: number) {\n switch (s) {\n case 0:\n return (x & y) ^ (~x & z);\n case 1:\n return x ^ y ^ z;\n case 2:\n return (x & y) ^ (x & z) ^ (y & z);\n case 3:\n return x ^ y ^ z;\n default:\n return 0;\n }\n}\n\nfunction ROTL(x: number, n: number) {\n return (x << n) | (x >>> (32 - n));\n}\n\nfunction sha1(bytes: number[] | string) {\n const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes == 'string') {\n const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n bytes = new Array(msg.length);\n for (let i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i);\n }\n\n bytes.push(0x80);\n\n const l = bytes.length / 4 + 2;\n const N = Math.ceil(l / 16);\n const M = new Array(N);\n\n for (let i = 0; i < N; i++) {\n M[i] = new Array(16);\n for (let j = 0; j < 16; j++) {\n M[i][j] =\n (bytes[i * 64 + j * 4] << 24) |\n (bytes[i * 64 + j * 4 + 1] << 16) |\n (bytes[i * 64 + j * 4 + 2] << 8) |\n bytes[i * 64 + j * 4 + 3];\n }\n }\n\n M[N - 1][14] = ((bytes.length - 1) * 8) / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = ((bytes.length - 1) * 8) & 0xffffffff;\n\n for (let i = 0; i < N; i++) {\n const W = new Array(80);\n\n for (let t = 0; t < 16; t++) W[t] = M[i][t];\n for (let t = 16; t < 80; t++) {\n W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);\n }\n\n let a = H[0];\n let b = H[1];\n let c = H[2];\n let d = H[3];\n let e = H[4];\n\n for (let t = 0; t < 80; t++) {\n const s = Math.floor(t / 20);\n const T = (ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t]) >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = (H[0] + a) >>> 0;\n H[1] = (H[1] + b) >>> 0;\n H[2] = (H[2] + c) >>> 0;\n H[3] = (H[3] + d) >>> 0;\n H[4] = (H[4] + e) >>> 0;\n }\n\n return [\n (H[0] >> 24) & 0xff,\n (H[0] >> 16) & 0xff,\n (H[0] >> 8) & 0xff,\n H[0] & 0xff,\n (H[1] >> 24) & 0xff,\n (H[1] >> 16) & 0xff,\n (H[1] >> 8) & 0xff,\n H[1] & 0xff,\n (H[2] >> 24) & 0xff,\n (H[2] >> 16) & 0xff,\n (H[2] >> 8) & 0xff,\n H[2] & 0xff,\n (H[3] >> 24) & 0xff,\n (H[3] >> 16) & 0xff,\n (H[3] >> 8) & 0xff,\n H[3] & 0xff,\n (H[4] >> 24) & 0xff,\n (H[4] >> 16) & 0xff,\n (H[4] >> 8) & 0xff,\n H[4] & 0xff,\n ];\n}\n\nexport default sha1;\n","import bytesToUuid from './bytesToUuid';\n\nfunction uuidToBytes(uuid: string) {\n // Note: We assume we're being passed a valid uuid string\n const bytes: number[] = [];\n uuid.replace(/[a-fA-F0-9]{2}/g, (hex: string) => {\n bytes.push(parseInt(hex, 16));\n return '';\n });\n\n return bytes;\n}\n\nfunction stringToBytes(str: string) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n const bytes: number[] = new Array(str.length);\n for (let i = 0; i < str.length; i++) {\n bytes[i] = str.charCodeAt(i);\n }\n return bytes;\n}\n\nexport default function (\n name: string,\n version: number,\n hashfunc: (bytes: number[] | string) => number[]\n) {\n const generateUUID = function (\n value: number[] | string,\n namespace: number[] | string,\n buf?: number[],\n offset?: number\n ): string {\n const off = (buf && offset) || 0;\n\n if (typeof value == 'string') value = stringToBytes(value);\n if (typeof namespace == 'string') namespace = uuidToBytes(namespace);\n\n if (!Array.isArray(value)) throw TypeError('value must be an array of bytes');\n if (!Array.isArray(namespace) || namespace.length !== 16)\n throw TypeError('namespace must be uuid string or an Array of 16 byte values');\n\n // Per 4.3\n const bytes = hashfunc(namespace.concat(value));\n bytes[6] = (bytes[6] & 0x0f) | version;\n bytes[8] = (bytes[8] & 0x3f) | 0x80;\n\n if (buf) {\n for (let idx = 0; idx < 16; ++idx) {\n buf[off + idx] = bytes[idx];\n }\n }\n\n return bytesToUuid(bytes);\n };\n\n // Function#name is not settable on some platforms (#270)\n try {\n generateUUID.name = name;\n } catch {}\n\n // Pre-defined namespaces, per Appendix C\n generateUUID.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\n generateUUID.URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\n\n return generateUUID;\n}\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nconst byteToHex: string[] = [];\nfor (let i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf: number[], offset?: number) {\n let i = offset || 0;\n const bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return [\n bth[buf[i++]],\n bth[buf[i++]],\n bth[buf[i++]],\n bth[buf[i++]],\n '-',\n bth[buf[i++]],\n bth[buf[i++]],\n '-',\n bth[buf[i++]],\n bth[buf[i++]],\n '-',\n bth[buf[i++]],\n bth[buf[i++]],\n '-',\n bth[buf[i++]],\n bth[buf[i++]],\n bth[buf[i++]],\n bth[buf[i++]],\n bth[buf[i++]],\n bth[buf[i++]],\n ].join('');\n}\n\nexport default bytesToUuid;\n","/**\n * Collection of utilities used for generating Universally Unique Identifiers.\n */\nexport type UUID = {\n /**\n * A UUID generated randomly.\n */\n v4: () => string;\n /**\n * A UUID generated based on the `value` and `namespace` parameters, which always produces the same result for the same inputs.\n */\n v5: (name: string, namespace: string | number[]) => string;\n namespace: typeof Uuidv5Namespace;\n};\n\n/**\n * Default namespaces for UUID v5 defined in RFC 4122\n */\nexport enum Uuidv5Namespace {\n // Source of the UUIDs: https://datatracker.ietf.org/doc/html/rfc4122\n dns = '6ba7b810-9dad-11d1-80b4-00c04fd430c8',\n url = '6ba7b811-9dad-11d1-80b4-00c04fd430c8',\n oid = '6ba7b812-9dad-11d1-80b4-00c04fd430c8',\n x500 = '6ba7b814-9dad-11d1-80b4-00c04fd430c8',\n}\n","import type { EventEmitter } from './EventEmitter';\nimport type { NativeModule } from './NativeModule';\nimport type { SharedObject } from './SharedObject';\nimport type { SharedRef } from './SharedRef';\n\nexport interface ExpoGlobal {\n /**\n * Host object that is used to access native Expo modules.\n */\n modules: Record;\n\n // Natively defined JS classes\n\n /**\n * @see EventEmitter\n */\n EventEmitter: typeof EventEmitter;\n\n /**\n * @see SharedObject\n */\n SharedObject: typeof SharedObject;\n\n /**\n * @see SharedRef\n */\n SharedRef: typeof SharedRef;\n\n /**\n * @see NativeModule\n */\n NativeModule: typeof NativeModule;\n\n // Utils\n\n /**\n * Generates a random UUID v4 string.\n */\n uuidv4(): string;\n\n /**\n * Generates a UUID v5 string representation of the value in the specified namespace.\n */\n uuidv5(name: string, namespace: string): string;\n\n /**\n * Returns a static view config of the native view with the given name\n * or `null` if the view has not been registered.\n */\n getViewConfig(viewName: string): ViewConfig | null;\n\n /**\n * Reloads the app.\n */\n reloadAppAsync(reason: string): Promise;\n}\n\ntype ViewConfig = {\n validAttributes: Record;\n directEventTypes: Record;\n};\n\nexport interface ExpoProcessEnv {\n NODE_ENV: string;\n /** Used in `@expo/metro-runtime`. */\n EXPO_DEV_SERVER_ORIGIN?: string;\n\n EXPO_ROUTER_IMPORT_MODE?: string;\n EXPO_ROUTER_ABS_APP_ROOT?: string;\n EXPO_ROUTER_APP_ROOT?: string;\n\n /** Maps to the `experiments.baseUrl` property in the project Expo config. This is injected by `babel-preset-expo` and supports automatic cache invalidation. */\n EXPO_BASE_URL?: string;\n\n /** Build-time representation of the `Platform.OS` value that the current JavaScript was bundled for. Does not support platform shaking wrapped require statements. */\n EXPO_OS?: string;\n\n [key: string]: any;\n}\n\nexport interface ExpoProcess {\n env: ExpoProcessEnv;\n [key: string]: any;\n}\n\n/* eslint-disable no-var */\n\ndeclare global {\n namespace NodeJS {\n export interface ProcessEnv extends ExpoProcessEnv {}\n export interface Process extends ExpoProcess {\n env: ProcessEnv;\n }\n }\n\n /**\n * Global object containing all the native bindings installed by Expo.\n * This object is not available in projects without the `expo` package installed.\n */\n var expo: ExpoGlobal;\n\n var process: NodeJS.Process;\n\n /**\n * ExpoDomWebView is defined in `@expo/dom-webview` runtime.\n */\n var ExpoDomWebView: Record | undefined;\n}\n","import invariant from 'invariant';\nimport { NativeEventEmitter, Platform } from 'react-native';\n\nimport { EventSubscription } from './EventEmitter';\n\nconst nativeEmitterSubscriptionKey = '@@nativeEmitterSubscription@@';\n\ntype NativeModule = {\n __expo_module_name__?: string;\n startObserving?: () => void;\n stopObserving?: () => void;\n\n // Erase these types as they would conflict with the new NativeModule type.\n // This EventEmitter is deprecated anyway.\n addListener?: any;\n removeListeners?: any;\n};\n\n/**\n * @deprecated Deprecated in favor of `EventEmitter`.\n */\nexport class LegacyEventEmitter {\n _listenerCount = 0;\n\n // @ts-expect-error\n _nativeModule: NativeModule;\n\n // @ts-expect-error\n _eventEmitter: NativeEventEmitter;\n\n constructor(nativeModule: NativeModule) {\n // If the native module is a new module, just return it back as it's already an event emitter.\n // This is for backwards compatibility until we stop using this legacy class in other packages.\n if (nativeModule.__expo_module_name__) {\n // @ts-expect-error\n return nativeModule;\n }\n this._nativeModule = nativeModule;\n this._eventEmitter = new NativeEventEmitter(nativeModule as any);\n }\n\n addListener(eventName: string, listener: (event: T) => void): EventSubscription {\n if (!this._listenerCount && Platform.OS !== 'ios' && this._nativeModule.startObserving) {\n this._nativeModule.startObserving();\n }\n\n this._listenerCount++;\n const nativeEmitterSubscription = this._eventEmitter.addListener(eventName, listener);\n const subscription = {\n [nativeEmitterSubscriptionKey]: nativeEmitterSubscription,\n remove: () => {\n this.removeSubscription(subscription);\n },\n };\n return subscription;\n }\n\n removeAllListeners(eventName: string): void {\n // @ts-ignore: the EventEmitter interface has been changed in react-native@0.64.0\n const removedListenerCount = this._eventEmitter.listenerCount\n ? // @ts-ignore: this is available since 0.64\n this._eventEmitter.listenerCount(eventName)\n : // @ts-ignore: this is available in older versions\n this._eventEmitter.listeners(eventName).length;\n this._eventEmitter.removeAllListeners(eventName);\n this._listenerCount -= removedListenerCount;\n invariant(\n this._listenerCount >= 0,\n `EventEmitter must have a non-negative number of listeners`\n );\n\n if (!this._listenerCount && Platform.OS !== 'ios' && this._nativeModule.stopObserving) {\n this._nativeModule.stopObserving();\n }\n }\n\n removeSubscription(subscription: EventSubscription): void {\n const nativeEmitterSubscription = subscription[nativeEmitterSubscriptionKey];\n if (!nativeEmitterSubscription) {\n return;\n }\n\n if ('remove' in nativeEmitterSubscription) {\n nativeEmitterSubscription.remove();\n }\n this._listenerCount--;\n\n // Ensure that the emitter's internal state remains correct even if `removeSubscription` is\n // called again with the same subscription\n delete subscription[nativeEmitterSubscriptionKey];\n\n // Release closed-over references to the emitter\n subscription.remove = () => {};\n\n if (!this._listenerCount && Platform.OS !== 'ios' && this._nativeModule.stopObserving) {\n this._nativeModule.stopObserving();\n }\n }\n\n emit(eventName: string, ...params: any[]): void {\n this._eventEmitter.emit(eventName, ...params);\n }\n}\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\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n","/**\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nimport NativeEventEmitter from '../../vendor/react-native/EventEmitter/NativeEventEmitter';\nexport default NativeEventEmitter;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport Platform from '../../../exports/Platform';\nimport RCTDeviceEventEmitter from './RCTDeviceEventEmitter';\nimport invariant from 'fbjs/lib/invariant';\n/**\n * `NativeEventEmitter` is intended for use by Native Modules to emit events to\n * JavaScript listeners. If a `NativeModule` is supplied to the constructor, it\n * will be notified (via `addListener` and `removeListeners`) when the listener\n * count changes to manage \"native memory\".\n *\n * Currently, all native events are fired via a global `RCTDeviceEventEmitter`.\n * This means event names must be globally unique, and it means that call sites\n * can theoretically listen to `RCTDeviceEventEmitter` (although discouraged).\n */\nexport default class NativeEventEmitter {\n constructor(nativeModule) {\n if (Platform.OS === 'ios') {\n invariant(nativeModule != null, '`new NativeEventEmitter()` requires a non-null argument.');\n this._nativeModule = nativeModule;\n }\n }\n addListener(eventType, listener, context) {\n var _this$_nativeModule;\n (_this$_nativeModule = this._nativeModule) == null ? void 0 : _this$_nativeModule.addListener(eventType);\n var subscription = RCTDeviceEventEmitter.addListener(eventType, listener, context);\n return {\n remove: () => {\n if (subscription != null) {\n var _this$_nativeModule2;\n (_this$_nativeModule2 = this._nativeModule) == null ? void 0 : _this$_nativeModule2.removeListeners(1);\n // $FlowFixMe[incompatible-use]\n subscription.remove();\n subscription = null;\n }\n }\n };\n }\n\n /**\n * @deprecated Use `remove` on the EventSubscription from `addListener`.\n */\n removeListener(eventType, listener) {\n var _this$_nativeModule3;\n (_this$_nativeModule3 = this._nativeModule) == null ? void 0 : _this$_nativeModule3.removeListeners(1);\n // NOTE: This will report a deprecation notice via `console.error`.\n // $FlowFixMe[prop-missing] - `removeListener` exists but is deprecated.\n RCTDeviceEventEmitter.removeListener(eventType, listener);\n }\n emit(eventType) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n // Generally, `RCTDeviceEventEmitter` is directly invoked. But this is\n // included for completeness.\n RCTDeviceEventEmitter.emit(eventType, ...args);\n }\n removeAllListeners(eventType) {\n var _this$_nativeModule4;\n invariant(eventType != null, '`NativeEventEmitter.removeAllListener()` requires a non-null argument.');\n (_this$_nativeModule4 = this._nativeModule) == null ? void 0 : _this$_nativeModule4.removeListeners(this.listenerCount(eventType));\n RCTDeviceEventEmitter.removeAllListeners(eventType);\n }\n listenerCount(eventType) {\n return RCTDeviceEventEmitter.listenerCount(eventType);\n }\n}","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\nimport EventEmitter from '../vendor/emitter/EventEmitter';\n\n// FIXME: use typed events\n\n/**\n * Global EventEmitter used by the native platform to emit events to JavaScript.\n * Events are identified by globally unique event names.\n *\n * NativeModules that emit events should instead subclass `NativeEventEmitter`.\n */\nexport default new EventEmitter();","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n/**\n * EventEmitter manages listeners and publishes events to them.\n *\n * EventEmitter accepts a single type parameter that defines the valid events\n * and associated listener argument(s).\n *\n * @example\n *\n * const emitter = new EventEmitter<{\n * success: [number, string],\n * error: [Error],\n * }>();\n *\n * emitter.on('success', (statusCode, responseText) => {...});\n * emitter.emit('success', 200, '...');\n *\n * emitter.on('error', error => {...});\n * emitter.emit('error', new Error('Resource not found'));\n *\n */\nexport default class EventEmitter {\n constructor() {\n this._registry = {};\n }\n /**\n * Registers a listener that is called when the supplied event is emitted.\n * Returns a subscription that has a `remove` method to undo registration.\n */\n addListener(eventType, listener, context) {\n var registrations = allocate(this._registry, eventType);\n var registration = {\n context,\n listener,\n remove() {\n registrations.delete(registration);\n }\n };\n registrations.add(registration);\n return registration;\n }\n\n /**\n * Emits the supplied event. Additional arguments supplied to `emit` will be\n * passed through to each of the registered listeners.\n *\n * If a listener modifies the listeners registered for the same event, those\n * changes will not be reflected in the current invocation of `emit`.\n */\n emit(eventType) {\n var registrations = this._registry[eventType];\n if (registrations != null) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n for (var _i = 0, _arr = [...registrations]; _i < _arr.length; _i++) {\n var registration = _arr[_i];\n registration.listener.apply(registration.context, args);\n }\n }\n }\n\n /**\n * Removes all registered listeners.\n */\n removeAllListeners(eventType) {\n if (eventType == null) {\n this._registry = {};\n } else {\n delete this._registry[eventType];\n }\n }\n\n /**\n * Returns the number of registered listeners for the supplied event.\n */\n listenerCount(eventType) {\n var registrations = this._registry[eventType];\n return registrations == null ? 0 : registrations.size;\n }\n}\nfunction allocate(registry, eventType) {\n var registrations = registry[eventType];\n if (registrations == null) {\n registrations = new Set();\n registry[eventType] = registrations;\n }\n return registrations;\n}","'use client';\n\nimport { ensureNativeModulesAreInstalled } from './ensureNativeModulesAreInstalled';\nimport type { NativeModule } from './ts-declarations/NativeModule';\n\nensureNativeModulesAreInstalled();\n\nexport default globalThis.expo.NativeModule as typeof NativeModule;\n","import type { ProxyNativeModule } from './NativeModulesProxy.types';\n\n// We default to an empty object shim wherever we don't have an environment-specific implementation\n\n/**\n * @deprecated `NativeModulesProxy` is deprecated and might be removed in the future releases.\n * Use `requireNativeModule` or `requireOptionalNativeModule` instead.\n */\nexport default {} as { [moduleName: string]: ProxyNativeModule };\n","import React from 'react';\n\nimport { UnavailabilityError } from './errors/UnavailabilityError';\n\n/**\n * A drop-in replacement for `requireNativeComponent`.\n */\nexport function requireNativeViewManager

(viewName: string): React.ComponentType

{\n throw new UnavailabilityError('expo-modules-core', 'requireNativeViewManager');\n}\n","import { CodedError } from './CodedError';\nimport Platform from '../Platform';\n\n/**\n * A class for errors to be thrown when a property is accessed which is\n * unavailable, unsupported, or not currently implemented on the running\n * platform.\n */\nexport class UnavailabilityError extends CodedError {\n constructor(moduleName: string, propertyName: string) {\n super(\n 'ERR_UNAVAILABLE',\n `The method or property ${moduleName}.${propertyName} is not available on ${Platform.OS}, are you sure you've linked all the native dependencies properly?`\n );\n }\n}\n","/**\n * A general error class that should be used for all errors in Expo modules.\n * Guarantees a `code` field that can be used to differentiate between different\n * types of errors without further subclassing Error.\n */\nexport class CodedError extends Error {\n code: string;\n info?: any;\n\n constructor(code: string, message: string) {\n super(message);\n this.code = code;\n }\n}\n","import { PlatformOSType, Platform as ReactNativePlatform } from 'react-native';\n\nimport {\n isDOMAvailable,\n canUseEventListeners,\n canUseViewport,\n isAsyncDebugging,\n} from './environment/browser';\n\nexport type PlatformSelectOSType = PlatformOSType | 'native' | 'electron' | 'default';\n\nexport type PlatformSelect = (specifics: { [platform in PlatformSelectOSType]?: T }) => T;\n\nif (__DEV__ && typeof process.env.EXPO_OS === 'undefined') {\n console.warn(\n `The global process.env.EXPO_OS is not defined. This should be inlined by babel-preset-expo during transformation.`\n );\n}\n\nconst nativeSelect =\n typeof window !== 'undefined'\n ? ReactNativePlatform.select\n : // process.env.EXPO_OS is injected by `babel-preset-expo` and available in both client and `react-server` environments.\n // Opt to use the env var when possible, and fallback to the React Native Platform module when it's not (arbitrary bundlers and transformers).\n function select(specifics: { [platform in PlatformSelectOSType]?: T }): T | undefined {\n if (!process.env.EXPO_OS) return undefined;\n if (specifics.hasOwnProperty(process.env.EXPO_OS)) {\n return specifics[process.env.EXPO_OS]!;\n } else if (process.env.EXPO_OS !== 'web' && specifics.hasOwnProperty('native')) {\n return specifics.native!;\n } else if (specifics.hasOwnProperty('default')) {\n return specifics.default!;\n }\n // do nothing...\n return undefined;\n };\n\nconst Platform = {\n /**\n * Denotes the currently running platform.\n * Can be one of ios, android, web.\n */\n OS: process.env.EXPO_OS || ReactNativePlatform.OS,\n /**\n * Returns the value with the matching platform.\n * Object keys can be any of ios, android, native, web, default.\n *\n * @ios ios, native, default\n * @android android, native, default\n * @web web, default\n */\n select: nativeSelect as PlatformSelect,\n /**\n * Denotes if the DOM API is available in the current environment.\n * The DOM is not available in native React runtimes and Node.js.\n */\n isDOMAvailable,\n /**\n * Denotes if the current environment can attach event listeners\n * to the window. This will return false in native React\n * runtimes and Node.js.\n */\n canUseEventListeners,\n /**\n * Denotes if the current environment can inspect properties of the\n * screen on which the current window is being rendered. This will\n * return false in native React runtimes and Node.js.\n */\n canUseViewport,\n /**\n * If the JavaScript is being executed in a remote JavaScript environment.\n * When `true`, synchronous native invocations cannot be executed.\n */\n isAsyncDebugging,\n};\n\nexport default Platform;\n","declare global {\n // Add IE-specific interface to Window\n interface Window {\n attachEvent(event: string, listener: EventListener): boolean;\n }\n}\n\n// Used for delegating node actions when browser APIs aren't available\n// like in SSR websites.\nexport const isDOMAvailable = typeof window !== 'undefined' && !!window.document?.createElement;\nexport const canUseEventListeners =\n isDOMAvailable && !!(window.addEventListener || window.attachEvent);\nexport const canUseViewport = isDOMAvailable && !!window.screen;\nexport const isAsyncDebugging = false;\n","'use client';\n\nimport { ensureNativeModulesAreInstalled } from './ensureNativeModulesAreInstalled';\nimport type { SharedObject as SharedObjectType } from './ts-declarations/SharedObject';\n\nensureNativeModulesAreInstalled();\n\nconst SharedObject = globalThis.expo.SharedObject as typeof SharedObjectType;\n\nexport default SharedObject;\n","'use client';\n\nimport { ensureNativeModulesAreInstalled } from './ensureNativeModulesAreInstalled';\nimport type { SharedRef as SharedRefType } from './ts-declarations/SharedRef';\n\nensureNativeModulesAreInstalled();\n\nconst SharedRef = globalThis.expo.SharedRef as typeof SharedRefType;\n\nexport default SharedRef;\n","","export function requireNativeModule(moduleName: string): ModuleType {\n const nativeModule = requireOptionalNativeModule(moduleName);\n if (nativeModule != null) {\n return nativeModule;\n }\n if (typeof window === 'undefined') {\n // For SSR, we expect not to have native modules available, but to avoid crashing from SSR resolutions, we return an empty object.\n return {} as ModuleType;\n }\n throw new Error(`Cannot find native module '${moduleName}'`);\n}\n\nexport function requireOptionalNativeModule(\n moduleName: string\n): ModuleType | null {\n if (typeof globalThis.ExpoDomWebView === 'object' && globalThis?.expo?.modules != null) {\n return globalThis.expo?.modules?.[moduleName] ?? null;\n }\n return null;\n}\n","import { ensureNativeModulesAreInstalled } from './ensureNativeModulesAreInstalled';\nimport type { NativeModule } from './ts-declarations/NativeModule';\n\n/**\n * Registers a web module.\n * @param moduleImplementation – a class that extends `NativeModule`. The class is registered under `globalThis.expo.modules[className]`.\n * @returns A singleton instance of the class passed into arguments.\n */\n\nexport function registerWebModule<\n EventsMap extends Record,\n ModuleType extends typeof NativeModule,\n>(moduleImplementation: ModuleType): ModuleType {\n ensureNativeModulesAreInstalled();\n\n const moduleName = moduleImplementation.name;\n if (!moduleName) {\n throw new Error('Module implementation must be a class');\n }\n if (!globalThis?.expo?.modules) {\n globalThis.expo.modules = {};\n }\n if (globalThis.expo.modules[moduleName]) {\n return globalThis.expo.modules[moduleName];\n }\n globalThis.expo.modules[moduleName] = new moduleImplementation();\n return globalThis.expo.modules[moduleName];\n}\n","/** A union type for all integer based [`TypedArray` objects](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#typedarray_objects). */\nexport type IntBasedTypedArray = Int8Array | Int16Array | Int32Array;\n\n/** A union type for all unsigned integer based [`TypedArray` objects](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#typedarray_objects). */\nexport type UintBasedTypedArray = Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array;\n\n/** A union type for all floating point based [`TypedArray` objects](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#typedarray_objects). */\nexport type FloatBasedTypedArray = Float32Array | Float64Array;\n\n/** A [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) describes an array-like view of an underlying binary data buffer. */\nexport type TypedArray = IntBasedTypedArray | UintBasedTypedArray | FloatBasedTypedArray;\n","export enum PermissionStatus {\n /**\n * User has granted the permission.\n */\n GRANTED = 'granted',\n /**\n * User hasn't granted or denied the permission yet.\n */\n UNDETERMINED = 'undetermined',\n /**\n * User has denied the permission.\n */\n DENIED = 'denied',\n}\n\n/**\n * Permission expiration time. Currently, all permissions are granted permanently.\n */\nexport type PermissionExpiration = 'never' | number;\n\n/**\n * An object obtained by permissions get and request functions.\n */\nexport interface PermissionResponse {\n /**\n * Determines the status of the permission.\n */\n status: PermissionStatus;\n /**\n * Determines time when the permission expires.\n */\n expires: PermissionExpiration;\n /**\n * A convenience boolean that indicates if the permission is granted.\n */\n granted: boolean;\n /**\n * Indicates if user can be asked again for specific permission.\n * If not, one should be directed to the Settings app\n * in order to enable/disable the permission.\n */\n canAskAgain: boolean;\n}\n","// Copyright © 2024 650 Industries.\n\n'use client';\n\nimport { useCallback, useEffect, useRef, useState } from 'react';\n\nimport { PermissionResponse } from './PermissionsInterface';\n\n// These types are identical, but improves the readability for suggestions in editors\ntype RequestPermissionMethod = () => Promise;\ntype GetPermissionMethod = () => Promise;\n\ninterface PermissionHookMethods {\n /** The permission method that requests the user to grant permission. */\n requestMethod: (options?: Options) => Promise;\n /** The permission method that only fetches the current permission status. */\n getMethod: (options?: Options) => Promise;\n}\n\ninterface PermissionHookBehavior {\n /** If the hook should automatically fetch the current permission status, without asking the user. */\n get?: boolean;\n /** If the hook should automatically request the user to grant permission. */\n request?: boolean;\n}\n\nexport type PermissionHookOptions = PermissionHookBehavior & Options;\n\n/**\n * Get or request permission for protected functionality within the app.\n * It uses separate permission requesters to interact with a single permission.\n * By default, the hook will only retrieve the permission status.\n */\nfunction usePermission(\n methods: PermissionHookMethods,\n options?: PermissionHookOptions\n): [Permission | null, RequestPermissionMethod, GetPermissionMethod] {\n const isMounted = useRef(true);\n const [status, setStatus] = useState(null);\n const { get = true, request = false, ...permissionOptions } = options || {};\n\n const getPermission = useCallback(async () => {\n const response = await methods.getMethod(\n Object.keys(permissionOptions).length > 0 ? (permissionOptions as Options) : undefined\n );\n if (isMounted.current) setStatus(response);\n return response;\n }, [methods.getMethod]);\n\n const requestPermission = useCallback(async () => {\n const response = await methods.requestMethod(\n Object.keys(permissionOptions).length > 0 ? (permissionOptions as Options) : undefined\n );\n if (isMounted.current) setStatus(response);\n return response;\n }, [methods.requestMethod]);\n\n useEffect(\n function runMethods() {\n if (request) requestPermission();\n if (!request && get) getPermission();\n },\n [get, request, requestPermission, getPermission]\n );\n\n // Workaround for unmounting components receiving state updates\n useEffect(function didMount() {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n\n return [status, requestPermission, getPermission];\n}\n\n/**\n * Create a new permission hook with the permission methods built-in.\n * This can be used to quickly create specific permission hooks in every module.\n */\nexport function createPermissionHook(\n methods: PermissionHookMethods\n) {\n return (options?: PermissionHookOptions) =>\n usePermission(methods, options);\n}\n","import React from 'react';\n\n/**\n * Create a React ref object that is friendly for snapshots.\n * It will be represented as `[React.ref]` in snapshots.\n * @returns a React ref object.\n */\nexport function createSnapshotFriendlyRef(): React.RefObject {\n return React.createRef();\n}\n","'use client';\n\nimport { DependencyList, useRef, useMemo, useEffect } from 'react';\n\nimport type { SharedObject } from '../ts-declarations/SharedObject';\n\n/**\n * Returns a shared object, which is automatically cleaned up when the component is unmounted.\n */\nexport function useReleasingSharedObject(\n factory: () => TSharedObject,\n dependencies: DependencyList\n): TSharedObject {\n const objectRef = useRef(null);\n const isFastRefresh = useRef(false);\n const previousDependencies = useRef(dependencies);\n\n if (objectRef.current == null) {\n objectRef.current = factory();\n }\n\n const object = useMemo(() => {\n let newObject = objectRef.current;\n const dependenciesAreEqual =\n previousDependencies.current?.length === dependencies.length &&\n dependencies.every((value, index) => value === previousDependencies.current[index]);\n\n // If the dependencies have changed, release the previous object and create a new one, otherwise this has been called\n // because of a fast refresh, and we don't want to release the object.\n if (!newObject || !dependenciesAreEqual) {\n objectRef.current?.release();\n newObject = factory();\n objectRef.current = newObject;\n previousDependencies.current = dependencies;\n } else {\n isFastRefresh.current = true;\n }\n return newObject;\n }, dependencies);\n\n useEffect(() => {\n isFastRefresh.current = false;\n\n return () => {\n // This will be called on every fast refresh and on unmount, but we only want to release the object on unmount.\n if (!isFastRefresh.current && objectRef.current) {\n objectRef.current.release();\n }\n };\n }, []);\n\n return object;\n}\n","/**\n * Reloads the app. This method works for both release and debug builds.\n *\n * Unlike [`Updates.reloadAsync()`](/versions/latest/sdk/updates/#updatesreloadasync),\n * this function does not use a new update even if one is available. It only reloads the app using the same JavaScript bundle that is currently running.\n *\n * @param reason The reason for reloading the app. This is used only for some platforms.\n */\nexport async function reloadAppAsync(reason: string = 'Reloaded from JS call'): Promise {\n await globalThis.expo?.reloadAppAsync(reason);\n}\n","import { CodedError, Platform } from 'expo-modules-core';\nimport FontObserver from 'fontfaceobserver';\nimport { FontDisplay } from './Font.types';\nfunction getFontFaceStyleSheet() {\n if (!Platform.isDOMAvailable) {\n return null;\n }\n const styleSheet = getStyleElement();\n return styleSheet.sheet ? styleSheet.sheet : null;\n}\nfunction getFontFaceRules() {\n const sheet = getFontFaceStyleSheet();\n if (sheet) {\n // @ts-ignore: rule iterator\n const rules = [...sheet.cssRules];\n const items = [];\n for (let i = 0; i < rules.length; i++) {\n const rule = rules[i];\n if (rule instanceof CSSFontFaceRule) {\n items.push({ rule, index: i });\n }\n }\n return items;\n }\n return [];\n}\nfunction getFontFaceRulesMatchingResource(fontFamilyName, options) {\n const rules = getFontFaceRules();\n return rules.filter(({ rule }) => {\n return (rule.style.fontFamily === fontFamilyName &&\n (options && options.display ? options.display === rule.style.fontDisplay : true));\n });\n}\nconst serverContext = new Set();\nfunction getHeadElements() {\n const entries = [...serverContext.entries()];\n if (!entries.length) {\n return [];\n }\n const css = entries.map(([{ css }]) => css).join('\\n');\n const links = entries.map(([{ resourceId }]) => resourceId);\n // TODO: Maybe return nothing if no fonts were loaded.\n return [\n {\n $$type: 'style',\n children: css,\n id: ID,\n type: 'text/css',\n },\n ...links.map((resourceId) => ({\n $$type: 'link',\n rel: 'preload',\n href: resourceId,\n as: 'font',\n crossorigin: '',\n })),\n ];\n}\nexport default {\n async unloadAllAsync() {\n if (!Platform.isDOMAvailable)\n return;\n const element = document.getElementById(ID);\n if (element && element instanceof HTMLStyleElement) {\n document.removeChild(element);\n }\n },\n async unloadAsync(fontFamilyName, options) {\n const sheet = getFontFaceStyleSheet();\n if (!sheet)\n return;\n const items = getFontFaceRulesMatchingResource(fontFamilyName, options);\n for (const item of items) {\n sheet.deleteRule(item.index);\n }\n },\n getServerResources() {\n const elements = getHeadElements();\n return elements\n .map((element) => {\n switch (element.$$type) {\n case 'style':\n return ``;\n case 'link':\n return ``;\n default:\n return '';\n }\n })\n .filter(Boolean);\n },\n resetServerContext() {\n serverContext.clear();\n },\n getLoadedFonts() {\n if (typeof window === 'undefined') {\n return [...serverContext.values()].map(({ name }) => name);\n }\n const rules = getFontFaceRules();\n return rules.map(({ rule }) => rule.style.fontFamily);\n },\n isLoaded(fontFamilyName, resource = {}) {\n if (typeof window === 'undefined') {\n return !![...serverContext.values()].find((asset) => {\n return asset.name === fontFamilyName;\n });\n }\n return getFontFaceRulesMatchingResource(fontFamilyName, resource)?.length > 0;\n },\n // NOTE(EvanBacon): No async keyword! This cannot return a promise in Node environments.\n loadAsync(fontFamilyName, resource) {\n if (typeof window === 'undefined') {\n serverContext.add({\n name: fontFamilyName,\n css: _createWebFontTemplate(fontFamilyName, resource),\n // @ts-expect-error: typeof string\n resourceId: resource.uri,\n });\n return Promise.resolve();\n }\n const canInjectStyle = document.head && typeof document.head.appendChild === 'function';\n if (!canInjectStyle) {\n throw new CodedError('ERR_WEB_ENVIRONMENT', `The browser's \\`document.head\\` element doesn't support injecting fonts.`);\n }\n const style = getStyleElement();\n document.head.appendChild(style);\n const res = getFontFaceRulesMatchingResource(fontFamilyName, resource);\n if (!res.length) {\n _createWebStyle(fontFamilyName, resource);\n }\n if (!isFontLoadingListenerSupported()) {\n return Promise.resolve();\n }\n return new FontObserver(fontFamilyName, { display: resource.display }).load(null, 6000);\n },\n};\nconst ID = 'expo-generated-fonts';\nfunction getStyleElement() {\n const element = document.getElementById(ID);\n if (element && element instanceof HTMLStyleElement) {\n return element;\n }\n const styleElement = document.createElement('style');\n styleElement.id = ID;\n styleElement.type = 'text/css';\n return styleElement;\n}\nexport function _createWebFontTemplate(fontFamily, resource) {\n return `@font-face{font-family:${fontFamily};src:url(${resource.uri});font-display:${resource.display || FontDisplay.AUTO}}`;\n}\nfunction _createWebStyle(fontFamily, resource) {\n const fontStyle = _createWebFontTemplate(fontFamily, resource);\n const styleElement = getStyleElement();\n // @ts-ignore: TypeScript does not define HTMLStyleElement::styleSheet. This is just for IE and\n // possibly can be removed if it's unnecessary on IE 11.\n if (styleElement.styleSheet) {\n const styleElementIE = styleElement;\n styleElementIE.styleSheet.cssText = styleElementIE.styleSheet.cssText\n ? styleElementIE.styleSheet.cssText + fontStyle\n : fontStyle;\n }\n else {\n const textNode = document.createTextNode(fontStyle);\n styleElement.appendChild(textNode);\n }\n return styleElement;\n}\nfunction isFontLoadingListenerSupported() {\n const { userAgent } = window.navigator;\n // WebKit is broken https://github.com/bramstein/fontfaceobserver/issues/95\n const isIOS = !!userAgent.match(/iPad|iPhone/i);\n const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n // Edge is broken https://github.com/bramstein/fontfaceobserver/issues/109#issuecomment-333356795\n const isEdge = userAgent.includes('Edge');\n // Internet Explorer\n const isIE = userAgent.includes('Trident');\n // Firefox\n const isFirefox = userAgent.includes('Firefox');\n return !isSafari && !isIOS && !isEdge && !isIE && !isFirefox;\n}\n//# sourceMappingURL=ExpoFontLoader.web.js.map","/* Font Face Observer v2.3.0 - © Bram Stein. License: BSD-3-Clause */(function(){function p(a,c){document.addEventListener?a.addEventListener(\"scroll\",c,!1):a.attachEvent(\"scroll\",c)}function u(a){document.body?a():document.addEventListener?document.addEventListener(\"DOMContentLoaded\",function b(){document.removeEventListener(\"DOMContentLoaded\",b);a()}):document.attachEvent(\"onreadystatechange\",function g(){if(\"interactive\"==document.readyState||\"complete\"==document.readyState)document.detachEvent(\"onreadystatechange\",g),a()})};function w(a){this.g=document.createElement(\"div\");this.g.setAttribute(\"aria-hidden\",\"true\");this.g.appendChild(document.createTextNode(a));this.h=document.createElement(\"span\");this.i=document.createElement(\"span\");this.m=document.createElement(\"span\");this.j=document.createElement(\"span\");this.l=-1;this.h.style.cssText=\"max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;\";this.i.style.cssText=\"max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;\";\nthis.j.style.cssText=\"max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;\";this.m.style.cssText=\"display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;\";this.h.appendChild(this.m);this.i.appendChild(this.j);this.g.appendChild(this.h);this.g.appendChild(this.i)}\nfunction x(a,c){a.g.style.cssText=\"max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:\"+c+\";\"}function B(a){var c=a.g.offsetWidth,b=c+100;a.j.style.width=b+\"px\";a.i.scrollLeft=b;a.h.scrollLeft=a.h.scrollWidth+100;return a.l!==c?(a.l=c,!0):!1}function C(a,c){function b(){var e=g;B(e)&&null!==e.g.parentNode&&c(e.l)}var g=a;p(a.h,b);p(a.i,b);B(a)};function D(a,c,b){c=c||{};b=b||window;this.family=a;this.style=c.style||\"normal\";this.weight=c.weight||\"normal\";this.stretch=c.stretch||\"normal\";this.context=b}var E=null,F=null,G=null,H=null;function I(a){null===F&&(M(a)&&/Apple/.test(window.navigator.vendor)?(a=/AppleWebKit\\/([0-9]+)(?:\\.([0-9]+))(?:\\.([0-9]+))/.exec(window.navigator.userAgent),F=!!a&&603>parseInt(a[1],10)):F=!1);return F}function M(a){null===H&&(H=!!a.document.fonts);return H}\nfunction N(a,c){var b=a.style,g=a.weight;if(null===G){var e=document.createElement(\"div\");try{e.style.font=\"condensed 100px sans-serif\"}catch(q){}G=\"\"!==e.style.font}return[b,g,G?a.stretch:\"\",\"100px\",c].join(\" \")}\nD.prototype.load=function(a,c){var b=this,g=a||\"BESbswy\",e=0,q=c||3E3,J=(new Date).getTime();return new Promise(function(K,L){if(M(b.context)&&!I(b.context)){var O=new Promise(function(r,t){function h(){(new Date).getTime()-J>=q?t(Error(\"\"+q+\"ms timeout exceeded\")):b.context.document.fonts.load(N(b,'\"'+b.family+'\"'),g).then(function(n){1<=n.length?r():setTimeout(h,25)},t)}h()}),P=new Promise(function(r,t){e=setTimeout(function(){t(Error(\"\"+q+\"ms timeout exceeded\"))},q)});Promise.race([P,O]).then(function(){clearTimeout(e);\nK(b)},L)}else u(function(){function r(){var d;if(d=-1!=k&&-1!=l||-1!=k&&-1!=m||-1!=l&&-1!=m)(d=k!=l&&k!=m&&l!=m)||(null===E&&(d=/AppleWebKit\\/([0-9]+)(?:\\.([0-9]+))/.exec(window.navigator.userAgent),E=!!d&&(536>parseInt(d[1],10)||536===parseInt(d[1],10)&&11>=parseInt(d[2],10))),d=E&&(k==y&&l==y&&m==y||k==z&&l==z&&m==z||k==A&&l==A&&m==A)),d=!d;d&&(null!==f.parentNode&&f.parentNode.removeChild(f),clearTimeout(e),K(b))}function t(){if((new Date).getTime()-J>=q)null!==f.parentNode&&f.parentNode.removeChild(f),\nL(Error(\"\"+q+\"ms timeout exceeded\"));else{var d=b.context.document.hidden;if(!0===d||void 0===d)k=h.g.offsetWidth,l=n.g.offsetWidth,m=v.g.offsetWidth,r();e=setTimeout(t,50)}}var h=new w(g),n=new w(g),v=new w(g),k=-1,l=-1,m=-1,y=-1,z=-1,A=-1,f=document.createElement(\"div\");f.dir=\"ltr\";x(h,N(b,\"sans-serif\"));x(n,N(b,\"serif\"));x(v,N(b,\"monospace\"));f.appendChild(h.g);f.appendChild(n.g);f.appendChild(v.g);b.context.document.body.appendChild(f);y=h.g.offsetWidth;z=n.g.offsetWidth;A=v.g.offsetWidth;t();\nC(h,function(d){k=d;r()});x(h,N(b,'\"'+b.family+'\",sans-serif'));C(n,function(d){l=d;r()});x(n,N(b,'\"'+b.family+'\",serif'));C(v,function(d){m=d;r()});x(v,N(b,'\"'+b.family+'\",monospace'))})})};\"object\"===typeof module?module.exports=D:(window.FontFaceObserver=D,window.FontFaceObserver.prototype.load=D.prototype.load);}());\n","// @needsAudit\n/**\n * Sets the [font-display](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display)\n * for a given typeface. The default font value on web is `FontDisplay.AUTO`.\n * Even though setting the `fontDisplay` does nothing on native platforms, the default behavior\n * emulates `FontDisplay.SWAP` on flagship devices like iOS, Samsung, Pixel, etc. Default\n * functionality varies on One Plus devices. In the browser this value is set in the generated\n * `@font-face` CSS block and not as a style property meaning you cannot dynamically change this\n * value based on the element it's used in.\n * @platform web\n */\nexport var FontDisplay;\n(function (FontDisplay) {\n /**\n * __(Default)__ The font display strategy is defined by the user agent or platform.\n * This generally defaults to the text being invisible until the font is loaded.\n * Good for buttons or banners that require a specific treatment.\n */\n FontDisplay[\"AUTO\"] = \"auto\";\n /**\n * Fallback text is rendered immediately with a default font while the desired font is loaded.\n * This is good for making the content appear to load instantly and is usually preferred.\n */\n FontDisplay[\"SWAP\"] = \"swap\";\n /**\n * The text will be invisible until the font has loaded. If the font fails to load then nothing\n * will appear - it's best to turn this off when debugging missing text.\n */\n FontDisplay[\"BLOCK\"] = \"block\";\n /**\n * Splits the behavior between `SWAP` and `BLOCK`.\n * There will be a [100ms timeout](https://developers.google.com/web/updates/2016/02/font-display?hl=en)\n * where the text with a custom font is invisible, after that the text will either swap to the\n * styled text or it'll show the unstyled text and continue to load the custom font. This is good\n * for buttons that need a custom font but should also be quickly available to screen-readers.\n */\n FontDisplay[\"FALLBACK\"] = \"fallback\";\n /**\n * This works almost identically to `FALLBACK`, the only difference is that the browser will\n * decide to load the font based on slow connection speed or critical resource demand.\n */\n FontDisplay[\"OPTIONAL\"] = \"optional\";\n})(FontDisplay || (FontDisplay = {}));\n//# sourceMappingURL=Font.types.js.map","import { Asset } from 'expo-asset';\nimport { CodedError } from 'expo-modules-core';\nimport ExpoFontLoader from './ExpoFontLoader';\nimport { FontDisplay } from './Font.types';\nfunction uriFromFontSource(asset) {\n if (typeof asset === 'string') {\n return asset || null;\n }\n else if (typeof asset === 'number') {\n return uriFromFontSource(Asset.fromModule(asset));\n }\n else if (typeof asset === 'object' && typeof asset.uri === 'number') {\n return uriFromFontSource(asset.uri);\n }\n else if (typeof asset === 'object') {\n return asset.uri || asset.localUri || asset.default || null;\n }\n return null;\n}\nfunction displayFromFontSource(asset) {\n if (typeof asset === 'object' && 'display' in asset) {\n return asset.display || FontDisplay.AUTO;\n }\n return FontDisplay.AUTO;\n}\nexport function getAssetForSource(source) {\n const uri = uriFromFontSource(source);\n const display = displayFromFontSource(source);\n if (!uri || typeof uri !== 'string') {\n throwInvalidSourceError(uri);\n }\n return {\n uri,\n display,\n };\n}\nfunction throwInvalidSourceError(source) {\n let type = typeof source;\n if (type === 'object')\n type = JSON.stringify(source, null, 2);\n throw new CodedError(`ERR_FONT_SOURCE`, `Expected font asset of type \\`string | FontResource | Asset\\` instead got: ${type}`);\n}\n// NOTE(EvanBacon): No async keyword!\nexport function loadSingleFontAsync(name, input) {\n if (typeof input !== 'object' || typeof input.uri !== 'string' || input.downloadAsync) {\n throwInvalidSourceError(input);\n }\n try {\n return ExpoFontLoader.loadAsync(name, input);\n }\n catch {\n // No-op.\n }\n return Promise.resolve();\n}\n//# sourceMappingURL=FontLoader.web.js.map","import './Asset.fx';\nexport * from './Asset';\nexport * from './AssetHooks';\n//# sourceMappingURL=index.js.map","import { Asset } from './Asset';\nimport { IS_ENV_WITH_LOCAL_ASSETS } from './PlatformUtils';\nimport { setCustomSourceTransformer } from './resolveAssetSource';\n// Override React Native's asset resolution for `Image` components in contexts where it matters\nif (IS_ENV_WITH_LOCAL_ASSETS) {\n setCustomSourceTransformer((resolver) => {\n try {\n // Bundler is using the hashAssetFiles plugin if and only if the fileHashes property exists\n if (resolver.asset.fileHashes) {\n const asset = Asset.fromMetadata(resolver.asset);\n return resolver.fromSource(asset.downloaded ? asset.localUri : asset.uri);\n }\n else {\n return resolver.defaultAsset();\n }\n }\n catch {\n return resolver.defaultAsset();\n }\n });\n}\n//# sourceMappingURL=Asset.fx.js.map","import { getAssetByID } from '@react-native/assets-registry/registry';\nimport { Platform } from 'expo-modules-core';\nimport { selectAssetSource } from './AssetSources';\nimport * as AssetUris from './AssetUris';\nimport { downloadAsync } from './ExpoAsset';\nimport * as ImageAssets from './ImageAssets';\nimport { getLocalAssetUri } from './LocalAssets';\nimport { IS_ENV_WITH_LOCAL_ASSETS } from './PlatformUtils';\nimport resolveAssetSource from './resolveAssetSource';\n/**\n * The `Asset` class represents an asset in your app. It gives metadata about the asset (such as its\n * name and type) and provides facilities to load the asset data.\n */\nexport class Asset {\n static byHash = {};\n static byUri = {};\n /**\n * The name of the asset file without the extension. Also without the part from `@` onward in the\n * filename (used to specify scale factor for images).\n */\n name;\n /**\n * The extension of the asset filename.\n */\n type;\n /**\n * The MD5 hash of the asset's data.\n */\n hash = null;\n /**\n * A URI that points to the asset's data on the remote server. When running the published version\n * of your app, this refers to the location on Expo's asset server where Expo has stored your\n * asset. When running the app from Expo CLI during development, this URI points to Expo CLI's\n * server running on your computer and the asset is served directly from your computer. If you\n * are not using Classic Updates (legacy), this field should be ignored as we ensure your assets\n * are on device before running your application logic.\n */\n uri;\n /**\n * If the asset has been downloaded (by calling [`downloadAsync()`](#downloadasync)), the\n * `file://` URI pointing to the local file on the device that contains the asset data.\n */\n localUri = null;\n /**\n * If the asset is an image, the width of the image data divided by the scale factor. The scale\n * factor is the number after `@` in the filename, or `1` if not present.\n */\n width = null;\n /**\n * If the asset is an image, the height of the image data divided by the scale factor. The scale factor is the number after `@` in the filename, or `1` if not present.\n */\n height = null;\n downloading = false;\n /**\n * Whether the asset has finished downloading from a call to [`downloadAsync()`](#downloadasync).\n */\n downloaded = false;\n _downloadCallbacks = [];\n constructor({ name, type, hash = null, uri, width, height }) {\n this.name = name;\n this.type = type;\n this.hash = hash;\n this.uri = uri;\n if (typeof width === 'number') {\n this.width = width;\n }\n if (typeof height === 'number') {\n this.height = height;\n }\n if (hash) {\n this.localUri = getLocalAssetUri(hash, type);\n if (this.localUri) {\n this.downloaded = true;\n }\n }\n if (Platform.OS === 'web') {\n if (!name) {\n this.name = AssetUris.getFilename(uri);\n }\n if (!type) {\n this.type = AssetUris.getFileExtension(uri);\n }\n }\n }\n // @needsAudit\n /**\n * A helper that wraps `Asset.fromModule(module).downloadAsync` for convenience.\n * @param moduleId An array of `require('path/to/file')` or external network URLs. Can also be\n * just one module or URL without an Array.\n * @return Returns a Promise that fulfills with an array of `Asset`s when the asset(s) has been\n * saved to disk.\n * @example\n * ```ts\n * const [{ localUri }] = await Asset.loadAsync(require('./assets/snack-icon.png'));\n * ```\n */\n static loadAsync(moduleId) {\n const moduleIds = Array.isArray(moduleId) ? moduleId : [moduleId];\n return Promise.all(moduleIds.map((moduleId) => Asset.fromModule(moduleId).downloadAsync()));\n }\n // @needsAudit\n /**\n * Returns the [`Asset`](#asset) instance representing an asset given its module or URL.\n * @param virtualAssetModule The value of `require('path/to/file')` for the asset or external\n * network URL\n * @return The [`Asset`](#asset) instance for the asset.\n */\n static fromModule(virtualAssetModule) {\n if (typeof virtualAssetModule === 'string') {\n return Asset.fromURI(virtualAssetModule);\n }\n if (typeof virtualAssetModule === 'object' &&\n 'uri' in virtualAssetModule &&\n typeof virtualAssetModule.uri === 'string') {\n const extension = AssetUris.getFileExtension(virtualAssetModule.uri);\n return new Asset({\n name: '',\n type: extension.startsWith('.') ? extension.substring(1) : extension,\n hash: null,\n uri: virtualAssetModule.uri,\n width: virtualAssetModule.width,\n height: virtualAssetModule.height,\n });\n }\n const meta = getAssetByID(virtualAssetModule);\n if (!meta) {\n throw new Error(`Module \"${virtualAssetModule}\" is missing from the asset registry`);\n }\n // Outside of the managed env we need the moduleId to initialize the asset\n // because resolveAssetSource depends on it\n if (!IS_ENV_WITH_LOCAL_ASSETS) {\n // null-check is performed above with `getAssetByID`.\n const { uri } = resolveAssetSource(virtualAssetModule);\n const asset = new Asset({\n name: meta.name,\n type: meta.type,\n hash: meta.hash,\n uri,\n width: meta.width,\n height: meta.height,\n });\n // For images backward compatibility,\n // keeps localUri the same as uri for React Native's Image that\n // works fine with drawable resource names.\n if (Platform.OS === 'android' && !uri.includes(':') && (meta.width || meta.height)) {\n asset.localUri = asset.uri;\n asset.downloaded = true;\n }\n Asset.byHash[meta.hash] = asset;\n return asset;\n }\n return Asset.fromMetadata(meta);\n }\n // @docsMissing\n static fromMetadata(meta) {\n // The hash of the whole asset, not to be confused with the hash of a specific file returned\n // from `selectAssetSource`\n const metaHash = meta.hash;\n if (Asset.byHash[metaHash]) {\n return Asset.byHash[metaHash];\n }\n const { uri, hash } = selectAssetSource(meta);\n const asset = new Asset({\n name: meta.name,\n type: meta.type,\n hash,\n uri,\n width: meta.width,\n height: meta.height,\n });\n Asset.byHash[metaHash] = asset;\n return asset;\n }\n // @docsMissing\n static fromURI(uri) {\n if (Asset.byUri[uri]) {\n return Asset.byUri[uri];\n }\n // Possibly a Base64-encoded URI\n let type = '';\n if (uri.indexOf(';base64') > -1) {\n type = uri.split(';')[0].split('/')[1];\n }\n else {\n const extension = AssetUris.getFileExtension(uri);\n type = extension.startsWith('.') ? extension.substring(1) : extension;\n }\n const asset = new Asset({\n name: '',\n type,\n hash: null,\n uri,\n });\n Asset.byUri[uri] = asset;\n return asset;\n }\n // @needsAudit\n /**\n * Downloads the asset data to a local file in the device's cache directory. Once the returned\n * promise is fulfilled without error, the [`localUri`](#localuri) field of this asset points\n * to a local file containing the asset data. The asset is only downloaded if an up-to-date local\n * file for the asset isn't already present due to an earlier download. The downloaded `Asset`\n * will be returned when the promise is resolved.\n * @return Returns a Promise which fulfills with an `Asset` instance.\n */\n async downloadAsync() {\n if (this.downloaded) {\n return this;\n }\n if (this.downloading) {\n await new Promise((resolve, reject) => {\n this._downloadCallbacks.push({ resolve, reject });\n });\n return this;\n }\n this.downloading = true;\n try {\n if (Platform.OS === 'web') {\n if (ImageAssets.isImageType(this.type)) {\n const { width, height, name } = await ImageAssets.getImageInfoAsync(this.uri);\n this.width = width;\n this.height = height;\n this.name = name;\n }\n else {\n this.name = AssetUris.getFilename(this.uri);\n }\n }\n this.localUri = await downloadAsync(this.uri, this.hash, this.type);\n this.downloaded = true;\n this._downloadCallbacks.forEach(({ resolve }) => resolve());\n }\n catch (e) {\n this._downloadCallbacks.forEach(({ reject }) => reject(e));\n throw e;\n }\n finally {\n this.downloading = false;\n this._downloadCallbacks = [];\n }\n return this;\n }\n}\n//# sourceMappingURL=Asset.js.map","const assets=[];module.exports={registerAsset:s=>assets.push(s),getAssetByID:s=>assets[s-1]};","import { Platform } from 'expo-modules-core';\nimport { PixelRatio, NativeModules } from 'react-native';\nimport AssetSourceResolver from './AssetSourceResolver';\nimport { getManifest2, manifestBaseUrl } from './PlatformUtils';\n/**\n * Selects the best file for the given asset (ex: choosing the best scale for images) and returns\n * a { uri, hash } pair for the specific asset file.\n *\n * If the asset isn't an image with multiple scales, the first file is selected.\n */\nexport function selectAssetSource(meta) {\n // This logic is based on that of AssetSourceResolver, with additional support for file hashes and\n // explicitly provided URIs\n const scale = AssetSourceResolver.pickScale(meta.scales, PixelRatio.get());\n const index = meta.scales.findIndex((s) => s === scale);\n const hash = meta.fileHashes ? (meta.fileHashes[index] ?? meta.fileHashes[0]) : meta.hash;\n // Allow asset processors to directly provide the URL to load\n const uri = meta.fileUris ? (meta.fileUris[index] ?? meta.fileUris[0]) : meta.uri;\n if (uri) {\n return { uri: resolveUri(uri), hash };\n }\n const fileScale = scale === 1 ? '' : `@${scale}x`;\n const fileExtension = meta.type ? `.${encodeURIComponent(meta.type)}` : '';\n const suffix = `/${encodeURIComponent(meta.name)}${fileScale}${fileExtension}`;\n const params = new URLSearchParams({\n platform: Platform.OS,\n hash: meta.hash,\n });\n // For assets with a specified absolute URL, we use the existing origin instead of prepending the\n // development server or production CDN URL origin\n if (/^https?:\\/\\//.test(meta.httpServerLocation)) {\n const uri = meta.httpServerLocation + suffix + '?' + params;\n return { uri, hash };\n }\n // For assets during development using manifest2, we use the development server's URL origin\n const manifest2 = getManifest2();\n const devServerUrl = manifest2?.extra?.expoGo?.developer\n ? 'http://' + manifest2.extra.expoGo.debuggerHost\n : null;\n if (devServerUrl) {\n const baseUrl = new URL(meta.httpServerLocation + suffix, devServerUrl);\n baseUrl.searchParams.set('platform', Platform.OS);\n baseUrl.searchParams.set('hash', meta.hash);\n return {\n uri: baseUrl.href,\n hash,\n };\n }\n // Temporary fallback for loading assets in Expo Go home\n if (NativeModules.ExponentKernel) {\n return { uri: `https://classic-assets.eascdn.net/~assets/${encodeURIComponent(hash)}`, hash };\n }\n // In correctly configured apps, we arrive here if the asset is locally available on disk due to\n // being managed by expo-updates, and `getLocalAssetUri(hash)` must return a local URI for this\n // hash. Since the asset is local, we don't have a remote URL and specify an invalid URL (an empty\n // string) as a placeholder.\n return { uri: '', hash };\n}\n/**\n * Resolves the given URI to an absolute URI. If the given URI is already an absolute URI, it is\n * simply returned. Otherwise, if it is a relative URI, it is resolved relative to the manifest's\n * base URI.\n */\nexport function resolveUri(uri) {\n // `manifestBaseUrl` is always an absolute URL or `null`.\n return manifestBaseUrl ? new URL(uri, manifestBaseUrl).href : uri;\n}\n//# sourceMappingURL=AssetSources.js.map","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nimport Dimensions from '../Dimensions';\n\n/**\n * PixelRatio gives access to the device pixel density.\n */\nexport default class PixelRatio {\n /**\n * Returns the device pixel density.\n */\n static get() {\n return Dimensions.get('window').scale;\n }\n\n /**\n * No equivalent for Web\n */\n static getFontScale() {\n return Dimensions.get('window').fontScale || PixelRatio.get();\n }\n\n /**\n * Converts a layout size (dp) to pixel size (px).\n * Guaranteed to return an integer number.\n */\n static getPixelSizeForLayoutSize(layoutSize) {\n return Math.round(layoutSize * PixelRatio.get());\n }\n\n /**\n * Rounds a layout size (dp) to the nearest layout size that corresponds to\n * an integer number of pixels. For example, on a device with a PixelRatio\n * of 3, `PixelRatio.roundToNearestPixel(8.4) = 8.33`, which corresponds to\n * exactly (8.33 * 3) = 25 pixels.\n */\n static roundToNearestPixel(layoutSize) {\n var ratio = PixelRatio.get();\n return Math.round(layoutSize * ratio) / ratio;\n }\n}","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\n'use client';\n\nimport invariant from 'fbjs/lib/invariant';\nimport canUseDOM from '../../modules/canUseDom';\nvar dimensions = {\n window: {\n fontScale: 1,\n height: 0,\n scale: 1,\n width: 0\n },\n screen: {\n fontScale: 1,\n height: 0,\n scale: 1,\n width: 0\n }\n};\nvar listeners = {};\nvar shouldInit = canUseDOM;\nfunction update() {\n if (!canUseDOM) {\n return;\n }\n var win = window;\n var height;\n var width;\n\n /**\n * iOS does not update viewport dimensions on keyboard open/close.\n * window.visualViewport(https://developer.mozilla.org/en-US/docs/Web/API/VisualViewport)\n * is used instead of document.documentElement.clientHeight (which remains as a fallback)\n */\n if (win.visualViewport) {\n var visualViewport = win.visualViewport;\n /**\n * We are multiplying by scale because height and width from visual viewport\n * also react to pinch zoom, and become smaller when zoomed. But it is not desired\n * behaviour, since originally documentElement client height and width were used,\n * and they do not react to pinch zoom.\n */\n height = Math.round(visualViewport.height * visualViewport.scale);\n width = Math.round(visualViewport.width * visualViewport.scale);\n } else {\n var docEl = win.document.documentElement;\n height = docEl.clientHeight;\n width = docEl.clientWidth;\n }\n dimensions.window = {\n fontScale: 1,\n height,\n scale: win.devicePixelRatio || 1,\n width\n };\n dimensions.screen = {\n fontScale: 1,\n height: win.screen.height,\n scale: win.devicePixelRatio || 1,\n width: win.screen.width\n };\n}\nfunction handleResize() {\n update();\n if (Array.isArray(listeners['change'])) {\n listeners['change'].forEach(handler => handler(dimensions));\n }\n}\nexport default class Dimensions {\n static get(dimension) {\n if (shouldInit) {\n shouldInit = false;\n update();\n }\n invariant(dimensions[dimension], \"No dimension set for key \" + dimension);\n return dimensions[dimension];\n }\n static set(initialDimensions) {\n if (initialDimensions) {\n if (canUseDOM) {\n invariant(false, 'Dimensions cannot be set in the browser');\n } else {\n if (initialDimensions.screen != null) {\n dimensions.screen = initialDimensions.screen;\n }\n if (initialDimensions.window != null) {\n dimensions.window = initialDimensions.window;\n }\n }\n }\n }\n static addEventListener(type, handler) {\n listeners[type] = listeners[type] || [];\n listeners[type].push(handler);\n return {\n remove: () => {\n this.removeEventListener(type, handler);\n }\n };\n }\n static removeEventListener(type, handler) {\n if (Array.isArray(listeners[type])) {\n listeners[type] = listeners[type].filter(_handler => _handler !== handler);\n }\n }\n}\nif (canUseDOM) {\n if (window.visualViewport) {\n window.visualViewport.addEventListener('resize', handleResize, false);\n } else {\n window.addEventListener('resize', handleResize, false);\n }\n}","import { Platform } from 'expo-modules-core';\nimport { PixelRatio } from 'react-native';\n// Returns the Metro dev server-specific asset location.\nfunction getScaledAssetPath(asset) {\n const scale = AssetSourceResolver.pickScale(asset.scales, PixelRatio.get());\n const scaleSuffix = scale === 1 ? '' : '@' + scale + 'x';\n const type = !asset.type ? '' : `.${asset.type}`;\n if (__DEV__) {\n return asset.httpServerLocation + '/' + asset.name + scaleSuffix + type;\n }\n else {\n return asset.httpServerLocation.replace(/\\.\\.\\//g, '_') + '/' + asset.name + scaleSuffix + type;\n }\n}\nexport default class AssetSourceResolver {\n serverUrl;\n // where the jsbundle is being run from\n // NOTE(EvanBacon): Never defined on web.\n jsbundleUrl;\n // the asset to resolve\n asset;\n constructor(serverUrl, jsbundleUrl, asset) {\n this.serverUrl = serverUrl || 'https://expo.dev';\n this.jsbundleUrl = null;\n this.asset = asset;\n }\n // Always true for web runtimes\n isLoadedFromServer() {\n return true;\n }\n // Always false for web runtimes\n isLoadedFromFileSystem() {\n return false;\n }\n defaultAsset() {\n return this.assetServerURL();\n }\n /**\n * @returns absolute remote URL for the hosted asset.\n */\n assetServerURL() {\n const fromUrl = new URL(getScaledAssetPath(this.asset), this.serverUrl);\n fromUrl.searchParams.set('platform', Platform.OS);\n fromUrl.searchParams.set('hash', this.asset.hash);\n return this.fromSource(\n // Relative on web\n fromUrl.toString().replace(fromUrl.origin, ''));\n }\n fromSource(source) {\n return {\n __packager_asset: true,\n width: this.asset.width ?? undefined,\n height: this.asset.height ?? undefined,\n uri: source,\n scale: AssetSourceResolver.pickScale(this.asset.scales, PixelRatio.get()),\n };\n }\n static pickScale(scales, deviceScale) {\n for (let i = 0; i < scales.length; i++) {\n if (scales[i] >= deviceScale) {\n return scales[i];\n }\n }\n return scales[scales.length - 1] || 1;\n }\n}\n//# sourceMappingURL=AssetSourceResolver.js.map","export const IS_ENV_WITH_LOCAL_ASSETS = false;\nexport function getLocalAssets() {\n return {};\n}\nexport function getManifest2() {\n return {};\n}\n// Compute manifest base URL if available\nexport const manifestBaseUrl = null;\n//# sourceMappingURL=PlatformUtils.web.js.map","export function getFilename(url) {\n const { pathname, searchParams } = new URL(url, 'https://e');\n // When attached to a dev server, we use `unstable_path` to represent the file path. This ensures\n // the file name is not canonicalized by the browser.\n // NOTE(EvanBacon): This is technically not tied to `__DEV__` as it's possible to use this while bundling in production\n // mode.\n if (__DEV__) {\n if (searchParams.has('unstable_path')) {\n const encodedFilePath = decodeURIComponent(searchParams.get('unstable_path'));\n return getBasename(encodedFilePath);\n }\n }\n return getBasename(pathname);\n}\nfunction getBasename(pathname) {\n return pathname.substring(pathname.lastIndexOf('/') + 1);\n}\nexport function getFileExtension(url) {\n const filename = getFilename(url);\n const dotIndex = filename.lastIndexOf('.');\n // Ignore leading dots for hidden files\n return dotIndex > 0 ? filename.substring(dotIndex) : '';\n}\n/**\n * Returns the base URL from a manifest's URL. For example, given a manifest hosted at\n * https://example.com/app/manifest.json, the base URL would be https://example.com/app/. Query\n * parameters and fragments also are removed.\n *\n * For an Expo-hosted project with a manifest hosted at https://exp.host/@user/project/index.exp, the\n * base URL would be https://exp.host/@user/project.\n *\n * We also normalize the \"exp\" protocol to \"http\" to handle internal URLs with the Expo schemes used\n * to tell the OS to open the URLs in the the Expo client.\n */\nexport function getManifestBaseUrl(manifestUrl) {\n const urlObject = new URL(manifestUrl);\n let nextProtocol = urlObject.protocol;\n // Change the scheme to http(s) if it is exp(s)\n if (nextProtocol === 'exp:') {\n nextProtocol = 'http:';\n }\n else if (nextProtocol === 'exps:') {\n nextProtocol = 'https:';\n }\n urlObject.protocol = nextProtocol;\n // Trim filename, query parameters, and fragment, if any\n const directory = urlObject.pathname.substring(0, urlObject.pathname.lastIndexOf('/') + 1);\n urlObject.pathname = directory;\n urlObject.search = '';\n urlObject.hash = '';\n // The URL spec doesn't allow for changing the protocol to `http` or `https`\n // without a port set so instead, we'll just swap the protocol manually.\n return urlObject.protocol !== nextProtocol\n ? urlObject.href.replace(urlObject.protocol, nextProtocol)\n : urlObject.href;\n}\n//# sourceMappingURL=AssetUris.js.map","export async function downloadAsync(url, _hash, _type) {\n return url;\n}\n//# sourceMappingURL=ExpoAsset.web.js.map","/* eslint-env browser */\nimport { Platform } from 'expo-modules-core';\nimport { getFilename } from './AssetUris';\nexport function isImageType(type) {\n return /^(jpeg|jpg|gif|png|bmp|webp|heic)$/i.test(type);\n}\nexport function getImageInfoAsync(url) {\n if (!Platform.isDOMAvailable) {\n return Promise.resolve({ name: getFilename(url), width: 0, height: 0 });\n }\n return new Promise((resolve, reject) => {\n const img = new Image();\n img.onerror = reject;\n img.onload = () => {\n resolve({\n name: getFilename(url),\n width: img.naturalWidth,\n height: img.naturalHeight,\n });\n };\n img.src = url;\n });\n}\n//# sourceMappingURL=ImageAssets.js.map","export function getLocalAssetUri(hash, type) {\n // noop on web\n return null;\n}\n//# sourceMappingURL=LocalAssets.web.js.map","import { getAssetByID } from '@react-native/assets-registry/registry';\nimport AssetSourceResolver from './AssetSourceResolver';\nlet _customSourceTransformer;\nexport function setCustomSourceTransformer(transformer) {\n _customSourceTransformer = transformer;\n}\n/**\n * `source` is either a number (opaque type returned by require('./foo.png'))\n * or an `ImageSource` like { uri: '' }\n */\nexport default function resolveAssetSource(source) {\n if (typeof source === 'object') {\n return source;\n }\n const asset = getAssetByID(source);\n if (!asset) {\n return null;\n }\n const resolver = new AssetSourceResolver(\n // Doesn't matter since this is removed on web\n 'https://expo.dev', null, asset);\n if (_customSourceTransformer) {\n return _customSourceTransformer(resolver);\n }\n return resolver.defaultAsset();\n}\nObject.defineProperty(resolveAssetSource, 'setCustomSourceTransformer', {\n get() {\n return setCustomSourceTransformer;\n },\n});\nexport const { pickScale } = AssetSourceResolver;\n//# sourceMappingURL=resolveAssetSource.js.map","import { useEffect, useState } from 'react';\nimport { Asset } from './Asset';\n// @needsAudit\n/**\n * Downloads and stores one or more assets locally.\n * After the assets are loaded, this hook returns a list of asset instances.\n * If something went wrong when loading the assets, an error is returned.\n *\n * > Note, the assets are not \"reloaded\" when you dynamically change the asset list.\n *\n * @return Returns an array containing:\n * - on the first position, a list of all loaded assets. If they aren't loaded yet, this value is\n * `undefined`.\n * - on the second position, an error which encountered when loading the assets. If there was no\n * error, this value is `undefined`.\n *\n * @example\n * ```tsx\n * const [assets, error] = useAssets([require('path/to/asset.jpg'), require('path/to/other.png')]);\n *\n * return assets ? : null;\n * ```\n */\nexport function useAssets(moduleIds) {\n const [assets, setAssets] = useState();\n const [error, setError] = useState();\n useEffect(() => {\n Asset.loadAsync(moduleIds).then(setAssets).catch(setError);\n }, []);\n return [assets, error];\n}\n//# sourceMappingURL=AssetHooks.js.map","import ExpoFontLoader from './ExpoFontLoader';\nexport const loadPromises = {};\n// cache the value on the js side for fast access to the fonts that are loaded\nlet cache = {};\nexport function markLoaded(fontFamily) {\n cache[fontFamily] = true;\n}\nexport function isLoadedInCache(fontFamily) {\n return fontFamily in cache;\n}\nexport function isLoadedNative(fontFamily) {\n if (isLoadedInCache(fontFamily)) {\n return true;\n }\n else {\n const loadedNativeFonts = ExpoFontLoader.getLoadedFonts();\n loadedNativeFonts.forEach((font) => {\n cache[font] = true;\n });\n return fontFamily in cache;\n }\n}\nexport function purgeFontFamilyFromCache(fontFamily) {\n delete cache[fontFamily];\n}\nexport function purgeCache() {\n cache = {};\n}\n//# sourceMappingURL=memory.js.map","import { CodedError } from 'expo-modules-core';\nimport ExpoFontLoader from './ExpoFontLoader';\nimport { getAssetForSource, loadSingleFontAsync } from './FontLoader';\n/**\n * @returns the server resources that should be statically extracted.\n * @private\n */\nexport function getServerResources() {\n return ExpoFontLoader.getServerResources();\n}\n/**\n * @returns clear the server resources from the global scope.\n * @private\n */\nexport function resetServerContext() {\n return ExpoFontLoader.resetServerContext();\n}\nexport function registerStaticFont(fontFamily, source) {\n // MUST BE A SYNC FUNCTION!\n if (!source) {\n throw new CodedError(`ERR_FONT_SOURCE`, `Cannot load null or undefined font source: { \"${fontFamily}\": ${source} }. Expected asset of type \\`FontSource\\` for fontFamily of name: \"${fontFamily}\"`);\n }\n const asset = getAssetForSource(source);\n loadSingleFontAsync(fontFamily, asset);\n}\n//# sourceMappingURL=server.js.map","import { useEffect, useState } from 'react';\nimport { loadAsync, isLoaded } from './Font';\nfunction isMapLoaded(map) {\n if (typeof map === 'string') {\n return isLoaded(map);\n }\n else {\n return Object.keys(map).every((fontFamily) => isLoaded(fontFamily));\n }\n}\nfunction useRuntimeFonts(map) {\n const [loaded, setLoaded] = useState(\n // For web rehydration, we need to check if the fonts are already loaded during the static render.\n // Native will also benefit from this optimization.\n isMapLoaded(map));\n const [error, setError] = useState(null);\n useEffect(() => {\n let isMounted = true;\n loadAsync(map)\n .then(() => {\n if (isMounted) {\n setLoaded(true);\n }\n })\n .catch((error) => {\n if (isMounted) {\n setError(error);\n }\n });\n return () => {\n isMounted = false;\n };\n }, []);\n return [loaded, error];\n}\nfunction useStaticFonts(map) {\n loadAsync(map);\n return [true, null];\n}\n// @needsAudit\n/**\n * Load a map of fonts with [`loadAsync`](#loadasyncfontfamilyorfontmap-source). This returns a `boolean` if the fonts are\n * loaded and ready to use. It also returns an error if something went wrong, to use in development.\n *\n * > Note, the fonts are not \"reloaded\" when you dynamically change the font map.\n *\n * @param map A map of `fontFamily`s to [`FontSource`](#fontsource)s. After loading the font you can\n * use the key in the `fontFamily` style prop of a `Text` element.\n *\n * @return\n * - __loaded__ (`boolean`) - A boolean to detect if the font for `fontFamily` has finished\n * loading.\n * - __error__ (`Error | null`) - An error encountered when loading the fonts.\n *\n * @example\n * ```tsx\n * const [loaded, error] = useFonts({ ... });\n * ```\n */\nexport const useFonts = typeof window === 'undefined' ? useStaticFonts : useRuntimeFonts;\n//# sourceMappingURL=FontHooks.js.map","","","","","","","import React, { useState } from 'react';\nimport SplashScreenBackground from '../v2BaseComponents/SplashScreenBackground';\nimport { Platform } from 'react-native';\n\nexport type ResetAppProviderProps = {\n children: React.ReactElement;\n};\n\nexport type ResetApp = (delay?: number) => void;\n\nexport const ResetAppContext = React.createContext(() => {\n return;\n});\n\nexport const useResetApp = () => React.useContext(ResetAppContext);\n\nexport const ResetAppProvider: React.FC = React.memo(({ children }) => {\n const [isPendingReset, setIsPendingReset] = useState(false);\n const [resetKey, setResetKey] = React.useState(0);\n const resetApp = React.useCallback((delay?: number) => {\n setIsPendingReset(true);\n // nosemgrep\n setTimeout(() => {\n /**\n * Web apps will initialize the screen from the url. this can cause\n * unintended behavior (such as infinite loops from the redirect page)\n *\n * Resetting the url will effectively reset the navigation state on the web\n */\n if (Platform.OS === 'web') {\n window.location.href = '/';\n }\n\n setResetKey((prev) => prev + 1);\n setIsPendingReset(false);\n }, delay);\n }, []);\n\n const content = (\n \n {React.cloneElement(children, { key: resetKey })}\n \n );\n\n return isPendingReset ? : content;\n});\n","import React from 'react';\nimport { ImageBackground, View } from 'react-native';\nimport Images from '../../Images';\nimport { useIsMobileLayout } from '../../hooks/useIsMobileLayout';\n\nexport type SplashScreenBackgroundOwnProps = {\n children?: React.ReactNode;\n};\n\nexport type SplashScreenBackgroundProps = SplashScreenBackgroundOwnProps;\n\nconst SplashScreenBackground: React.FC = (props) => {\n const isMobile = useIsMobileLayout();\n const source = isMobile ? Images.MobileSplash : Images.DesktopSplash;\n return (\n \n {props.children}\n \n );\n};\n\nexport default React.memo(SplashScreenBackground);\n","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"children\", \"style\", \"imageStyle\", \"imageRef\"];\n/**\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nimport * as React from 'react';\nimport { forwardRef } from 'react';\nimport Image from '../Image';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\nvar emptyObject = {};\n\n/**\n * Very simple drop-in replacement for which supports nesting views.\n */\nvar ImageBackground = /*#__PURE__*/forwardRef((props, forwardedRef) => {\n var children = props.children,\n _props$style = props.style,\n style = _props$style === void 0 ? emptyObject : _props$style,\n imageStyle = props.imageStyle,\n imageRef = props.imageRef,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n var _StyleSheet$flatten = StyleSheet.flatten(style),\n height = _StyleSheet$flatten.height,\n width = _StyleSheet$flatten.width;\n return /*#__PURE__*/React.createElement(View, {\n ref: forwardedRef,\n style: style\n }, /*#__PURE__*/React.createElement(Image, _extends({}, rest, {\n ref: imageRef,\n style: [{\n // Temporary Workaround:\n // Current (imperfect yet) implementation of overwrites width and height styles\n // (which is not quite correct), and these styles conflict with explicitly set styles\n // of and with our internal layout model here.\n // So, we have to proxy/reapply these styles explicitly for actual component.\n // This workaround should be removed after implementing proper support of\n // intrinsic content size of the .\n width,\n height,\n zIndex: -1\n }, StyleSheet.absoluteFill, imageStyle]\n })), children);\n});\nImageBackground.displayName = 'ImageBackground';\nexport default ImageBackground;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\n'use client';\n\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"aria-label\", \"accessibilityLabel\", \"blurRadius\", \"defaultSource\", \"draggable\", \"onError\", \"onLayout\", \"onLoad\", \"onLoadEnd\", \"onLoadStart\", \"pointerEvents\", \"source\", \"style\"];\nimport * as React from 'react';\nimport createElement from '../createElement';\nimport { getAssetByID } from '../../modules/AssetRegistry';\nimport { createBoxShadowValue } from '../StyleSheet/preprocess';\nimport ImageLoader from '../../modules/ImageLoader';\nimport PixelRatio from '../PixelRatio';\nimport StyleSheet from '../StyleSheet';\nimport TextAncestorContext from '../Text/TextAncestorContext';\nimport View from '../View';\nimport { warnOnce } from '../../modules/warnOnce';\nvar ERRORED = 'ERRORED';\nvar LOADED = 'LOADED';\nvar LOADING = 'LOADING';\nvar IDLE = 'IDLE';\nvar _filterId = 0;\nvar svgDataUriPattern = /^(data:image\\/svg\\+xml;utf8,)(.*)/;\nfunction createTintColorSVG(tintColor, id) {\n return tintColor && id != null ? /*#__PURE__*/React.createElement(\"svg\", {\n style: {\n position: 'absolute',\n height: 0,\n visibility: 'hidden',\n width: 0\n }\n }, /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"filter\", {\n id: \"tint-\" + id,\n suppressHydrationWarning: true\n }, /*#__PURE__*/React.createElement(\"feFlood\", {\n floodColor: \"\" + tintColor,\n key: tintColor\n }), /*#__PURE__*/React.createElement(\"feComposite\", {\n in2: \"SourceAlpha\",\n operator: \"in\"\n })))) : null;\n}\nfunction extractNonStandardStyleProps(style, blurRadius, filterId, tintColorProp) {\n var flatStyle = StyleSheet.flatten(style);\n var filter = flatStyle.filter,\n resizeMode = flatStyle.resizeMode,\n shadowOffset = flatStyle.shadowOffset,\n tintColor = flatStyle.tintColor;\n if (flatStyle.resizeMode) {\n warnOnce('Image.style.resizeMode', 'Image: style.resizeMode is deprecated. Please use props.resizeMode.');\n }\n if (flatStyle.tintColor) {\n warnOnce('Image.style.tintColor', 'Image: style.tintColor is deprecated. Please use props.tintColor.');\n }\n\n // Add CSS filters\n // React Native exposes these features as props and proprietary styles\n var filters = [];\n var _filter = null;\n if (filter) {\n filters.push(filter);\n }\n if (blurRadius) {\n filters.push(\"blur(\" + blurRadius + \"px)\");\n }\n if (shadowOffset) {\n var shadowString = createBoxShadowValue(flatStyle);\n if (shadowString) {\n filters.push(\"drop-shadow(\" + shadowString + \")\");\n }\n }\n if ((tintColorProp || tintColor) && filterId != null) {\n filters.push(\"url(#tint-\" + filterId + \")\");\n }\n if (filters.length > 0) {\n _filter = filters.join(' ');\n }\n return [resizeMode, _filter, tintColor];\n}\nfunction resolveAssetDimensions(source) {\n if (typeof source === 'number') {\n var _getAssetByID = getAssetByID(source),\n _height = _getAssetByID.height,\n _width = _getAssetByID.width;\n return {\n height: _height,\n width: _width\n };\n } else if (source != null && !Array.isArray(source) && typeof source === 'object') {\n var _height2 = source.height,\n _width2 = source.width;\n return {\n height: _height2,\n width: _width2\n };\n }\n}\nfunction resolveAssetUri(source) {\n var uri = null;\n if (typeof source === 'number') {\n // get the URI from the packager\n var asset = getAssetByID(source);\n if (asset == null) {\n throw new Error(\"Image: asset with ID \\\"\" + source + \"\\\" could not be found. Please check the image source or packager.\");\n }\n var scale = asset.scales[0];\n if (asset.scales.length > 1) {\n var preferredScale = PixelRatio.get();\n // Get the scale which is closest to the preferred scale\n scale = asset.scales.reduce((prev, curr) => Math.abs(curr - preferredScale) < Math.abs(prev - preferredScale) ? curr : prev);\n }\n var scaleSuffix = scale !== 1 ? \"@\" + scale + \"x\" : '';\n uri = asset ? asset.httpServerLocation + \"/\" + asset.name + scaleSuffix + \".\" + asset.type : '';\n } else if (typeof source === 'string') {\n uri = source;\n } else if (source && typeof source.uri === 'string') {\n uri = source.uri;\n }\n if (uri) {\n var match = uri.match(svgDataUriPattern);\n // inline SVG markup may contain characters (e.g., #, \") that need to be escaped\n if (match) {\n var prefix = match[1],\n svg = match[2];\n var encodedSvg = encodeURIComponent(svg);\n return \"\" + prefix + encodedSvg;\n }\n }\n return uri;\n}\nvar Image = /*#__PURE__*/React.forwardRef((props, ref) => {\n var _ariaLabel = props['aria-label'],\n accessibilityLabel = props.accessibilityLabel,\n blurRadius = props.blurRadius,\n defaultSource = props.defaultSource,\n draggable = props.draggable,\n onError = props.onError,\n onLayout = props.onLayout,\n onLoad = props.onLoad,\n onLoadEnd = props.onLoadEnd,\n onLoadStart = props.onLoadStart,\n pointerEvents = props.pointerEvents,\n source = props.source,\n style = props.style,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n var ariaLabel = _ariaLabel || accessibilityLabel;\n if (process.env.NODE_ENV !== 'production') {\n if (props.children) {\n throw new Error('The component cannot contain children. If you want to render content on top of the image, consider using the component or absolute positioning.');\n }\n }\n var _React$useState = React.useState(() => {\n var uri = resolveAssetUri(source);\n if (uri != null) {\n var isLoaded = ImageLoader.has(uri);\n if (isLoaded) {\n return LOADED;\n }\n }\n return IDLE;\n }),\n state = _React$useState[0],\n updateState = _React$useState[1];\n var _React$useState2 = React.useState({}),\n layout = _React$useState2[0],\n updateLayout = _React$useState2[1];\n var hasTextAncestor = React.useContext(TextAncestorContext);\n var hiddenImageRef = React.useRef(null);\n var filterRef = React.useRef(_filterId++);\n var requestRef = React.useRef(null);\n var shouldDisplaySource = state === LOADED || state === LOADING && defaultSource == null;\n var _extractNonStandardSt = extractNonStandardStyleProps(style, blurRadius, filterRef.current, props.tintColor),\n _resizeMode = _extractNonStandardSt[0],\n filter = _extractNonStandardSt[1],\n _tintColor = _extractNonStandardSt[2];\n var resizeMode = props.resizeMode || _resizeMode || 'cover';\n var tintColor = props.tintColor || _tintColor;\n var selectedSource = shouldDisplaySource ? source : defaultSource;\n var displayImageUri = resolveAssetUri(selectedSource);\n var imageSizeStyle = resolveAssetDimensions(selectedSource);\n var backgroundImage = displayImageUri ? \"url(\\\"\" + displayImageUri + \"\\\")\" : null;\n var backgroundSize = getBackgroundSize();\n\n // Accessibility image allows users to trigger the browser's image context menu\n var hiddenImage = displayImageUri ? createElement('img', {\n alt: ariaLabel || '',\n style: styles.accessibilityImage$raw,\n draggable: draggable || false,\n ref: hiddenImageRef,\n src: displayImageUri\n }) : null;\n function getBackgroundSize() {\n if (hiddenImageRef.current != null && (resizeMode === 'center' || resizeMode === 'repeat')) {\n var _hiddenImageRef$curre = hiddenImageRef.current,\n naturalHeight = _hiddenImageRef$curre.naturalHeight,\n naturalWidth = _hiddenImageRef$curre.naturalWidth;\n var _height3 = layout.height,\n _width3 = layout.width;\n if (naturalHeight && naturalWidth && _height3 && _width3) {\n var scaleFactor = Math.min(1, _width3 / naturalWidth, _height3 / naturalHeight);\n var x = Math.ceil(scaleFactor * naturalWidth);\n var y = Math.ceil(scaleFactor * naturalHeight);\n return x + \"px \" + y + \"px\";\n }\n }\n }\n function handleLayout(e) {\n if (resizeMode === 'center' || resizeMode === 'repeat' || onLayout) {\n var _layout = e.nativeEvent.layout;\n onLayout && onLayout(e);\n updateLayout(_layout);\n }\n }\n\n // Image loading\n var uri = resolveAssetUri(source);\n React.useEffect(() => {\n abortPendingRequest();\n if (uri != null) {\n updateState(LOADING);\n if (onLoadStart) {\n onLoadStart();\n }\n requestRef.current = ImageLoader.load(uri, function load(e) {\n updateState(LOADED);\n if (onLoad) {\n onLoad(e);\n }\n if (onLoadEnd) {\n onLoadEnd();\n }\n }, function error() {\n updateState(ERRORED);\n if (onError) {\n onError({\n nativeEvent: {\n error: \"Failed to load resource \" + uri\n }\n });\n }\n if (onLoadEnd) {\n onLoadEnd();\n }\n });\n }\n function abortPendingRequest() {\n if (requestRef.current != null) {\n ImageLoader.abort(requestRef.current);\n requestRef.current = null;\n }\n }\n return abortPendingRequest;\n }, [uri, requestRef, updateState, onError, onLoad, onLoadEnd, onLoadStart]);\n return /*#__PURE__*/React.createElement(View, _extends({}, rest, {\n \"aria-label\": ariaLabel,\n onLayout: handleLayout,\n pointerEvents: pointerEvents,\n ref: ref,\n style: [styles.root, hasTextAncestor && styles.inline, imageSizeStyle, style, styles.undo,\n // TEMP: avoid deprecated shadow props regression\n // until Image refactored to use createElement.\n {\n boxShadow: null\n }]\n }), /*#__PURE__*/React.createElement(View, {\n style: [styles.image, resizeModeStyles[resizeMode], {\n backgroundImage,\n filter\n }, backgroundSize != null && {\n backgroundSize\n }],\n suppressHydrationWarning: true\n }), hiddenImage, createTintColorSVG(tintColor, filterRef.current));\n});\nImage.displayName = 'Image';\n\n// $FlowIgnore: This is the correct type, but casting makes it unhappy since the variables aren't defined yet\nvar ImageWithStatics = Image;\nImageWithStatics.getSize = function (uri, success, failure) {\n ImageLoader.getSize(uri, success, failure);\n};\nImageWithStatics.prefetch = function (uri) {\n return ImageLoader.prefetch(uri);\n};\nImageWithStatics.queryCache = function (uris) {\n return ImageLoader.queryCache(uris);\n};\nvar styles = StyleSheet.create({\n root: {\n flexBasis: 'auto',\n overflow: 'hidden',\n zIndex: 0\n },\n inline: {\n display: 'inline-flex'\n },\n undo: {\n // These styles are converted to CSS filters applied to the\n // element displaying the background image.\n blurRadius: null,\n shadowColor: null,\n shadowOpacity: null,\n shadowOffset: null,\n shadowRadius: null,\n tintColor: null,\n // These styles are not supported\n overlayColor: null,\n resizeMode: null\n },\n image: _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {\n backgroundColor: 'transparent',\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n height: '100%',\n width: '100%',\n zIndex: -1\n }),\n accessibilityImage$raw: _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {\n height: '100%',\n opacity: 0,\n width: '100%',\n zIndex: -1\n })\n});\nvar resizeModeStyles = StyleSheet.create({\n center: {\n backgroundSize: 'auto'\n },\n contain: {\n backgroundSize: 'contain'\n },\n cover: {\n backgroundSize: 'cover'\n },\n none: {\n backgroundPosition: '0',\n backgroundSize: 'auto'\n },\n repeat: {\n backgroundPosition: '0',\n backgroundRepeat: 'repeat',\n backgroundSize: 'auto'\n },\n stretch: {\n backgroundSize: '100% 100%'\n }\n});\nexport default ImageWithStatics;","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\n'use client';\n\nimport AccessibilityUtil from '../../modules/AccessibilityUtil';\nimport createDOMProps from '../../modules/createDOMProps';\nimport React from 'react';\nimport { LocaleProvider } from '../../modules/useLocale';\nvar createElement = (component, props, options) => {\n // Use equivalent platform elements where possible.\n var accessibilityComponent;\n if (component && component.constructor === String) {\n accessibilityComponent = AccessibilityUtil.propsToAccessibilityComponent(props);\n }\n var Component = accessibilityComponent || component;\n var domProps = createDOMProps(Component, props, options);\n var element = /*#__PURE__*/React.createElement(Component, domProps);\n\n // Update locale context if element's writing direction prop changes\n var elementWithLocaleProvider = domProps.dir ? /*#__PURE__*/React.createElement(LocaleProvider, {\n children: element,\n direction: domProps.dir,\n locale: domProps.lang\n }) : element;\n return elementWithLocaleProvider;\n};\nexport default createElement;","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nimport isDisabled from './isDisabled';\nimport propsToAccessibilityComponent from './propsToAccessibilityComponent';\nimport propsToAriaRole from './propsToAriaRole';\nvar AccessibilityUtil = {\n isDisabled,\n propsToAccessibilityComponent,\n propsToAriaRole\n};\nexport default AccessibilityUtil;","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nvar isDisabled = props => props.disabled || Array.isArray(props.accessibilityStates) && props.accessibilityStates.indexOf('disabled') > -1;\nexport default isDisabled;","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nimport propsToAriaRole from './propsToAriaRole';\nvar roleComponents = {\n article: 'article',\n banner: 'header',\n blockquote: 'blockquote',\n button: 'button',\n code: 'code',\n complementary: 'aside',\n contentinfo: 'footer',\n deletion: 'del',\n emphasis: 'em',\n figure: 'figure',\n insertion: 'ins',\n form: 'form',\n list: 'ul',\n listitem: 'li',\n main: 'main',\n navigation: 'nav',\n paragraph: 'p',\n region: 'section',\n strong: 'strong'\n};\nvar emptyObject = {};\nvar propsToAccessibilityComponent = function propsToAccessibilityComponent(props) {\n if (props === void 0) {\n props = emptyObject;\n }\n var roleProp = props.role || props.accessibilityRole;\n // special-case for \"label\" role which doesn't map to an ARIA role\n if (roleProp === 'label') {\n return 'label';\n }\n var role = propsToAriaRole(props);\n if (role) {\n if (role === 'heading') {\n var level = props.accessibilityLevel || props['aria-level'];\n if (level != null) {\n return \"h\" + level;\n }\n return 'h1';\n }\n return roleComponents[role];\n }\n};\nexport default propsToAccessibilityComponent;","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nvar accessibilityRoleToWebRole = {\n adjustable: 'slider',\n button: 'button',\n header: 'heading',\n image: 'img',\n imagebutton: null,\n keyboardkey: null,\n label: null,\n link: 'link',\n none: 'presentation',\n search: 'search',\n summary: 'region',\n text: null\n};\nvar propsToAriaRole = _ref => {\n var accessibilityRole = _ref.accessibilityRole,\n role = _ref.role;\n var _role = role || accessibilityRole;\n if (_role) {\n var inferredRole = accessibilityRoleToWebRole[_role];\n if (inferredRole !== null) {\n // ignore roles that don't map to web\n return inferredRole || _role;\n }\n }\n};\nexport default propsToAriaRole;","import _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"aria-activedescendant\", \"accessibilityActiveDescendant\", \"aria-atomic\", \"accessibilityAtomic\", \"aria-autocomplete\", \"accessibilityAutoComplete\", \"aria-busy\", \"accessibilityBusy\", \"aria-checked\", \"accessibilityChecked\", \"aria-colcount\", \"accessibilityColumnCount\", \"aria-colindex\", \"accessibilityColumnIndex\", \"aria-colspan\", \"accessibilityColumnSpan\", \"aria-controls\", \"accessibilityControls\", \"aria-current\", \"accessibilityCurrent\", \"aria-describedby\", \"accessibilityDescribedBy\", \"aria-details\", \"accessibilityDetails\", \"aria-disabled\", \"accessibilityDisabled\", \"aria-errormessage\", \"accessibilityErrorMessage\", \"aria-expanded\", \"accessibilityExpanded\", \"aria-flowto\", \"accessibilityFlowTo\", \"aria-haspopup\", \"accessibilityHasPopup\", \"aria-hidden\", \"accessibilityHidden\", \"aria-invalid\", \"accessibilityInvalid\", \"aria-keyshortcuts\", \"accessibilityKeyShortcuts\", \"aria-label\", \"accessibilityLabel\", \"aria-labelledby\", \"accessibilityLabelledBy\", \"aria-level\", \"accessibilityLevel\", \"aria-live\", \"accessibilityLiveRegion\", \"aria-modal\", \"accessibilityModal\", \"aria-multiline\", \"accessibilityMultiline\", \"aria-multiselectable\", \"accessibilityMultiSelectable\", \"aria-orientation\", \"accessibilityOrientation\", \"aria-owns\", \"accessibilityOwns\", \"aria-placeholder\", \"accessibilityPlaceholder\", \"aria-posinset\", \"accessibilityPosInSet\", \"aria-pressed\", \"accessibilityPressed\", \"aria-readonly\", \"accessibilityReadOnly\", \"aria-required\", \"accessibilityRequired\", \"role\", \"accessibilityRole\", \"aria-roledescription\", \"accessibilityRoleDescription\", \"aria-rowcount\", \"accessibilityRowCount\", \"aria-rowindex\", \"accessibilityRowIndex\", \"aria-rowspan\", \"accessibilityRowSpan\", \"aria-selected\", \"accessibilitySelected\", \"aria-setsize\", \"accessibilitySetSize\", \"aria-sort\", \"accessibilitySort\", \"aria-valuemax\", \"accessibilityValueMax\", \"aria-valuemin\", \"accessibilityValueMin\", \"aria-valuenow\", \"accessibilityValueNow\", \"aria-valuetext\", \"accessibilityValueText\", \"dataSet\", \"focusable\", \"id\", \"nativeID\", \"pointerEvents\", \"style\", \"tabIndex\", \"testID\"];\n/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nimport AccessibilityUtil from '../AccessibilityUtil';\nimport StyleSheet from '../../exports/StyleSheet';\nimport { warnOnce } from '../warnOnce';\nvar emptyObject = {};\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\nvar uppercasePattern = /[A-Z]/g;\nfunction toHyphenLower(match) {\n return '-' + match.toLowerCase();\n}\nfunction hyphenateString(str) {\n return str.replace(uppercasePattern, toHyphenLower);\n}\nfunction processIDRefList(idRefList) {\n return isArray(idRefList) ? idRefList.join(' ') : idRefList;\n}\nvar pointerEventsStyles = StyleSheet.create({\n auto: {\n pointerEvents: 'auto'\n },\n 'box-none': {\n pointerEvents: 'box-none'\n },\n 'box-only': {\n pointerEvents: 'box-only'\n },\n none: {\n pointerEvents: 'none'\n }\n});\nvar createDOMProps = (elementType, props, options) => {\n if (!props) {\n props = emptyObject;\n }\n var _props = props,\n ariaActiveDescendant = _props['aria-activedescendant'],\n accessibilityActiveDescendant = _props.accessibilityActiveDescendant,\n ariaAtomic = _props['aria-atomic'],\n accessibilityAtomic = _props.accessibilityAtomic,\n ariaAutoComplete = _props['aria-autocomplete'],\n accessibilityAutoComplete = _props.accessibilityAutoComplete,\n ariaBusy = _props['aria-busy'],\n accessibilityBusy = _props.accessibilityBusy,\n ariaChecked = _props['aria-checked'],\n accessibilityChecked = _props.accessibilityChecked,\n ariaColumnCount = _props['aria-colcount'],\n accessibilityColumnCount = _props.accessibilityColumnCount,\n ariaColumnIndex = _props['aria-colindex'],\n accessibilityColumnIndex = _props.accessibilityColumnIndex,\n ariaColumnSpan = _props['aria-colspan'],\n accessibilityColumnSpan = _props.accessibilityColumnSpan,\n ariaControls = _props['aria-controls'],\n accessibilityControls = _props.accessibilityControls,\n ariaCurrent = _props['aria-current'],\n accessibilityCurrent = _props.accessibilityCurrent,\n ariaDescribedBy = _props['aria-describedby'],\n accessibilityDescribedBy = _props.accessibilityDescribedBy,\n ariaDetails = _props['aria-details'],\n accessibilityDetails = _props.accessibilityDetails,\n ariaDisabled = _props['aria-disabled'],\n accessibilityDisabled = _props.accessibilityDisabled,\n ariaErrorMessage = _props['aria-errormessage'],\n accessibilityErrorMessage = _props.accessibilityErrorMessage,\n ariaExpanded = _props['aria-expanded'],\n accessibilityExpanded = _props.accessibilityExpanded,\n ariaFlowTo = _props['aria-flowto'],\n accessibilityFlowTo = _props.accessibilityFlowTo,\n ariaHasPopup = _props['aria-haspopup'],\n accessibilityHasPopup = _props.accessibilityHasPopup,\n ariaHidden = _props['aria-hidden'],\n accessibilityHidden = _props.accessibilityHidden,\n ariaInvalid = _props['aria-invalid'],\n accessibilityInvalid = _props.accessibilityInvalid,\n ariaKeyShortcuts = _props['aria-keyshortcuts'],\n accessibilityKeyShortcuts = _props.accessibilityKeyShortcuts,\n ariaLabel = _props['aria-label'],\n accessibilityLabel = _props.accessibilityLabel,\n ariaLabelledBy = _props['aria-labelledby'],\n accessibilityLabelledBy = _props.accessibilityLabelledBy,\n ariaLevel = _props['aria-level'],\n accessibilityLevel = _props.accessibilityLevel,\n ariaLive = _props['aria-live'],\n accessibilityLiveRegion = _props.accessibilityLiveRegion,\n ariaModal = _props['aria-modal'],\n accessibilityModal = _props.accessibilityModal,\n ariaMultiline = _props['aria-multiline'],\n accessibilityMultiline = _props.accessibilityMultiline,\n ariaMultiSelectable = _props['aria-multiselectable'],\n accessibilityMultiSelectable = _props.accessibilityMultiSelectable,\n ariaOrientation = _props['aria-orientation'],\n accessibilityOrientation = _props.accessibilityOrientation,\n ariaOwns = _props['aria-owns'],\n accessibilityOwns = _props.accessibilityOwns,\n ariaPlaceholder = _props['aria-placeholder'],\n accessibilityPlaceholder = _props.accessibilityPlaceholder,\n ariaPosInSet = _props['aria-posinset'],\n accessibilityPosInSet = _props.accessibilityPosInSet,\n ariaPressed = _props['aria-pressed'],\n accessibilityPressed = _props.accessibilityPressed,\n ariaReadOnly = _props['aria-readonly'],\n accessibilityReadOnly = _props.accessibilityReadOnly,\n ariaRequired = _props['aria-required'],\n accessibilityRequired = _props.accessibilityRequired,\n ariaRole = _props.role,\n accessibilityRole = _props.accessibilityRole,\n ariaRoleDescription = _props['aria-roledescription'],\n accessibilityRoleDescription = _props.accessibilityRoleDescription,\n ariaRowCount = _props['aria-rowcount'],\n accessibilityRowCount = _props.accessibilityRowCount,\n ariaRowIndex = _props['aria-rowindex'],\n accessibilityRowIndex = _props.accessibilityRowIndex,\n ariaRowSpan = _props['aria-rowspan'],\n accessibilityRowSpan = _props.accessibilityRowSpan,\n ariaSelected = _props['aria-selected'],\n accessibilitySelected = _props.accessibilitySelected,\n ariaSetSize = _props['aria-setsize'],\n accessibilitySetSize = _props.accessibilitySetSize,\n ariaSort = _props['aria-sort'],\n accessibilitySort = _props.accessibilitySort,\n ariaValueMax = _props['aria-valuemax'],\n accessibilityValueMax = _props.accessibilityValueMax,\n ariaValueMin = _props['aria-valuemin'],\n accessibilityValueMin = _props.accessibilityValueMin,\n ariaValueNow = _props['aria-valuenow'],\n accessibilityValueNow = _props.accessibilityValueNow,\n ariaValueText = _props['aria-valuetext'],\n accessibilityValueText = _props.accessibilityValueText,\n dataSet = _props.dataSet,\n focusable = _props.focusable,\n id = _props.id,\n nativeID = _props.nativeID,\n pointerEvents = _props.pointerEvents,\n style = _props.style,\n tabIndex = _props.tabIndex,\n testID = _props.testID,\n domProps = _objectWithoutPropertiesLoose(_props, _excluded);\n\n /*\n if (accessibilityDisabled != null) {\n warnOnce('accessibilityDisabled', `accessibilityDisabled is deprecated.`);\n }\n */\n var disabled = ariaDisabled || accessibilityDisabled;\n var role = AccessibilityUtil.propsToAriaRole(props);\n\n // ACCESSIBILITY\n /*\n if (accessibilityActiveDescendant != null) {\n warnOnce(\n 'accessibilityActiveDescendant',\n `accessibilityActiveDescendant is deprecated. Use aria-activedescendant.`\n );\n }\n */\n var _ariaActiveDescendant = ariaActiveDescendant != null ? ariaActiveDescendant : accessibilityActiveDescendant;\n if (_ariaActiveDescendant != null) {\n domProps['aria-activedescendant'] = _ariaActiveDescendant;\n }\n\n /*\n if (accessibilityAtomic != null) {\n warnOnce(\n 'accessibilityAtomic',\n `accessibilityAtomic is deprecated. Use aria-atomic.`\n );\n }\n */\n var _ariaAtomic = ariaAtomic != null ? ariaActiveDescendant : accessibilityAtomic;\n if (_ariaAtomic != null) {\n domProps['aria-atomic'] = _ariaAtomic;\n }\n\n /*\n if (accessibilityAutoComplete != null) {\n warnOnce(\n 'accessibilityAutoComplete',\n `accessibilityAutoComplete is deprecated. Use aria-autocomplete.`\n );\n }\n */\n var _ariaAutoComplete = ariaAutoComplete != null ? ariaAutoComplete : accessibilityAutoComplete;\n if (_ariaAutoComplete != null) {\n domProps['aria-autocomplete'] = _ariaAutoComplete;\n }\n\n /*\n if (accessibilityBusy != null) {\n warnOnce(\n 'accessibilityBusy',\n `accessibilityBusy is deprecated. Use aria-busy.`\n );\n }\n */\n var _ariaBusy = ariaBusy != null ? ariaBusy : accessibilityBusy;\n if (_ariaBusy != null) {\n domProps['aria-busy'] = _ariaBusy;\n }\n\n /*\n if (accessibilityChecked != null) {\n warnOnce(\n 'accessibilityChecked',\n `accessibilityChecked is deprecated. Use aria-checked.`\n );\n }\n */\n var _ariaChecked = ariaChecked != null ? ariaChecked : accessibilityChecked;\n if (_ariaChecked != null) {\n domProps['aria-checked'] = _ariaChecked;\n }\n\n /*\n if (accessibilityColumnCount != null) {\n warnOnce(\n 'accessibilityColumnCount',\n `accessibilityColumnCount is deprecated. Use aria-colcount.`\n );\n }\n */\n var _ariaColumnCount = ariaColumnCount != null ? ariaColumnCount : accessibilityColumnCount;\n if (_ariaColumnCount != null) {\n domProps['aria-colcount'] = _ariaColumnCount;\n }\n\n /*\n if (accessibilityColumnIndex != null) {\n warnOnce(\n 'accessibilityColumnIndex',\n `accessibilityColumnIndex is deprecated. Use aria-colindex.`\n );\n }\n */\n var _ariaColumnIndex = ariaColumnIndex != null ? ariaColumnIndex : accessibilityColumnIndex;\n if (_ariaColumnIndex != null) {\n domProps['aria-colindex'] = _ariaColumnIndex;\n }\n\n /*\n if (accessibilityColumnSpan != null) {\n warnOnce(\n 'accessibilityColumnSpan',\n `accessibilityColumnSpan is deprecated. Use aria-colspan.`\n );\n }\n */\n var _ariaColumnSpan = ariaColumnSpan != null ? ariaColumnSpan : accessibilityColumnSpan;\n if (_ariaColumnSpan != null) {\n domProps['aria-colspan'] = _ariaColumnSpan;\n }\n\n /*\n if (accessibilityControls != null) {\n warnOnce(\n 'accessibilityControls',\n `accessibilityControls is deprecated. Use aria-controls.`\n );\n }\n */\n var _ariaControls = ariaControls != null ? ariaControls : accessibilityControls;\n if (_ariaControls != null) {\n domProps['aria-controls'] = processIDRefList(_ariaControls);\n }\n\n /*\n if (accessibilityCurrent != null) {\n warnOnce(\n 'accessibilityCurrent',\n `accessibilityCurrent is deprecated. Use aria-current.`\n );\n }\n */\n var _ariaCurrent = ariaCurrent != null ? ariaCurrent : accessibilityCurrent;\n if (_ariaCurrent != null) {\n domProps['aria-current'] = _ariaCurrent;\n }\n\n /*\n if (accessibilityDescribedBy != null) {\n warnOnce(\n 'accessibilityDescribedBy',\n `accessibilityDescribedBy is deprecated. Use aria-describedby.`\n );\n }\n */\n var _ariaDescribedBy = ariaDescribedBy != null ? ariaDescribedBy : accessibilityDescribedBy;\n if (_ariaDescribedBy != null) {\n domProps['aria-describedby'] = processIDRefList(_ariaDescribedBy);\n }\n\n /*\n if (accessibilityDetails != null) {\n warnOnce(\n 'accessibilityDetails',\n `accessibilityDetails is deprecated. Use aria-details.`\n );\n }\n */\n var _ariaDetails = ariaDetails != null ? ariaDetails : accessibilityDetails;\n if (_ariaDetails != null) {\n domProps['aria-details'] = _ariaDetails;\n }\n if (disabled === true) {\n domProps['aria-disabled'] = true;\n // Enhance with native semantics\n if (elementType === 'button' || elementType === 'form' || elementType === 'input' || elementType === 'select' || elementType === 'textarea') {\n domProps.disabled = true;\n }\n }\n\n /*\n if (accessibilityErrorMessage != null) {\n warnOnce(\n 'accessibilityErrorMessage',\n `accessibilityErrorMessage is deprecated. Use aria-errormessage.`\n );\n }\n */\n var _ariaErrorMessage = ariaErrorMessage != null ? ariaErrorMessage : accessibilityErrorMessage;\n if (_ariaErrorMessage != null) {\n domProps['aria-errormessage'] = _ariaErrorMessage;\n }\n\n /*\n if (accessibilityExpanded != null) {\n warnOnce(\n 'accessibilityExpanded',\n `accessibilityExpanded is deprecated. Use aria-expanded.`\n );\n }\n */\n var _ariaExpanded = ariaExpanded != null ? ariaExpanded : accessibilityExpanded;\n if (_ariaExpanded != null) {\n domProps['aria-expanded'] = _ariaExpanded;\n }\n\n /*\n if (accessibilityFlowTo != null) {\n warnOnce(\n 'accessibilityFlowTo',\n `accessibilityFlowTo is deprecated. Use aria-flowto.`\n );\n }\n */\n var _ariaFlowTo = ariaFlowTo != null ? ariaFlowTo : accessibilityFlowTo;\n if (_ariaFlowTo != null) {\n domProps['aria-flowto'] = processIDRefList(_ariaFlowTo);\n }\n\n /*\n if (accessibilityHasPopup != null) {\n warnOnce(\n 'accessibilityHasPopup',\n `accessibilityHasPopup is deprecated. Use aria-haspopup.`\n );\n }\n */\n var _ariaHasPopup = ariaHasPopup != null ? ariaHasPopup : accessibilityHasPopup;\n if (_ariaHasPopup != null) {\n domProps['aria-haspopup'] = _ariaHasPopup;\n }\n\n /*\n if (accessibilityHidden != null) {\n warnOnce(\n 'accessibilityHidden',\n `accessibilityHidden is deprecated. Use aria-hidden.`\n );\n }\n */\n var _ariaHidden = ariaHidden != null ? ariaHidden : accessibilityHidden;\n if (_ariaHidden === true) {\n domProps['aria-hidden'] = _ariaHidden;\n }\n\n /*\n if (accessibilityInvalid != null) {\n warnOnce(\n 'accessibilityInvalid',\n `accessibilityInvalid is deprecated. Use aria-invalid.`\n );\n }\n */\n var _ariaInvalid = ariaInvalid != null ? ariaInvalid : accessibilityInvalid;\n if (_ariaInvalid != null) {\n domProps['aria-invalid'] = _ariaInvalid;\n }\n\n /*\n if (accessibilityKeyShortcuts != null) {\n warnOnce(\n 'accessibilityKeyShortcuts',\n `accessibilityKeyShortcuts is deprecated. Use aria-keyshortcuts.`\n );\n }\n */\n var _ariaKeyShortcuts = ariaKeyShortcuts != null ? ariaKeyShortcuts : accessibilityKeyShortcuts;\n if (_ariaKeyShortcuts != null) {\n domProps['aria-keyshortcuts'] = processIDRefList(_ariaKeyShortcuts);\n }\n\n /*\n if (accessibilityLabel != null) {\n warnOnce(\n 'accessibilityLabel',\n `accessibilityLabel is deprecated. Use aria-label.`\n );\n }\n */\n var _ariaLabel = ariaLabel != null ? ariaLabel : accessibilityLabel;\n if (_ariaLabel != null) {\n domProps['aria-label'] = _ariaLabel;\n }\n\n /*\n if (accessibilityLabelledBy != null) {\n warnOnce(\n 'accessibilityLabelledBy',\n `accessibilityLabelledBy is deprecated. Use aria-labelledby.`\n );\n }\n */\n var _ariaLabelledBy = ariaLabelledBy != null ? ariaLabelledBy : accessibilityLabelledBy;\n if (_ariaLabelledBy != null) {\n domProps['aria-labelledby'] = processIDRefList(_ariaLabelledBy);\n }\n\n /*\n if (accessibilityLevel != null) {\n warnOnce(\n 'accessibilityLevel',\n `accessibilityLevel is deprecated. Use aria-level.`\n );\n }\n */\n var _ariaLevel = ariaLevel != null ? ariaLevel : accessibilityLevel;\n if (_ariaLevel != null) {\n domProps['aria-level'] = _ariaLevel;\n }\n\n /*\n if (accessibilityLiveRegion != null) {\n warnOnce(\n 'accessibilityLiveRegion',\n `accessibilityLiveRegion is deprecated. Use aria-live.`\n );\n }\n */\n var _ariaLive = ariaLive != null ? ariaLive : accessibilityLiveRegion;\n if (_ariaLive != null) {\n domProps['aria-live'] = _ariaLive === 'none' ? 'off' : _ariaLive;\n }\n\n /*\n if (accessibilityModal != null) {\n warnOnce(\n 'accessibilityModal',\n `accessibilityModal is deprecated. Use aria-modal.`\n );\n }\n */\n var _ariaModal = ariaModal != null ? ariaModal : accessibilityModal;\n if (_ariaModal != null) {\n domProps['aria-modal'] = _ariaModal;\n }\n\n /*\n if (accessibilityMultiline != null) {\n warnOnce(\n 'accessibilityMultiline',\n `accessibilityMultiline is deprecated. Use aria-multiline.`\n );\n }\n */\n var _ariaMultiline = ariaMultiline != null ? ariaMultiline : accessibilityMultiline;\n if (_ariaMultiline != null) {\n domProps['aria-multiline'] = _ariaMultiline;\n }\n\n /*\n if (accessibilityMultiSelectable != null) {\n warnOnce(\n 'accessibilityMultiSelectable',\n `accessibilityMultiSelectable is deprecated. Use aria-multiselectable.`\n );\n }\n */\n var _ariaMultiSelectable = ariaMultiSelectable != null ? ariaMultiSelectable : accessibilityMultiSelectable;\n if (_ariaMultiSelectable != null) {\n domProps['aria-multiselectable'] = _ariaMultiSelectable;\n }\n\n /*\n if (accessibilityOrientation != null) {\n warnOnce(\n 'accessibilityOrientation',\n `accessibilityOrientation is deprecated. Use aria-orientation.`\n );\n }\n */\n var _ariaOrientation = ariaOrientation != null ? ariaOrientation : accessibilityOrientation;\n if (_ariaOrientation != null) {\n domProps['aria-orientation'] = _ariaOrientation;\n }\n\n /*\n if (accessibilityOwns != null) {\n warnOnce(\n 'accessibilityOwns',\n `accessibilityOwns is deprecated. Use aria-owns.`\n );\n }\n */\n var _ariaOwns = ariaOwns != null ? ariaOwns : accessibilityOwns;\n if (_ariaOwns != null) {\n domProps['aria-owns'] = processIDRefList(_ariaOwns);\n }\n\n /*\n if (accessibilityPlaceholder != null) {\n warnOnce(\n 'accessibilityPlaceholder',\n `accessibilityPlaceholder is deprecated. Use aria-placeholder.`\n );\n }\n */\n var _ariaPlaceholder = ariaPlaceholder != null ? ariaPlaceholder : accessibilityPlaceholder;\n if (_ariaPlaceholder != null) {\n domProps['aria-placeholder'] = _ariaPlaceholder;\n }\n\n /*\n if (accessibilityPosInSet != null) {\n warnOnce(\n 'accessibilityPosInSet',\n `accessibilityPosInSet is deprecated. Use aria-posinset.`\n );\n }\n */\n var _ariaPosInSet = ariaPosInSet != null ? ariaPosInSet : accessibilityPosInSet;\n if (_ariaPosInSet != null) {\n domProps['aria-posinset'] = _ariaPosInSet;\n }\n\n /*\n if (accessibilityPressed != null) {\n warnOnce(\n 'accessibilityPressed',\n `accessibilityPressed is deprecated. Use aria-pressed.`\n );\n }\n */\n var _ariaPressed = ariaPressed != null ? ariaPressed : accessibilityPressed;\n if (_ariaPressed != null) {\n domProps['aria-pressed'] = _ariaPressed;\n }\n\n /*\n if (accessibilityReadOnly != null) {\n warnOnce(\n 'accessibilityReadOnly',\n `accessibilityReadOnly is deprecated. Use aria-readonly.`\n );\n }\n */\n var _ariaReadOnly = ariaReadOnly != null ? ariaReadOnly : accessibilityReadOnly;\n if (_ariaReadOnly != null) {\n domProps['aria-readonly'] = _ariaReadOnly;\n // Enhance with native semantics\n if (elementType === 'input' || elementType === 'select' || elementType === 'textarea') {\n domProps.readOnly = true;\n }\n }\n\n /*\n if (accessibilityRequired != null) {\n warnOnce(\n 'accessibilityRequired',\n `accessibilityRequired is deprecated. Use aria-required.`\n );\n }\n */\n var _ariaRequired = ariaRequired != null ? ariaRequired : accessibilityRequired;\n if (_ariaRequired != null) {\n domProps['aria-required'] = _ariaRequired;\n // Enhance with native semantics\n if (elementType === 'input' || elementType === 'select' || elementType === 'textarea') {\n domProps.required = accessibilityRequired;\n }\n }\n\n /*\n if (accessibilityRole != null) {\n warnOnce('accessibilityRole', `accessibilityRole is deprecated. Use role.`);\n }\n */\n if (role != null) {\n // 'presentation' synonym has wider browser support\n domProps['role'] = role === 'none' ? 'presentation' : role;\n }\n\n /*\n if (accessibilityRoleDescription != null) {\n warnOnce(\n 'accessibilityRoleDescription',\n `accessibilityRoleDescription is deprecated. Use aria-roledescription.`\n );\n }\n */\n var _ariaRoleDescription = ariaRoleDescription != null ? ariaRoleDescription : accessibilityRoleDescription;\n if (_ariaRoleDescription != null) {\n domProps['aria-roledescription'] = _ariaRoleDescription;\n }\n\n /*\n if (accessibilityRowCount != null) {\n warnOnce(\n 'accessibilityRowCount',\n `accessibilityRowCount is deprecated. Use aria-rowcount.`\n );\n }\n */\n var _ariaRowCount = ariaRowCount != null ? ariaRowCount : accessibilityRowCount;\n if (_ariaRowCount != null) {\n domProps['aria-rowcount'] = _ariaRowCount;\n }\n\n /*\n if (accessibilityRowIndex != null) {\n warnOnce(\n 'accessibilityRowIndex',\n `accessibilityRowIndex is deprecated. Use aria-rowindex.`\n );\n }\n */\n var _ariaRowIndex = ariaRowIndex != null ? ariaRowIndex : accessibilityRowIndex;\n if (_ariaRowIndex != null) {\n domProps['aria-rowindex'] = _ariaRowIndex;\n }\n\n /*\n if (accessibilityRowSpan != null) {\n warnOnce(\n 'accessibilityRowSpan',\n `accessibilityRowSpan is deprecated. Use aria-rowspan.`\n );\n }\n */\n var _ariaRowSpan = ariaRowSpan != null ? ariaRowSpan : accessibilityRowSpan;\n if (_ariaRowSpan != null) {\n domProps['aria-rowspan'] = _ariaRowSpan;\n }\n\n /*\n if (accessibilitySelected != null) {\n warnOnce(\n 'accessibilitySelected',\n `accessibilitySelected is deprecated. Use aria-selected.`\n );\n }\n */\n var _ariaSelected = ariaSelected != null ? ariaSelected : accessibilitySelected;\n if (_ariaSelected != null) {\n domProps['aria-selected'] = _ariaSelected;\n }\n\n /*\n if (accessibilitySetSize != null) {\n warnOnce(\n 'accessibilitySetSize',\n `accessibilitySetSize is deprecated. Use aria-setsize.`\n );\n }\n */\n var _ariaSetSize = ariaSetSize != null ? ariaSetSize : accessibilitySetSize;\n if (_ariaSetSize != null) {\n domProps['aria-setsize'] = _ariaSetSize;\n }\n\n /*\n if (accessibilitySort != null) {\n warnOnce(\n 'accessibilitySort',\n `accessibilitySort is deprecated. Use aria-sort.`\n );\n }\n */\n var _ariaSort = ariaSort != null ? ariaSort : accessibilitySort;\n if (_ariaSort != null) {\n domProps['aria-sort'] = _ariaSort;\n }\n\n /*\n if (accessibilityValueMax != null) {\n warnOnce(\n 'accessibilityValueMax',\n `accessibilityValueMax is deprecated. Use aria-valuemax.`\n );\n }\n */\n var _ariaValueMax = ariaValueMax != null ? ariaValueMax : accessibilityValueMax;\n if (_ariaValueMax != null) {\n domProps['aria-valuemax'] = _ariaValueMax;\n }\n\n /*\n if (accessibilityValueMin != null) {\n warnOnce(\n 'accessibilityValueMin',\n `accessibilityValueMin is deprecated. Use aria-valuemin.`\n );\n }\n */\n var _ariaValueMin = ariaValueMin != null ? ariaValueMin : accessibilityValueMin;\n if (_ariaValueMin != null) {\n domProps['aria-valuemin'] = _ariaValueMin;\n }\n\n /*\n if (accessibilityValueNow != null) {\n warnOnce(\n 'accessibilityValueNow',\n `accessibilityValueNow is deprecated. Use aria-valuenow.`\n );\n }\n */\n var _ariaValueNow = ariaValueNow != null ? ariaValueNow : accessibilityValueNow;\n if (_ariaValueNow != null) {\n domProps['aria-valuenow'] = _ariaValueNow;\n }\n\n /*\n if (accessibilityValueText != null) {\n warnOnce(\n 'accessibilityValueText',\n `accessibilityValueText is deprecated. Use aria-valuetext.`\n );\n }\n */\n var _ariaValueText = ariaValueText != null ? ariaValueText : accessibilityValueText;\n if (_ariaValueText != null) {\n domProps['aria-valuetext'] = _ariaValueText;\n }\n\n // \"dataSet\" replaced with \"data-*\"\n if (dataSet != null) {\n for (var dataProp in dataSet) {\n if (hasOwnProperty.call(dataSet, dataProp)) {\n var dataName = hyphenateString(dataProp);\n var dataValue = dataSet[dataProp];\n if (dataValue != null) {\n domProps[\"data-\" + dataName] = dataValue;\n }\n }\n }\n }\n\n // FOCUS\n if (tabIndex === 0 || tabIndex === '0' || tabIndex === -1 || tabIndex === '-1') {\n domProps.tabIndex = tabIndex;\n } else {\n /*\n if (focusable != null) {\n warnOnce('focusable', `focusable is deprecated.`);\n }\n */\n\n // \"focusable\" indicates that an element may be a keyboard tab-stop.\n if (focusable === false) {\n domProps.tabIndex = '-1';\n }\n if (\n // These native elements are keyboard focusable by default\n elementType === 'a' || elementType === 'button' || elementType === 'input' || elementType === 'select' || elementType === 'textarea') {\n if (focusable === false || accessibilityDisabled === true) {\n domProps.tabIndex = '-1';\n }\n } else if (\n // These roles are made keyboard focusable by default\n role === 'button' || role === 'checkbox' || role === 'link' || role === 'radio' || role === 'textbox' || role === 'switch') {\n if (focusable !== false) {\n domProps.tabIndex = '0';\n }\n } else {\n // Everything else must explicitly set the prop\n if (focusable === true) {\n domProps.tabIndex = '0';\n }\n }\n }\n\n // Resolve styles\n if (pointerEvents != null) {\n warnOnce('pointerEvents', \"props.pointerEvents is deprecated. Use style.pointerEvents\");\n }\n var _StyleSheet = StyleSheet([style, pointerEvents && pointerEventsStyles[pointerEvents]], _objectSpread({\n writingDirection: 'ltr'\n }, options)),\n className = _StyleSheet[0],\n inlineStyle = _StyleSheet[1];\n if (className) {\n domProps.className = className;\n }\n if (inlineStyle) {\n domProps.style = inlineStyle;\n }\n\n // OTHER\n // Native element ID\n /*\n if (nativeID != null) {\n warnOnce('nativeID', `nativeID is deprecated. Use id.`);\n }\n */\n var _id = id != null ? id : nativeID;\n if (_id != null) {\n domProps.id = _id;\n }\n // Automated test IDs\n if (testID != null) {\n domProps['data-testid'] = testID;\n }\n if (domProps.type == null && elementType === 'button') {\n domProps.type = 'button';\n }\n return domProps;\n};\nexport default createDOMProps;","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nimport React, { createContext, useContext } from 'react';\nimport { isLocaleRTL } from './isLocaleRTL';\nvar defaultLocale = {\n direction: 'ltr',\n locale: 'en-US'\n};\nvar LocaleContext = /*#__PURE__*/createContext(defaultLocale);\nexport function getLocaleDirection(locale) {\n return isLocaleRTL(locale) ? 'rtl' : 'ltr';\n}\nexport function LocaleProvider(props) {\n var direction = props.direction,\n locale = props.locale,\n children = props.children;\n var needsContext = direction || locale;\n return needsContext ? /*#__PURE__*/React.createElement(LocaleContext.Provider, {\n children: children,\n value: {\n direction: locale ? getLocaleDirection(locale) : direction,\n locale\n }\n }) : children;\n}\nexport function useLocaleContext() {\n return useContext(LocaleContext);\n}","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nvar rtlScripts = new Set(['Arab', 'Syrc', 'Samr', 'Mand', 'Thaa', 'Mend', 'Nkoo', 'Adlm', 'Rohg', 'Hebr']);\nvar rtlLangs = new Set(['ae',\n// Avestan\n'ar',\n// Arabic\n'arc',\n// Aramaic\n'bcc',\n// Southern Balochi\n'bqi',\n// Bakthiari\n'ckb',\n// Sorani\n'dv',\n// Dhivehi\n'fa', 'far',\n// Persian\n'glk',\n// Gilaki\n'he', 'iw',\n// Hebrew\n'khw',\n// Khowar\n'ks',\n// Kashmiri\n'ku',\n// Kurdish\n'mzn',\n// Mazanderani\n'nqo',\n// N'Ko\n'pnb',\n// Western Punjabi\n'ps',\n// Pashto\n'sd',\n// Sindhi\n'ug',\n// Uyghur\n'ur',\n// Urdu\n'yi' // Yiddish\n]);\nvar cache = new Map();\n\n/**\n * Determine the writing direction of a locale\n */\nexport function isLocaleRTL(locale) {\n var cachedRTL = cache.get(locale);\n if (cachedRTL) {\n return cachedRTL;\n }\n var isRTL = false;\n // $FlowFixMe\n if (Intl.Locale) {\n try {\n // $FlowFixMe\n var script = new Intl.Locale(locale).maximize().script;\n isRTL = rtlScripts.has(script);\n } catch (_unused) {\n // RangeError: Incorrect locale information provided\n // Fallback to inferring from language\n var lang = locale.split('-')[0];\n isRTL = rtlLangs.has(lang);\n }\n } else {\n // Fallback to inferring from language\n var _lang = locale.split('-')[0];\n isRTL = rtlLangs.has(_lang);\n }\n cache.set(locale, isRTL);\n return isRTL;\n}","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nvar dataUriPattern = /^data:/;\nexport class ImageUriCache {\n static has(uri) {\n var entries = ImageUriCache._entries;\n var isDataUri = dataUriPattern.test(uri);\n return isDataUri || Boolean(entries[uri]);\n }\n static add(uri) {\n var entries = ImageUriCache._entries;\n var lastUsedTimestamp = Date.now();\n if (entries[uri]) {\n entries[uri].lastUsedTimestamp = lastUsedTimestamp;\n entries[uri].refCount += 1;\n } else {\n entries[uri] = {\n lastUsedTimestamp,\n refCount: 1\n };\n }\n }\n static remove(uri) {\n var entries = ImageUriCache._entries;\n if (entries[uri]) {\n entries[uri].refCount -= 1;\n }\n // Free up entries when the cache is \"full\"\n ImageUriCache._cleanUpIfNeeded();\n }\n static _cleanUpIfNeeded() {\n var entries = ImageUriCache._entries;\n var imageUris = Object.keys(entries);\n if (imageUris.length + 1 > ImageUriCache._maximumEntries) {\n var leastRecentlyUsedKey;\n var leastRecentlyUsedEntry;\n imageUris.forEach(uri => {\n var entry = entries[uri];\n if ((!leastRecentlyUsedEntry || entry.lastUsedTimestamp < leastRecentlyUsedEntry.lastUsedTimestamp) && entry.refCount === 0) {\n leastRecentlyUsedKey = uri;\n leastRecentlyUsedEntry = entry;\n }\n });\n if (leastRecentlyUsedKey) {\n delete entries[leastRecentlyUsedKey];\n }\n }\n }\n}\nImageUriCache._maximumEntries = 256;\nImageUriCache._entries = {};\nvar id = 0;\nvar requests = {};\nvar ImageLoader = {\n abort(requestId) {\n var image = requests[\"\" + requestId];\n if (image) {\n image.onerror = null;\n image.onload = null;\n image = null;\n delete requests[\"\" + requestId];\n }\n },\n getSize(uri, success, failure) {\n var complete = false;\n var interval = setInterval(callback, 16);\n var requestId = ImageLoader.load(uri, callback, errorCallback);\n function callback() {\n var image = requests[\"\" + requestId];\n if (image) {\n var naturalHeight = image.naturalHeight,\n naturalWidth = image.naturalWidth;\n if (naturalHeight && naturalWidth) {\n success(naturalWidth, naturalHeight);\n complete = true;\n }\n }\n if (complete) {\n ImageLoader.abort(requestId);\n clearInterval(interval);\n }\n }\n function errorCallback() {\n if (typeof failure === 'function') {\n failure();\n }\n ImageLoader.abort(requestId);\n clearInterval(interval);\n }\n },\n has(uri) {\n return ImageUriCache.has(uri);\n },\n load(uri, onLoad, onError) {\n id += 1;\n var image = new window.Image();\n image.onerror = onError;\n image.onload = e => {\n // avoid blocking the main thread\n var onDecode = () => onLoad({\n nativeEvent: e\n });\n if (typeof image.decode === 'function') {\n // Safari currently throws exceptions when decoding svgs.\n // We want to catch that error and allow the load handler\n // to be forwarded to the onLoad handler in this case\n image.decode().then(onDecode, onDecode);\n } else {\n setTimeout(onDecode, 0);\n }\n };\n image.src = uri;\n requests[\"\" + id] = image;\n return id;\n },\n prefetch(uri) {\n return new Promise((resolve, reject) => {\n ImageLoader.load(uri, () => {\n // Add the uri to the cache so it can be immediately displayed when used\n // but also immediately remove it to correctly reflect that it has no active references\n ImageUriCache.add(uri);\n ImageUriCache.remove(uri);\n resolve();\n }, reject);\n });\n },\n queryCache(uris) {\n var result = {};\n uris.forEach(u => {\n if (ImageUriCache.has(u)) {\n result[u] = 'disk/memory';\n }\n });\n return Promise.resolve(result);\n }\n};\nexport default ImageLoader;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\n'use client';\n\nimport { createContext } from 'react';\nvar TextAncestorContext = /*#__PURE__*/createContext(false);\nexport default TextAncestorContext;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\n'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"hrefAttrs\", \"onLayout\", \"onMoveShouldSetResponder\", \"onMoveShouldSetResponderCapture\", \"onResponderEnd\", \"onResponderGrant\", \"onResponderMove\", \"onResponderReject\", \"onResponderRelease\", \"onResponderStart\", \"onResponderTerminate\", \"onResponderTerminationRequest\", \"onScrollShouldSetResponder\", \"onScrollShouldSetResponderCapture\", \"onSelectionChangeShouldSetResponder\", \"onSelectionChangeShouldSetResponderCapture\", \"onStartShouldSetResponder\", \"onStartShouldSetResponderCapture\"];\nimport * as React from 'react';\nimport createElement from '../createElement';\nimport * as forwardedProps from '../../modules/forwardedProps';\nimport pick from '../../modules/pick';\nimport useElementLayout from '../../modules/useElementLayout';\nimport useMergeRefs from '../../modules/useMergeRefs';\nimport usePlatformMethods from '../../modules/usePlatformMethods';\nimport useResponderEvents from '../../modules/useResponderEvents';\nimport StyleSheet from '../StyleSheet';\nimport TextAncestorContext from '../Text/TextAncestorContext';\nimport { useLocaleContext, getLocaleDirection } from '../../modules/useLocale';\nvar forwardPropsList = Object.assign({}, forwardedProps.defaultProps, forwardedProps.accessibilityProps, forwardedProps.clickProps, forwardedProps.focusProps, forwardedProps.keyboardProps, forwardedProps.mouseProps, forwardedProps.touchProps, forwardedProps.styleProps, {\n href: true,\n lang: true,\n onScroll: true,\n onWheel: true,\n pointerEvents: true\n});\nvar pickProps = props => pick(props, forwardPropsList);\nvar View = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {\n var hrefAttrs = props.hrefAttrs,\n onLayout = props.onLayout,\n onMoveShouldSetResponder = props.onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture = props.onMoveShouldSetResponderCapture,\n onResponderEnd = props.onResponderEnd,\n onResponderGrant = props.onResponderGrant,\n onResponderMove = props.onResponderMove,\n onResponderReject = props.onResponderReject,\n onResponderRelease = props.onResponderRelease,\n onResponderStart = props.onResponderStart,\n onResponderTerminate = props.onResponderTerminate,\n onResponderTerminationRequest = props.onResponderTerminationRequest,\n onScrollShouldSetResponder = props.onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture = props.onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder = props.onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture = props.onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder = props.onStartShouldSetResponder,\n onStartShouldSetResponderCapture = props.onStartShouldSetResponderCapture,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n if (process.env.NODE_ENV !== 'production') {\n React.Children.toArray(props.children).forEach(item => {\n if (typeof item === 'string') {\n console.error(\"Unexpected text node: \" + item + \". A text node cannot be a child of a .\");\n }\n });\n }\n var hasTextAncestor = React.useContext(TextAncestorContext);\n var hostRef = React.useRef(null);\n var _useLocaleContext = useLocaleContext(),\n contextDirection = _useLocaleContext.direction;\n useElementLayout(hostRef, onLayout);\n useResponderEvents(hostRef, {\n onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture,\n onResponderEnd,\n onResponderGrant,\n onResponderMove,\n onResponderReject,\n onResponderRelease,\n onResponderStart,\n onResponderTerminate,\n onResponderTerminationRequest,\n onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder,\n onStartShouldSetResponderCapture\n });\n var component = 'div';\n var langDirection = props.lang != null ? getLocaleDirection(props.lang) : null;\n var componentDirection = props.dir || langDirection;\n var writingDirection = componentDirection || contextDirection;\n var supportedProps = pickProps(rest);\n supportedProps.dir = componentDirection;\n supportedProps.style = [styles.view$raw, hasTextAncestor && styles.inline, props.style];\n if (props.href != null) {\n component = 'a';\n if (hrefAttrs != null) {\n var download = hrefAttrs.download,\n rel = hrefAttrs.rel,\n target = hrefAttrs.target;\n if (download != null) {\n supportedProps.download = download;\n }\n if (rel != null) {\n supportedProps.rel = rel;\n }\n if (typeof target === 'string') {\n supportedProps.target = target.charAt(0) !== '_' ? '_' + target : target;\n }\n }\n }\n var platformMethodsRef = usePlatformMethods(supportedProps);\n var setRef = useMergeRefs(hostRef, platformMethodsRef, forwardedRef);\n supportedProps.ref = setRef;\n return createElement(component, supportedProps, {\n writingDirection\n });\n});\nView.displayName = 'View';\nvar styles = StyleSheet.create({\n view$raw: {\n alignItems: 'stretch',\n backgroundColor: 'transparent',\n border: '0 solid black',\n boxSizing: 'border-box',\n display: 'flex',\n flexBasis: 'auto',\n flexDirection: 'column',\n flexShrink: 0,\n listStyle: 'none',\n margin: 0,\n minHeight: 0,\n minWidth: 0,\n padding: 0,\n position: 'relative',\n textDecoration: 'none',\n zIndex: 0\n },\n inline: {\n display: 'inline-flex'\n }\n});\nexport default View;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nexport var defaultProps = {\n children: true,\n dataSet: true,\n dir: true,\n id: true,\n ref: true,\n suppressHydrationWarning: true,\n tabIndex: true,\n testID: true,\n // @deprecated\n focusable: true,\n nativeID: true\n};\nexport var accessibilityProps = {\n 'aria-activedescendant': true,\n 'aria-atomic': true,\n 'aria-autocomplete': true,\n 'aria-busy': true,\n 'aria-checked': true,\n 'aria-colcount': true,\n 'aria-colindex': true,\n 'aria-colspan': true,\n 'aria-controls': true,\n 'aria-current': true,\n 'aria-describedby': true,\n 'aria-details': true,\n 'aria-disabled': true,\n 'aria-errormessage': true,\n 'aria-expanded': true,\n 'aria-flowto': true,\n 'aria-haspopup': true,\n 'aria-hidden': true,\n 'aria-invalid': true,\n 'aria-keyshortcuts': true,\n 'aria-label': true,\n 'aria-labelledby': true,\n 'aria-level': true,\n 'aria-live': true,\n 'aria-modal': true,\n 'aria-multiline': true,\n 'aria-multiselectable': true,\n 'aria-orientation': true,\n 'aria-owns': true,\n 'aria-placeholder': true,\n 'aria-posinset': true,\n 'aria-pressed': true,\n 'aria-readonly': true,\n 'aria-required': true,\n role: true,\n 'aria-roledescription': true,\n 'aria-rowcount': true,\n 'aria-rowindex': true,\n 'aria-rowspan': true,\n 'aria-selected': true,\n 'aria-setsize': true,\n 'aria-sort': true,\n 'aria-valuemax': true,\n 'aria-valuemin': true,\n 'aria-valuenow': true,\n 'aria-valuetext': true,\n // @deprecated\n accessibilityActiveDescendant: true,\n accessibilityAtomic: true,\n accessibilityAutoComplete: true,\n accessibilityBusy: true,\n accessibilityChecked: true,\n accessibilityColumnCount: true,\n accessibilityColumnIndex: true,\n accessibilityColumnSpan: true,\n accessibilityControls: true,\n accessibilityCurrent: true,\n accessibilityDescribedBy: true,\n accessibilityDetails: true,\n accessibilityDisabled: true,\n accessibilityErrorMessage: true,\n accessibilityExpanded: true,\n accessibilityFlowTo: true,\n accessibilityHasPopup: true,\n accessibilityHidden: true,\n accessibilityInvalid: true,\n accessibilityKeyShortcuts: true,\n accessibilityLabel: true,\n accessibilityLabelledBy: true,\n accessibilityLevel: true,\n accessibilityLiveRegion: true,\n accessibilityModal: true,\n accessibilityMultiline: true,\n accessibilityMultiSelectable: true,\n accessibilityOrientation: true,\n accessibilityOwns: true,\n accessibilityPlaceholder: true,\n accessibilityPosInSet: true,\n accessibilityPressed: true,\n accessibilityReadOnly: true,\n accessibilityRequired: true,\n accessibilityRole: true,\n accessibilityRoleDescription: true,\n accessibilityRowCount: true,\n accessibilityRowIndex: true,\n accessibilityRowSpan: true,\n accessibilitySelected: true,\n accessibilitySetSize: true,\n accessibilitySort: true,\n accessibilityValueMax: true,\n accessibilityValueMin: true,\n accessibilityValueNow: true,\n accessibilityValueText: true\n};\nexport var clickProps = {\n onClick: true,\n onAuxClick: true,\n onContextMenu: true,\n onGotPointerCapture: true,\n onLostPointerCapture: true,\n onPointerCancel: true,\n onPointerDown: true,\n onPointerEnter: true,\n onPointerMove: true,\n onPointerLeave: true,\n onPointerOut: true,\n onPointerOver: true,\n onPointerUp: true\n};\nexport var focusProps = {\n onBlur: true,\n onFocus: true\n};\nexport var keyboardProps = {\n onKeyDown: true,\n onKeyDownCapture: true,\n onKeyUp: true,\n onKeyUpCapture: true\n};\nexport var mouseProps = {\n onMouseDown: true,\n onMouseEnter: true,\n onMouseLeave: true,\n onMouseMove: true,\n onMouseOver: true,\n onMouseOut: true,\n onMouseUp: true\n};\nexport var touchProps = {\n onTouchCancel: true,\n onTouchCancelCapture: true,\n onTouchEnd: true,\n onTouchEndCapture: true,\n onTouchMove: true,\n onTouchMoveCapture: true,\n onTouchStart: true,\n onTouchStartCapture: true\n};\nexport var styleProps = {\n style: true\n};","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nexport default function pick(obj, list) {\n var nextObj = {};\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n if (list[key] === true) {\n nextObj[key] = obj[key];\n }\n }\n }\n return nextObj;\n}","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nimport useLayoutEffect from '../useLayoutEffect';\nimport UIManager from '../../exports/UIManager';\nimport canUseDOM from '../canUseDom';\nvar DOM_LAYOUT_HANDLER_NAME = '__reactLayoutHandler';\nvar didWarn = !canUseDOM;\nvar resizeObserver = null;\nfunction getResizeObserver() {\n if (canUseDOM && typeof window.ResizeObserver !== 'undefined') {\n if (resizeObserver == null) {\n resizeObserver = new window.ResizeObserver(function (entries) {\n entries.forEach(entry => {\n var node = entry.target;\n var onLayout = node[DOM_LAYOUT_HANDLER_NAME];\n if (typeof onLayout === 'function') {\n // We still need to measure the view because browsers don't yet provide\n // border-box dimensions in the entry\n UIManager.measure(node, (x, y, width, height, left, top) => {\n var event = {\n // $FlowFixMe\n nativeEvent: {\n layout: {\n x,\n y,\n width,\n height,\n left,\n top\n }\n },\n timeStamp: Date.now()\n };\n Object.defineProperty(event.nativeEvent, 'target', {\n enumerable: true,\n get: () => entry.target\n });\n onLayout(event);\n });\n }\n });\n });\n }\n } else if (!didWarn) {\n if (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test') {\n console.warn('onLayout relies on ResizeObserver which is not supported by your browser. ' + 'Please include a polyfill, e.g., https://github.com/que-etc/resize-observer-polyfill.');\n didWarn = true;\n }\n }\n return resizeObserver;\n}\nexport default function useElementLayout(ref, onLayout) {\n var observer = getResizeObserver();\n useLayoutEffect(() => {\n var node = ref.current;\n if (node != null) {\n node[DOM_LAYOUT_HANDLER_NAME] = onLayout;\n }\n }, [ref, onLayout]);\n\n // Observing is done in a separate effect to avoid this effect running\n // when 'onLayout' changes.\n useLayoutEffect(() => {\n var node = ref.current;\n if (node != null && observer != null) {\n if (typeof node[DOM_LAYOUT_HANDLER_NAME] === 'function') {\n observer.observe(node);\n } else {\n observer.unobserve(node);\n }\n }\n return () => {\n if (node != null && observer != null) {\n observer.unobserve(node);\n }\n };\n }, [ref, observer]);\n}","/**\n * Copyright (c) Nicolas Gallagher.\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 * useLayoutEffect throws an error on the server. On the few occasions where is\n * problematic, use this hook.\n *\n * \n */\n\nimport { useEffect, useLayoutEffect } from 'react';\nimport canUseDOM from '../canUseDom';\nvar useLayoutEffectImpl = canUseDOM ? useLayoutEffect : useEffect;\nexport default useLayoutEffectImpl;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nimport * as React from 'react';\nimport mergeRefs from '../mergeRefs';\nexport default function useMergeRefs() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return React.useMemo(() => mergeRefs(...args),\n // eslint-disable-next-line\n [...args]);\n}","/**\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nimport * as React from 'react';\nexport default function mergeRefs() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return function forwardRef(node) {\n args.forEach(ref => {\n if (ref == null) {\n return;\n }\n if (typeof ref === 'function') {\n ref(node);\n return;\n }\n if (typeof ref === 'object') {\n ref.current = node;\n return;\n }\n console.error(\"mergeRefs cannot handle Refs of type boolean, number or string, received ref \" + String(ref));\n });\n };\n}","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nimport UIManager from '../../exports/UIManager';\nimport useStable from '../useStable';\n\n/**\n * Adds non-standard methods to the hode element. This is temporarily until an\n * API like `ReactNative.measure(hostRef, callback)` is added to React Native.\n */\nexport default function usePlatformMethods(_ref) {\n var pointerEvents = _ref.pointerEvents,\n style = _ref.style;\n // Avoid creating a new ref on every render.\n var ref = useStable(() => hostNode => {\n if (hostNode != null) {\n hostNode.measure = callback => UIManager.measure(hostNode, callback);\n hostNode.measureLayout = (relativeToNode, success, failure) => UIManager.measureLayout(hostNode, relativeToNode, failure, success);\n hostNode.measureInWindow = callback => UIManager.measureInWindow(hostNode, callback);\n }\n });\n return ref;\n}","/**\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nimport * as React from 'react';\nvar UNINITIALIZED = typeof Symbol === 'function' && typeof Symbol() === 'symbol' ? Symbol() : Object.freeze({});\nexport default function useStable(getInitialValue) {\n var ref = React.useRef(UNINITIALIZED);\n if (ref.current === UNINITIALIZED) {\n ref.current = getInitialValue();\n }\n // $FlowFixMe (#64650789) Trouble refining types where `Symbol` is concerned.\n return ref.current;\n}","/**\n * Copyright (c) Nicolas Gallagher\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 */\n\n/**\n * Hook for integrating the Responder System into React\n *\n * function SomeComponent({ onStartShouldSetResponder }) {\n * const ref = useRef(null);\n * useResponderEvents(ref, { onStartShouldSetResponder });\n * return

\n * }\n */\n\nimport * as React from 'react';\nimport * as ResponderSystem from './ResponderSystem';\nvar emptyObject = {};\nvar idCounter = 0;\nfunction useStable(getInitialValue) {\n var ref = React.useRef(null);\n if (ref.current == null) {\n ref.current = getInitialValue();\n }\n return ref.current;\n}\nexport default function useResponderEvents(hostRef, config) {\n if (config === void 0) {\n config = emptyObject;\n }\n var id = useStable(() => idCounter++);\n var isAttachedRef = React.useRef(false);\n\n // This is a separate effects so it doesn't run when the config changes.\n // On initial mount, attach global listeners if needed.\n // On unmount, remove node potentially attached to the Responder System.\n React.useEffect(() => {\n ResponderSystem.attachListeners();\n return () => {\n ResponderSystem.removeNode(id);\n };\n }, [id]);\n\n // Register and unregister with the Responder System as necessary\n React.useEffect(() => {\n var _config = config,\n onMoveShouldSetResponder = _config.onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture = _config.onMoveShouldSetResponderCapture,\n onScrollShouldSetResponder = _config.onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture = _config.onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder = _config.onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture = _config.onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder = _config.onStartShouldSetResponder,\n onStartShouldSetResponderCapture = _config.onStartShouldSetResponderCapture;\n var requiresResponderSystem = onMoveShouldSetResponder != null || onMoveShouldSetResponderCapture != null || onScrollShouldSetResponder != null || onScrollShouldSetResponderCapture != null || onSelectionChangeShouldSetResponder != null || onSelectionChangeShouldSetResponderCapture != null || onStartShouldSetResponder != null || onStartShouldSetResponderCapture != null;\n var node = hostRef.current;\n if (requiresResponderSystem) {\n ResponderSystem.addNode(id, node, config);\n isAttachedRef.current = true;\n } else if (isAttachedRef.current) {\n ResponderSystem.removeNode(id);\n isAttachedRef.current = false;\n }\n }, [config, hostRef, id]);\n React.useDebugValue({\n isResponder: hostRef.current === ResponderSystem.getResponderNode()\n });\n React.useDebugValue(config);\n}","/**\n * Copyright (c) Nicolas Gallagher\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 */\n\n/**\n * RESPONDER EVENT SYSTEM\n *\n * A single, global \"interaction lock\" on views. For a view to be the \"responder\" means\n * that pointer interactions are exclusive to that view and none other. The \"interaction\n * lock\" can be transferred (only) to ancestors of the current \"responder\" as long as\n * pointers continue to be active.\n *\n * Responder being granted:\n *\n * A view can become the \"responder\" after the following events:\n * * \"pointerdown\" (implemented using \"touchstart\", \"mousedown\")\n * * \"pointermove\" (implemented using \"touchmove\", \"mousemove\")\n * * \"scroll\" (while a pointer is down)\n * * \"selectionchange\" (while a pointer is down)\n *\n * If nothing is already the \"responder\", the event propagates to (capture) and from\n * (bubble) the event target until a view returns `true` for\n * `on*ShouldSetResponder(Capture)`.\n *\n * If something is already the responder, the event propagates to (capture) and from\n * (bubble) the lowest common ancestor of the event target and the current \"responder\".\n * Then negotiation happens between the current \"responder\" and a view that wants to\n * become the \"responder\": see the timing diagram below.\n *\n * (NOTE: Scrolled views either automatically become the \"responder\" or release the\n * \"interaction lock\". A native scroll view that isn't built on top of the responder\n * system must result in the current \"responder\" being notified that it no longer has\n * the \"interaction lock\" - the native system has taken over.\n *\n * Responder being released:\n *\n * As soon as there are no more active pointers that *started* inside descendants\n * of the *current* \"responder\", an `onResponderRelease` event is dispatched to the\n * current \"responder\", and the responder lock is released.\n *\n * Typical sequence of events:\n * * startShouldSetResponder\n * * responderGrant/Reject\n * * responderStart\n * * responderMove\n * * responderEnd\n * * responderRelease\n */\n\n/* Negotiation Performed\n +-----------------------+\n / \\\nProcess low level events to + Current Responder + wantsResponderID\ndetermine who to perform negot-| (if any exists at all) |\niation/transition | Otherwise just pass through|\n-------------------------------+----------------------------+------------------+\nBubble to find first ID | |\nto return true:wantsResponderID| |\n | |\n +--------------+ | |\n | onTouchStart | | |\n +------+-------+ none | |\n | return| |\n+-----------v-------------+true| +------------------------+ |\n|onStartShouldSetResponder|----->| onResponderStart (cur) |<-----------+\n+-----------+-------------+ | +------------------------+ | |\n | | | +--------+-------+\n | returned true for| false:REJECT +-------->|onResponderReject\n | wantsResponderID | | | +----------------+\n | (now attempt | +------------------+-----+ |\n | handoff) | | onResponder | |\n +------------------->| TerminationRequest | |\n | +------------------+-----+ |\n | | | +----------------+\n | true:GRANT +-------->|onResponderGrant|\n | | +--------+-------+\n | +------------------------+ | |\n | | onResponderTerminate |<-----------+\n | +------------------+-----+ |\n | | | +----------------+\n | +-------->|onResponderStart|\n | | +----------------+\nBubble to find first ID | |\nto return true:wantsResponderID| |\n | |\n +-------------+ | |\n | onTouchMove | | |\n +------+------+ none | |\n | return| |\n+-----------v-------------+true| +------------------------+ |\n|onMoveShouldSetResponder |----->| onResponderMove (cur) |<-----------+\n+-----------+-------------+ | +------------------------+ | |\n | | | +--------+-------+\n | returned true for| false:REJECT +-------->|onResponderReject\n | wantsResponderID | | | +----------------+\n | (now attempt | +------------------+-----+ |\n | handoff) | | onResponder | |\n +------------------->| TerminationRequest| |\n | +------------------+-----+ |\n | | | +----------------+\n | true:GRANT +-------->|onResponderGrant|\n | | +--------+-------+\n | +------------------------+ | |\n | | onResponderTerminate |<-----------+\n | +------------------+-----+ |\n | | | +----------------+\n | +-------->|onResponderMove |\n | | +----------------+\n | |\n | |\n Some active touch started| |\n inside current responder | +------------------------+ |\n +------------------------->| onResponderEnd | |\n | | +------------------------+ |\n +---+---------+ | |\n | onTouchEnd | | |\n +---+---------+ | |\n | | +------------------------+ |\n +------------------------->| onResponderEnd | |\n No active touches started| +-----------+------------+ |\n inside current responder | | |\n | v |\n | +------------------------+ |\n | | onResponderRelease | |\n | +------------------------+ |\n | |\n + + */\n\nimport createResponderEvent from './createResponderEvent';\nimport { isCancelish, isEndish, isMoveish, isScroll, isSelectionChange, isStartish } from './ResponderEventTypes';\nimport { getLowestCommonAncestor, getResponderPaths, hasTargetTouches, hasValidSelection, isPrimaryPointerDown, setResponderId } from './utils';\nimport { ResponderTouchHistoryStore } from './ResponderTouchHistoryStore';\nimport canUseDOM from '../canUseDom';\n\n/* ------------ TYPES ------------ */\n\nvar emptyObject = {};\n\n/* ------------ IMPLEMENTATION ------------ */\n\nvar startRegistration = ['onStartShouldSetResponderCapture', 'onStartShouldSetResponder', {\n bubbles: true\n}];\nvar moveRegistration = ['onMoveShouldSetResponderCapture', 'onMoveShouldSetResponder', {\n bubbles: true\n}];\nvar scrollRegistration = ['onScrollShouldSetResponderCapture', 'onScrollShouldSetResponder', {\n bubbles: false\n}];\nvar shouldSetResponderEvents = {\n touchstart: startRegistration,\n mousedown: startRegistration,\n touchmove: moveRegistration,\n mousemove: moveRegistration,\n scroll: scrollRegistration\n};\nvar emptyResponder = {\n id: null,\n idPath: null,\n node: null\n};\nvar responderListenersMap = new Map();\nvar isEmulatingMouseEvents = false;\nvar trackedTouchCount = 0;\nvar currentResponder = {\n id: null,\n node: null,\n idPath: null\n};\nvar responderTouchHistoryStore = new ResponderTouchHistoryStore();\nfunction changeCurrentResponder(responder) {\n currentResponder = responder;\n}\nfunction getResponderConfig(id) {\n var config = responderListenersMap.get(id);\n return config != null ? config : emptyObject;\n}\n\n/**\n * Process native events\n *\n * A single event listener is used to manage the responder system.\n * All pointers are tracked in the ResponderTouchHistoryStore. Native events\n * are interpreted in terms of the Responder System and checked to see if\n * the responder should be transferred. Each host node that is attached to\n * the Responder System has an ID, which is used to look up its associated\n * callbacks.\n */\nfunction eventListener(domEvent) {\n var eventType = domEvent.type;\n var eventTarget = domEvent.target;\n\n /**\n * Manage emulated events and early bailout.\n * Since PointerEvent is not used yet (lack of support in older Safari), it's\n * necessary to manually manage the mess of browser touch/mouse events.\n * And bailout early for termination events when there is no active responder.\n */\n\n // Flag when browser may produce emulated events\n if (eventType === 'touchstart') {\n isEmulatingMouseEvents = true;\n }\n // Remove flag when browser will not produce emulated events\n if (eventType === 'touchmove' || trackedTouchCount > 1) {\n isEmulatingMouseEvents = false;\n }\n // Ignore various events in particular circumstances\n if (\n // Ignore browser emulated mouse events\n eventType === 'mousedown' && isEmulatingMouseEvents || eventType === 'mousemove' && isEmulatingMouseEvents ||\n // Ignore mousemove if a mousedown didn't occur first\n eventType === 'mousemove' && trackedTouchCount < 1) {\n return;\n }\n // Remove flag after emulated events are finished\n if (isEmulatingMouseEvents && eventType === 'mouseup') {\n if (trackedTouchCount === 0) {\n isEmulatingMouseEvents = false;\n }\n return;\n }\n var isStartEvent = isStartish(eventType) && isPrimaryPointerDown(domEvent);\n var isMoveEvent = isMoveish(eventType);\n var isEndEvent = isEndish(eventType);\n var isScrollEvent = isScroll(eventType);\n var isSelectionChangeEvent = isSelectionChange(eventType);\n var responderEvent = createResponderEvent(domEvent, responderTouchHistoryStore);\n\n /**\n * Record the state of active pointers\n */\n\n if (isStartEvent || isMoveEvent || isEndEvent) {\n if (domEvent.touches) {\n trackedTouchCount = domEvent.touches.length;\n } else {\n if (isStartEvent) {\n trackedTouchCount = 1;\n } else if (isEndEvent) {\n trackedTouchCount = 0;\n }\n }\n responderTouchHistoryStore.recordTouchTrack(eventType, responderEvent.nativeEvent);\n }\n\n /**\n * Responder System logic\n */\n\n var eventPaths = getResponderPaths(domEvent);\n var wasNegotiated = false;\n var wantsResponder;\n\n // If an event occured that might change the current responder...\n if (isStartEvent || isMoveEvent || isScrollEvent && trackedTouchCount > 0) {\n // If there is already a responder, prune the event paths to the lowest common ancestor\n // of the existing responder and deepest target of the event.\n var currentResponderIdPath = currentResponder.idPath;\n var eventIdPath = eventPaths.idPath;\n if (currentResponderIdPath != null && eventIdPath != null) {\n var lowestCommonAncestor = getLowestCommonAncestor(currentResponderIdPath, eventIdPath);\n if (lowestCommonAncestor != null) {\n var indexOfLowestCommonAncestor = eventIdPath.indexOf(lowestCommonAncestor);\n // Skip the current responder so it doesn't receive unexpected \"shouldSet\" events.\n var index = indexOfLowestCommonAncestor + (lowestCommonAncestor === currentResponder.id ? 1 : 0);\n eventPaths = {\n idPath: eventIdPath.slice(index),\n nodePath: eventPaths.nodePath.slice(index)\n };\n } else {\n eventPaths = null;\n }\n }\n if (eventPaths != null) {\n // If a node wants to become the responder, attempt to transfer.\n wantsResponder = findWantsResponder(eventPaths, domEvent, responderEvent);\n if (wantsResponder != null) {\n // Sets responder if none exists, or negotates with existing responder.\n attemptTransfer(responderEvent, wantsResponder);\n wasNegotiated = true;\n }\n }\n }\n\n // If there is now a responder, invoke its callbacks for the lifecycle of the gesture.\n if (currentResponder.id != null && currentResponder.node != null) {\n var _currentResponder = currentResponder,\n id = _currentResponder.id,\n node = _currentResponder.node;\n var _getResponderConfig = getResponderConfig(id),\n onResponderStart = _getResponderConfig.onResponderStart,\n onResponderMove = _getResponderConfig.onResponderMove,\n onResponderEnd = _getResponderConfig.onResponderEnd,\n onResponderRelease = _getResponderConfig.onResponderRelease,\n onResponderTerminate = _getResponderConfig.onResponderTerminate,\n onResponderTerminationRequest = _getResponderConfig.onResponderTerminationRequest;\n responderEvent.bubbles = false;\n responderEvent.cancelable = false;\n responderEvent.currentTarget = node;\n\n // Start\n if (isStartEvent) {\n if (onResponderStart != null) {\n responderEvent.dispatchConfig.registrationName = 'onResponderStart';\n onResponderStart(responderEvent);\n }\n }\n // Move\n else if (isMoveEvent) {\n if (onResponderMove != null) {\n responderEvent.dispatchConfig.registrationName = 'onResponderMove';\n onResponderMove(responderEvent);\n }\n } else {\n var isTerminateEvent = isCancelish(eventType) ||\n // native context menu\n eventType === 'contextmenu' ||\n // window blur\n eventType === 'blur' && eventTarget === window ||\n // responder (or ancestors) blur\n eventType === 'blur' && eventTarget.contains(node) && domEvent.relatedTarget !== node ||\n // native scroll without using a pointer\n isScrollEvent && trackedTouchCount === 0 ||\n // native scroll on node that is parent of the responder (allow siblings to scroll)\n isScrollEvent && eventTarget.contains(node) && eventTarget !== node ||\n // native select/selectionchange on node\n isSelectionChangeEvent && hasValidSelection(domEvent);\n var isReleaseEvent = isEndEvent && !isTerminateEvent && !hasTargetTouches(node, domEvent.touches);\n\n // End\n if (isEndEvent) {\n if (onResponderEnd != null) {\n responderEvent.dispatchConfig.registrationName = 'onResponderEnd';\n onResponderEnd(responderEvent);\n }\n }\n // Release\n if (isReleaseEvent) {\n if (onResponderRelease != null) {\n responderEvent.dispatchConfig.registrationName = 'onResponderRelease';\n onResponderRelease(responderEvent);\n }\n changeCurrentResponder(emptyResponder);\n }\n // Terminate\n if (isTerminateEvent) {\n var shouldTerminate = true;\n\n // Responders can still avoid termination but only for these events.\n if (eventType === 'contextmenu' || eventType === 'scroll' || eventType === 'selectionchange') {\n // Only call this function is it wasn't already called during negotiation.\n if (wasNegotiated) {\n shouldTerminate = false;\n } else if (onResponderTerminationRequest != null) {\n responderEvent.dispatchConfig.registrationName = 'onResponderTerminationRequest';\n if (onResponderTerminationRequest(responderEvent) === false) {\n shouldTerminate = false;\n }\n }\n }\n if (shouldTerminate) {\n if (onResponderTerminate != null) {\n responderEvent.dispatchConfig.registrationName = 'onResponderTerminate';\n onResponderTerminate(responderEvent);\n }\n changeCurrentResponder(emptyResponder);\n isEmulatingMouseEvents = false;\n trackedTouchCount = 0;\n }\n }\n }\n }\n}\n\n/**\n * Walk the event path to/from the target node. At each node, stop and call the\n * relevant \"shouldSet\" functions for the given event type. If any of those functions\n * call \"stopPropagation\" on the event, stop searching for a responder.\n */\nfunction findWantsResponder(eventPaths, domEvent, responderEvent) {\n var shouldSetCallbacks = shouldSetResponderEvents[domEvent.type]; // for Flow\n\n if (shouldSetCallbacks != null) {\n var idPath = eventPaths.idPath,\n nodePath = eventPaths.nodePath;\n var shouldSetCallbackCaptureName = shouldSetCallbacks[0];\n var shouldSetCallbackBubbleName = shouldSetCallbacks[1];\n var bubbles = shouldSetCallbacks[2].bubbles;\n var check = function check(id, node, callbackName) {\n var config = getResponderConfig(id);\n var shouldSetCallback = config[callbackName];\n if (shouldSetCallback != null) {\n responderEvent.currentTarget = node;\n if (shouldSetCallback(responderEvent) === true) {\n // Start the path from the potential responder\n var prunedIdPath = idPath.slice(idPath.indexOf(id));\n return {\n id,\n node,\n idPath: prunedIdPath\n };\n }\n }\n };\n\n // capture\n for (var i = idPath.length - 1; i >= 0; i--) {\n var id = idPath[i];\n var node = nodePath[i];\n var result = check(id, node, shouldSetCallbackCaptureName);\n if (result != null) {\n return result;\n }\n if (responderEvent.isPropagationStopped() === true) {\n return;\n }\n }\n\n // bubble\n if (bubbles) {\n for (var _i = 0; _i < idPath.length; _i++) {\n var _id = idPath[_i];\n var _node = nodePath[_i];\n var _result = check(_id, _node, shouldSetCallbackBubbleName);\n if (_result != null) {\n return _result;\n }\n if (responderEvent.isPropagationStopped() === true) {\n return;\n }\n }\n } else {\n var _id2 = idPath[0];\n var _node2 = nodePath[0];\n var target = domEvent.target;\n if (target === _node2) {\n return check(_id2, _node2, shouldSetCallbackBubbleName);\n }\n }\n }\n}\n\n/**\n * Attempt to transfer the responder.\n */\nfunction attemptTransfer(responderEvent, wantsResponder) {\n var _currentResponder2 = currentResponder,\n currentId = _currentResponder2.id,\n currentNode = _currentResponder2.node;\n var id = wantsResponder.id,\n node = wantsResponder.node;\n var _getResponderConfig2 = getResponderConfig(id),\n onResponderGrant = _getResponderConfig2.onResponderGrant,\n onResponderReject = _getResponderConfig2.onResponderReject;\n responderEvent.bubbles = false;\n responderEvent.cancelable = false;\n responderEvent.currentTarget = node;\n\n // Set responder\n if (currentId == null) {\n if (onResponderGrant != null) {\n responderEvent.currentTarget = node;\n responderEvent.dispatchConfig.registrationName = 'onResponderGrant';\n onResponderGrant(responderEvent);\n }\n changeCurrentResponder(wantsResponder);\n }\n // Negotiate with current responder\n else {\n var _getResponderConfig3 = getResponderConfig(currentId),\n onResponderTerminate = _getResponderConfig3.onResponderTerminate,\n onResponderTerminationRequest = _getResponderConfig3.onResponderTerminationRequest;\n var allowTransfer = true;\n if (onResponderTerminationRequest != null) {\n responderEvent.currentTarget = currentNode;\n responderEvent.dispatchConfig.registrationName = 'onResponderTerminationRequest';\n if (onResponderTerminationRequest(responderEvent) === false) {\n allowTransfer = false;\n }\n }\n if (allowTransfer) {\n // Terminate existing responder\n if (onResponderTerminate != null) {\n responderEvent.currentTarget = currentNode;\n responderEvent.dispatchConfig.registrationName = 'onResponderTerminate';\n onResponderTerminate(responderEvent);\n }\n // Grant next responder\n if (onResponderGrant != null) {\n responderEvent.currentTarget = node;\n responderEvent.dispatchConfig.registrationName = 'onResponderGrant';\n onResponderGrant(responderEvent);\n }\n changeCurrentResponder(wantsResponder);\n } else {\n // Reject responder request\n if (onResponderReject != null) {\n responderEvent.currentTarget = node;\n responderEvent.dispatchConfig.registrationName = 'onResponderReject';\n onResponderReject(responderEvent);\n }\n }\n }\n}\n\n/* ------------ PUBLIC API ------------ */\n\n/**\n * Attach Listeners\n *\n * Use native events as ReactDOM doesn't have a non-plugin API to implement\n * this system.\n */\nvar documentEventsCapturePhase = ['blur', 'scroll'];\nvar documentEventsBubblePhase = [\n// mouse\n'mousedown', 'mousemove', 'mouseup', 'dragstart',\n// touch\n'touchstart', 'touchmove', 'touchend', 'touchcancel',\n// other\n'contextmenu', 'select', 'selectionchange'];\nexport function attachListeners() {\n if (canUseDOM && window.__reactResponderSystemActive == null) {\n window.addEventListener('blur', eventListener);\n documentEventsBubblePhase.forEach(eventType => {\n document.addEventListener(eventType, eventListener);\n });\n documentEventsCapturePhase.forEach(eventType => {\n document.addEventListener(eventType, eventListener, true);\n });\n window.__reactResponderSystemActive = true;\n }\n}\n\n/**\n * Register a node with the ResponderSystem.\n */\nexport function addNode(id, node, config) {\n setResponderId(node, id);\n responderListenersMap.set(id, config);\n}\n\n/**\n * Unregister a node with the ResponderSystem.\n */\nexport function removeNode(id) {\n if (currentResponder.id === id) {\n terminateResponder();\n }\n if (responderListenersMap.has(id)) {\n responderListenersMap.delete(id);\n }\n}\n\n/**\n * Allow the current responder to be terminated from within components to support\n * more complex requirements, such as use with other React libraries for working\n * with scroll views, input views, etc.\n */\nexport function terminateResponder() {\n var _currentResponder3 = currentResponder,\n id = _currentResponder3.id,\n node = _currentResponder3.node;\n if (id != null && node != null) {\n var _getResponderConfig4 = getResponderConfig(id),\n onResponderTerminate = _getResponderConfig4.onResponderTerminate;\n if (onResponderTerminate != null) {\n var event = createResponderEvent({}, responderTouchHistoryStore);\n event.currentTarget = node;\n onResponderTerminate(event);\n }\n changeCurrentResponder(emptyResponder);\n }\n isEmulatingMouseEvents = false;\n trackedTouchCount = 0;\n}\n\n/**\n * Allow unit tests to inspect the current responder in the system.\n * FOR TESTING ONLY.\n */\nexport function getResponderNode() {\n return currentResponder.node;\n}","/**\n * Copyright (c) Nicolas Gallagher\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 */\n\nimport getBoundingClientRect from '../../modules/getBoundingClientRect';\nvar emptyFunction = () => {};\nvar emptyObject = {};\nvar emptyArray = [];\n\n/**\n * Safari produces very large identifiers that would cause the `touchBank` array\n * length to be so large as to crash the browser, if not normalized like this.\n * In the future the `touchBank` should use an object/map instead.\n */\nfunction normalizeIdentifier(identifier) {\n return identifier > 20 ? identifier % 20 : identifier;\n}\n\n/**\n * Converts a native DOM event to a ResponderEvent.\n * Mouse events are transformed into fake touch events.\n */\nexport default function createResponderEvent(domEvent, responderTouchHistoryStore) {\n var rect;\n var propagationWasStopped = false;\n var changedTouches;\n var touches;\n var domEventChangedTouches = domEvent.changedTouches;\n var domEventType = domEvent.type;\n var metaKey = domEvent.metaKey === true;\n var shiftKey = domEvent.shiftKey === true;\n var force = domEventChangedTouches && domEventChangedTouches[0].force || 0;\n var identifier = normalizeIdentifier(domEventChangedTouches && domEventChangedTouches[0].identifier || 0);\n var clientX = domEventChangedTouches && domEventChangedTouches[0].clientX || domEvent.clientX;\n var clientY = domEventChangedTouches && domEventChangedTouches[0].clientY || domEvent.clientY;\n var pageX = domEventChangedTouches && domEventChangedTouches[0].pageX || domEvent.pageX;\n var pageY = domEventChangedTouches && domEventChangedTouches[0].pageY || domEvent.pageY;\n var preventDefault = typeof domEvent.preventDefault === 'function' ? domEvent.preventDefault.bind(domEvent) : emptyFunction;\n var timestamp = domEvent.timeStamp;\n function normalizeTouches(touches) {\n return Array.prototype.slice.call(touches).map(touch => {\n return {\n force: touch.force,\n identifier: normalizeIdentifier(touch.identifier),\n get locationX() {\n return locationX(touch.clientX);\n },\n get locationY() {\n return locationY(touch.clientY);\n },\n pageX: touch.pageX,\n pageY: touch.pageY,\n target: touch.target,\n timestamp\n };\n });\n }\n if (domEventChangedTouches != null) {\n changedTouches = normalizeTouches(domEventChangedTouches);\n touches = normalizeTouches(domEvent.touches);\n } else {\n var emulatedTouches = [{\n force,\n identifier,\n get locationX() {\n return locationX(clientX);\n },\n get locationY() {\n return locationY(clientY);\n },\n pageX,\n pageY,\n target: domEvent.target,\n timestamp\n }];\n changedTouches = emulatedTouches;\n touches = domEventType === 'mouseup' || domEventType === 'dragstart' ? emptyArray : emulatedTouches;\n }\n var responderEvent = {\n bubbles: true,\n cancelable: true,\n // `currentTarget` is set before dispatch\n currentTarget: null,\n defaultPrevented: domEvent.defaultPrevented,\n dispatchConfig: emptyObject,\n eventPhase: domEvent.eventPhase,\n isDefaultPrevented() {\n return domEvent.defaultPrevented;\n },\n isPropagationStopped() {\n return propagationWasStopped;\n },\n isTrusted: domEvent.isTrusted,\n nativeEvent: {\n altKey: false,\n ctrlKey: false,\n metaKey,\n shiftKey,\n changedTouches,\n force,\n identifier,\n get locationX() {\n return locationX(clientX);\n },\n get locationY() {\n return locationY(clientY);\n },\n pageX,\n pageY,\n target: domEvent.target,\n timestamp,\n touches,\n type: domEventType\n },\n persist: emptyFunction,\n preventDefault,\n stopPropagation() {\n propagationWasStopped = true;\n },\n target: domEvent.target,\n timeStamp: timestamp,\n touchHistory: responderTouchHistoryStore.touchHistory\n };\n\n // Using getters and functions serves two purposes:\n // 1) The value of `currentTarget` is not initially available.\n // 2) Measuring the clientRect may cause layout jank and should only be done on-demand.\n function locationX(x) {\n rect = rect || getBoundingClientRect(responderEvent.currentTarget);\n if (rect) {\n return x - rect.left;\n }\n }\n function locationY(y) {\n rect = rect || getBoundingClientRect(responderEvent.currentTarget);\n if (rect) {\n return y - rect.top;\n }\n }\n return responderEvent;\n}","/**\n * Copyright (c) Nicolas Gallagher\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 */\n\nexport var BLUR = 'blur';\nexport var CONTEXT_MENU = 'contextmenu';\nexport var FOCUS_OUT = 'focusout';\nexport var MOUSE_DOWN = 'mousedown';\nexport var MOUSE_MOVE = 'mousemove';\nexport var MOUSE_UP = 'mouseup';\nexport var MOUSE_CANCEL = 'dragstart';\nexport var TOUCH_START = 'touchstart';\nexport var TOUCH_MOVE = 'touchmove';\nexport var TOUCH_END = 'touchend';\nexport var TOUCH_CANCEL = 'touchcancel';\nexport var SCROLL = 'scroll';\nexport var SELECT = 'select';\nexport var SELECTION_CHANGE = 'selectionchange';\nexport function isStartish(eventType) {\n return eventType === TOUCH_START || eventType === MOUSE_DOWN;\n}\nexport function isMoveish(eventType) {\n return eventType === TOUCH_MOVE || eventType === MOUSE_MOVE;\n}\nexport function isEndish(eventType) {\n return eventType === TOUCH_END || eventType === MOUSE_UP || isCancelish(eventType);\n}\nexport function isCancelish(eventType) {\n return eventType === TOUCH_CANCEL || eventType === MOUSE_CANCEL;\n}\nexport function isScroll(eventType) {\n return eventType === SCROLL;\n}\nexport function isSelectionChange(eventType) {\n return eventType === SELECT || eventType === SELECTION_CHANGE;\n}","/**\n * Copyright (c) Nicolas Gallagher\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 */\n\nimport isSelectionValid from '../../modules/isSelectionValid';\nvar keyName = '__reactResponderId';\nfunction getEventPath(domEvent) {\n // The 'selectionchange' event always has the 'document' as the target.\n // Use the anchor node as the initial target to reconstruct a path.\n // (We actually only need the first \"responder\" node in practice.)\n if (domEvent.type === 'selectionchange') {\n var target = window.getSelection().anchorNode;\n return composedPathFallback(target);\n } else {\n var path = domEvent.composedPath != null ? domEvent.composedPath() : composedPathFallback(domEvent.target);\n return path;\n }\n}\nfunction composedPathFallback(target) {\n var path = [];\n while (target != null && target !== document.body) {\n path.push(target);\n target = target.parentNode;\n }\n return path;\n}\n\n/**\n * Retrieve the responderId from a host node\n */\nfunction getResponderId(node) {\n if (node != null) {\n return node[keyName];\n }\n return null;\n}\n\n/**\n * Store the responderId on a host node\n */\nexport function setResponderId(node, id) {\n if (node != null) {\n node[keyName] = id;\n }\n}\n\n/**\n * Filter the event path to contain only the nodes attached to the responder system\n */\nexport function getResponderPaths(domEvent) {\n var idPath = [];\n var nodePath = [];\n var eventPath = getEventPath(domEvent);\n for (var i = 0; i < eventPath.length; i++) {\n var node = eventPath[i];\n var id = getResponderId(node);\n if (id != null) {\n idPath.push(id);\n nodePath.push(node);\n }\n }\n return {\n idPath,\n nodePath\n };\n}\n\n/**\n * Walk the paths and find the first common ancestor\n */\nexport function getLowestCommonAncestor(pathA, pathB) {\n var pathALength = pathA.length;\n var pathBLength = pathB.length;\n if (\n // If either path is empty\n pathALength === 0 || pathBLength === 0 ||\n // If the last elements aren't the same there can't be a common ancestor\n // that is connected to the responder system\n pathA[pathALength - 1] !== pathB[pathBLength - 1]) {\n return null;\n }\n var itemA = pathA[0];\n var indexA = 0;\n var itemB = pathB[0];\n var indexB = 0;\n\n // If A is deeper, skip indices that can't match.\n if (pathALength - pathBLength > 0) {\n indexA = pathALength - pathBLength;\n itemA = pathA[indexA];\n pathALength = pathBLength;\n }\n\n // If B is deeper, skip indices that can't match\n if (pathBLength - pathALength > 0) {\n indexB = pathBLength - pathALength;\n itemB = pathB[indexB];\n pathBLength = pathALength;\n }\n\n // Walk in lockstep until a match is found\n var depth = pathALength;\n while (depth--) {\n if (itemA === itemB) {\n return itemA;\n }\n itemA = pathA[indexA++];\n itemB = pathB[indexB++];\n }\n return null;\n}\n\n/**\n * Determine whether any of the active touches are within the current responder.\n * This cannot rely on W3C `targetTouches`, as neither IE11 nor Safari implement it.\n */\nexport function hasTargetTouches(target, touches) {\n if (!touches || touches.length === 0) {\n return false;\n }\n for (var i = 0; i < touches.length; i++) {\n var node = touches[i].target;\n if (node != null) {\n if (target.contains(node)) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * Ignore 'selectionchange' events that don't correspond with a person's intent to\n * select text.\n */\nexport function hasValidSelection(domEvent) {\n if (domEvent.type === 'selectionchange') {\n return isSelectionValid();\n }\n return domEvent.type === 'select';\n}\n\n/**\n * Events are only valid if the primary button was used without specific modifier keys.\n */\nexport function isPrimaryPointerDown(domEvent) {\n var altKey = domEvent.altKey,\n button = domEvent.button,\n buttons = domEvent.buttons,\n ctrlKey = domEvent.ctrlKey,\n type = domEvent.type;\n var isTouch = type === 'touchstart' || type === 'touchmove';\n var isPrimaryMouseDown = type === 'mousedown' && (button === 0 || buttons === 1);\n var isPrimaryMouseMove = type === 'mousemove' && buttons === 1;\n var noModifiers = altKey === false && ctrlKey === false;\n if (isTouch || isPrimaryMouseDown && noModifiers || isPrimaryMouseMove && noModifiers) {\n return true;\n }\n return false;\n}","/**\n * Copyright (c) Nicolas Gallagher\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 */\n\nexport default function isSelectionValid() {\n var selection = window.getSelection();\n var string = selection.toString();\n var anchorNode = selection.anchorNode;\n var focusNode = selection.focusNode;\n var isTextNode = anchorNode && anchorNode.nodeType === window.Node.TEXT_NODE || focusNode && focusNode.nodeType === window.Node.TEXT_NODE;\n return string.length >= 1 && string !== '\\n' && isTextNode;\n}","/**\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nimport { isStartish, isMoveish, isEndish } from './ResponderEventTypes';\n/**\n * Tracks the position and time of each active touch by `touch.identifier`. We\n * should typically only see IDs in the range of 1-20 because IDs get recycled\n * when touches end and start again.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\nvar MAX_TOUCH_BANK = 20;\nfunction timestampForTouch(touch) {\n // The legacy internal implementation provides \"timeStamp\", which has been\n // renamed to \"timestamp\".\n return touch.timeStamp || touch.timestamp;\n}\n\n/**\n * TODO: Instead of making gestures recompute filtered velocity, we could\n * include a built in velocity computation that can be reused globally.\n */\nfunction createTouchRecord(touch) {\n return {\n touchActive: true,\n startPageX: touch.pageX,\n startPageY: touch.pageY,\n startTimeStamp: timestampForTouch(touch),\n currentPageX: touch.pageX,\n currentPageY: touch.pageY,\n currentTimeStamp: timestampForTouch(touch),\n previousPageX: touch.pageX,\n previousPageY: touch.pageY,\n previousTimeStamp: timestampForTouch(touch)\n };\n}\nfunction resetTouchRecord(touchRecord, touch) {\n touchRecord.touchActive = true;\n touchRecord.startPageX = touch.pageX;\n touchRecord.startPageY = touch.pageY;\n touchRecord.startTimeStamp = timestampForTouch(touch);\n touchRecord.currentPageX = touch.pageX;\n touchRecord.currentPageY = touch.pageY;\n touchRecord.currentTimeStamp = timestampForTouch(touch);\n touchRecord.previousPageX = touch.pageX;\n touchRecord.previousPageY = touch.pageY;\n touchRecord.previousTimeStamp = timestampForTouch(touch);\n}\nfunction getTouchIdentifier(_ref) {\n var identifier = _ref.identifier;\n if (identifier == null) {\n console.error('Touch object is missing identifier.');\n }\n if (__DEV__) {\n if (identifier > MAX_TOUCH_BANK) {\n console.error('Touch identifier %s is greater than maximum supported %s which causes ' + 'performance issues backfilling array locations for all of the indices.', identifier, MAX_TOUCH_BANK);\n }\n }\n return identifier;\n}\nfunction recordTouchStart(touch, touchHistory) {\n var identifier = getTouchIdentifier(touch);\n var touchRecord = touchHistory.touchBank[identifier];\n if (touchRecord) {\n resetTouchRecord(touchRecord, touch);\n } else {\n touchHistory.touchBank[identifier] = createTouchRecord(touch);\n }\n touchHistory.mostRecentTimeStamp = timestampForTouch(touch);\n}\nfunction recordTouchMove(touch, touchHistory) {\n var touchRecord = touchHistory.touchBank[getTouchIdentifier(touch)];\n if (touchRecord) {\n touchRecord.touchActive = true;\n touchRecord.previousPageX = touchRecord.currentPageX;\n touchRecord.previousPageY = touchRecord.currentPageY;\n touchRecord.previousTimeStamp = touchRecord.currentTimeStamp;\n touchRecord.currentPageX = touch.pageX;\n touchRecord.currentPageY = touch.pageY;\n touchRecord.currentTimeStamp = timestampForTouch(touch);\n touchHistory.mostRecentTimeStamp = timestampForTouch(touch);\n } else {\n console.warn('Cannot record touch move without a touch start.\\n', \"Touch Move: \" + printTouch(touch) + \"\\n\", \"Touch Bank: \" + printTouchBank(touchHistory));\n }\n}\nfunction recordTouchEnd(touch, touchHistory) {\n var touchRecord = touchHistory.touchBank[getTouchIdentifier(touch)];\n if (touchRecord) {\n touchRecord.touchActive = false;\n touchRecord.previousPageX = touchRecord.currentPageX;\n touchRecord.previousPageY = touchRecord.currentPageY;\n touchRecord.previousTimeStamp = touchRecord.currentTimeStamp;\n touchRecord.currentPageX = touch.pageX;\n touchRecord.currentPageY = touch.pageY;\n touchRecord.currentTimeStamp = timestampForTouch(touch);\n touchHistory.mostRecentTimeStamp = timestampForTouch(touch);\n } else {\n console.warn('Cannot record touch end without a touch start.\\n', \"Touch End: \" + printTouch(touch) + \"\\n\", \"Touch Bank: \" + printTouchBank(touchHistory));\n }\n}\nfunction printTouch(touch) {\n return JSON.stringify({\n identifier: touch.identifier,\n pageX: touch.pageX,\n pageY: touch.pageY,\n timestamp: timestampForTouch(touch)\n });\n}\nfunction printTouchBank(touchHistory) {\n var touchBank = touchHistory.touchBank;\n var printed = JSON.stringify(touchBank.slice(0, MAX_TOUCH_BANK));\n if (touchBank.length > MAX_TOUCH_BANK) {\n printed += ' (original size: ' + touchBank.length + ')';\n }\n return printed;\n}\nexport class ResponderTouchHistoryStore {\n constructor() {\n this._touchHistory = {\n touchBank: [],\n //Array\n numberActiveTouches: 0,\n // If there is only one active touch, we remember its location. This prevents\n // us having to loop through all of the touches all the time in the most\n // common case.\n indexOfSingleActiveTouch: -1,\n mostRecentTimeStamp: 0\n };\n }\n recordTouchTrack(topLevelType, nativeEvent) {\n var touchHistory = this._touchHistory;\n if (isMoveish(topLevelType)) {\n nativeEvent.changedTouches.forEach(touch => recordTouchMove(touch, touchHistory));\n } else if (isStartish(topLevelType)) {\n nativeEvent.changedTouches.forEach(touch => recordTouchStart(touch, touchHistory));\n touchHistory.numberActiveTouches = nativeEvent.touches.length;\n if (touchHistory.numberActiveTouches === 1) {\n touchHistory.indexOfSingleActiveTouch = nativeEvent.touches[0].identifier;\n }\n } else if (isEndish(topLevelType)) {\n nativeEvent.changedTouches.forEach(touch => recordTouchEnd(touch, touchHistory));\n touchHistory.numberActiveTouches = nativeEvent.touches.length;\n if (touchHistory.numberActiveTouches === 1) {\n var touchBank = touchHistory.touchBank;\n for (var i = 0; i < touchBank.length; i++) {\n var touchTrackToCheck = touchBank[i];\n if (touchTrackToCheck != null && touchTrackToCheck.touchActive) {\n touchHistory.indexOfSingleActiveTouch = i;\n break;\n }\n }\n if (__DEV__) {\n var activeRecord = touchBank[touchHistory.indexOfSingleActiveTouch];\n if (!(activeRecord != null && activeRecord.touchActive)) {\n console.error('Cannot find single active touch.');\n }\n }\n }\n }\n }\n get touchHistory() {\n return this._touchHistory;\n }\n}","export default {\n PrimaryRecordBackground: require('../assets/PrimaryRecordBackground.png'),\n PrimaryRecordLogoDark: require('../assets/PrimaryRecordLogoDark.png'),\n BasicLogo: require('../assets/PrimaryLogo.png'),\n IconSVG: require('../assets/primary-record-icon-svg.svg'),\n UsageScreenshots: [\n require('../assets/usage-screenshots/1.png'),\n require('../assets/usage-screenshots/2.png'),\n require('../assets/usage-screenshots/3.png'),\n require('../assets/usage-screenshots/4.png'),\n require('../assets/usage-screenshots/5.png'),\n require('../assets/usage-screenshots/6.png'),\n require('../assets/usage-screenshots/7.png'),\n ],\n NurseApproved: require('../assets/nurse-approved.png'),\n Puzzle: require('../assets/app/puzzle.png'),\n OneUpLogo: require('../assets/app/one-up-logo.png'),\n PrimaryRecordLogoDarkV2: require('../assets/app/primary-record-logo-dark-v2.png'),\n DesktopSplash: require('../assets/app/desktopSplash.jpg'),\n MobileSplash: require('../assets/app/mobileSplash.png'),\n LargeHeaderLogo: require('../assets/app/large-header-logo.png'),\n SmallHeaderLogo: require('../assets/app/small-header-logo.png'),\n LargeIconLogo: require('../assets/app/large-icon-logo.png'),\n FDALogo: require('../assets/app/fda.png'),\n nvidiaInceptionProgramLogo: require('../assets/nvidia-inception-program.jpg'),\n downloadInAppStore: require('../assets/app/download-in-app-store.svg'),\n downloadInGooglePlay: require('../assets/app/download-in-google-play.png'),\n};\n","","","","","","","","","","","","","","","","","","","","","","","","","import { Dimensions } from 'react-native';\nimport { MOBILE_WIDTH_CUTOFF } from '../utils/constants';\n\nexport const useIsMobileLayout = () => {\n return Dimensions.get('window').width < MOBILE_WIDTH_CUTOFF;\n};\n","export const constants = {\n supportSMS: '(317) 210-0644',\n supportSMSBody: '[Primary Record Support]\\n',\n supportEmail: 'support@primaryrecord.com',\n supportEmailSubject: 'Support Request',\n supportEmailBody: 'How can we help you?\\n',\n supportWebsite: 'https://www.primaryrecord.com/contact/',\n primaryRecordYoutube: 'https://www.youtube.com/@primaryrecord',\n};\n\nexport const AVATAR_UPLOAD_QUALITY = 0.1;\nexport const CARD_UPLOAD_QUALITY = 0.5;\nexport const RESOURCE_IMAGE_UPLOAD_QUALITY = 0.5;\nexport const CARD_ASPECT_RATIO = [3.375, 2.125] as [number, number];\n\nexport const cannyAppID = '63dd45140b697344f98bc6a2';\nexport const feedbackAndRoadmapUrl = 'https://primary-record.canny.io/feedback/';\nexport const primaryRecordHome = 'https://www.primaryrecord.com/';\nexport const aboutUrl = 'https://www.primaryrecord.com/about/';\nexport const careersUrl = 'https://www.primaryrecord.com/careers/';\nexport const contactUrl = 'https://www.primaryrecord.com/contact/';\nexport const faqUrl = 'https://support.primaryrecord.com/faq';\nexport const privacyPolicyUrl = 'https://www.primaryrecord.com/privacy-policy/';\nexport const termsOfServiceUrl = 'https://www.primaryrecord.com/terms-of-service/';\nexport const supportEmail = 'support@primaryrecord.com';\nexport const scheduleSupportChatUrl =\n 'https://meetings.hubspot.com/jean-ross/meet-primary-record?__hstc=18061094.acea3b8be3d79e106e06929d2b4d63dd.1720192271694.1726514400500.1726522937384.114&__hssc=18061094.5.1726522937384&__hsfp=1400577961&uuid=c82fea81-08d4-4470-b7f2-8c996f152889';\nexport const guidanceHubspotUrl =\n 'https://support.primaryrecord.com/meetings/jean-ross/nurse-navigator-personal-on-boarding-session/';\nexport const scheduleACallUrl =\n 'https://meetings.hubspot.com/jean-ross/meet-primary-record?__hstc=18061094.3649b3bdb8e7df48bac0c1904fff8e5d.1707905375545.1726583468310.1726592501090.13&__hssc=18061094.2.1726592501090&__hsfp=1400577961';\nexport const recordingAVisitLearnMore =\n 'https://support.primaryrecord.com/what-legal-consent-is-needed-to-record-my-doctor-at-a-visit';\nexport const recordingDisabledHelpUrl = 'https://support.primaryrecord.com/unreliable-note-saving-on-ios-pro-app';\nexport const helpCenterUrl = 'https://www.primaryrecord.com/help-center/';\nexport const salesEmail = 'sales@primaryrecord.com';\nexport const statusPageUrl = 'https://status.primaryrecord.app/';\nexport const carinCodeOfConductUrl =\n 'https://www.primaryrecord.com/wp-content/uploads/2024/09/2020_CARIN_Code_of_Conduct_May-2020_v2.pdf';\nexport const blogUrl = 'https://www.primaryrecord.com/blog/';\nexport const trustCenterUrl = 'https://trust.primaryrecord.com/';\nexport const primaryRecordFacebookUrl = 'https://www.facebook.com/primaryrecord';\nexport const primaryRecordLinkedInUrl = 'https://www.linkedin.com/company/primary-record/';\nexport const primaryRecordInstagramUrl = 'https://www.instagram.com/primaryrecord/';\nexport const subscribeToTheNewsletterUrl = 'https://www.primaryrecord.com/newsletter-signup/';\nexport const advancedDirectiveFormsUrl = 'https://www.primaryrecord.com/advanced-directives-forms/';\nexport const appStoreAppUrl = 'https://apps.apple.com/us/app/primary-record/id6468519519';\nexport const playStoreAppUrl = 'https://play.google.com/store/apps/details?id=com.primaryrecord.primaryrecord.android';\n\nexport const MOBILE_WIDTH_CUTOFF = 768;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","/**\n * @license React\n * react-jsx-runtime.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';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","import usePersistedKeyValueStore from './usePersistedKeyValueStore';\nimport { Platform } from 'react-native';\n\nexport type Environment = 'dev' | 'prod';\n\nexport type UseEnvironmentReturnValue = Environment | 'loading';\n\nfunction useEnvironmentMobile(): UseEnvironmentReturnValue {\n const { isLoading, value } = usePersistedKeyValueStore({\n category: 'environment',\n key: 'environment',\n defaultValue: 'prod',\n });\n\n if (isLoading) return 'loading';\n\n return value;\n}\n\nfunction useEnvironmentWeb(): UseEnvironmentReturnValue {\n return require('../webEnvironment').webEnvironment;\n}\n\nexport const useEnvironment = Platform.select({\n web: useEnvironmentWeb,\n default: useEnvironmentMobile,\n});\n","import { useCallback, useEffect, useRef, useState } from 'react';\nimport Storage from 'react-native-storage';\nimport AsyncStorage from '@react-native-async-storage/async-storage';\nimport { createGlobalState } from 'react-native-global-state-hooks';\n\nconst storage = new Storage({\n size: 1000,\n storageBackend: AsyncStorage,\n});\n\nexport type UsePersistedKeyValueStoreArgs = {\n category: string;\n key: string;\n defaultValue?: TDataType;\n expiration?: number;\n onPersisted?: (value: TDataType) => void;\n areValuesEqual?: (newValue: TDataType, existing: TDataType | undefined) => boolean;\n};\n\nexport type UsePersistedKeyValueStoreReturnValue = {\n value: TDataType;\n isLoading: boolean;\n setValue: (value: TDataType) => Promise;\n};\n\nexport const getStorageKey = (category: string, key: string) => `${category}:${key}`;\n\nexport async function loadPersistedKeyValueStore(category: string, key: string, defaultValue?: TDataType) {\n try {\n const loadedValue = await storage.load({\n key: getStorageKey(category, key),\n });\n return loadedValue;\n } catch (e) {\n return defaultValue;\n }\n}\n\nconst useGlobalState = createGlobalState>({});\n\nexport default function usePersistedKeyValueStore({\n category,\n key,\n defaultValue,\n expiration,\n onPersisted,\n areValuesEqual,\n}: UsePersistedKeyValueStoreArgs): UsePersistedKeyValueStoreReturnValue {\n const [globalState, setGlobalState] = useGlobalState();\n const storageKey = getStorageKey(category, key);\n const [isLoading, setIsLoading] = useState(globalState[storageKey] === undefined);\n\n useEffect(() => {\n const loadValue = async () => {\n try {\n const loadedValue = await loadPersistedKeyValueStore(category, key, defaultValue);\n setGlobalState((_) => {\n const isStillEmpty = _[storageKey] === undefined;\n\n if (!isStillEmpty) return _;\n\n return {\n ..._,\n [storageKey]: loadedValue,\n };\n });\n } catch (e) {\n setGlobalState((_) => ({\n ..._,\n [storageKey]: defaultValue,\n }));\n } finally {\n setIsLoading(false);\n }\n };\n\n // only load if not yet in global state\n if (globalState[storageKey] === undefined) {\n loadValue();\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [category, key, defaultValue]);\n\n const setValueAndPersist = useCallback(\n async (value: TDataType) => {\n setGlobalState((globalState) => {\n const isEqual = areValuesEqual\n ? areValuesEqual(value, globalState[storageKey])\n : value === globalState[storageKey];\n\n if (!isEqual) {\n return {\n ...globalState,\n [storageKey]: value,\n };\n } else {\n return globalState;\n }\n });\n\n await storage.save({\n key: storageKey,\n data: value,\n expires: expiration,\n });\n onPersisted?.(value);\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [expiration, storageKey, onPersisted],\n );\n\n return {\n value: globalState[storageKey] ?? defaultValue,\n isLoading,\n setValue: setValueAndPersist,\n };\n}\n","function e(e,t,n,r,i,a,s){try{var o=e[a](s),c=o.value}catch(e){return void n(e)}o.done?t(c):Promise.resolve(c).then(r,i)}function t(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function n(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};if(t(this,r),this._SIZE=n.size||1e3,this.sync=n.sync||{},this.defaultExpires=void 0!==n.defaultExpires?n.defaultExpires:864e5,this.enableCache=!1!==n.enableCache,this._s=n.storageBackend||null,this._innerVersion=11,this.cache={},this._s&&this._s.setItem)try{var i=this._s.setItem(\"__react_native_storage_test\",\"test\");this.isPromise=!(!i||!i.then)}catch(e){throw console.warn(e),delete this._s,e}else console.warn(\"Data would be lost after reload cause there is no storageBackend specified!\\n \\nEither use localStorage(for web) or AsyncStorage(for React Native) as a storageBackend.\");this._mapPromise=this.getItem(\"map\").then(function(t){e._m=e._checkMap(t&&JSON.parse(t)||{})})}var a,s,o,c,u;return a=r,(s=[{key:\"getItem\",value:function(e){return this._s?this.isPromise?this._s.getItem(e):Promise.resolve(this._s.getItem(e)):Promise.resolve()}},{key:\"setItem\",value:function(e,t){return this._s?this.isPromise?this._s.setItem(e,t):Promise.resolve(this._s.setItem(e,t)):Promise.resolve()}},{key:\"removeItem\",value:function(e){return this._s?this.isPromise?this._s.removeItem(e):Promise.resolve(this._s.removeItem(e)):Promise.resolve()}},{key:\"_initMap\",value:function(){return{innerVersion:this._innerVersion,index:0,__keys__:{}}}},{key:\"_checkMap\",value:function(e){return e&&e.innerVersion&&e.innerVersion===this._innerVersion?e:this._initMap()}},{key:\"_getId\",value:function(e,t){return e+\"_\"+t}},{key:\"_saveToMap\",value:function(e){var t=e.key,n=e.id,r=e.data,i=this._getId(t,n),a=this._m;if(void 0!==a[i])return this.enableCache&&(this.cache[i]=JSON.parse(r)),this.setItem(\"map_\"+a[i],r);if(void 0!==a[a.index]){var s=a[a.index],o=s.split(\"_\");delete a[s],this._removeIdInKey(o[0],o[1]),this.enableCache&&delete this.cache[s]}if(a[i]=a.index,a[a.index]=i,a.__keys__[t]=a.__keys__[t]||[],a.__keys__[t].push(n),this.enableCache){var c=JSON.parse(r);this.cache[i]=c}var u=a.index;++a.index===this._SIZE&&(a.index=0),this.setItem(\"map_\"+u,r),this.setItem(\"map\",JSON.stringify(a))}},{key:\"save\",value:function(e){var t=this,n=e.key,r=e.id,i=e.data,a=e.rawData,s=e.expires,o=void 0===s?this.defaultExpires:s;-1!==n.toString().indexOf(\"_\")&&console.error('Please do not use \"_\" in key!');var c={rawData:i};if(void 0===i){if(void 0===a)return void console.error('\"data\" is required in save()!');console.warn('\"rawData\" is deprecated, please use \"data\" instead!'),c.rawData=a}var u=Date.now();if(null!==o&&(c.expires=u+o),c=JSON.stringify(c),void 0===r){if(this.enableCache){var h=JSON.parse(c);this.cache[n]=h}return this.setItem(n,c)}return-1!==r.toString().indexOf(\"_\")&&console.error('Please do not use \"_\" in id!'),this._mapPromise.then(function(){return t._saveToMap({key:n,id:r,data:c})})}},{key:\"getBatchData\",value:function(e){var t=this;return Promise.all(e.map(function(e){return t.load(e)}))}},{key:\"getBatchDataWithIds\",value:(c=regeneratorRuntime.mark(function e(t){var n,r,i,a,s,o,c,u,h=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.key,r=t.ids,i=t.syncInBackground,a=t.syncParams,s=r.map(function(e){return h.load({key:n,id:e,syncInBackground:i,autoSync:!1,batched:!0})}),e.next=4,Promise.all(s);case 4:if(o=e.sent,c=[],o.forEach(function(e){void 0!==e.syncId&&c.push(e.syncId)}),!c.length){e.next=14;break}return e.next=10,this.sync[n]({id:c,syncParams:a});case 10:return u=e.sent,e.abrupt(\"return\",o.map(function(e){return e.syncId?u.shift():e}));case 14:return e.abrupt(\"return\",o);case 15:case\"end\":return e.stop()}},e,this)}),u=function(){var t=this,n=arguments;return new Promise(function(r,i){var a=c.apply(t,n);function s(t){e(a,r,i,s,o,\"next\",t)}function o(t){e(a,r,i,s,o,\"throw\",t)}s(void 0)})},function(e){return u.apply(this,arguments)})},{key:\"_lookupGlobalItem\",value:function(e){var t=this,n=e.key;return this.enableCache&&void 0!==this.cache[n]?this._loadGlobalItem(i({ret:this.cache[n]},e)):this.getItem(n).then(function(n){return t._loadGlobalItem(i({ret:n},e))})}},{key:\"_loadGlobalItem\",value:function(e){var t=e.key,n=e.ret,r=e.autoSync,i=e.syncInBackground,a=e.syncParams;if(null==n){if(r&&this.sync[t])return this.sync[t]({syncParams:a});throw new l(JSON.stringify(e))}\"string\"==typeof n&&(n=JSON.parse(n),this.enableCache&&(this.cache[t]=n));var s=Date.now();if(n.expires= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","import AsyncStorage from \"./AsyncStorage\";\nexport { useAsyncStorage } from \"./hooks\";\nexport default AsyncStorage;\n//# sourceMappingURL=index.js.map","/**\n * Copyright (c) Nicolas Gallagher.\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\nimport mergeOptions from \"merge-options\";\n\n// eslint-disable-next-line @typescript-eslint/ban-types\n\n// eslint-disable-next-line @typescript-eslint/ban-types\n\nconst merge = mergeOptions.bind({\n concatArrays: true,\n ignoreUndefined: true\n});\nfunction mergeLocalStorageItem(key, value) {\n const oldValue = window.localStorage.getItem(key);\n if (oldValue) {\n const oldObject = JSON.parse(oldValue);\n const newObject = JSON.parse(value);\n const nextValue = JSON.stringify(merge(oldObject, newObject));\n window.localStorage.setItem(key, nextValue);\n } else {\n window.localStorage.setItem(key, value);\n }\n}\nfunction createPromise(getValue, callback) {\n return new Promise((resolve, reject) => {\n try {\n const value = getValue();\n callback === null || callback === void 0 ? void 0 : callback(null, value);\n resolve(value);\n } catch (err) {\n callback === null || callback === void 0 ? void 0 : callback(err);\n reject(err);\n }\n });\n}\nfunction createPromiseAll(promises, callback, processResult) {\n return Promise.all(promises).then(result => {\n const value = (processResult === null || processResult === void 0 ? void 0 : processResult(result)) ?? null;\n callback === null || callback === void 0 ? void 0 : callback(null, value);\n return Promise.resolve(value);\n }, errors => {\n callback === null || callback === void 0 ? void 0 : callback(errors);\n return Promise.reject(errors);\n });\n}\nconst AsyncStorage = {\n /**\n * Fetches `key` value.\n */\n getItem: (key, callback) => {\n return createPromise(() => window.localStorage.getItem(key), callback);\n },\n /**\n * Sets `value` for `key`.\n */\n setItem: (key, value, callback) => {\n return createPromise(() => window.localStorage.setItem(key, value), callback);\n },\n /**\n * Removes a `key`\n */\n removeItem: (key, callback) => {\n return createPromise(() => window.localStorage.removeItem(key), callback);\n },\n /**\n * Merges existing value with input value, assuming they are stringified JSON.\n */\n mergeItem: (key, value, callback) => {\n return createPromise(() => mergeLocalStorageItem(key, value), callback);\n },\n /**\n * Erases *all* AsyncStorage for the domain.\n */\n clear: callback => {\n return createPromise(() => window.localStorage.clear(), callback);\n },\n /**\n * Gets *all* keys known to the app, for all callers, libraries, etc.\n */\n getAllKeys: callback => {\n return createPromise(() => {\n const numberOfKeys = window.localStorage.length;\n const keys = [];\n for (let i = 0; i < numberOfKeys; i += 1) {\n const key = window.localStorage.key(i) || \"\";\n keys.push(key);\n }\n return keys;\n }, callback);\n },\n /**\n * (stub) Flushes any pending requests using a single batch call to get the data.\n */\n flushGetRequests: () => undefined,\n /**\n * multiGet resolves to an array of key-value pair arrays that matches the\n * input format of multiSet.\n *\n * multiGet(['k1', 'k2']) -> [['k1', 'val1'], ['k2', 'val2']]\n */\n multiGet: (keys, callback) => {\n const promises = keys.map(key => AsyncStorage.getItem(key));\n const processResult = result => result.map((value, i) => [keys[i], value]);\n return createPromiseAll(promises, callback, processResult);\n },\n /**\n * Takes an array of key-value array pairs.\n * multiSet([['k1', 'val1'], ['k2', 'val2']])\n */\n multiSet: (keyValuePairs, callback) => {\n const promises = keyValuePairs.map(item => AsyncStorage.setItem(item[0], item[1]));\n return createPromiseAll(promises, callback);\n },\n /**\n * Delete all the keys in the `keys` array.\n */\n multiRemove: (keys, callback) => {\n const promises = keys.map(key => AsyncStorage.removeItem(key));\n return createPromiseAll(promises, callback);\n },\n /**\n * Takes an array of key-value array pairs and merges them with existing\n * values, assuming they are stringified JSON.\n *\n * multiMerge([['k1', 'val1'], ['k2', 'val2']])\n */\n multiMerge: (keyValuePairs, callback) => {\n const promises = keyValuePairs.map(item => AsyncStorage.mergeItem(item[0], item[1]));\n return createPromiseAll(promises, callback);\n }\n};\nexport default AsyncStorage;\n//# sourceMappingURL=AsyncStorage.js.map","'use strict';\nconst isOptionObject = require('is-plain-obj');\n\nconst {hasOwnProperty} = Object.prototype;\nconst {propertyIsEnumerable} = Object;\nconst defineProperty = (object, name, value) => Object.defineProperty(object, name, {\n\tvalue,\n\twritable: true,\n\tenumerable: true,\n\tconfigurable: true\n});\n\nconst globalThis = this;\nconst defaultMergeOptions = {\n\tconcatArrays: false,\n\tignoreUndefined: false\n};\n\nconst getEnumerableOwnPropertyKeys = value => {\n\tconst keys = [];\n\n\tfor (const key in value) {\n\t\tif (hasOwnProperty.call(value, key)) {\n\t\t\tkeys.push(key);\n\t\t}\n\t}\n\n\t/* istanbul ignore else */\n\tif (Object.getOwnPropertySymbols) {\n\t\tconst symbols = Object.getOwnPropertySymbols(value);\n\n\t\tfor (const symbol of symbols) {\n\t\t\tif (propertyIsEnumerable.call(value, symbol)) {\n\t\t\t\tkeys.push(symbol);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn keys;\n};\n\nfunction clone(value) {\n\tif (Array.isArray(value)) {\n\t\treturn cloneArray(value);\n\t}\n\n\tif (isOptionObject(value)) {\n\t\treturn cloneOptionObject(value);\n\t}\n\n\treturn value;\n}\n\nfunction cloneArray(array) {\n\tconst result = array.slice(0, 0);\n\n\tgetEnumerableOwnPropertyKeys(array).forEach(key => {\n\t\tdefineProperty(result, key, clone(array[key]));\n\t});\n\n\treturn result;\n}\n\nfunction cloneOptionObject(object) {\n\tconst result = Object.getPrototypeOf(object) === null ? Object.create(null) : {};\n\n\tgetEnumerableOwnPropertyKeys(object).forEach(key => {\n\t\tdefineProperty(result, key, clone(object[key]));\n\t});\n\n\treturn result;\n}\n\n/**\n * @param {*} merged already cloned\n * @param {*} source something to merge\n * @param {string[]} keys keys to merge\n * @param {Object} config Config Object\n * @returns {*} cloned Object\n */\nconst mergeKeys = (merged, source, keys, config) => {\n\tkeys.forEach(key => {\n\t\tif (typeof source[key] === 'undefined' && config.ignoreUndefined) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Do not recurse into prototype chain of merged\n\t\tif (key in merged && merged[key] !== Object.getPrototypeOf(merged)) {\n\t\t\tdefineProperty(merged, key, merge(merged[key], source[key], config));\n\t\t} else {\n\t\t\tdefineProperty(merged, key, clone(source[key]));\n\t\t}\n\t});\n\n\treturn merged;\n};\n\n/**\n * @param {*} merged already cloned\n * @param {*} source something to merge\n * @param {Object} config Config Object\n * @returns {*} cloned Object\n *\n * see [Array.prototype.concat ( ...arguments )](http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.concat)\n */\nconst concatArrays = (merged, source, config) => {\n\tlet result = merged.slice(0, 0);\n\tlet resultIndex = 0;\n\n\t[merged, source].forEach(array => {\n\t\tconst indices = [];\n\n\t\t// `result.concat(array)` with cloning\n\t\tfor (let k = 0; k < array.length; k++) {\n\t\t\tif (!hasOwnProperty.call(array, k)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tindices.push(String(k));\n\n\t\t\tif (array === merged) {\n\t\t\t\t// Already cloned\n\t\t\t\tdefineProperty(result, resultIndex++, array[k]);\n\t\t\t} else {\n\t\t\t\tdefineProperty(result, resultIndex++, clone(array[k]));\n\t\t\t}\n\t\t}\n\n\t\t// Merge non-index keys\n\t\tresult = mergeKeys(result, array, getEnumerableOwnPropertyKeys(array).filter(key => !indices.includes(key)), config);\n\t});\n\n\treturn result;\n};\n\n/**\n * @param {*} merged already cloned\n * @param {*} source something to merge\n * @param {Object} config Config Object\n * @returns {*} cloned Object\n */\nfunction merge(merged, source, config) {\n\tif (config.concatArrays && Array.isArray(merged) && Array.isArray(source)) {\n\t\treturn concatArrays(merged, source, config);\n\t}\n\n\tif (!isOptionObject(source) || !isOptionObject(merged)) {\n\t\treturn clone(source);\n\t}\n\n\treturn mergeKeys(merged, source, getEnumerableOwnPropertyKeys(source), config);\n}\n\nmodule.exports = function (...options) {\n\tconst config = merge(clone(defaultMergeOptions), (this !== globalThis && this) || {}, defaultMergeOptions);\n\tlet merged = {_: {}};\n\n\tfor (const option of options) {\n\t\tif (option === undefined) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!isOptionObject(option)) {\n\t\t\tthrow new TypeError('`' + option + '` is not an Option Object');\n\t\t}\n\n\t\tmerged = merge(merged, {_: option}, config);\n\t}\n\n\treturn merged._;\n};\n","'use strict';\n\nmodule.exports = value => {\n\tif (Object.prototype.toString.call(value) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === null || prototype === Object.prototype;\n};\n","import AsyncStorage from \"./AsyncStorage\";\nexport function useAsyncStorage(key) {\n return {\n getItem: (...args) => AsyncStorage.getItem(key, ...args),\n setItem: (...args) => AsyncStorage.setItem(key, ...args),\n mergeItem: (...args) => AsyncStorage.mergeItem(key, ...args),\n removeItem: (...args) => AsyncStorage.removeItem(key, ...args)\n };\n}\n//# sourceMappingURL=hooks.js.map","/*! For license information please see bundle.js.LICENSE.txt */\n!function(t,n){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=n(require(\"react\")):\"function\"==typeof define&&define.amd?define([\"react\"],n):\"object\"==typeof exports?exports[\"react-native-global-state-hooks\"]=n(require(\"react\")):t[\"react-native-global-state-hooks\"]=n(t.react)}(this,(t=>(()=>{var n={852:(t,n,r)=>{\"use strict\";function e(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var r=null==t?null:\"undefined\"!=typeof Symbol&&t[Symbol.iterator]||t[\"@@iterator\"];if(null!=r){var e,u,o,i,a=[],c=!0,f=!1;try{if(o=(r=r.call(t)).next,0===n){if(Object(r)!==r)return;c=!1}else for(;!(c=(e=o.call(r)).done)&&(a.push(e.value),a.length!==n);c=!0);}catch(t){f=!0,u=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(f)throw u}}return a}}(t,n)||function(t,n){if(t){if(\"string\"==typeof t)return u(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return\"Object\"===r&&t.constructor&&(r=t.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(t):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,n):void 0}}(t,n)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function u(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r1?u-1:0),f=1;f1?r-1:0),c=1;c{\"use strict\";function e(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var r=null==t?null:\"undefined\"!=typeof Symbol&&t[Symbol.iterator]||t[\"@@iterator\"];if(null!=r){var e,u,o,i,a=[],c=!0,f=!1;try{if(o=(r=r.call(t)).next,0===n){if(Object(r)!==r)return;c=!1}else for(;!(c=(e=o.call(r)).done)&&(a.push(e.value),a.length!==n);c=!0);}catch(t){f=!0,u=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(f)throw u}}return a}}(t,n)||function(t,n){if(t){if(\"string\"==typeof t)return u(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return\"Object\"===r&&t.constructor&&(r=t.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(t):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,n):void 0}}(t,n)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function u(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r1&&void 0!==arguments[1]?arguments[1]:{},r=n.actions,u=o(n,[\"actions\"]),a=new i.GlobalStore(t,u,r),c=e(a.getHookDecoupled(),2),f=c[0],l=c[1];return[a.getHook(),f,l]},n.createGlobalState=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e((0,n.createGlobalStateWithDecoupledFuncs)(t,r),1)[0]},n.createCustomGlobalStateWithDecoupledFuncs=function(t){var r=t.onInitialize,e=t.onChange;return function(t){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{config:null},i=u.config,a=u.onInit,c=u.onStateChanged,f=o(u,[\"config\",\"onInit\",\"onStateChanged\"]);return(0,n.createGlobalStateWithDecoupledFuncs)(t,Object.assign({onInit:function(t){r(t,i),null==a||a(t)},onStateChanged:function(t){e(t,i),null==c||c(t)}},f))}},n.createDerivate=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(e){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t((function(t){var r=n(t);return e?e(r):r}),e&&u?u:r)}},n.createDerivateEmitter=function(t,r){var e=t._father_emitter;if(e){var u=function(t){var n=e.selector(t);return r(n)},o=(0,n.createDerivateEmitter)(e.getter,u);return o._father_emitter={getter:e.getter,selector:u},o}var i=function(n,e){var u=\"function\"==typeof e,o=u?n:null,i=u?e:n,a=u?arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}:e;return t((function(t){t((function(t){var n,e=r(t);return null!==(n=null==o?void 0:o(e))&&void 0!==n?n:e}),i,a)}))};return i._father_emitter={getter:t,selector:r},i}},774:(t,n,r)=>{\"use strict\";function e(t){return e=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},e(t)}function u(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r=0;--u){var o=this.tryEntries[u],i=o.completion;if(\"root\"===o.tryLoc)return e(\"end\");if(o.tryLoc<=this.prev){var a=r.call(o,\"catchLoc\"),c=r.call(o,\"finallyLoc\");if(a&&c){if(this.prev=0;--e){var u=this.tryEntries[e];if(u.tryLoc<=this.prev&&r.call(u,\"finallyLoc\")&&this.prev=0;--n){var r=this.tryEntries[n];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),p}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc===t){var e=r.completion;if(\"throw\"===e.type){var u=e.arg;A(r)}return u}}throw new Error(\"illegal catch attempt\")},delegateYield:function(t,n,r){return this.delegate={iterator:k(t),resultName:n,nextLoc:r},\"next\"===this.method&&(this.arg=void 0),p}},t}function i(t,n){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{},l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;!function(t,n){if(!(t instanceof n))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this.actionsConfig=l,this.subscribers=new Map,this.actions=null,this.config={metadata:null},this.onInit=null,this.onStateChanged=null,this.onSubscribed=null,this.computePreventStateChange=null,this.initialize=function(){return t=e,n=void 0,r=void 0,u=o().mark((function t(){var n,r,e;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.actionsConfig&&(this.actions=this.getStoreActionsMap()),n=this.onInit,r=this.config.onInit,n||r){t.next=5;break}return t.abrupt(\"return\");case 5:e=this.getConfigCallbackParam(),null==n||n(e),null==r||r(e);case 8:case\"end\":return t.stop()}}),t,this)})),new(r||(r=Promise))((function(e,o){function i(t){try{c(u.next(t))}catch(t){o(t)}}function a(t){try{c(u.throw(t))}catch(t){o(t)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(t){t(n)}))).then(i,a)}c((u=u.apply(t,n||[])).next())}));var t,n,r,u},this.setState=function(t){var n=t.state,r=t.forceUpdate;e.stateWrapper={state:n},Array.from(e.subscribers.values()).forEach((function(t){!function(t){var e=t.selector,u=t.callback,o=t.currentState,i=t.config,a=(null==i?void 0:i.isEqual)||null===(null==i?void 0:i.isEqual)?null==i?void 0:i.isEqual:e?c.shallowCompare:null,f=e?e(n):n;!r&&(null==a?void 0:a(o,f))||u({state:f})}(t)}))},this.setMetadata=function(t){var n,r,u=\"function\"==typeof t?t(null!==(n=e.config.metadata)&&void 0!==n?n:null):t;e.config=Object.assign(Object.assign({},null!==(r=e.config)&&void 0!==r?r:{}),{metadata:u})},this.getMetadata=function(){var t;return null!==(t=e.config.metadata)&&void 0!==t?t:null},this.createChangesSubscriber=function(t){var n=t.callback,r=t.selector,u=t.config,o=r?r(e.stateWrapper.state):e.stateWrapper.state,i={state:o};return(null==u?void 0:u.skipFirst)||n(o),{stateWrapper:i,subscriptionCallback:function(t){var r=t.state;i.state=r,n(r)}}},this.getState=function(t){if(!t)return e.stateWrapper.state;var r=[];return t((function(t,n,u){var o=\"function\"==typeof n,i=o?t:null,a=o?n:t,f=o?u:n,l=e.createChangesSubscriber({selector:i,callback:a,config:f}),s=l.subscriptionCallback,h=l.stateWrapper,p=(0,c.uniqueId)();e.updateSubscription({subscriptionId:p,selector:i,config:f,stateWrapper:h,callback:s}),r.push(p)})),r.length||(0,n.throwNoSubscribersWereAdded)(),function(){r.forEach((function(t){e.subscribers.delete(t)}))}},this.getConfigCallbackParam=function(){var t=e.setMetadata,n=e.getMetadata,r=e.getState,u=e.actions;return{setMetadata:t,getMetadata:n,getState:r,setState:e.setStateWrapper,actions:u}},this.updateSubscription=function(t){var n=t.subscriptionId,r=t.callback,u=t.selector,o=t.config,i=void 0===o?{}:o,a=t.stateWrapper.state,c=e.subscribers.get(n);if(c)return c.currentState=a,c;var f={subscriptionId:n,selector:u,config:i,currentState:a,callback:r};return e.subscribers.set(n,f),f},this.executeOnSubscribed=function(){var t=e.onSubscribed,n=e.config.onSubscribed;if(t||n){var r=e.getConfigCallbackParam();null==t||t(r),null==n||n(r)}},this.getHook=function(){return function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=(0,f.useRef)(null);(0,f.useEffect)((function(){return function(){e.subscribers.delete(o.current)}}),[]);var i,a,l=(i=(0,f.useState)((function(){return t?{state:t(e.stateWrapper.state)}:e.stateWrapper})),a=2,function(t){if(Array.isArray(t))return t}(i)||function(t,n){var r=null==t?null:\"undefined\"!=typeof Symbol&&t[Symbol.iterator]||t[\"@@iterator\"];if(null!=r){var e,u,o,i,a=[],c=!0,f=!1;try{if(o=(r=r.call(t)).next,0===n){if(Object(r)!==r)return;c=!1}else for(;!(c=(e=o.call(r)).done)&&(a.push(e.value),a.length!==n);c=!0);}catch(t){f=!0,u=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(f)throw u}}return a}}(i,a)||function(t,n){if(t){if(\"string\"==typeof t)return u(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return\"Object\"===r&&t.constructor&&(r=t.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(t):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,n):void 0}}(i,a)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()),s=l[0],h=l[1];return(0,f.useEffect)((function(){null===o.current&&(o.current=(0,c.uniqueId)())}),[]),(0,f.useEffect)((function(){var n=o.current;if(null!==n){var u=!e.subscribers.has(n);e.updateSubscription({subscriptionId:n,stateWrapper:s,selector:t,config:r,callback:h}),u&&e.executeOnSubscribed()}}),[s]),[s.state,e.getStateOrchestrator(),null!==(n=e.config.metadata)&&void 0!==n?n:null]}},this.getHookDecoupled=function(){var t=e.getStateOrchestrator(),n=e.getMetadata;return[e.getState,t,n]},this.getStateOrchestrator=function(){return e.actions?e.actions:e.setStateWrapper},this.hasStateCallbacks=function(){var t=e.computePreventStateChange,n=e.onStateChanged,r=e.config,u=r.computePreventStateChange,o=r.onStateChanged;return!!(t||u||n||o)},this.setStateWrapper=function(t){var n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).forceUpdate,r=\"function\"==typeof t,u=e.stateWrapper.state,o=r?t(u):t;if(n||!Object.is(e.stateWrapper.state,o)){var i=e.setMetadata,a=e.getMetadata,c=e.getState,f=e.actions,l={setMetadata:i,getMetadata:a,setState:e.setState,getState:c,actions:f,previousState:u,state:o},s=e.computePreventStateChange,h=e.config.computePreventStateChange;if((s||h)&&((null==s?void 0:s(l))||(null==h?void 0:h(l))))return;e.setState({forceUpdate:n,state:o});var p=e.onStateChanged,v=e.config.onStateChanged;(p||v)&&(null==p||p(l),null==v||v(l))}},this.getStoreActionsMap=function(){if(!e.actionsConfig)return null;var t=e.actionsConfig,n=e.setMetadata,r=e.setStateWrapper,u=e.getState,o=e.getMetadata,i=Object.keys(t).reduce((function(e,c){var f,l,s;return Object.assign(e,(f={},s=function(){for(var e=t[c],a=arguments.length,f=new Array(a),l=0;l ({ setState, getState, setMetadata, getMetadata, actions }) => {\\n\\n setState((state) => ({ ...state, ...param }))\\n\\n }\\n\\n}\\n\"))}(c),s.call(i,{setState:r,getState:u,setMetadata:n,getMetadata:o,actions:i})},(l=a(l=c))in f?Object.defineProperty(f,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):f[l]=s,f)),e}),{});return i},this.stateWrapper={state:r},this.config=Object.assign({metadata:null},null!=i?i:{}),this.constructor!==t||this.initialize()}var r,e;return r=t,(e=[{key:\"state\",get:function(){return this.stateWrapper.state}}])&&i(r.prototype,e),Object.defineProperty(r,\"prototype\",{writable:!1}),t}();n.GlobalStore=l},530:(t,n)=>{\"use strict\";Object.defineProperty(n,\"__esModule\",{value:!0})},608:(t,n,r)=>{\"use strict\";function e(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var r=null==t?null:\"undefined\"!=typeof Symbol&&t[Symbol.iterator]||t[\"@@iterator\"];if(null!=r){var e,u,o,i,a=[],c=!0,f=!1;try{if(o=(r=r.call(t)).next,0===n){if(Object(r)!==r)return;c=!1}else for(;!(c=(e=o.call(r)).done)&&(a.push(e.value),a.length!==n);c=!0);}catch(t){f=!0,u=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(f)throw u}}return a}}(t,n)||o(t,n)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function u(t,n){var r=\"undefined\"!=typeof Symbol&&t[Symbol.iterator]||t[\"@@iterator\"];if(!r){if(Array.isArray(t)||(r=o(t))||n&&t&&\"number\"==typeof t.length){r&&(t=r);var e=0,u=function(){};return{s:u,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:u}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function o(t,n){if(t){if(\"string\"==typeof t)return i(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return\"Object\"===r&&t.constructor&&(r=t.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(t):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,n):void 0}}function i(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r1&&void 0!==arguments[1]?arguments[1]:0;return function(){for(var e=arguments.length,u=new Array(e),o=0;o{\"use strict\";function e(t){return e=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},e(t)}function u(t,n){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},u(t,n)}function o(t){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},o(t)}Object.defineProperty(n,\"__esModule\",{value:!0}),n.GlobalStoreAbstract=void 0;var i=function(t){!function(t,n){if(\"function\"!=typeof n&&null!==n)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,\"prototype\",{writable:!1}),n&&u(t,n)}(c,t);var n,r,i,a=(r=c,i=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=o(r);if(i){var u=o(this).constructor;t=Reflect.construct(n,arguments,u)}else t=n.apply(this,arguments);return function(t,n){if(n&&(\"object\"===e(n)||\"function\"==typeof n))return n;if(void 0!==n)throw new TypeError(\"Derived constructors may only return object or undefined\");return function(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}(t)}(this,t)});function c(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return function(t,n){if(!(t instanceof n))throw new TypeError(\"Cannot call a class as a function\")}(this,c),(n=a.call(this,t,r,e)).onInit=function(t){n.onInitialize(t)},n.onStateChanged=function(t){n.onChange(t)},n}return n=c,Object.defineProperty(n,\"prototype\",{writable:!1}),n}(r(774).GlobalStore);n.GlobalStoreAbstract=i},991:(t,n,r)=>{\"use strict\";var e=Object.create?function(t,n,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(n,r);u&&!(\"get\"in u?!n.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return n[r]}}),Object.defineProperty(t,e,u)}:function(t,n,r,e){void 0===e&&(e=r),t[e]=n[r]},u=function(t,n){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};Object.defineProperty(n,\"__esModule\",{value:!0}),u(r(684),n),u(r(530),n),u(r(774),n),u(r(195),n),u(r(853),n),u(r(608),n),u(r(852),n)},684:function(t){t.exports=(()=>{\"use strict\";var t={991:(t,n,r)=>{var e=Object.create?function(t,n,r,e){void 0===e&&(e=r);var u=Object.getOwnPropertyDescriptor(n,r);u&&!(\"get\"in u?!n.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return n[r]}}),Object.defineProperty(t,e,u)}:function(t,n,r,e){void 0===e&&(e=r),t[e]=n[r]};Object.defineProperty(n,\"__esModule\",{value:!0}),function(t,n){for(var r in t)\"default\"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)}(r(729),n)},729:(t,n)=>{function r(t){return r=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},r(t)}function e(t,n,e){return(n=function(t){var n=function(t,n){if(\"object\"!==r(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var u=e.call(t,\"string\");if(\"object\"!==r(u))return u;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return String(t)}(t);return\"symbol\"===r(n)?n:String(n)}(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function u(t,n){if(t){if(\"string\"==typeof t)return o(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return\"Object\"===r&&t.constructor&&(r=t.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(t):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,n):void 0}}function o(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r1&&void 0!==arguments[1]?arguments[1]:{}).shallow;if((0,n.isPrimitive)(t)||(0,n.isDate)(t))return t;if(Array.isArray(t))return i?function(t){if(Array.isArray(t))return o(t)}(r=t)||function(t){if(\"undefined\"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t[\"@@iterator\"])return Array.from(t)}(r)||u(r)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}():t.map((function(t){return(0,n.clone)(t)}));if(t instanceof Map){var a=Array.from(t.entries());return i?new Map(a):new Map(a.map((function(t){return(0,n.clone)(t)})))}if(t instanceof Set){var c=Array.from(t.values());return i?new Set(c):new Set(c.map((function(t){return(0,n.clone)(t)})))}return t instanceof RegExp?new RegExp(t.toString()):(0,n.isFunction)(t)?i?t:Object.create(t):i?Object.assign({},t):t instanceof Error?new Error(t.message):Object.keys(t).reduce((function(r,u){var o=t[u];return Object.assign(Object.assign({},r),e({},u,(0,n.clone)(o)))}),{})},n.isNil=function(t){return null==t},n.isNumber=function(t){return\"number\"==typeof t},n.isBoolean=function(t){return\"boolean\"==typeof t},n.isString=function(t){return\"string\"==typeof t},n.isDate=function(t){return t instanceof Date},n.isRegex=function(t){return t instanceof RegExp},n.isFunction=function(t){return\"function\"==typeof t||t instanceof Function},n.isPrimitive=function(t){return(0,n.isNil)(t)||(0,n.isNumber)(t)||(0,n.isBoolean)(t)||(0,n.isString)(t)||\"symbol\"===r(t)},n.formatFromStore=function(t){return function(t){var r,o;if((0,n.isPrimitive)(t))return t;if(\"date\"===(null==t?void 0:t.$t))return new Date(t.$v);if(\"map\"===(null==t?void 0:t.$t)){var i=(null!==(r=t.$v)&&void 0!==r?r:[]).map((function(t){var r,e=(2,function(t){if(Array.isArray(t))return t}(r=t)||function(t,n){var r=null==t?null:\"undefined\"!=typeof Symbol&&t[Symbol.iterator]||t[\"@@iterator\"];if(null!=r){var e,u,o,i,a=[],c=!0,f=!1;try{for(o=(r=r.call(t)).next,0;!(c=(e=o.call(r)).done)&&(a.push(e.value),2!==a.length);c=!0);}catch(t){f=!0,u=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(f)throw u}}return a}}(r)||u(r,2)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()),o=e[0],i=e[1];return[o,(0,n.formatFromStore)(i)]}));return new Map(i)}if(\"set\"===(null==t?void 0:t.$t)){var a=null!==(o=t.$v)&&void 0!==o?o:[].map((function(t){return(0,n.formatFromStore)(t)}));return new Set(a)}return\"regex\"===(null==t?void 0:t.$t)?new RegExp(t.$v):\"error\"===(null==t?void 0:t.$t)?new Error(t.$v):Array.isArray(t)?t.map((function(t){return(0,n.formatFromStore)(t)})):\"function\"===(null==t?void 0:t.$t)?Function(\"(\".concat(t.$v,\")(...arguments)\")):Object.keys(t).reduce((function(r,u){var o=t[u];return Object.assign(Object.assign({},r),e({},u,(0,n.formatFromStore)(o)))}),{})}((arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).jsonParse?JSON.parse(t):(0,n.clone)(t))},n.formatToStore=function(t){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{stringify:!1},o=u.stringify,i=u.validator,a=u.excludeTypes,c=u.excludeKeys,f=new Set(null!=a?a:[]),l=new Set(null!=c?c:[]),s=f.size||l.size,h=null!=i?i:function(t){var n=t.key,e=t.value;if(!s)return!0;var u=l.has(n),o=f.has(r(e));return!u&&!o},p=function t(r){if((0,n.isPrimitive)(r))return r;if(Array.isArray(r))return r.map((function(n){return t(n)}));if(r instanceof Map)return{$t:\"map\",$v:Array.from(r.entries()).map((function(n){return t(n)}))};if(r instanceof Set)return{$t:\"set\",$v:Array.from(r.values()).map((function(n){return t(n)}))};if((0,n.isDate)(r))return{$t:\"date\",$v:r.toISOString()};if((0,n.isRegex)(r))return{$t:\"regex\",$v:r.toString()};if((0,n.isFunction)(r)){var u;try{u={$t:\"function\",$v:r.toString()}}catch(t){u={$t:\"error\",$v:\"Error: Could not serialize function\"}}return u}return r instanceof Error?{$t:\"error\",$v:r.message}:Object.keys(r).reduce((function(n,u){var o=r[u],i=t(o);return h({obj:r,key:u,value:i})?Object.assign(Object.assign({},n),e({},u,t(o))):n}),{})}((0,n.clone)(t));return o?JSON.stringify(p):p}}},n={};return function r(e){var u=n[e];if(void 0!==u)return u.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,r),o.exports}(991)})()},486:function(t,n,r){var e;t=r.nmd(t),function(){var u,o=\"Expected a function\",i=\"__lodash_hash_undefined__\",a=\"__lodash_placeholder__\",c=32,f=128,l=1/0,s=9007199254740991,h=NaN,p=4294967295,v=[[\"ary\",f],[\"bind\",1],[\"bindKey\",2],[\"curry\",8],[\"curryRight\",16],[\"flip\",512],[\"partial\",c],[\"partialRight\",64],[\"rearg\",256]],y=\"[object Arguments]\",g=\"[object Array]\",d=\"[object Boolean]\",_=\"[object Date]\",b=\"[object Error]\",m=\"[object Function]\",w=\"[object GeneratorFunction]\",S=\"[object Map]\",j=\"[object Number]\",x=\"[object Object]\",O=\"[object Promise]\",A=\"[object RegExp]\",E=\"[object Set]\",k=\"[object String]\",I=\"[object Symbol]\",C=\"[object WeakMap]\",P=\"[object ArrayBuffer]\",R=\"[object DataView]\",W=\"[object Float32Array]\",L=\"[object Float64Array]\",M=\"[object Int8Array]\",z=\"[object Int16Array]\",$=\"[object Int32Array]\",T=\"[object Uint8Array]\",D=\"[object Uint8ClampedArray]\",F=\"[object Uint16Array]\",N=\"[object Uint32Array]\",U=/\\b__p \\+= '';/g,B=/\\b(__p \\+=) '' \\+/g,G=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,Z=/[&<>\"']/g,K=RegExp(q.source),H=RegExp(Z.source),V=/<%-([\\s\\S]+?)%>/g,J=/<%([\\s\\S]+?)%>/g,Y=/<%=([\\s\\S]+?)%>/g,Q=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,X=/^\\w*$/,tt=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,nt=/[\\\\^$.*+?()[\\]{}|]/g,rt=RegExp(nt.source),et=/^\\s+/,ut=/\\s/,ot=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,it=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,at=/,? & /,ct=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,ft=/[()=,{}\\[\\]\\/\\s]/,lt=/\\\\(\\\\)?/g,st=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,ht=/\\w*$/,pt=/^[-+]0x[0-9a-f]+$/i,vt=/^0b[01]+$/i,yt=/^\\[object .+?Constructor\\]$/,gt=/^0o[0-7]+$/i,dt=/^(?:0|[1-9]\\d*)$/,_t=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,bt=/($^)/,mt=/['\\n\\r\\u2028\\u2029\\\\]/g,wt=\"\\\\ud800-\\\\udfff\",St=\"\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff\",jt=\"\\\\u2700-\\\\u27bf\",xt=\"a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff\",Ot=\"A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde\",At=\"\\\\ufe0e\\\\ufe0f\",Et=\"\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\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\",kt=\"[\"+wt+\"]\",It=\"[\"+Et+\"]\",Ct=\"[\"+St+\"]\",Pt=\"\\\\d+\",Rt=\"[\"+jt+\"]\",Wt=\"[\"+xt+\"]\",Lt=\"[^\"+wt+Et+Pt+jt+xt+Ot+\"]\",Mt=\"\\\\ud83c[\\\\udffb-\\\\udfff]\",zt=\"[^\"+wt+\"]\",$t=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",Tt=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",Dt=\"[\"+Ot+\"]\",Ft=\"\\\\u200d\",Nt=\"(?:\"+Wt+\"|\"+Lt+\")\",Ut=\"(?:\"+Dt+\"|\"+Lt+\")\",Bt=\"(?:['’](?:d|ll|m|re|s|t|ve))?\",Gt=\"(?:['’](?:D|LL|M|RE|S|T|VE))?\",qt=\"(?:\"+Ct+\"|\"+Mt+\")?\",Zt=\"[\"+At+\"]?\",Kt=Zt+qt+\"(?:\"+Ft+\"(?:\"+[zt,$t,Tt].join(\"|\")+\")\"+Zt+qt+\")*\",Ht=\"(?:\"+[Rt,$t,Tt].join(\"|\")+\")\"+Kt,Vt=\"(?:\"+[zt+Ct+\"?\",Ct,$t,Tt,kt].join(\"|\")+\")\",Jt=RegExp(\"['’]\",\"g\"),Yt=RegExp(Ct,\"g\"),Qt=RegExp(Mt+\"(?=\"+Mt+\")|\"+Vt+Kt,\"g\"),Xt=RegExp([Dt+\"?\"+Wt+\"+\"+Bt+\"(?=\"+[It,Dt,\"$\"].join(\"|\")+\")\",Ut+\"+\"+Gt+\"(?=\"+[It,Dt+Nt,\"$\"].join(\"|\")+\")\",Dt+\"?\"+Nt+\"+\"+Bt,Dt+\"+\"+Gt,\"\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])\",\"\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])\",Pt,Ht].join(\"|\"),\"g\"),tn=RegExp(\"[\"+Ft+wt+St+At+\"]\"),nn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rn=[\"Array\",\"Buffer\",\"DataView\",\"Date\",\"Error\",\"Float32Array\",\"Float64Array\",\"Function\",\"Int8Array\",\"Int16Array\",\"Int32Array\",\"Map\",\"Math\",\"Object\",\"Promise\",\"RegExp\",\"Set\",\"String\",\"Symbol\",\"TypeError\",\"Uint8Array\",\"Uint8ClampedArray\",\"Uint16Array\",\"Uint32Array\",\"WeakMap\",\"_\",\"clearTimeout\",\"isFinite\",\"parseInt\",\"setTimeout\"],en=-1,un={};un[W]=un[L]=un[M]=un[z]=un[$]=un[T]=un[D]=un[F]=un[N]=!0,un[y]=un[g]=un[P]=un[d]=un[R]=un[_]=un[b]=un[m]=un[S]=un[j]=un[x]=un[A]=un[E]=un[k]=un[C]=!1;var on={};on[y]=on[g]=on[P]=on[R]=on[d]=on[_]=on[W]=on[L]=on[M]=on[z]=on[$]=on[S]=on[j]=on[x]=on[A]=on[E]=on[k]=on[I]=on[T]=on[D]=on[F]=on[N]=!0,on[b]=on[m]=on[C]=!1;var an={\"\\\\\":\"\\\\\",\"'\":\"'\",\"\\n\":\"n\",\"\\r\":\"r\",\"\\u2028\":\"u2028\",\"\\u2029\":\"u2029\"},cn=parseFloat,fn=parseInt,ln=\"object\"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,sn=\"object\"==typeof self&&self&&self.Object===Object&&self,hn=ln||sn||Function(\"return this\")(),pn=n&&!n.nodeType&&n,vn=pn&&t&&!t.nodeType&&t,yn=vn&&vn.exports===pn,gn=yn&&ln.process,dn=function(){try{return vn&&vn.require&&vn.require(\"util\").types||gn&&gn.binding&&gn.binding(\"util\")}catch(t){}}(),_n=dn&&dn.isArrayBuffer,bn=dn&&dn.isDate,mn=dn&&dn.isMap,wn=dn&&dn.isRegExp,Sn=dn&&dn.isSet,jn=dn&&dn.isTypedArray;function xn(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}function On(t,n,r,e){for(var u=-1,o=null==t?0:t.length;++u-1}function Pn(t,n,r){for(var e=-1,u=null==t?0:t.length;++e-1;);return r}function tr(t,n){for(var r=t.length;r--&&Fn(n,t[r],0)>-1;);return r}var nr=qn({À:\"A\",Á:\"A\",Â:\"A\",Ã:\"A\",Ä:\"A\",Å:\"A\",à:\"a\",á:\"a\",â:\"a\",ã:\"a\",ä:\"a\",å:\"a\",Ç:\"C\",ç:\"c\",Ð:\"D\",ð:\"d\",È:\"E\",É:\"E\",Ê:\"E\",Ë:\"E\",è:\"e\",é:\"e\",ê:\"e\",ë:\"e\",Ì:\"I\",Í:\"I\",Î:\"I\",Ï:\"I\",ì:\"i\",í:\"i\",î:\"i\",ï:\"i\",Ñ:\"N\",ñ:\"n\",Ò:\"O\",Ó:\"O\",Ô:\"O\",Õ:\"O\",Ö:\"O\",Ø:\"O\",ò:\"o\",ó:\"o\",ô:\"o\",õ:\"o\",ö:\"o\",ø:\"o\",Ù:\"U\",Ú:\"U\",Û:\"U\",Ü:\"U\",ù:\"u\",ú:\"u\",û:\"u\",ü:\"u\",Ý:\"Y\",ý:\"y\",ÿ:\"y\",Æ:\"Ae\",æ:\"ae\",Þ:\"Th\",þ:\"th\",ß:\"ss\",Ā:\"A\",Ă:\"A\",Ą:\"A\",ā:\"a\",ă:\"a\",ą:\"a\",Ć:\"C\",Ĉ:\"C\",Ċ:\"C\",Č:\"C\",ć:\"c\",ĉ:\"c\",ċ:\"c\",č:\"c\",Ď:\"D\",Đ:\"D\",ď:\"d\",đ:\"d\",Ē:\"E\",Ĕ:\"E\",Ė:\"E\",Ę:\"E\",Ě:\"E\",ē:\"e\",ĕ:\"e\",ė:\"e\",ę:\"e\",ě:\"e\",Ĝ:\"G\",Ğ:\"G\",Ġ:\"G\",Ģ:\"G\",ĝ:\"g\",ğ:\"g\",ġ:\"g\",ģ:\"g\",Ĥ:\"H\",Ħ:\"H\",ĥ:\"h\",ħ:\"h\",Ĩ:\"I\",Ī:\"I\",Ĭ:\"I\",Į:\"I\",İ:\"I\",ĩ:\"i\",ī:\"i\",ĭ:\"i\",į:\"i\",ı:\"i\",Ĵ:\"J\",ĵ:\"j\",Ķ:\"K\",ķ:\"k\",ĸ:\"k\",Ĺ:\"L\",Ļ:\"L\",Ľ:\"L\",Ŀ:\"L\",Ł:\"L\",ĺ:\"l\",ļ:\"l\",ľ:\"l\",ŀ:\"l\",ł:\"l\",Ń:\"N\",Ņ:\"N\",Ň:\"N\",Ŋ:\"N\",ń:\"n\",ņ:\"n\",ň:\"n\",ŋ:\"n\",Ō:\"O\",Ŏ:\"O\",Ő:\"O\",ō:\"o\",ŏ:\"o\",ő:\"o\",Ŕ:\"R\",Ŗ:\"R\",Ř:\"R\",ŕ:\"r\",ŗ:\"r\",ř:\"r\",Ś:\"S\",Ŝ:\"S\",Ş:\"S\",Š:\"S\",ś:\"s\",ŝ:\"s\",ş:\"s\",š:\"s\",Ţ:\"T\",Ť:\"T\",Ŧ:\"T\",ţ:\"t\",ť:\"t\",ŧ:\"t\",Ũ:\"U\",Ū:\"U\",Ŭ:\"U\",Ů:\"U\",Ű:\"U\",Ų:\"U\",ũ:\"u\",ū:\"u\",ŭ:\"u\",ů:\"u\",ű:\"u\",ų:\"u\",Ŵ:\"W\",ŵ:\"w\",Ŷ:\"Y\",ŷ:\"y\",Ÿ:\"Y\",Ź:\"Z\",Ż:\"Z\",Ž:\"Z\",ź:\"z\",ż:\"z\",ž:\"z\",IJ:\"IJ\",ij:\"ij\",Œ:\"Oe\",œ:\"oe\",ʼn:\"'n\",ſ:\"s\"}),rr=qn({\"&\":\"&\",\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\"});function er(t){return\"\\\\\"+an[t]}function ur(t){return tn.test(t)}function or(t){var n=-1,r=Array(t.size);return t.forEach((function(t,e){r[++n]=[e,t]})),r}function ir(t,n){return function(r){return t(n(r))}}function ar(t,n){for(var r=-1,e=t.length,u=0,o=[];++r\",\""\":'\"',\"'\":\"'\"}),vr=function t(n){var r,e=(n=null==n?hn:vr.defaults(hn.Object(),n,vr.pick(hn,rn))).Array,ut=n.Date,wt=n.Error,St=n.Function,jt=n.Math,xt=n.Object,Ot=n.RegExp,At=n.String,Et=n.TypeError,kt=e.prototype,It=St.prototype,Ct=xt.prototype,Pt=n[\"__core-js_shared__\"],Rt=It.toString,Wt=Ct.hasOwnProperty,Lt=0,Mt=(r=/[^.]+$/.exec(Pt&&Pt.keys&&Pt.keys.IE_PROTO||\"\"))?\"Symbol(src)_1.\"+r:\"\",zt=Ct.toString,$t=Rt.call(xt),Tt=hn._,Dt=Ot(\"^\"+Rt.call(Wt).replace(nt,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"),Ft=yn?n.Buffer:u,Nt=n.Symbol,Ut=n.Uint8Array,Bt=Ft?Ft.allocUnsafe:u,Gt=ir(xt.getPrototypeOf,xt),qt=xt.create,Zt=Ct.propertyIsEnumerable,Kt=kt.splice,Ht=Nt?Nt.isConcatSpreadable:u,Vt=Nt?Nt.iterator:u,Qt=Nt?Nt.toStringTag:u,tn=function(){try{var t=co(xt,\"defineProperty\");return t({},\"\",{}),t}catch(t){}}(),an=n.clearTimeout!==hn.clearTimeout&&n.clearTimeout,ln=ut&&ut.now!==hn.Date.now&&ut.now,sn=n.setTimeout!==hn.setTimeout&&n.setTimeout,pn=jt.ceil,vn=jt.floor,gn=xt.getOwnPropertySymbols,dn=Ft?Ft.isBuffer:u,$n=n.isFinite,qn=kt.join,yr=ir(xt.keys,xt),gr=jt.max,dr=jt.min,_r=ut.now,br=n.parseInt,mr=jt.random,wr=kt.reverse,Sr=co(n,\"DataView\"),jr=co(n,\"Map\"),xr=co(n,\"Promise\"),Or=co(n,\"Set\"),Ar=co(n,\"WeakMap\"),Er=co(xt,\"create\"),kr=Ar&&new Ar,Ir={},Cr=$o(Sr),Pr=$o(jr),Rr=$o(xr),Wr=$o(Or),Lr=$o(Ar),Mr=Nt?Nt.prototype:u,zr=Mr?Mr.valueOf:u,$r=Mr?Mr.toString:u;function Tr(t){if(ta(t)&&!Bi(t)&&!(t instanceof Ur)){if(t instanceof Nr)return t;if(Wt.call(t,\"__wrapped__\"))return To(t)}return new Nr(t)}var Dr=function(){function t(){}return function(n){if(!Xi(n))return{};if(qt)return qt(n);t.prototype=n;var r=new t;return t.prototype=u,r}}();function Fr(){}function Nr(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=u}function Ur(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function Br(t){var n=-1,r=null==t?0:t.length;for(this.clear();++n=n?t:n)),t}function ie(t,n,r,e,o,i){var a,c=1&n,f=2&n,l=4&n;if(r&&(a=o?r(t,e,o,i):r(t)),a!==u)return a;if(!Xi(t))return t;var s=Bi(t);if(s){if(a=function(t){var n=t.length,r=new t.constructor(n);return n&&\"string\"==typeof t[0]&&Wt.call(t,\"index\")&&(r.index=t.index,r.input=t.input),r}(t),!c)return Au(t,a)}else{var h=so(t),p=h==m||h==w;if(Ki(t))return mu(t,c);if(h==x||h==y||p&&!o){if(a=f||p?{}:po(t),!c)return f?function(t,n){return Eu(t,lo(t),n)}(t,function(t,n){return t&&Eu(n,Pa(n),t)}(a,t)):function(t,n){return Eu(t,fo(t),n)}(t,re(a,t))}else{if(!on[h])return o?t:{};a=function(t,n,r){var e,u=t.constructor;switch(n){case P:return wu(t);case d:case _:return new u(+t);case R:return function(t,n){var r=n?wu(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case W:case L:case M:case z:case $:case T:case D:case F:case N:return Su(t,r);case S:return new u;case j:case k:return new u(t);case A:return function(t){var n=new t.constructor(t.source,ht.exec(t));return n.lastIndex=t.lastIndex,n}(t);case E:return new u;case I:return e=t,zr?xt(zr.call(e)):{}}}(t,h,c)}}i||(i=new Kr);var v=i.get(t);if(v)return v;i.set(t,a),oa(t)?t.forEach((function(e){a.add(ie(e,n,r,e,t,i))})):na(t)&&t.forEach((function(e,u){a.set(u,ie(e,n,r,u,t,i))}));var g=s?u:(l?f?no:to:f?Pa:Ca)(t);return An(g||t,(function(e,u){g&&(e=t[u=e]),Xr(a,u,ie(e,n,r,u,t,i))})),a}function ae(t,n,r){var e=r.length;if(null==t)return!e;for(t=xt(t);e--;){var o=r[e],i=n[o],a=t[o];if(a===u&&!(o in t)||!i(a))return!1}return!0}function ce(t,n,r){if(\"function\"!=typeof t)throw new Et(o);return ko((function(){t.apply(u,r)}),n)}function fe(t,n,r,e){var u=-1,o=Cn,i=!0,a=t.length,c=[],f=n.length;if(!a)return c;r&&(n=Rn(n,Jn(r))),e?(o=Pn,i=!1):n.length>=200&&(o=Qn,i=!1,n=new Zr(n));t:for(;++u-1},Gr.prototype.set=function(t,n){var r=this.__data__,e=te(r,t);return e<0?(++this.size,r.push([t,n])):r[e][1]=n,this},qr.prototype.clear=function(){this.size=0,this.__data__={hash:new Br,map:new(jr||Gr),string:new Br}},qr.prototype.delete=function(t){var n=io(this,t).delete(t);return this.size-=n?1:0,n},qr.prototype.get=function(t){return io(this,t).get(t)},qr.prototype.has=function(t){return io(this,t).has(t)},qr.prototype.set=function(t,n){var r=io(this,t),e=r.size;return r.set(t,n),this.size+=r.size==e?0:1,this},Zr.prototype.add=Zr.prototype.push=function(t){return this.__data__.set(t,i),this},Zr.prototype.has=function(t){return this.__data__.has(t)},Kr.prototype.clear=function(){this.__data__=new Gr,this.size=0},Kr.prototype.delete=function(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r},Kr.prototype.get=function(t){return this.__data__.get(t)},Kr.prototype.has=function(t){return this.__data__.has(t)},Kr.prototype.set=function(t,n){var r=this.__data__;if(r instanceof Gr){var e=r.__data__;if(!jr||e.length<199)return e.push([t,n]),this.size=++r.size,this;r=this.__data__=new qr(e)}return r.set(t,n),this.size=r.size,this};var le=Cu(_e),se=Cu(be,!0);function he(t,n){var r=!0;return le(t,(function(t,e,u){return r=!!n(t,e,u)})),r}function pe(t,n,r){for(var e=-1,o=t.length;++e0&&r(a)?n>1?ye(a,n-1,r,e,u):Wn(u,a):e||(u[u.length]=a)}return u}var ge=Pu(),de=Pu(!0);function _e(t,n){return t&&ge(t,n,Ca)}function be(t,n){return t&&de(t,n,Ca)}function me(t,n){return In(n,(function(n){return Ji(t[n])}))}function we(t,n){for(var r=0,e=(n=gu(n,t)).length;null!=t&&rn}function Oe(t,n){return null!=t&&Wt.call(t,n)}function Ae(t,n){return null!=t&&n in xt(t)}function Ee(t,n,r){for(var o=r?Pn:Cn,i=t[0].length,a=t.length,c=a,f=e(a),l=1/0,s=[];c--;){var h=t[c];c&&n&&(h=Rn(h,Jn(n))),l=dr(h.length,l),f[c]=!r&&(n||i>=120&&h.length>=120)?new Zr(c&&h):u}h=t[0];var p=-1,v=f[0];t:for(;++p=a?c:c*(\"desc\"==r[e]?-1:1)}return t.index-n.index}(t,n,r)}));e--;)t[e]=t[e].value;return t}(u)}function Ue(t,n,r){for(var e=-1,u=n.length,o={};++e-1;)a!==t&&Kt.call(a,c,1),Kt.call(t,c,1);return t}function Ge(t,n){for(var r=t?n.length:0,e=r-1;r--;){var u=n[r];if(r==e||u!==o){var o=u;yo(u)?Kt.call(t,u,1):cu(t,u)}}return t}function qe(t,n){return t+vn(mr()*(n-t+1))}function Ze(t,n){var r=\"\";if(!t||n<1||n>s)return r;do{n%2&&(r+=t),(n=vn(n/2))&&(t+=t)}while(n);return r}function Ke(t,n){return Io(xo(t,n,rc),t+\"\")}function He(t){return Vr(Da(t))}function Ve(t,n){var r=Da(t);return Ro(r,oe(n,0,r.length))}function Je(t,n,r,e){if(!Xi(t))return t;for(var o=-1,i=(n=gu(n,t)).length,a=i-1,c=t;null!=c&&++oo?0:o+n),(r=r>o?o:r)<0&&(r+=o),o=n>r?0:r-n>>>0,n>>>=0;for(var i=e(o);++u>>1,i=t[o];null!==i&&!aa(i)&&(r?i<=n:i=200){var f=n?null:Zu(t);if(f)return cr(f);i=!1,u=Qn,c=new Zr}else c=n?[]:a;t:for(;++e=e?t:tu(t,n,r)}var bu=an||function(t){return hn.clearTimeout(t)};function mu(t,n){if(n)return t.slice();var r=t.length,e=Bt?Bt(r):new t.constructor(r);return t.copy(e),e}function wu(t){var n=new t.constructor(t.byteLength);return new Ut(n).set(new Ut(t)),n}function Su(t,n){var r=n?wu(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function ju(t,n){if(t!==n){var r=t!==u,e=null===t,o=t==t,i=aa(t),a=n!==u,c=null===n,f=n==n,l=aa(n);if(!c&&!l&&!i&&t>n||i&&a&&f&&!c&&!l||e&&a&&f||!r&&f||!o)return 1;if(!e&&!i&&!l&&t1?r[o-1]:u,a=o>2?r[2]:u;for(i=t.length>3&&\"function\"==typeof i?(o--,i):u,a&&go(r[0],r[1],a)&&(i=o<3?u:i,o=1),n=xt(n);++e-1?o[i?n[a]:a]:u}}function zu(t){return Xu((function(n){var r=n.length,e=r,i=Nr.prototype.thru;for(t&&n.reverse();e--;){var a=n[e];if(\"function\"!=typeof a)throw new Et(o);if(i&&!c&&\"wrapper\"==eo(a))var c=new Nr([],!0)}for(e=c?e:r;++e1&&m.reverse(),p&&sc))return!1;var l=i.get(t),s=i.get(n);if(l&&s)return l==n&&s==t;var h=-1,p=!0,v=2&r?new Zr:u;for(i.set(t,n),i.set(n,t);++h-1&&t%1==0&&t1?\"& \":\"\")+n[e],n=n.join(r>2?\", \":\" \"),t.replace(ot,\"{\\n/* [wrapped with \"+n+\"] */\\n\")}(e,function(t,n){return An(v,(function(r){var e=\"_.\"+r[0];n&r[1]&&!Cn(t,e)&&t.push(e)})),t.sort()}(function(t){var n=t.match(it);return n?n[1].split(at):[]}(e),r)))}function Po(t){var n=0,r=0;return function(){var e=_r(),o=16-(e-r);if(r=e,o>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(u,arguments)}}function Ro(t,n){var r=-1,e=t.length,o=e-1;for(n=n===u?e:n;++r1?t[n-1]:u;return r=\"function\"==typeof r?(t.pop(),r):u,ui(t,r)}));function si(t){var n=Tr(t);return n.__chain__=!0,n}function hi(t,n){return n(t)}var pi=Xu((function(t){var n=t.length,r=n?t[0]:0,e=this.__wrapped__,o=function(n){return ue(n,t)};return!(n>1||this.__actions__.length)&&e instanceof Ur&&yo(r)?((e=e.slice(r,+r+(n?1:0))).__actions__.push({func:hi,args:[o],thisArg:u}),new Nr(e,this.__chain__).thru((function(t){return n&&!t.length&&t.push(u),t}))):this.thru(o)})),vi=ku((function(t,n,r){Wt.call(t,r)?++t[r]:ee(t,r,1)})),yi=Mu(Uo),gi=Mu(Bo);function di(t,n){return(Bi(t)?An:le)(t,oo(n,3))}function _i(t,n){return(Bi(t)?En:se)(t,oo(n,3))}var bi=ku((function(t,n,r){Wt.call(t,r)?t[r].push(n):ee(t,r,[n])})),mi=Ke((function(t,n,r){var u=-1,o=\"function\"==typeof n,i=qi(t)?e(t.length):[];return le(t,(function(t){i[++u]=o?xn(n,t,r):ke(t,n,r)})),i})),wi=ku((function(t,n,r){ee(t,r,n)}));function Si(t,n){return(Bi(t)?Rn:ze)(t,oo(n,3))}var ji=ku((function(t,n,r){t[r?0:1].push(n)}),(function(){return[[],[]]})),xi=Ke((function(t,n){if(null==t)return[];var r=n.length;return r>1&&go(t,n[0],n[1])?n=[]:r>2&&go(n[0],n[1],n[2])&&(n=[n[0]]),Ne(t,ye(n,1),[])})),Oi=ln||function(){return hn.Date.now()};function Ai(t,n,r){return n=r?u:n,n=t&&null==n?t.length:n,Hu(t,f,u,u,u,u,n)}function Ei(t,n){var r;if(\"function\"!=typeof n)throw new Et(o);return t=pa(t),function(){return--t>0&&(r=n.apply(this,arguments)),t<=1&&(n=u),r}}var ki=Ke((function(t,n,r){var e=1;if(r.length){var u=ar(r,uo(ki));e|=c}return Hu(t,e,n,r,u)})),Ii=Ke((function(t,n,r){var e=3;if(r.length){var u=ar(r,uo(Ii));e|=c}return Hu(n,e,t,r,u)}));function Ci(t,n,r){var e,i,a,c,f,l,s=0,h=!1,p=!1,v=!0;if(\"function\"!=typeof t)throw new Et(o);function y(n){var r=e,o=i;return e=i=u,s=n,c=t.apply(o,r)}function g(t){var r=t-l;return l===u||r>=n||r<0||p&&t-s>=a}function d(){var t=Oi();if(g(t))return _(t);f=ko(d,function(t){var r=n-(t-l);return p?dr(r,a-(t-s)):r}(t))}function _(t){return f=u,v&&e?y(t):(e=i=u,c)}function b(){var t=Oi(),r=g(t);if(e=arguments,i=this,l=t,r){if(f===u)return function(t){return s=t,f=ko(d,n),h?y(t):c}(l);if(p)return bu(f),f=ko(d,n),y(l)}return f===u&&(f=ko(d,n)),c}return n=ya(n)||0,Xi(r)&&(h=!!r.leading,a=(p=\"maxWait\"in r)?gr(ya(r.maxWait)||0,n):a,v=\"trailing\"in r?!!r.trailing:v),b.cancel=function(){f!==u&&bu(f),s=0,e=l=i=f=u},b.flush=function(){return f===u?c:_(Oi())},b}var Pi=Ke((function(t,n){return ce(t,1,n)})),Ri=Ke((function(t,n,r){return ce(t,ya(n)||0,r)}));function Wi(t,n){if(\"function\"!=typeof t||null!=n&&\"function\"!=typeof n)throw new Et(o);var r=function(){var e=arguments,u=n?n.apply(this,e):e[0],o=r.cache;if(o.has(u))return o.get(u);var i=t.apply(this,e);return r.cache=o.set(u,i)||o,i};return r.cache=new(Wi.Cache||qr),r}function Li(t){if(\"function\"!=typeof t)throw new Et(o);return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}Wi.Cache=qr;var Mi=du((function(t,n){var r=(n=1==n.length&&Bi(n[0])?Rn(n[0],Jn(oo())):Rn(ye(n,1),Jn(oo()))).length;return Ke((function(e){for(var u=-1,o=dr(e.length,r);++u=n})),Ui=Ie(function(){return arguments}())?Ie:function(t){return ta(t)&&Wt.call(t,\"callee\")&&!Zt.call(t,\"callee\")},Bi=e.isArray,Gi=_n?Jn(_n):function(t){return ta(t)&&je(t)==P};function qi(t){return null!=t&&Qi(t.length)&&!Ji(t)}function Zi(t){return ta(t)&&qi(t)}var Ki=dn||yc,Hi=bn?Jn(bn):function(t){return ta(t)&&je(t)==_};function Vi(t){if(!ta(t))return!1;var n=je(t);return n==b||\"[object DOMException]\"==n||\"string\"==typeof t.message&&\"string\"==typeof t.name&&!ea(t)}function Ji(t){if(!Xi(t))return!1;var n=je(t);return n==m||n==w||\"[object AsyncFunction]\"==n||\"[object Proxy]\"==n}function Yi(t){return\"number\"==typeof t&&t==pa(t)}function Qi(t){return\"number\"==typeof t&&t>-1&&t%1==0&&t<=s}function Xi(t){var n=typeof t;return null!=t&&(\"object\"==n||\"function\"==n)}function ta(t){return null!=t&&\"object\"==typeof t}var na=mn?Jn(mn):function(t){return ta(t)&&so(t)==S};function ra(t){return\"number\"==typeof t||ta(t)&&je(t)==j}function ea(t){if(!ta(t)||je(t)!=x)return!1;var n=Gt(t);if(null===n)return!0;var r=Wt.call(n,\"constructor\")&&n.constructor;return\"function\"==typeof r&&r instanceof r&&Rt.call(r)==$t}var ua=wn?Jn(wn):function(t){return ta(t)&&je(t)==A},oa=Sn?Jn(Sn):function(t){return ta(t)&&so(t)==E};function ia(t){return\"string\"==typeof t||!Bi(t)&&ta(t)&&je(t)==k}function aa(t){return\"symbol\"==typeof t||ta(t)&&je(t)==I}var ca=jn?Jn(jn):function(t){return ta(t)&&Qi(t.length)&&!!un[je(t)]},fa=Bu(Me),la=Bu((function(t,n){return t<=n}));function sa(t){if(!t)return[];if(qi(t))return ia(t)?sr(t):Au(t);if(Vt&&t[Vt])return function(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r}(t[Vt]());var n=so(t);return(n==S?or:n==E?cr:Da)(t)}function ha(t){return t?(t=ya(t))===l||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function pa(t){var n=ha(t),r=n%1;return n==n?r?n-r:n:0}function va(t){return t?oe(pa(t),0,p):0}function ya(t){if(\"number\"==typeof t)return t;if(aa(t))return h;if(Xi(t)){var n=\"function\"==typeof t.valueOf?t.valueOf():t;t=Xi(n)?n+\"\":n}if(\"string\"!=typeof t)return 0===t?t:+t;t=Vn(t);var r=vt.test(t);return r||gt.test(t)?fn(t.slice(2),r?2:8):pt.test(t)?h:+t}function ga(t){return Eu(t,Pa(t))}function da(t){return null==t?\"\":iu(t)}var _a=Iu((function(t,n){if(wo(n)||qi(n))Eu(n,Ca(n),t);else for(var r in n)Wt.call(n,r)&&Xr(t,r,n[r])})),ba=Iu((function(t,n){Eu(n,Pa(n),t)})),ma=Iu((function(t,n,r,e){Eu(n,Pa(n),t,e)})),wa=Iu((function(t,n,r,e){Eu(n,Ca(n),t,e)})),Sa=Xu(ue),ja=Ke((function(t,n){t=xt(t);var r=-1,e=n.length,o=e>2?n[2]:u;for(o&&go(n[0],n[1],o)&&(e=1);++r1),n})),Eu(t,no(t),r),e&&(r=ie(r,7,Yu));for(var u=n.length;u--;)cu(r,n[u]);return r})),Ma=Xu((function(t,n){return null==t?{}:function(t,n){return Ue(t,n,(function(n,r){return Aa(t,r)}))}(t,n)}));function za(t,n){if(null==t)return{};var r=Rn(no(t),(function(t){return[t]}));return n=oo(n),Ue(t,r,(function(t,r){return n(t,r[0])}))}var $a=Ku(Ca),Ta=Ku(Pa);function Da(t){return null==t?[]:Yn(t,Ca(t))}var Fa=Wu((function(t,n,r){return n=n.toLowerCase(),t+(r?Na(n):n)}));function Na(t){return Va(da(t).toLowerCase())}function Ua(t){return(t=da(t))&&t.replace(_t,nr).replace(Yt,\"\")}var Ba=Wu((function(t,n,r){return t+(r?\"-\":\"\")+n.toLowerCase()})),Ga=Wu((function(t,n,r){return t+(r?\" \":\"\")+n.toLowerCase()})),qa=Ru(\"toLowerCase\"),Za=Wu((function(t,n,r){return t+(r?\"_\":\"\")+n.toLowerCase()})),Ka=Wu((function(t,n,r){return t+(r?\" \":\"\")+Va(n)})),Ha=Wu((function(t,n,r){return t+(r?\" \":\"\")+n.toUpperCase()})),Va=Ru(\"toUpperCase\");function Ja(t,n,r){return t=da(t),(n=r?u:n)===u?function(t){return nn.test(t)}(t)?function(t){return t.match(Xt)||[]}(t):function(t){return t.match(ct)||[]}(t):t.match(n)||[]}var Ya=Ke((function(t,n){try{return xn(t,u,n)}catch(t){return Vi(t)?t:new wt(t)}})),Qa=Xu((function(t,n){return An(n,(function(n){n=zo(n),ee(t,n,ki(t[n],t))})),t}));function Xa(t){return function(){return t}}var tc=zu(),nc=zu(!0);function rc(t){return t}function ec(t){return We(\"function\"==typeof t?t:ie(t,1))}var uc=Ke((function(t,n){return function(r){return ke(r,t,n)}})),oc=Ke((function(t,n){return function(r){return ke(t,r,n)}}));function ic(t,n,r){var e=Ca(n),u=me(n,e);null!=r||Xi(n)&&(u.length||!e.length)||(r=n,n=t,t=this,u=me(n,Ca(n)));var o=!(Xi(r)&&\"chain\"in r&&!r.chain),i=Ji(t);return An(u,(function(r){var e=n[r];t[r]=e,i&&(t.prototype[r]=function(){var n=this.__chain__;if(o||n){var r=t(this.__wrapped__);return(r.__actions__=Au(this.__actions__)).push({func:e,args:arguments,thisArg:t}),r.__chain__=n,r}return e.apply(t,Wn([this.value()],arguments))})})),t}function ac(){}var cc=Fu(Rn),fc=Fu(kn),lc=Fu(zn);function sc(t){return _o(t)?Gn(zo(t)):function(t){return function(n){return we(n,t)}}(t)}var hc=Uu(),pc=Uu(!0);function vc(){return[]}function yc(){return!1}var gc,dc=Du((function(t,n){return t+n}),0),_c=qu(\"ceil\"),bc=Du((function(t,n){return t/n}),1),mc=qu(\"floor\"),wc=Du((function(t,n){return t*n}),1),Sc=qu(\"round\"),jc=Du((function(t,n){return t-n}),0);return Tr.after=function(t,n){if(\"function\"!=typeof n)throw new Et(o);return t=pa(t),function(){if(--t<1)return n.apply(this,arguments)}},Tr.ary=Ai,Tr.assign=_a,Tr.assignIn=ba,Tr.assignInWith=ma,Tr.assignWith=wa,Tr.at=Sa,Tr.before=Ei,Tr.bind=ki,Tr.bindAll=Qa,Tr.bindKey=Ii,Tr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Bi(t)?t:[t]},Tr.chain=si,Tr.chunk=function(t,n,r){n=(r?go(t,n,r):n===u)?1:gr(pa(n),0);var o=null==t?0:t.length;if(!o||n<1)return[];for(var i=0,a=0,c=e(pn(o/n));io?0:o+r),(e=e===u||e>o?o:pa(e))<0&&(e+=o),e=r>e?0:va(e);r>>0)?(t=da(t))&&(\"string\"==typeof n||null!=n&&!ua(n))&&!(n=iu(n))&&ur(t)?_u(sr(t),0,r):t.split(n,r):[]},Tr.spread=function(t,n){if(\"function\"!=typeof t)throw new Et(o);return n=null==n?0:gr(pa(n),0),Ke((function(r){var e=r[n],u=_u(r,0,n);return e&&Wn(u,e),xn(t,this,u)}))},Tr.tail=function(t){var n=null==t?0:t.length;return n?tu(t,1,n):[]},Tr.take=function(t,n,r){return t&&t.length?tu(t,0,(n=r||n===u?1:pa(n))<0?0:n):[]},Tr.takeRight=function(t,n,r){var e=null==t?0:t.length;return e?tu(t,(n=e-(n=r||n===u?1:pa(n)))<0?0:n,e):[]},Tr.takeRightWhile=function(t,n){return t&&t.length?lu(t,oo(n,3),!1,!0):[]},Tr.takeWhile=function(t,n){return t&&t.length?lu(t,oo(n,3)):[]},Tr.tap=function(t,n){return n(t),t},Tr.throttle=function(t,n,r){var e=!0,u=!0;if(\"function\"!=typeof t)throw new Et(o);return Xi(r)&&(e=\"leading\"in r?!!r.leading:e,u=\"trailing\"in r?!!r.trailing:u),Ci(t,n,{leading:e,maxWait:n,trailing:u})},Tr.thru=hi,Tr.toArray=sa,Tr.toPairs=$a,Tr.toPairsIn=Ta,Tr.toPath=function(t){return Bi(t)?Rn(t,zo):aa(t)?[t]:Au(Mo(da(t)))},Tr.toPlainObject=ga,Tr.transform=function(t,n,r){var e=Bi(t),u=e||Ki(t)||ca(t);if(n=oo(n,4),null==r){var o=t&&t.constructor;r=u?e?new o:[]:Xi(t)&&Ji(o)?Dr(Gt(t)):{}}return(u?An:_e)(t,(function(t,e,u){return n(r,t,e,u)})),r},Tr.unary=function(t){return Ai(t,1)},Tr.union=ti,Tr.unionBy=ni,Tr.unionWith=ri,Tr.uniq=function(t){return t&&t.length?au(t):[]},Tr.uniqBy=function(t,n){return t&&t.length?au(t,oo(n,2)):[]},Tr.uniqWith=function(t,n){return n=\"function\"==typeof n?n:u,t&&t.length?au(t,u,n):[]},Tr.unset=function(t,n){return null==t||cu(t,n)},Tr.unzip=ei,Tr.unzipWith=ui,Tr.update=function(t,n,r){return null==t?t:fu(t,n,yu(r))},Tr.updateWith=function(t,n,r,e){return e=\"function\"==typeof e?e:u,null==t?t:fu(t,n,yu(r),e)},Tr.values=Da,Tr.valuesIn=function(t){return null==t?[]:Yn(t,Pa(t))},Tr.without=oi,Tr.words=Ja,Tr.wrap=function(t,n){return zi(yu(n),t)},Tr.xor=ii,Tr.xorBy=ai,Tr.xorWith=ci,Tr.zip=fi,Tr.zipObject=function(t,n){return pu(t||[],n||[],Xr)},Tr.zipObjectDeep=function(t,n){return pu(t||[],n||[],Je)},Tr.zipWith=li,Tr.entries=$a,Tr.entriesIn=Ta,Tr.extend=ba,Tr.extendWith=ma,ic(Tr,Tr),Tr.add=dc,Tr.attempt=Ya,Tr.camelCase=Fa,Tr.capitalize=Na,Tr.ceil=_c,Tr.clamp=function(t,n,r){return r===u&&(r=n,n=u),r!==u&&(r=(r=ya(r))==r?r:0),n!==u&&(n=(n=ya(n))==n?n:0),oe(ya(t),n,r)},Tr.clone=function(t){return ie(t,4)},Tr.cloneDeep=function(t){return ie(t,5)},Tr.cloneDeepWith=function(t,n){return ie(t,5,n=\"function\"==typeof n?n:u)},Tr.cloneWith=function(t,n){return ie(t,4,n=\"function\"==typeof n?n:u)},Tr.conformsTo=function(t,n){return null==n||ae(t,n,Ca(n))},Tr.deburr=Ua,Tr.defaultTo=function(t,n){return null==t||t!=t?n:t},Tr.divide=bc,Tr.endsWith=function(t,n,r){t=da(t),n=iu(n);var e=t.length,o=r=r===u?e:oe(pa(r),0,e);return(r-=n.length)>=0&&t.slice(r,o)==n},Tr.eq=Di,Tr.escape=function(t){return(t=da(t))&&H.test(t)?t.replace(Z,rr):t},Tr.escapeRegExp=function(t){return(t=da(t))&&rt.test(t)?t.replace(nt,\"\\\\$&\"):t},Tr.every=function(t,n,r){var e=Bi(t)?kn:he;return r&&go(t,n,r)&&(n=u),e(t,oo(n,3))},Tr.find=yi,Tr.findIndex=Uo,Tr.findKey=function(t,n){return Tn(t,oo(n,3),_e)},Tr.findLast=gi,Tr.findLastIndex=Bo,Tr.findLastKey=function(t,n){return Tn(t,oo(n,3),be)},Tr.floor=mc,Tr.forEach=di,Tr.forEachRight=_i,Tr.forIn=function(t,n){return null==t?t:ge(t,oo(n,3),Pa)},Tr.forInRight=function(t,n){return null==t?t:de(t,oo(n,3),Pa)},Tr.forOwn=function(t,n){return t&&_e(t,oo(n,3))},Tr.forOwnRight=function(t,n){return t&&be(t,oo(n,3))},Tr.get=Oa,Tr.gt=Fi,Tr.gte=Ni,Tr.has=function(t,n){return null!=t&&ho(t,n,Oe)},Tr.hasIn=Aa,Tr.head=qo,Tr.identity=rc,Tr.includes=function(t,n,r,e){t=qi(t)?t:Da(t),r=r&&!e?pa(r):0;var u=t.length;return r<0&&(r=gr(u+r,0)),ia(t)?r<=u&&t.indexOf(n,r)>-1:!!u&&Fn(t,n,r)>-1},Tr.indexOf=function(t,n,r){var e=null==t?0:t.length;if(!e)return-1;var u=null==r?0:pa(r);return u<0&&(u=gr(e+u,0)),Fn(t,n,u)},Tr.inRange=function(t,n,r){return n=ha(n),r===u?(r=n,n=0):r=ha(r),function(t,n,r){return t>=dr(n,r)&&t=-9007199254740991&&t<=s},Tr.isSet=oa,Tr.isString=ia,Tr.isSymbol=aa,Tr.isTypedArray=ca,Tr.isUndefined=function(t){return t===u},Tr.isWeakMap=function(t){return ta(t)&&so(t)==C},Tr.isWeakSet=function(t){return ta(t)&&\"[object WeakSet]\"==je(t)},Tr.join=function(t,n){return null==t?\"\":qn.call(t,n)},Tr.kebabCase=Ba,Tr.last=Vo,Tr.lastIndexOf=function(t,n,r){var e=null==t?0:t.length;if(!e)return-1;var o=e;return r!==u&&(o=(o=pa(r))<0?gr(e+o,0):dr(o,e-1)),n==n?function(t,n,r){for(var e=r+1;e--;)if(t[e]===n)return e;return e}(t,n,o):Dn(t,Un,o,!0)},Tr.lowerCase=Ga,Tr.lowerFirst=qa,Tr.lt=fa,Tr.lte=la,Tr.max=function(t){return t&&t.length?pe(t,rc,xe):u},Tr.maxBy=function(t,n){return t&&t.length?pe(t,oo(n,2),xe):u},Tr.mean=function(t){return Bn(t,rc)},Tr.meanBy=function(t,n){return Bn(t,oo(n,2))},Tr.min=function(t){return t&&t.length?pe(t,rc,Me):u},Tr.minBy=function(t,n){return t&&t.length?pe(t,oo(n,2),Me):u},Tr.stubArray=vc,Tr.stubFalse=yc,Tr.stubObject=function(){return{}},Tr.stubString=function(){return\"\"},Tr.stubTrue=function(){return!0},Tr.multiply=wc,Tr.nth=function(t,n){return t&&t.length?Fe(t,pa(n)):u},Tr.noConflict=function(){return hn._===this&&(hn._=Tt),this},Tr.noop=ac,Tr.now=Oi,Tr.pad=function(t,n,r){t=da(t);var e=(n=pa(n))?lr(t):0;if(!n||e>=n)return t;var u=(n-e)/2;return Nu(vn(u),r)+t+Nu(pn(u),r)},Tr.padEnd=function(t,n,r){t=da(t);var e=(n=pa(n))?lr(t):0;return n&&en){var e=t;t=n,n=e}if(r||t%1||n%1){var o=mr();return dr(t+o*(n-t+cn(\"1e-\"+((o+\"\").length-1))),n)}return qe(t,n)},Tr.reduce=function(t,n,r){var e=Bi(t)?Ln:Zn,u=arguments.length<3;return e(t,oo(n,4),r,u,le)},Tr.reduceRight=function(t,n,r){var e=Bi(t)?Mn:Zn,u=arguments.length<3;return e(t,oo(n,4),r,u,se)},Tr.repeat=function(t,n,r){return n=(r?go(t,n,r):n===u)?1:pa(n),Ze(da(t),n)},Tr.replace=function(){var t=arguments,n=da(t[0]);return t.length<3?n:n.replace(t[1],t[2])},Tr.result=function(t,n,r){var e=-1,o=(n=gu(n,t)).length;for(o||(o=1,t=u);++es)return[];var r=p,e=dr(t,p);n=oo(n),t-=p;for(var u=Hn(e,n);++r=i)return t;var c=r-lr(e);if(c<1)return e;var f=a?_u(a,0,c).join(\"\"):t.slice(0,c);if(o===u)return f+e;if(a&&(c+=f.length-c),ua(o)){if(t.slice(c).search(o)){var l,s=f;for(o.global||(o=Ot(o.source,da(ht.exec(o))+\"g\")),o.lastIndex=0;l=o.exec(s);)var h=l.index;f=f.slice(0,h===u?c:h)}}else if(t.indexOf(iu(o),c)!=c){var p=f.lastIndexOf(o);p>-1&&(f=f.slice(0,p))}return f+e},Tr.unescape=function(t){return(t=da(t))&&K.test(t)?t.replace(q,pr):t},Tr.uniqueId=function(t){var n=++Lt;return da(t)+n},Tr.upperCase=Ha,Tr.upperFirst=Va,Tr.each=di,Tr.eachRight=_i,Tr.first=qo,ic(Tr,(gc={},_e(Tr,(function(t,n){Wt.call(Tr.prototype,n)||(gc[n]=t)})),gc),{chain:!1}),Tr.VERSION=\"4.17.21\",An([\"bind\",\"bindKey\",\"curry\",\"curryRight\",\"partial\",\"partialRight\"],(function(t){Tr[t].placeholder=Tr})),An([\"drop\",\"take\"],(function(t,n){Ur.prototype[t]=function(r){r=r===u?1:gr(pa(r),0);var e=this.__filtered__&&!n?new Ur(this):this.clone();return e.__filtered__?e.__takeCount__=dr(r,e.__takeCount__):e.__views__.push({size:dr(r,p),type:t+(e.__dir__<0?\"Right\":\"\")}),e},Ur.prototype[t+\"Right\"]=function(n){return this.reverse()[t](n).reverse()}})),An([\"filter\",\"map\",\"takeWhile\"],(function(t,n){var r=n+1,e=1==r||3==r;Ur.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:oo(t,3),type:r}),n.__filtered__=n.__filtered__||e,n}})),An([\"head\",\"last\"],(function(t,n){var r=\"take\"+(n?\"Right\":\"\");Ur.prototype[t]=function(){return this[r](1).value()[0]}})),An([\"initial\",\"tail\"],(function(t,n){var r=\"drop\"+(n?\"\":\"Right\");Ur.prototype[t]=function(){return this.__filtered__?new Ur(this):this[r](1)}})),Ur.prototype.compact=function(){return this.filter(rc)},Ur.prototype.find=function(t){return this.filter(t).head()},Ur.prototype.findLast=function(t){return this.reverse().find(t)},Ur.prototype.invokeMap=Ke((function(t,n){return\"function\"==typeof t?new Ur(this):this.map((function(r){return ke(r,t,n)}))})),Ur.prototype.reject=function(t){return this.filter(Li(oo(t)))},Ur.prototype.slice=function(t,n){t=pa(t);var r=this;return r.__filtered__&&(t>0||n<0)?new Ur(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==u&&(r=(n=pa(n))<0?r.dropRight(-n):r.take(n-t)),r)},Ur.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ur.prototype.toArray=function(){return this.take(p)},_e(Ur.prototype,(function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),o=Tr[e?\"take\"+(\"last\"==n?\"Right\":\"\"):n],i=e||/^find/.test(n);o&&(Tr.prototype[n]=function(){var n=this.__wrapped__,a=e?[1]:arguments,c=n instanceof Ur,f=a[0],l=c||Bi(n),s=function(t){var n=o.apply(Tr,Wn([t],a));return e&&h?n[0]:n};l&&r&&\"function\"==typeof f&&1!=f.length&&(c=l=!1);var h=this.__chain__,p=!!this.__actions__.length,v=i&&!h,y=c&&!p;if(!i&&l){n=y?n:new Ur(this);var g=t.apply(n,a);return g.__actions__.push({func:hi,args:[s],thisArg:u}),new Nr(g,h)}return v&&y?t.apply(this,a):(g=this.thru(s),v?e?g.value()[0]:g.value():g)})})),An([\"pop\",\"push\",\"shift\",\"sort\",\"splice\",\"unshift\"],(function(t){var n=kt[t],r=/^(?:push|sort|unshift)$/.test(t)?\"tap\":\"thru\",e=/^(?:pop|shift)$/.test(t);Tr.prototype[t]=function(){var t=arguments;if(e&&!this.__chain__){var u=this.value();return n.apply(Bi(u)?u:[],t)}return this[r]((function(r){return n.apply(Bi(r)?r:[],t)}))}})),_e(Ur.prototype,(function(t,n){var r=Tr[n];if(r){var e=r.name+\"\";Wt.call(Ir,e)||(Ir[e]=[]),Ir[e].push({name:n,func:r})}})),Ir[$u(u,2).name]=[{name:\"wrapper\",func:u}],Ur.prototype.clone=function(){var t=new Ur(this.__wrapped__);return t.__actions__=Au(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Au(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Au(this.__views__),t},Ur.prototype.reverse=function(){if(this.__filtered__){var t=new Ur(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Ur.prototype.value=function(){var t=this.__wrapped__.value(),n=this.__dir__,r=Bi(t),e=n<0,u=r?t.length:0,o=function(t,n,r){for(var e=-1,u=r.length;++e=this.__values__.length;return{done:t,value:t?u:this.__values__[this.__index__++]}},Tr.prototype.plant=function(t){for(var n,r=this;r instanceof Fr;){var e=To(r);e.__index__=0,e.__values__=u,n?o.__wrapped__=e:n=e;var o=e;r=r.__wrapped__}return o.__wrapped__=t,n},Tr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Ur){var n=t;return this.__actions__.length&&(n=new Ur(this)),(n=n.reverse()).__actions__.push({func:hi,args:[Xo],thisArg:u}),new Nr(n,this.__chain__)}return this.thru(Xo)},Tr.prototype.toJSON=Tr.prototype.valueOf=Tr.prototype.value=function(){return su(this.__wrapped__,this.__actions__)},Tr.prototype.first=Tr.prototype.head,Vt&&(Tr.prototype[Vt]=function(){return this}),Tr}();hn._=vr,(e=function(){return vr}.call(n,r,n,t))===u||(t.exports=e)}.call(this)},156:n=>{\"use strict\";n.exports=t}},r={};function e(t){var u=r[t];if(void 0!==u)return u.exports;var o=r[t]={id:t,loaded:!1,exports:{}};return n[t].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}return e.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(t){if(\"object\"==typeof window)return window}}(),e.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),e(991)})()));","import { Environment } from './hooks/useEnvironment';\n\nexport const webEnvironment: Environment = 'prod';\n","import { Amplify } from 'aws-amplify';\nimport { QueryClientProvider } from '@tanstack/react-query';\nimport { NavigationContainer } from '@react-navigation/native';\nimport NotificationsProvider from './components/notifications/NotificationsProvider';\nimport RootNavigation from './components/AppNavigator/RootNavigation';\nimport { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context';\nimport { PortalProvider } from '@gorhom/portal';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport * as Linking from 'expo-linking';\nimport { Environment } from './hooks/useEnvironment';\nimport awsExportsDev from './aws-exports-dev';\nimport awsExportsProd from './aws-exports-prod';\nimport { ClientType, getClientType } from './hooks/useClientType';\nimport { ThemeProvider } from '@aws-amplify/ui-react-native';\nimport * as WebBrowser from 'expo-web-browser';\nimport { EventProvider } from 'react-native-outside-press';\nimport { KeyboardAvoidingView, Platform, StatusBar, View } from 'react-native';\nimport { getQueryClient } from './utils/queryClient';\nimport { getIntl } from './utils/intl';\nimport { withIsFormDirtyProvider } from './components/shared/FormExitValidation';\nimport { FixedPositionPortalContainer } from './components/v2BaseComponents/FixedPositionPortalContainer';\nimport { NestedScrollViewPortalHostContainer } from './components/v2BaseComponents/NestedScrollViewPortal';\nimport { AnimateLoadedContent } from './components/v2BaseComponents/Loader';\nimport KeyboardRestrictedView from './components/shared/KeyboardRestrictedView';\nimport { SideDrawerCollapsedStateProvider } from './components/shared/SideDrawerCollapsedStateProvider';\nimport { useCaptureAppQueryParams } from './hooks/useUrlAppParams';\nimport { amplifyUITheme, colors } from './utils/theme';\nimport ErrorBoundary from './components/v2BaseComponents/ErrorBoundary';\nimport Bugsnag from '@bugsnag/expo';\nimport { useLockDeviceOrientation } from './hooks/useLockDeviceOrientation';\nimport { WithPendoReactNavigation } from 'rn-pendo-sdk';\nimport LayoutChangeEventProvider from './components/v2BaseComponents/LayoutChangeEventProvider';\nimport * as Notifications from 'expo-notifications';\nimport { linkingOptions } from './utils/linkingOptions';\n\nconst intl = getIntl('PrimaryRecordApp', {\n defaultDocumentTitle: 'Primary Record',\n});\n\nNotifications.setNotificationHandler({\n handleNotification: async () => ({\n shouldShowAlert: true,\n shouldPlaySound: true,\n shouldSetBadge: true,\n }),\n});\n\n// I hit issues were double clicking would open 2 auth sessions which pops an error\nlet isAuthSessionOpen = false;\n\nfunction modifyAWSExports(exports: any, environment: Environment) {\n // https://docs.amplify.aws/lib/auth/social/q/platform/react-native/#redirect-urls\n const massageRawRedirectUrls = (rawValue: string) => {\n const splitRedirects = rawValue.split(',');\n const getRedirectContaining = (search: string) =>\n splitRedirects.find((redirect: string) => redirect.includes(search));\n\n const clientTypeRedirects: Record = {\n // @ts-expect-error TS2322\n 'mobile-dev': getRedirectContaining('primary-record'),\n // @ts-expect-error TS2322\n mobile: getRedirectContaining('primary-record'),\n // @ts-expect-error TS2322\n 'local-web': getRedirectContaining('localhost'),\n // @ts-expect-error TS2322\n 'dev-web': getRedirectContaining('dev.primaryrecord'),\n // @ts-expect-error TS2322\n 'prod-web': getRedirectContaining('www.primaryrecord.app'),\n };\n return clientTypeRedirects[getClientType()];\n };\n\n const oauthDomains: Record = {\n dev: 'auth.dev.primaryrecord.app',\n prod: 'auth.primaryrecord.app',\n };\n\n const mobileUrlOpener = async (url: string, redirectUrl: string) => {\n try {\n if (isAuthSessionOpen) return;\n\n isAuthSessionOpen = true;\n const result = await WebBrowser.openAuthSessionAsync(url, redirectUrl, {\n showTitle: false,\n preferEphemeralSession: false,\n // duckduckgo, for example, doesn't allow google login at all\n browserPackage: Platform.OS === 'android' ? 'com.android.chrome' : undefined,\n });\n\n if (result.type === 'success') {\n Linking.openURL(result.url);\n }\n } catch (e) {\n throw e;\n } finally {\n isAuthSessionOpen = false;\n }\n };\n const isMobileClient = getClientType() === 'mobile' || getClientType() === 'mobile-dev';\n\n const updatedConfig = {\n ...exports,\n oauth: {\n ...(exports?.oauth || {}),\n domain: oauthDomains[environment],\n redirectSignIn: massageRawRedirectUrls(exports.oauth.redirectSignIn),\n redirectSignOut: massageRawRedirectUrls(exports.oauth.redirectSignOut),\n urlOpener: isMobileClient ? mobileUrlOpener : undefined,\n },\n autoSessionRecord: false,\n };\n\n return updatedConfig;\n}\n\nconst BugSnagErrorBoundary =\n Platform.OS === 'web' ? Bugsnag.getPlugin('react')?.createErrorBoundary(React) || React.Fragment : React.Fragment;\n\nconst PendoNavigationContainer =\n Platform.OS === 'web' ? WithPendoReactNavigation(NavigationContainer) : NavigationContainer;\n\nfunction PrimaryRecordApp({ environment }: { environment: Environment }) {\n const { isPendingParamCapture } = useCaptureAppQueryParams();\n\n useLockDeviceOrientation();\n\n const [amplifyConfigureComplete, setAmplifyConfigureComplete] = useState(false);\n const queryClient = useMemo(() => getQueryClient(true), []);\n useEffect(() => {\n const targetExports = environment === 'dev' ? awsExportsDev : awsExportsProd;\n const modifiedExports = modifyAWSExports(targetExports, environment);\n Amplify.configure(modifiedExports);\n setAmplifyConfigureComplete(true);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n if (!amplifyConfigureComplete || isPendingParamCapture) return null;\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n {() => null}\n \n }\n documentTitle={{\n formatter: (options: any) => {\n return options?.title ?? intl('defaultDocumentTitle');\n },\n }}\n >\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default withIsFormDirtyProvider(PrimaryRecordApp);\n","export { DefaultAmplify as Amplify } from './initSingleton.mjs';\n//# sourceMappingURL=index.mjs.map\n","import { Amplify, CookieStorage, defaultStorage } from '@aws-amplify/core';\nimport { parseAmplifyConfig } from '@aws-amplify/core/internals/utils';\nimport { cognitoUserPoolsTokenProvider, cognitoCredentialsProvider } from '@aws-amplify/auth/cognito';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst DefaultAmplify = {\n /**\n * Configures Amplify with the {@link resourceConfig} and {@link libraryOptions}.\n *\n * @param resourceConfig The {@link ResourcesConfig} object that is typically imported from the\n * `amplifyconfiguration.json` file. It can also be an object literal created inline when calling `Amplify.configure`.\n * @param libraryOptions The {@link LibraryOptions} additional options for the library.\n *\n * @example\n * import config from './amplifyconfiguration.json';\n *\n * Amplify.configure(config);\n */\n configure(resourceConfig, libraryOptions) {\n const resolvedResourceConfig = parseAmplifyConfig(resourceConfig);\n // If no Auth config is provided, no special handling will be required, configure as is.\n // Otherwise, we can assume an Auth config is provided from here on.\n if (!resolvedResourceConfig.Auth) {\n Amplify.configure(resolvedResourceConfig, libraryOptions);\n return;\n }\n // If Auth options are provided, always just configure as is.\n // Otherwise, we can assume no Auth libraryOptions were provided from here on.\n if (libraryOptions?.Auth) {\n Amplify.configure(resolvedResourceConfig, libraryOptions);\n return;\n }\n // If no Auth libraryOptions were previously configured, then always add default providers.\n if (!Amplify.libraryOptions.Auth) {\n cognitoUserPoolsTokenProvider.setAuthConfig(resolvedResourceConfig.Auth);\n cognitoUserPoolsTokenProvider.setKeyValueStorage(\n // TODO: allow configure with a public interface\n libraryOptions?.ssr\n ? new CookieStorage({ sameSite: 'lax' })\n : defaultStorage);\n Amplify.configure(resolvedResourceConfig, {\n ...libraryOptions,\n Auth: {\n tokenProvider: cognitoUserPoolsTokenProvider,\n credentialsProvider: cognitoCredentialsProvider,\n },\n });\n return;\n }\n // At this point, Auth libraryOptions would have been previously configured and no overriding\n // Auth options were given, so we should preserve the currently configured Auth libraryOptions.\n if (libraryOptions) {\n // If ssr is provided through libraryOptions, we should respect the intentional reconfiguration.\n if (libraryOptions.ssr !== undefined) {\n cognitoUserPoolsTokenProvider.setKeyValueStorage(\n // TODO: allow configure with a public interface\n libraryOptions.ssr\n ? new CookieStorage({ sameSite: 'lax' })\n : defaultStorage);\n }\n Amplify.configure(resolvedResourceConfig, {\n Auth: Amplify.libraryOptions.Auth,\n ...libraryOptions,\n });\n return;\n }\n // Finally, if there were no libraryOptions given at all, we should simply not touch the currently\n // configured libraryOptions.\n Amplify.configure(resolvedResourceConfig);\n },\n /**\n * Returns the {@link ResourcesConfig} object passed in as the `resourceConfig` parameter when calling\n * `Amplify.configure`.\n *\n * @returns An {@link ResourcesConfig} object.\n */\n getConfig() {\n return Amplify.getConfig();\n },\n};\n\nexport { DefaultAmplify };\n//# sourceMappingURL=initSingleton.mjs.map\n","export { Hub } from './Hub/index.mjs';\nexport { decodeJWT } from './singleton/Auth/utils/index.mjs';\nexport { Amplify, AmplifyClass as AmplifyClassV6 } from './singleton/Amplify.mjs';\nexport { fetchAuthSession } from './singleton/apis/fetchAuthSession.mjs';\nexport { clearCredentials } from './singleton/apis/clearCredentials.mjs';\nexport { getId } from './awsClients/cognitoIdentity/getId.mjs';\nexport { getCredentialsForIdentity } from './awsClients/cognitoIdentity/getCredentialsForIdentity.mjs';\nexport { defaultStorage, sessionStorage, sharedInMemoryStorage } from './storage/index.mjs';\nexport { Cache } from './Cache/index.mjs';\nexport { I18n } from './I18n/index.mjs';\nexport { ConsoleLogger } from './Logger/ConsoleLogger.mjs';\nexport { ServiceWorkerClass as ServiceWorker } from './ServiceWorker/ServiceWorker.mjs';\nexport { CookieStorage } from './storage/CookieStorage.mjs';\n//# sourceMappingURL=index.mjs.map\n","import { ConsoleLogger } from '../Logger/ConsoleLogger.mjs';\nimport { NO_HUBCALLBACK_PROVIDED_EXCEPTION } from '../constants.mjs';\nimport { AmplifyError } from '../errors/AmplifyError.mjs';\nimport '../types/errors.mjs';\nimport '../errors/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst AMPLIFY_SYMBOL = (typeof Symbol !== 'undefined'\n ? Symbol('amplify_default')\n : '@@amplify_default');\nconst logger = new ConsoleLogger('Hub');\nclass HubClass {\n constructor(name) {\n this.listeners = new Map();\n this.protectedChannels = [\n 'core',\n 'auth',\n 'api',\n 'analytics',\n 'interactions',\n 'pubsub',\n 'storage',\n 'ui',\n 'xr',\n ];\n this.name = name;\n }\n /**\n * Used internally to remove a Hub listener.\n *\n * @remarks\n * This private method is for internal use only. Instead of calling Hub.remove, call the result of Hub.listen.\n */\n _remove(channel, listener) {\n const holder = this.listeners.get(channel);\n if (!holder) {\n logger.warn(`No listeners for ${channel}`);\n return;\n }\n this.listeners.set(channel, [\n ...holder.filter(({ callback }) => callback !== listener),\n ]);\n }\n dispatch(channel, payload, source, ampSymbol) {\n if (typeof channel === 'string' &&\n this.protectedChannels.indexOf(channel) > -1) {\n const hasAccess = ampSymbol === AMPLIFY_SYMBOL;\n if (!hasAccess) {\n logger.warn(`WARNING: ${channel} is protected and dispatching on it can have unintended consequences`);\n }\n }\n const capsule = {\n channel,\n payload: { ...payload },\n source,\n patternInfo: [],\n };\n try {\n this._toListeners(capsule);\n }\n catch (e) {\n logger.error(e);\n }\n }\n listen(channel, callback, listenerName = 'noname') {\n let cb;\n if (typeof callback !== 'function') {\n throw new AmplifyError({\n name: NO_HUBCALLBACK_PROVIDED_EXCEPTION,\n message: 'No callback supplied to Hub',\n });\n }\n else {\n // Needs to be casted as a more generic type\n cb = callback;\n }\n let holder = this.listeners.get(channel);\n if (!holder) {\n holder = [];\n this.listeners.set(channel, holder);\n }\n holder.push({\n name: listenerName,\n callback: cb,\n });\n return () => {\n this._remove(channel, cb);\n };\n }\n _toListeners(capsule) {\n const { channel, payload } = capsule;\n const holder = this.listeners.get(channel);\n if (holder) {\n holder.forEach(listener => {\n logger.debug(`Dispatching to ${channel} with `, payload);\n try {\n listener.callback(capsule);\n }\n catch (e) {\n logger.error(e);\n }\n });\n }\n }\n}\n/* We export a __default__ instance of HubClass to use it as a\npseudo Singleton for the main messaging bus, however you can still create\nyour own instance of HubClass() for a separate \"private bus\" of events. */\nconst Hub = new HubClass('__default__');\n/**\n * @internal\n *\n * Internal hub used for core Amplify functionality. Not intended for use outside of Amplify.\n *\n */\nconst HubInternal = new HubClass('internal-hub');\n\nexport { AMPLIFY_SYMBOL, Hub, HubClass, HubInternal };\n//# sourceMappingURL=index.mjs.map\n","import { AWS_CLOUDWATCH_CATEGORY } from '../constants.mjs';\nimport { LogType } from './types.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst LOG_LEVELS = {\n VERBOSE: 1,\n DEBUG: 2,\n INFO: 3,\n WARN: 4,\n ERROR: 5,\n NONE: 6,\n};\n/**\n * Write logs\n * @class Logger\n */\nclass ConsoleLogger {\n /**\n * @constructor\n * @param {string} name - Name of the logger\n */\n constructor(name, level = LogType.WARN) {\n this.name = name;\n this.level = level;\n this._pluggables = [];\n }\n _padding(n) {\n return n < 10 ? '0' + n : '' + n;\n }\n _ts() {\n const dt = new Date();\n return ([this._padding(dt.getMinutes()), this._padding(dt.getSeconds())].join(':') +\n '.' +\n dt.getMilliseconds());\n }\n configure(config) {\n if (!config)\n return this._config;\n this._config = config;\n return this._config;\n }\n /**\n * Write log\n * @method\n * @memeberof Logger\n * @param {LogType|string} type - log type, default INFO\n * @param {string|object} msg - Logging message or object\n */\n _log(type, ...msg) {\n let loggerLevelName = this.level;\n if (ConsoleLogger.LOG_LEVEL) {\n loggerLevelName = ConsoleLogger.LOG_LEVEL;\n }\n if (typeof window !== 'undefined' && window.LOG_LEVEL) {\n loggerLevelName = window.LOG_LEVEL;\n }\n const loggerLevel = LOG_LEVELS[loggerLevelName];\n const typeLevel = LOG_LEVELS[type];\n if (!(typeLevel >= loggerLevel)) {\n // Do nothing if type is not greater than or equal to logger level (handle undefined)\n return;\n }\n let log = console.log.bind(console);\n if (type === LogType.ERROR && console.error) {\n log = console.error.bind(console);\n }\n if (type === LogType.WARN && console.warn) {\n log = console.warn.bind(console);\n }\n if (ConsoleLogger.BIND_ALL_LOG_LEVELS) {\n if (type === LogType.INFO && console.info) {\n log = console.info.bind(console);\n }\n if (type === LogType.DEBUG && console.debug) {\n log = console.debug.bind(console);\n }\n }\n const prefix = `[${type}] ${this._ts()} ${this.name}`;\n let message = '';\n if (msg.length === 1 && typeof msg[0] === 'string') {\n message = `${prefix} - ${msg[0]}`;\n log(message);\n }\n else if (msg.length === 1) {\n message = `${prefix} ${msg[0]}`;\n log(prefix, msg[0]);\n }\n else if (typeof msg[0] === 'string') {\n let obj = msg.slice(1);\n if (obj.length === 1) {\n obj = obj[0];\n }\n message = `${prefix} - ${msg[0]} ${obj}`;\n log(`${prefix} - ${msg[0]}`, obj);\n }\n else {\n message = `${prefix} ${msg}`;\n log(prefix, msg);\n }\n for (const plugin of this._pluggables) {\n const logEvent = { message, timestamp: Date.now() };\n plugin.pushLogs([logEvent]);\n }\n }\n /**\n * Write General log. Default to INFO\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n log(...msg) {\n this._log(LogType.INFO, ...msg);\n }\n /**\n * Write INFO log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n info(...msg) {\n this._log(LogType.INFO, ...msg);\n }\n /**\n * Write WARN log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n warn(...msg) {\n this._log(LogType.WARN, ...msg);\n }\n /**\n * Write ERROR log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n error(...msg) {\n this._log(LogType.ERROR, ...msg);\n }\n /**\n * Write DEBUG log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n debug(...msg) {\n this._log(LogType.DEBUG, ...msg);\n }\n /**\n * Write VERBOSE log\n * @method\n * @memeberof Logger\n * @param {string|object} msg - Logging message or object\n */\n verbose(...msg) {\n this._log(LogType.VERBOSE, ...msg);\n }\n addPluggable(pluggable) {\n if (pluggable && pluggable.getCategoryName() === AWS_CLOUDWATCH_CATEGORY) {\n this._pluggables.push(pluggable);\n pluggable.configure(this._config);\n }\n }\n listPluggables() {\n return this._pluggables;\n }\n}\nConsoleLogger.LOG_LEVEL = null;\nConsoleLogger.BIND_ALL_LOG_LEVELS = false;\n\nexport { ConsoleLogger };\n//# sourceMappingURL=ConsoleLogger.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Logging constants\nconst AWS_CLOUDWATCH_CATEGORY = 'Logging';\nconst USER_AGENT_HEADER = 'x-amz-user-agent';\n// Error exception code constants\nconst NO_HUBCALLBACK_PROVIDED_EXCEPTION = 'NoHubcallbackProvidedException';\n\nexport { AWS_CLOUDWATCH_CATEGORY, NO_HUBCALLBACK_PROVIDED_EXCEPTION, USER_AGENT_HEADER };\n//# sourceMappingURL=constants.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar LogType;\n(function (LogType) {\n LogType[\"DEBUG\"] = \"DEBUG\";\n LogType[\"ERROR\"] = \"ERROR\";\n LogType[\"INFO\"] = \"INFO\";\n LogType[\"WARN\"] = \"WARN\";\n LogType[\"VERBOSE\"] = \"VERBOSE\";\n LogType[\"NONE\"] = \"NONE\";\n})(LogType || (LogType = {}));\n\nexport { LogType };\n//# sourceMappingURL=types.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass AmplifyError extends Error {\n /**\n * Constructs an AmplifyError.\n *\n * @param message text that describes the main problem.\n * @param underlyingError the underlying cause of the error.\n * @param recoverySuggestion suggestion to recover from the error.\n *\n */\n constructor({ message, name, recoverySuggestion, underlyingError, }) {\n super(message);\n this.name = name;\n this.underlyingError = underlyingError;\n this.recoverySuggestion = recoverySuggestion;\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = AmplifyError;\n Object.setPrototypeOf(this, AmplifyError.prototype);\n }\n}\n\nexport { AmplifyError };\n//# sourceMappingURL=AmplifyError.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar AmplifyErrorCode;\n(function (AmplifyErrorCode) {\n AmplifyErrorCode[\"NoEndpointId\"] = \"NoEndpointId\";\n AmplifyErrorCode[\"PlatformNotSupported\"] = \"PlatformNotSupported\";\n AmplifyErrorCode[\"Unknown\"] = \"Unknown\";\n AmplifyErrorCode[\"NetworkError\"] = \"NetworkError\";\n})(AmplifyErrorCode || (AmplifyErrorCode = {}));\n\nexport { AmplifyErrorCode };\n//# sourceMappingURL=errors.mjs.map\n","import { AmplifyErrorCode } from '../types/errors.mjs';\nimport { createAssertionFunction } from './createAssertionFunction.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst amplifyErrorMap = {\n [AmplifyErrorCode.NoEndpointId]: {\n message: 'Endpoint ID was not found and was unable to be created.',\n },\n [AmplifyErrorCode.PlatformNotSupported]: {\n message: 'Function not supported on current platform.',\n },\n [AmplifyErrorCode.Unknown]: {\n message: 'An unknown error occurred.',\n },\n [AmplifyErrorCode.NetworkError]: {\n message: 'A network error has occurred.',\n },\n};\nconst assert = createAssertionFunction(amplifyErrorMap);\n\nexport { assert };\n//# sourceMappingURL=errorHelpers.mjs.map\n","import { AmplifyError } from './AmplifyError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createAssertionFunction = (errorMap, AssertionError = AmplifyError) => (assertion, name, additionalContext) => {\n const { message, recoverySuggestion } = errorMap[name];\n if (!assertion) {\n throw new AssertionError({\n name,\n message: additionalContext\n ? `${message} ${additionalContext}`\n : message,\n recoverySuggestion,\n });\n }\n};\n\nexport { createAssertionFunction };\n//# sourceMappingURL=createAssertionFunction.mjs.map\n","import { base64Decoder } from '../../../utils/convert/base64/base64Decoder.mjs';\nimport '../../../types/errors.mjs';\nimport '../../../errors/errorHelpers.mjs';\nimport { assert, AuthConfigurationErrorCode } from './errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction assertTokenProviderConfig(cognitoConfig) {\n let assertionValid = true; // assume valid until otherwise proveed\n if (!cognitoConfig) {\n assertionValid = false;\n }\n else {\n assertionValid =\n !!cognitoConfig.userPoolId && !!cognitoConfig.userPoolClientId;\n }\n assert(assertionValid, AuthConfigurationErrorCode.AuthUserPoolException);\n}\nfunction assertOAuthConfig(cognitoConfig) {\n const validOAuthConfig = !!cognitoConfig?.loginWith?.oauth?.domain &&\n !!cognitoConfig?.loginWith?.oauth?.redirectSignOut &&\n !!cognitoConfig?.loginWith?.oauth?.redirectSignIn &&\n !!cognitoConfig?.loginWith?.oauth?.responseType;\n assert(validOAuthConfig, AuthConfigurationErrorCode.OAuthNotConfigureException);\n}\nfunction assertIdentityPoolIdConfig(cognitoConfig) {\n const validConfig = !!cognitoConfig?.identityPoolId;\n assert(validConfig, AuthConfigurationErrorCode.InvalidIdentityPoolIdException);\n}\n/**\n * Decodes payload of JWT token\n *\n * @param {String} token A string representing a token to be decoded\n * @throws {@link Error} - Throws error when token is invalid or payload malformed.\n */\nfunction decodeJWT(token) {\n const tokenParts = token.split('.');\n if (tokenParts.length !== 3) {\n throw new Error('Invalid token');\n }\n try {\n const base64WithUrlSafe = tokenParts[1];\n const base64 = base64WithUrlSafe.replace(/-/g, '+').replace(/_/g, '/');\n const jsonStr = decodeURIComponent(base64Decoder\n .convert(base64)\n .split('')\n .map(char => `%${`00${char.charCodeAt(0).toString(16)}`.slice(-2)}`)\n .join(''));\n const payload = JSON.parse(jsonStr);\n return {\n toString: () => token,\n payload,\n };\n }\n catch (err) {\n throw new Error('Invalid token payload');\n }\n}\n\nexport { assertIdentityPoolIdConfig, assertOAuthConfig, assertTokenProviderConfig, decodeJWT };\n//# sourceMappingURL=index.mjs.map\n","import { getAtob } from '../../globalHelpers/index.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst base64Decoder = {\n convert(input, options) {\n let inputStr = input;\n // urlSafe character replacement options conform to the base64 url spec\n // https://datatracker.ietf.org/doc/html/rfc4648#page-7\n if (options?.urlSafe) {\n inputStr = inputStr.replace(/-/g, '+').replace(/_/g, '/');\n }\n return getAtob()(inputStr);\n },\n};\n\nexport { base64Decoder };\n//# sourceMappingURL=base64Decoder.mjs.map\n","import { AmplifyError } from '../../errors/AmplifyError.mjs';\nimport '../../types/errors.mjs';\nimport '../../errors/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst getCrypto = () => {\n if (typeof window === 'object' && typeof window.crypto === 'object') {\n return window.crypto;\n }\n // Next.js global polyfill\n if (typeof crypto === 'object') {\n return crypto;\n }\n throw new AmplifyError({\n name: 'MissingPolyfill',\n message: 'Cannot resolve the `crypto` function from the environment.',\n });\n};\nconst getBtoa = () => {\n // browser\n if (typeof window !== 'undefined' && typeof window.btoa === 'function') {\n return window.btoa;\n }\n // Next.js global polyfill\n if (typeof btoa === 'function') {\n return btoa;\n }\n throw new AmplifyError({\n name: 'Base64EncoderError',\n message: 'Cannot resolve the `btoa` function from the environment.',\n });\n};\nconst getAtob = () => {\n // browser\n if (typeof window !== 'undefined' && typeof window.atob === 'function') {\n return window.atob;\n }\n // Next.js global polyfill\n if (typeof atob === 'function') {\n return atob;\n }\n throw new AmplifyError({\n name: 'Base64EncoderError',\n message: 'Cannot resolve the `atob` function from the environment.',\n });\n};\n\nexport { getAtob, getBtoa, getCrypto };\n//# sourceMappingURL=index.mjs.map\n","import { createAssertionFunction } from '../../../errors/createAssertionFunction.mjs';\nimport '../../../types/errors.mjs';\nimport '../../../errors/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar AuthConfigurationErrorCode;\n(function (AuthConfigurationErrorCode) {\n AuthConfigurationErrorCode[\"AuthTokenConfigException\"] = \"AuthTokenConfigException\";\n AuthConfigurationErrorCode[\"AuthUserPoolAndIdentityPoolException\"] = \"AuthUserPoolAndIdentityPoolException\";\n AuthConfigurationErrorCode[\"AuthUserPoolException\"] = \"AuthUserPoolException\";\n AuthConfigurationErrorCode[\"InvalidIdentityPoolIdException\"] = \"InvalidIdentityPoolIdException\";\n AuthConfigurationErrorCode[\"OAuthNotConfigureException\"] = \"OAuthNotConfigureException\";\n})(AuthConfigurationErrorCode || (AuthConfigurationErrorCode = {}));\nconst authConfigurationErrorMap = {\n [AuthConfigurationErrorCode.AuthTokenConfigException]: {\n message: 'Auth Token Provider not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure in your app.',\n },\n [AuthConfigurationErrorCode.AuthUserPoolAndIdentityPoolException]: {\n message: 'Auth UserPool or IdentityPool not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId.',\n },\n [AuthConfigurationErrorCode.AuthUserPoolException]: {\n message: 'Auth UserPool not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId.',\n },\n [AuthConfigurationErrorCode.InvalidIdentityPoolIdException]: {\n message: 'Invalid identity pool id provided.',\n recoverySuggestion: 'Make sure a valid identityPoolId is given in the config.',\n },\n [AuthConfigurationErrorCode.OAuthNotConfigureException]: {\n message: 'oauth param not configured.',\n recoverySuggestion: 'Make sure to call Amplify.configure with oauth parameter in your app.',\n },\n};\nconst assert = createAssertionFunction(authConfigurationErrorMap);\n\nexport { AuthConfigurationErrorCode, assert };\n//# sourceMappingURL=errorHelpers.mjs.map\n","import { Hub, AMPLIFY_SYMBOL } from '../Hub/index.mjs';\nimport '../utils/getClientInfo/getClientInfo.mjs';\nimport '../utils/retry/retry.mjs';\nimport { deepFreeze } from '../utils/deepFreeze.mjs';\nimport '../parseAWSExports.mjs';\nimport { ADD_OAUTH_LISTENER } from './constants.mjs';\nimport 'uuid';\nimport { parseAmplifyConfig } from '../utils/parseAmplifyConfig.mjs';\nimport '../types/errors.mjs';\nimport '../errors/errorHelpers.mjs';\nimport './Auth/utils/errorHelpers.mjs';\nimport { AuthClass } from './Auth/index.mjs';\nimport '@aws-crypto/sha256-js';\nimport '@smithy/util-hex-encoding';\nimport '../Platform/index.mjs';\nimport '../Platform/types.mjs';\nimport '../BackgroundProcessManager/types.mjs';\nimport '../Reachability/Reachability.mjs';\nimport '../utils/sessionListener/index.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass AmplifyClass {\n constructor() {\n this.oAuthListener = undefined;\n this.resourcesConfig = {};\n this.libraryOptions = {};\n this.Auth = new AuthClass();\n }\n /**\n * Configures Amplify for use with your back-end resources.\n *\n * @remarks\n * This API does not perform any merging of either `resourcesConfig` or `libraryOptions`. The most recently\n * provided values will be used after configuration.\n *\n * @remarks\n * `configure` can be used to specify additional library options where available for supported categories.\n *\n * @param resourceConfig - Back-end resource configuration. Typically provided via the `aws-exports.js` file.\n * @param libraryOptions - Additional options for customizing the behavior of the library.\n */\n configure(resourcesConfig, libraryOptions) {\n const resolvedResourceConfig = parseAmplifyConfig(resourcesConfig);\n this.resourcesConfig = resolvedResourceConfig;\n if (libraryOptions) {\n this.libraryOptions = libraryOptions;\n }\n // Make resource config immutable\n this.resourcesConfig = deepFreeze(this.resourcesConfig);\n this.Auth.configure(this.resourcesConfig.Auth, this.libraryOptions.Auth);\n Hub.dispatch('core', {\n event: 'configure',\n data: this.resourcesConfig,\n }, 'Configure', AMPLIFY_SYMBOL);\n this.notifyOAuthListener();\n }\n /**\n * Provides access to the current back-end resource configuration for the Library.\n *\n * @returns Returns the immutable back-end resource configuration.\n */\n getConfig() {\n return this.resourcesConfig;\n }\n /** @internal */\n [ADD_OAUTH_LISTENER](listener) {\n if (this.resourcesConfig.Auth?.Cognito.loginWith?.oauth) {\n // when Amplify has been configured with a valid OAuth config while adding the listener, run it directly\n listener(this.resourcesConfig.Auth?.Cognito);\n }\n else {\n // otherwise register the listener and run it later when Amplify gets configured with a valid oauth config\n this.oAuthListener = listener;\n }\n }\n notifyOAuthListener() {\n if (!this.resourcesConfig.Auth?.Cognito.loginWith?.oauth ||\n !this.oAuthListener) {\n return;\n }\n this.oAuthListener(this.resourcesConfig.Auth?.Cognito);\n // the listener should only be notified once with a valid oauth config\n this.oAuthListener = undefined;\n }\n}\n/**\n * The `Amplify` utility is used to configure the library.\n *\n * @remarks\n * `Amplify` orchestrates cross-category communication within the library.\n */\nconst Amplify = new AmplifyClass();\n\nexport { Amplify, AmplifyClass };\n//# sourceMappingURL=Amplify.mjs.map\n","import { ConsoleLogger } from '../../Logger/ConsoleLogger.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('getClientInfo');\nfunction getClientInfo() {\n if (typeof window === 'undefined') {\n return {};\n }\n return browserClientInfo();\n}\nfunction browserClientInfo() {\n if (typeof window === 'undefined') {\n logger.warn('No window object available to get browser client info');\n return {};\n }\n const nav = window.navigator;\n if (!nav) {\n logger.warn('No navigator object available to get browser client info');\n return {};\n }\n const { platform, product, vendor, userAgent, language } = nav;\n const type = getBrowserType(userAgent);\n const timezone = browserTimezone();\n return {\n platform,\n make: product || vendor,\n model: type.type,\n version: type.version,\n appVersion: [type.type, type.version].join('/'),\n language,\n timezone,\n };\n}\nfunction browserTimezone() {\n const tzMatch = /\\(([A-Za-z\\s].*)\\)/.exec(new Date().toString());\n return tzMatch ? tzMatch[1] || '' : '';\n}\nfunction getBrowserType(userAgent) {\n // The latest user agents for Opera: https://www.whatismybrowser.com/guides/the-latest-user-agent/opera\n const operaMatch = /.+(Opera[\\s[A-Z]*|OPR[\\sA-Z]*)\\/([0-9.]+).*/i.exec(userAgent);\n if (operaMatch) {\n return { type: operaMatch[1], version: operaMatch[2] };\n }\n // The latest user agents for Edge: https://www.whatismybrowser.com/guides/the-latest-user-agent/edge\n const ieMatch = /.+(Trident|Edge|Edg|EdgA|EdgiOS)\\/([0-9.]+).*/i.exec(userAgent);\n if (ieMatch) {\n return { type: ieMatch[1], version: ieMatch[2] };\n }\n // The latest user agents for web browsers on Firefox and Chrome\n // https://www.whatismybrowser.com/guides/the-latest-user-agent/firefox\n // https://www.whatismybrowser.com/guides/the-latest-user-agent/chrome\n const cfMatch = /.+(Chrome|CriOS|Firefox|FxiOS)\\/([0-9.]+).*/i.exec(userAgent);\n if (cfMatch) {\n return { type: cfMatch[1], version: cfMatch[2] };\n }\n // The latest user agents for Safari: https://www.whatismybrowser.com/guides/the-latest-user-agent/safari\n const sMatch = /.+(Safari)\\/([0-9.]+).*/i.exec(userAgent);\n if (sMatch) {\n return { type: sMatch[1], version: sMatch[2] };\n }\n const awkMatch = /.+(AppleWebKit)\\/([0-9.]+).*/i.exec(userAgent);\n if (awkMatch) {\n return { type: awkMatch[1], version: awkMatch[2] };\n }\n const anyMatch = /.*([A-Z]+)\\/([0-9.]+).*/i.exec(userAgent);\n if (anyMatch) {\n return { type: anyMatch[1], version: anyMatch[2] };\n }\n return { type: '', version: '' };\n}\n\nexport { getClientInfo };\n//# sourceMappingURL=getClientInfo.mjs.map\n","import { ConsoleLogger } from '../../Logger/ConsoleLogger.mjs';\nimport { isNonRetryableError } from './isNonRetryableError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('retryUtil');\n/**\n * @private\n * Internal use of Amplify only\n */\nasync function retry(functionToRetry, args, delayFn, onTerminate) {\n if (typeof functionToRetry !== 'function') {\n throw Error('functionToRetry must be a function');\n }\n // TODO(eslint): remove this linter suppression with refactoring.\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n let attempt = 0;\n let terminated = false;\n let timeout;\n let wakeUp = () => {\n // no-op\n }; // will be replaced with a resolver()\n // used after the loop if terminated while waiting for a timer.\n let lastError;\n onTerminate &&\n onTerminate.then(() => {\n // signal not to try anymore.\n terminated = true;\n // stop sleeping if we're sleeping.\n clearTimeout(timeout);\n wakeUp();\n });\n // TODO(eslint): remove this linter suppression with refactoring.\n // eslint-disable-next-line no-unmodified-loop-condition\n while (!terminated) {\n attempt++;\n logger.debug(`${functionToRetry.name} attempt #${attempt} with this vars: ${JSON.stringify(args)}`);\n try {\n resolve(await functionToRetry(...args));\n return;\n }\n catch (err) {\n lastError = err;\n logger.debug(`error on ${functionToRetry.name}`, err);\n if (isNonRetryableError(err)) {\n logger.debug(`${functionToRetry.name} non retryable error`, err);\n reject(err);\n return;\n }\n const retryIn = delayFn(attempt, args, err);\n logger.debug(`${functionToRetry.name} retrying in ${retryIn} ms`);\n // we check `terminated` again here because it could have flipped\n // in the time it took `functionToRetry` to return.\n if (retryIn === false || terminated) {\n reject(err);\n return;\n }\n else {\n await new Promise(_resolve => {\n wakeUp = _resolve; // export wakeUp for onTerminate handling\n timeout = setTimeout(wakeUp, retryIn);\n });\n }\n }\n }\n // reached if terminated while waiting for a timer.\n reject(lastError);\n });\n}\n\nexport { retry };\n//# sourceMappingURL=retry.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst isNonRetryableError = (obj) => {\n const key = 'nonRetryable';\n return obj && obj[key];\n};\n\nexport { isNonRetryableError };\n//# sourceMappingURL=isNonRetryableError.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst deepFreeze = (object) => {\n const propNames = Reflect.ownKeys(object);\n for (const name of propNames) {\n const value = object[name];\n if ((value && typeof value === 'object') || typeof value === 'function') {\n deepFreeze(value);\n }\n }\n return Object.freeze(object);\n};\n\nexport { deepFreeze };\n//# sourceMappingURL=deepFreeze.mjs.map\n","import { ConsoleLogger } from './Logger/ConsoleLogger.mjs';\nimport { AmplifyError } from './errors/AmplifyError.mjs';\nimport './types/errors.mjs';\nimport './errors/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('parseAWSExports');\nconst authTypeMapping = {\n API_KEY: 'apiKey',\n AWS_IAM: 'iam',\n AMAZON_COGNITO_USER_POOLS: 'userPool',\n OPENID_CONNECT: 'oidc',\n NONE: 'none',\n AWS_LAMBDA: 'lambda',\n // `LAMBDA` is an incorrect value that was added during the v6 rewrite.\n // Keeping it as a valid value until v7 to prevent breaking customers who might\n // be relying on it as a workaround.\n // ref: https://github.com/aws-amplify/amplify-js/pull/12922\n // TODO: @v7 remove next line\n LAMBDA: 'lambda',\n};\n/**\n * Converts the object imported from `aws-exports.js` or `amplifyconfiguration.json` files generated by\n * the Amplify CLI into an object that conforms to the {@link ResourcesConfig}.\n *\n * @param config A configuration object imported from `aws-exports.js` or `amplifyconfiguration.json`.\n *\n * @returns An object that conforms to the {@link ResourcesConfig} .\n */\nconst parseAWSExports = (config = {}) => {\n if (!Object.prototype.hasOwnProperty.call(config, 'aws_project_region')) {\n throw new AmplifyError({\n name: 'InvalidParameterException',\n message: 'Invalid config parameter.',\n recoverySuggestion: 'Ensure passing the config object imported from `amplifyconfiguration.json`.',\n });\n }\n const { aws_appsync_apiKey, aws_appsync_authenticationType, aws_appsync_graphqlEndpoint, aws_appsync_region, aws_bots_config, aws_cognito_identity_pool_id, aws_cognito_sign_up_verification_method, aws_cognito_mfa_configuration, aws_cognito_mfa_types, aws_cognito_password_protection_settings, aws_cognito_verification_mechanisms, aws_cognito_signup_attributes, aws_cognito_social_providers, aws_cognito_username_attributes, aws_mandatory_sign_in, aws_mobile_analytics_app_id, aws_mobile_analytics_app_region, aws_user_files_s3_bucket, aws_user_files_s3_bucket_region, aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing, aws_user_pools_id, aws_user_pools_web_client_id, geo, oauth, predictions, aws_cloud_logic_custom, Notifications, modelIntrospection, } = config;\n const amplifyConfig = {};\n // Analytics\n if (aws_mobile_analytics_app_id) {\n amplifyConfig.Analytics = {\n Pinpoint: {\n appId: aws_mobile_analytics_app_id,\n region: aws_mobile_analytics_app_region,\n },\n };\n }\n // Notifications\n const { InAppMessaging, Push } = Notifications ?? {};\n if (InAppMessaging?.AWSPinpoint || Push?.AWSPinpoint) {\n if (InAppMessaging?.AWSPinpoint) {\n const { appId, region } = InAppMessaging.AWSPinpoint;\n amplifyConfig.Notifications = {\n InAppMessaging: {\n Pinpoint: {\n appId,\n region,\n },\n },\n };\n }\n if (Push?.AWSPinpoint) {\n const { appId, region } = Push.AWSPinpoint;\n amplifyConfig.Notifications = {\n ...amplifyConfig.Notifications,\n PushNotification: {\n Pinpoint: {\n appId,\n region,\n },\n },\n };\n }\n }\n // Interactions\n if (Array.isArray(aws_bots_config)) {\n amplifyConfig.Interactions = {\n LexV1: Object.fromEntries(aws_bots_config.map(bot => [bot.name, bot])),\n };\n }\n // API\n if (aws_appsync_graphqlEndpoint) {\n const defaultAuthMode = authTypeMapping[aws_appsync_authenticationType];\n if (!defaultAuthMode) {\n logger.debug(`Invalid authentication type ${aws_appsync_authenticationType}. Falling back to IAM.`);\n }\n amplifyConfig.API = {\n GraphQL: {\n endpoint: aws_appsync_graphqlEndpoint,\n apiKey: aws_appsync_apiKey,\n region: aws_appsync_region,\n defaultAuthMode: defaultAuthMode ?? 'iam',\n },\n };\n if (modelIntrospection) {\n amplifyConfig.API.GraphQL.modelIntrospection = modelIntrospection;\n }\n }\n // Auth\n const mfaConfig = aws_cognito_mfa_configuration\n ? {\n status: aws_cognito_mfa_configuration &&\n aws_cognito_mfa_configuration.toLowerCase(),\n totpEnabled: aws_cognito_mfa_types?.includes('TOTP') ?? false,\n smsEnabled: aws_cognito_mfa_types?.includes('SMS') ?? false,\n }\n : undefined;\n const passwordFormatConfig = aws_cognito_password_protection_settings\n ? {\n minLength: aws_cognito_password_protection_settings.passwordPolicyMinLength,\n requireLowercase: aws_cognito_password_protection_settings.passwordPolicyCharacters?.includes('REQUIRES_LOWERCASE') ?? false,\n requireUppercase: aws_cognito_password_protection_settings.passwordPolicyCharacters?.includes('REQUIRES_UPPERCASE') ?? false,\n requireNumbers: aws_cognito_password_protection_settings.passwordPolicyCharacters?.includes('REQUIRES_NUMBERS') ?? false,\n requireSpecialCharacters: aws_cognito_password_protection_settings.passwordPolicyCharacters?.includes('REQUIRES_SYMBOLS') ?? false,\n }\n : undefined;\n const mergedUserAttributes = Array.from(new Set([\n ...(aws_cognito_verification_mechanisms ?? []),\n ...(aws_cognito_signup_attributes ?? []),\n ]));\n const userAttributes = mergedUserAttributes.reduce((attributes, key) => ({\n ...attributes,\n // All user attributes generated by the CLI are required\n [key.toLowerCase()]: { required: true },\n }), {});\n const loginWithEmailEnabled = aws_cognito_username_attributes?.includes('EMAIL') ?? false;\n const loginWithPhoneEnabled = aws_cognito_username_attributes?.includes('PHONE_NUMBER') ?? false;\n if (aws_cognito_identity_pool_id || aws_user_pools_id) {\n amplifyConfig.Auth = {\n Cognito: {\n identityPoolId: aws_cognito_identity_pool_id,\n allowGuestAccess: aws_mandatory_sign_in !== 'enable',\n signUpVerificationMethod: aws_cognito_sign_up_verification_method,\n userAttributes,\n userPoolClientId: aws_user_pools_web_client_id,\n userPoolId: aws_user_pools_id,\n mfa: mfaConfig,\n passwordFormat: passwordFormatConfig,\n loginWith: {\n username: !(loginWithEmailEnabled || loginWithPhoneEnabled),\n email: loginWithEmailEnabled,\n phone: loginWithPhoneEnabled,\n },\n },\n };\n }\n const hasOAuthConfig = oauth ? Object.keys(oauth).length > 0 : false;\n const hasSocialProviderConfig = aws_cognito_social_providers\n ? aws_cognito_social_providers.length > 0\n : false;\n if (amplifyConfig.Auth && hasOAuthConfig) {\n amplifyConfig.Auth.Cognito.loginWith = {\n ...amplifyConfig.Auth.Cognito.loginWith,\n oauth: {\n ...getOAuthConfig(oauth),\n ...(hasSocialProviderConfig && {\n providers: parseSocialProviders(aws_cognito_social_providers),\n }),\n },\n };\n }\n // Storage\n if (aws_user_files_s3_bucket) {\n amplifyConfig.Storage = {\n S3: {\n bucket: aws_user_files_s3_bucket,\n region: aws_user_files_s3_bucket_region,\n dangerouslyConnectToHttpEndpointForTesting: aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing,\n },\n };\n }\n // Geo\n if (geo) {\n const { amazon_location_service } = geo;\n amplifyConfig.Geo = {\n LocationService: {\n maps: amazon_location_service.maps,\n geofenceCollections: amazon_location_service.geofenceCollections,\n searchIndices: amazon_location_service.search_indices,\n region: amazon_location_service.region,\n },\n };\n }\n // REST API\n if (aws_cloud_logic_custom) {\n amplifyConfig.API = {\n ...amplifyConfig.API,\n REST: aws_cloud_logic_custom.reduce((acc, api) => {\n const { name, endpoint, region, service } = api;\n return {\n ...acc,\n [name]: {\n endpoint,\n ...(service ? { service } : undefined),\n ...(region ? { region } : undefined),\n },\n };\n }, {}),\n };\n }\n // Predictions\n if (predictions) {\n // map VoiceId from speechGenerator defaults to voiceId\n const { VoiceId: voiceId } = predictions?.convert?.speechGenerator?.defaults ?? {};\n amplifyConfig.Predictions = voiceId\n ? {\n ...predictions,\n convert: {\n ...predictions.convert,\n speechGenerator: {\n ...predictions.convert.speechGenerator,\n defaults: { voiceId },\n },\n },\n }\n : predictions;\n }\n return amplifyConfig;\n};\nconst getRedirectUrl = (redirectStr) => redirectStr?.split(',') ?? [];\nconst getOAuthConfig = ({ domain, scope, redirectSignIn, redirectSignOut, responseType, }) => ({\n domain,\n scopes: scope,\n redirectSignIn: getRedirectUrl(redirectSignIn),\n redirectSignOut: getRedirectUrl(redirectSignOut),\n responseType,\n});\nconst parseSocialProviders = (aws_cognito_social_providers) => {\n return aws_cognito_social_providers.map((provider) => {\n const updatedProvider = provider.toLowerCase();\n return updatedProvider.charAt(0).toUpperCase() + updatedProvider.slice(1);\n });\n};\n\nexport { parseAWSExports };\n//# sourceMappingURL=parseAWSExports.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst ADD_OAUTH_LISTENER = Symbol('oauth-listener');\n\nexport { ADD_OAUTH_LISTENER };\n//# sourceMappingURL=constants.mjs.map\n","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';\nexport { default as NIL } from './nil.js';\nexport { default as version } from './version.js';\nexport { default as validate } from './validate.js';\nexport { default as stringify } from './stringify.js';\nexport { default as parse } from './parse.js';","import rng from './rng.js';\nimport { unsafeStringify } from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || unsafeStringify(b);\n}\n\nexport default v1;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import v35 from './v35.js';\nimport md5 from './md5.js';\nconst v3 = v35('v3', 0x30, md5);\nexport default v3;","import { unsafeStringify } from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function v35(name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n var _namespace;\n\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (let i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n const output = [];\n const length32 = input.length * 32;\n const hexTab = '0123456789abcdef';\n\n for (let i = 0; i < length32; i += 8) {\n const x = input[i >> 5] >>> i % 32 & 0xff;\n const hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n let a = 1732584193;\n let b = -271733879;\n let c = -1732584194;\n let d = 271733878;\n\n for (let i = 0; i < x.length; i += 16) {\n const olda = a;\n const oldb = b;\n const oldc = c;\n const oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n const length8 = input.length * 8;\n const output = new Uint32Array(getOutputLength(length8));\n\n for (let i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n const lsw = (x & 0xffff) + (y & 0xffff);\n const msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nconst v5 = v35('v5', 0x50, sha1);\nexport default v5;","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (let i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n const l = bytes.length / 4 + 2;\n const N = Math.ceil(l / 16);\n const M = new Array(N);\n\n for (let i = 0; i < N; ++i) {\n const arr = new Uint32Array(16);\n\n for (let j = 0; j < 16; ++j) {\n arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3];\n }\n\n M[i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (let i = 0; i < N; ++i) {\n const W = new Uint32Array(80);\n\n for (let t = 0; t < 16; ++t) {\n W[t] = M[i][t];\n }\n\n for (let t = 16; t < 80; ++t) {\n W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);\n }\n\n let a = H[0];\n let b = H[1];\n let c = H[2];\n let d = H[3];\n let e = H[4];\n\n for (let t = 0; t < 80; ++t) {\n const s = Math.floor(t / 20);\n const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.slice(14, 15), 16);\n}\n\nexport default version;","import { parseAWSExports } from '../parseAWSExports.mjs';\nimport { isAmplifyOutputs, parseAmplifyOutputs } from '../parseAmplifyOutputs.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Parses the variety of configuration shapes that Amplify can accept into a ResourcesConfig.\n *\n * @param amplifyConfig An Amplify configuration object conforming to one of the supported schemas.\n * @return A ResourcesConfig for the provided configuration object.\n */\nconst parseAmplifyConfig = (amplifyConfig) => {\n if (Object.keys(amplifyConfig).some(key => key.startsWith('aws_'))) {\n return parseAWSExports(amplifyConfig);\n }\n else if (isAmplifyOutputs(amplifyConfig)) {\n return parseAmplifyOutputs(amplifyConfig);\n }\n else {\n return amplifyConfig;\n }\n};\n\nexport { parseAmplifyConfig };\n//# sourceMappingURL=parseAmplifyConfig.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction isAmplifyOutputs(config) {\n // version format initially will be '1' but is expected to be something like x.y where x is major and y minor version\n const { version } = config;\n if (!version) {\n return false;\n }\n return version.startsWith('1');\n}\nfunction parseStorage(amplifyOutputsStorageProperties) {\n if (!amplifyOutputsStorageProperties) {\n return undefined;\n }\n const { bucket_name, aws_region, buckets } = amplifyOutputsStorageProperties;\n return {\n S3: {\n bucket: bucket_name,\n region: aws_region,\n buckets: buckets && createBucketInfoMap(buckets),\n },\n };\n}\nfunction parseAuth(amplifyOutputsAuthProperties) {\n if (!amplifyOutputsAuthProperties) {\n return undefined;\n }\n const { user_pool_id, user_pool_client_id, identity_pool_id, password_policy, mfa_configuration, mfa_methods, unauthenticated_identities_enabled, oauth, username_attributes, standard_required_attributes, groups, } = amplifyOutputsAuthProperties;\n const authConfig = {\n Cognito: {\n userPoolId: user_pool_id,\n userPoolClientId: user_pool_client_id,\n groups,\n },\n };\n if (identity_pool_id) {\n authConfig.Cognito = {\n ...authConfig.Cognito,\n identityPoolId: identity_pool_id,\n };\n }\n if (password_policy) {\n authConfig.Cognito.passwordFormat = {\n requireLowercase: password_policy.require_lowercase,\n requireNumbers: password_policy.require_numbers,\n requireUppercase: password_policy.require_uppercase,\n requireSpecialCharacters: password_policy.require_symbols,\n minLength: password_policy.min_length ?? 6,\n };\n }\n if (mfa_configuration) {\n authConfig.Cognito.mfa = {\n status: getMfaStatus(mfa_configuration),\n smsEnabled: mfa_methods?.includes('SMS'),\n totpEnabled: mfa_methods?.includes('TOTP'),\n };\n }\n if (unauthenticated_identities_enabled) {\n authConfig.Cognito.allowGuestAccess = unauthenticated_identities_enabled;\n }\n if (oauth) {\n authConfig.Cognito.loginWith = {\n oauth: {\n domain: oauth.domain,\n redirectSignIn: oauth.redirect_sign_in_uri,\n redirectSignOut: oauth.redirect_sign_out_uri,\n responseType: oauth.response_type === 'token' ? 'token' : 'code',\n scopes: oauth.scopes,\n providers: getOAuthProviders(oauth.identity_providers),\n },\n };\n }\n if (username_attributes) {\n authConfig.Cognito.loginWith = {\n ...authConfig.Cognito.loginWith,\n email: username_attributes.includes('email'),\n phone: username_attributes.includes('phone_number'),\n // Signing in with a username is not currently supported in Gen2, this should always evaluate to false\n username: username_attributes.includes('username'),\n };\n }\n if (standard_required_attributes) {\n authConfig.Cognito.userAttributes = standard_required_attributes.reduce((acc, curr) => ({ ...acc, [curr]: { required: true } }), {});\n }\n return authConfig;\n}\nfunction parseAnalytics(amplifyOutputsAnalyticsProperties) {\n if (!amplifyOutputsAnalyticsProperties?.amazon_pinpoint) {\n return undefined;\n }\n const { amazon_pinpoint } = amplifyOutputsAnalyticsProperties;\n return {\n Pinpoint: {\n appId: amazon_pinpoint.app_id,\n region: amazon_pinpoint.aws_region,\n },\n };\n}\nfunction parseGeo(amplifyOutputsAnalyticsProperties) {\n if (!amplifyOutputsAnalyticsProperties) {\n return undefined;\n }\n const { aws_region, geofence_collections, maps, search_indices } = amplifyOutputsAnalyticsProperties;\n return {\n LocationService: {\n region: aws_region,\n searchIndices: search_indices,\n geofenceCollections: geofence_collections,\n maps,\n },\n };\n}\nfunction parseData(amplifyOutputsDataProperties) {\n if (!amplifyOutputsDataProperties) {\n return undefined;\n }\n const { aws_region, default_authorization_type, url, api_key, model_introspection, } = amplifyOutputsDataProperties;\n const GraphQL = {\n endpoint: url,\n defaultAuthMode: getGraphQLAuthMode(default_authorization_type),\n region: aws_region,\n apiKey: api_key,\n modelIntrospection: model_introspection,\n };\n return {\n GraphQL,\n };\n}\nfunction parseCustom(amplifyOutputsCustomProperties) {\n if (!amplifyOutputsCustomProperties?.events) {\n return undefined;\n }\n const { url, aws_region, api_key, default_authorization_type } = amplifyOutputsCustomProperties.events;\n const Events = {\n endpoint: url,\n defaultAuthMode: getGraphQLAuthMode(default_authorization_type),\n region: aws_region,\n apiKey: api_key,\n };\n return {\n Events,\n };\n}\nfunction parseNotifications(amplifyOutputsNotificationsProperties) {\n if (!amplifyOutputsNotificationsProperties) {\n return undefined;\n }\n const { aws_region, channels, amazon_pinpoint_app_id } = amplifyOutputsNotificationsProperties;\n const hasInAppMessaging = channels.includes('IN_APP_MESSAGING');\n const hasPushNotification = channels.includes('APNS') || channels.includes('FCM');\n if (!(hasInAppMessaging || hasPushNotification)) {\n return undefined;\n }\n // At this point, we know the Amplify outputs contains at least one supported channel\n const notificationsConfig = {};\n if (hasInAppMessaging) {\n notificationsConfig.InAppMessaging = {\n Pinpoint: {\n appId: amazon_pinpoint_app_id,\n region: aws_region,\n },\n };\n }\n if (hasPushNotification) {\n notificationsConfig.PushNotification = {\n Pinpoint: {\n appId: amazon_pinpoint_app_id,\n region: aws_region,\n },\n };\n }\n return notificationsConfig;\n}\nfunction parseAmplifyOutputs(amplifyOutputs) {\n const resourcesConfig = {};\n if (amplifyOutputs.storage) {\n resourcesConfig.Storage = parseStorage(amplifyOutputs.storage);\n }\n if (amplifyOutputs.auth) {\n resourcesConfig.Auth = parseAuth(amplifyOutputs.auth);\n }\n if (amplifyOutputs.analytics) {\n resourcesConfig.Analytics = parseAnalytics(amplifyOutputs.analytics);\n }\n if (amplifyOutputs.geo) {\n resourcesConfig.Geo = parseGeo(amplifyOutputs.geo);\n }\n if (amplifyOutputs.data) {\n resourcesConfig.API = parseData(amplifyOutputs.data);\n }\n if (amplifyOutputs.custom) {\n const customConfig = parseCustom(amplifyOutputs.custom);\n if (customConfig && 'Events' in customConfig) {\n resourcesConfig.API = { ...resourcesConfig.API, ...customConfig };\n }\n }\n if (amplifyOutputs.notifications) {\n resourcesConfig.Notifications = parseNotifications(amplifyOutputs.notifications);\n }\n return resourcesConfig;\n}\nconst authModeNames = {\n AMAZON_COGNITO_USER_POOLS: 'userPool',\n API_KEY: 'apiKey',\n AWS_IAM: 'iam',\n AWS_LAMBDA: 'lambda',\n OPENID_CONNECT: 'oidc',\n};\nfunction getGraphQLAuthMode(authType) {\n return authModeNames[authType];\n}\nconst providerNames = {\n GOOGLE: 'Google',\n LOGIN_WITH_AMAZON: 'Amazon',\n FACEBOOK: 'Facebook',\n SIGN_IN_WITH_APPLE: 'Apple',\n};\nfunction getOAuthProviders(providers = []) {\n return providers.reduce((oAuthProviders, provider) => {\n if (providerNames[provider] !== undefined) {\n oAuthProviders.push(providerNames[provider]);\n }\n return oAuthProviders;\n }, []);\n}\nfunction getMfaStatus(mfaConfiguration) {\n if (mfaConfiguration === 'OPTIONAL')\n return 'optional';\n if (mfaConfiguration === 'REQUIRED')\n return 'on';\n return 'off';\n}\nfunction createBucketInfoMap(buckets) {\n const mappedBuckets = {};\n buckets.forEach(({ name, bucket_name: bucketName, aws_region: region, paths }) => {\n if (name in mappedBuckets) {\n throw new Error(`Duplicate friendly name found: ${name}. Name must be unique.`);\n }\n mappedBuckets[name] = {\n bucketName,\n region,\n paths,\n };\n });\n return mappedBuckets;\n}\n\nexport { isAmplifyOutputs, parseAmplifyOutputs, parseAnalytics };\n//# sourceMappingURL=parseAmplifyOutputs.mjs.map\n","function isTokenExpired({ expiresAt, clockDrift, }) {\n const currentTime = Date.now();\n return currentTime + clockDrift > expiresAt;\n}\nclass AuthClass {\n /**\n * Configure Auth category\n *\n * @internal\n *\n * @param authResourcesConfig - Resources configurations required by Auth providers.\n * @param authOptions - Client options used by library\n *\n * @returns void\n */\n configure(authResourcesConfig, authOptions) {\n this.authConfig = authResourcesConfig;\n this.authOptions = authOptions;\n }\n /**\n * Fetch the auth tokens, and the temporary AWS credentials and identity if they are configured. By default it\n * does not refresh the auth tokens or credentials if they are loaded in storage already. You can force a refresh\n * with `{ forceRefresh: true }` input.\n *\n * @param options - Options configuring the fetch behavior.\n *\n * @returns Promise of current auth session {@link AuthSession}.\n */\n async fetchAuthSession(options = {}) {\n let credentialsAndIdentityId;\n let userSub;\n // Get tokens will throw if session cannot be refreshed (network or service error) or return null if not available\n const tokens = await this.getTokens(options);\n if (tokens) {\n userSub = tokens.accessToken?.payload?.sub;\n // getCredentialsAndIdentityId will throw if cannot get credentials (network or service error)\n credentialsAndIdentityId =\n await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({\n authConfig: this.authConfig,\n tokens,\n authenticated: true,\n forceRefresh: options.forceRefresh,\n });\n }\n else {\n // getCredentialsAndIdentityId will throw if cannot get credentials (network or service error)\n credentialsAndIdentityId =\n await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({\n authConfig: this.authConfig,\n authenticated: false,\n forceRefresh: options.forceRefresh,\n });\n }\n return {\n tokens,\n credentials: credentialsAndIdentityId?.credentials,\n identityId: credentialsAndIdentityId?.identityId,\n userSub,\n };\n }\n async clearCredentials() {\n await this.authOptions?.credentialsProvider?.clearCredentialsAndIdentityId();\n }\n async getTokens(options) {\n return ((await this.authOptions?.tokenProvider?.getTokens(options)) ?? undefined);\n }\n}\n\nexport { AuthClass, isTokenExpired };\n//# sourceMappingURL=index.mjs.map\n","export * from \"./jsSha256\";\n//# sourceMappingURL=index.js.map","import { __awaiter, __generator } from \"tslib\";\nimport { BLOCK_SIZE } from \"./constants\";\nimport { RawSha256 } from \"./RawSha256\";\nimport { isEmptyData, convertToBuffer } from \"@aws-crypto/util\";\nvar Sha256 = /** @class */ (function () {\n function Sha256(secret) {\n this.secret = secret;\n this.hash = new RawSha256();\n this.reset();\n }\n Sha256.prototype.update = function (toHash) {\n if (isEmptyData(toHash) || this.error) {\n return;\n }\n try {\n this.hash.update(convertToBuffer(toHash));\n }\n catch (e) {\n this.error = e;\n }\n };\n /* This synchronous method keeps compatibility\n * with the v2 aws-sdk.\n */\n Sha256.prototype.digestSync = function () {\n if (this.error) {\n throw this.error;\n }\n if (this.outer) {\n if (!this.outer.finished) {\n this.outer.update(this.hash.digest());\n }\n return this.outer.digest();\n }\n return this.hash.digest();\n };\n /* The underlying digest method here is synchronous.\n * To keep the same interface with the other hash functions\n * the default is to expose this as an async method.\n * However, it can sometimes be useful to have a sync method.\n */\n Sha256.prototype.digest = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.digestSync()];\n });\n });\n };\n Sha256.prototype.reset = function () {\n this.hash = new RawSha256();\n if (this.secret) {\n this.outer = new RawSha256();\n var inner = bufferFromSecret(this.secret);\n var outer = new Uint8Array(BLOCK_SIZE);\n outer.set(inner);\n for (var i = 0; i < BLOCK_SIZE; i++) {\n inner[i] ^= 0x36;\n outer[i] ^= 0x5c;\n }\n this.hash.update(inner);\n this.outer.update(outer);\n // overwrite the copied key in memory\n for (var i = 0; i < inner.byteLength; i++) {\n inner[i] = 0;\n }\n }\n };\n return Sha256;\n}());\nexport { Sha256 };\nfunction bufferFromSecret(secret) {\n var input = convertToBuffer(secret);\n if (input.byteLength > BLOCK_SIZE) {\n var bufferHash = new RawSha256();\n bufferHash.update(input);\n input = bufferHash.digest();\n }\n var buffer = new Uint8Array(BLOCK_SIZE);\n buffer.set(input);\n return buffer;\n}\n//# sourceMappingURL=jsSha256.js.map","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","/**\n * @internal\n */\nexport var BLOCK_SIZE = 64;\n/**\n * @internal\n */\nexport var DIGEST_LENGTH = 32;\n/**\n * @internal\n */\nexport var KEY = new Uint32Array([\n 0x428a2f98,\n 0x71374491,\n 0xb5c0fbcf,\n 0xe9b5dba5,\n 0x3956c25b,\n 0x59f111f1,\n 0x923f82a4,\n 0xab1c5ed5,\n 0xd807aa98,\n 0x12835b01,\n 0x243185be,\n 0x550c7dc3,\n 0x72be5d74,\n 0x80deb1fe,\n 0x9bdc06a7,\n 0xc19bf174,\n 0xe49b69c1,\n 0xefbe4786,\n 0x0fc19dc6,\n 0x240ca1cc,\n 0x2de92c6f,\n 0x4a7484aa,\n 0x5cb0a9dc,\n 0x76f988da,\n 0x983e5152,\n 0xa831c66d,\n 0xb00327c8,\n 0xbf597fc7,\n 0xc6e00bf3,\n 0xd5a79147,\n 0x06ca6351,\n 0x14292967,\n 0x27b70a85,\n 0x2e1b2138,\n 0x4d2c6dfc,\n 0x53380d13,\n 0x650a7354,\n 0x766a0abb,\n 0x81c2c92e,\n 0x92722c85,\n 0xa2bfe8a1,\n 0xa81a664b,\n 0xc24b8b70,\n 0xc76c51a3,\n 0xd192e819,\n 0xd6990624,\n 0xf40e3585,\n 0x106aa070,\n 0x19a4c116,\n 0x1e376c08,\n 0x2748774c,\n 0x34b0bcb5,\n 0x391c0cb3,\n 0x4ed8aa4a,\n 0x5b9cca4f,\n 0x682e6ff3,\n 0x748f82ee,\n 0x78a5636f,\n 0x84c87814,\n 0x8cc70208,\n 0x90befffa,\n 0xa4506ceb,\n 0xbef9a3f7,\n 0xc67178f2\n]);\n/**\n * @internal\n */\nexport var INIT = [\n 0x6a09e667,\n 0xbb67ae85,\n 0x3c6ef372,\n 0xa54ff53a,\n 0x510e527f,\n 0x9b05688c,\n 0x1f83d9ab,\n 0x5be0cd19\n];\n/**\n * @internal\n */\nexport var MAX_HASHABLE_LENGTH = Math.pow(2, 53) - 1;\n//# sourceMappingURL=constants.js.map","import { BLOCK_SIZE, DIGEST_LENGTH, INIT, KEY, MAX_HASHABLE_LENGTH } from \"./constants\";\n/**\n * @internal\n */\nvar RawSha256 = /** @class */ (function () {\n function RawSha256() {\n this.state = Int32Array.from(INIT);\n this.temp = new Int32Array(64);\n this.buffer = new Uint8Array(64);\n this.bufferLength = 0;\n this.bytesHashed = 0;\n /**\n * @internal\n */\n this.finished = false;\n }\n RawSha256.prototype.update = function (data) {\n if (this.finished) {\n throw new Error(\"Attempted to update an already finished hash.\");\n }\n var position = 0;\n var byteLength = data.byteLength;\n this.bytesHashed += byteLength;\n if (this.bytesHashed * 8 > MAX_HASHABLE_LENGTH) {\n throw new Error(\"Cannot hash more than 2^53 - 1 bits\");\n }\n while (byteLength > 0) {\n this.buffer[this.bufferLength++] = data[position++];\n byteLength--;\n if (this.bufferLength === BLOCK_SIZE) {\n this.hashBuffer();\n this.bufferLength = 0;\n }\n }\n };\n RawSha256.prototype.digest = function () {\n if (!this.finished) {\n var bitsHashed = this.bytesHashed * 8;\n var bufferView = new DataView(this.buffer.buffer, this.buffer.byteOffset, this.buffer.byteLength);\n var undecoratedLength = this.bufferLength;\n bufferView.setUint8(this.bufferLength++, 0x80);\n // Ensure the final block has enough room for the hashed length\n if (undecoratedLength % BLOCK_SIZE >= BLOCK_SIZE - 8) {\n for (var i = this.bufferLength; i < BLOCK_SIZE; i++) {\n bufferView.setUint8(i, 0);\n }\n this.hashBuffer();\n this.bufferLength = 0;\n }\n for (var i = this.bufferLength; i < BLOCK_SIZE - 8; i++) {\n bufferView.setUint8(i, 0);\n }\n bufferView.setUint32(BLOCK_SIZE - 8, Math.floor(bitsHashed / 0x100000000), true);\n bufferView.setUint32(BLOCK_SIZE - 4, bitsHashed);\n this.hashBuffer();\n this.finished = true;\n }\n // The value in state is little-endian rather than big-endian, so flip\n // each word into a new Uint8Array\n var out = new Uint8Array(DIGEST_LENGTH);\n for (var i = 0; i < 8; i++) {\n out[i * 4] = (this.state[i] >>> 24) & 0xff;\n out[i * 4 + 1] = (this.state[i] >>> 16) & 0xff;\n out[i * 4 + 2] = (this.state[i] >>> 8) & 0xff;\n out[i * 4 + 3] = (this.state[i] >>> 0) & 0xff;\n }\n return out;\n };\n RawSha256.prototype.hashBuffer = function () {\n var _a = this, buffer = _a.buffer, state = _a.state;\n var state0 = state[0], state1 = state[1], state2 = state[2], state3 = state[3], state4 = state[4], state5 = state[5], state6 = state[6], state7 = state[7];\n for (var i = 0; i < BLOCK_SIZE; i++) {\n if (i < 16) {\n this.temp[i] =\n ((buffer[i * 4] & 0xff) << 24) |\n ((buffer[i * 4 + 1] & 0xff) << 16) |\n ((buffer[i * 4 + 2] & 0xff) << 8) |\n (buffer[i * 4 + 3] & 0xff);\n }\n else {\n var u = this.temp[i - 2];\n var t1_1 = ((u >>> 17) | (u << 15)) ^ ((u >>> 19) | (u << 13)) ^ (u >>> 10);\n u = this.temp[i - 15];\n var t2_1 = ((u >>> 7) | (u << 25)) ^ ((u >>> 18) | (u << 14)) ^ (u >>> 3);\n this.temp[i] =\n ((t1_1 + this.temp[i - 7]) | 0) + ((t2_1 + this.temp[i - 16]) | 0);\n }\n var t1 = ((((((state4 >>> 6) | (state4 << 26)) ^\n ((state4 >>> 11) | (state4 << 21)) ^\n ((state4 >>> 25) | (state4 << 7))) +\n ((state4 & state5) ^ (~state4 & state6))) |\n 0) +\n ((state7 + ((KEY[i] + this.temp[i]) | 0)) | 0)) |\n 0;\n var t2 = ((((state0 >>> 2) | (state0 << 30)) ^\n ((state0 >>> 13) | (state0 << 19)) ^\n ((state0 >>> 22) | (state0 << 10))) +\n ((state0 & state1) ^ (state0 & state2) ^ (state1 & state2))) |\n 0;\n state7 = state6;\n state6 = state5;\n state5 = state4;\n state4 = (state3 + t1) | 0;\n state3 = state2;\n state2 = state1;\n state1 = state0;\n state0 = (t1 + t2) | 0;\n }\n state[0] += state0;\n state[1] += state1;\n state[2] += state2;\n state[3] += state3;\n state[4] += state4;\n state[5] += state5;\n state[6] += state6;\n state[7] += state7;\n };\n return RawSha256;\n}());\nexport { RawSha256 };\n//# sourceMappingURL=RawSha256.js.map","// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport { convertToBuffer } from \"./convertToBuffer\";\nexport { isEmptyData } from \"./isEmptyData\";\nexport { numToUint8 } from \"./numToUint8\";\nexport { uint32ArrayFrom } from './uint32ArrayFrom';\n//# sourceMappingURL=index.js.map","// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { fromUtf8 as fromUtf8Browser } from \"@smithy/util-utf8\";\n// Quick polyfill\nvar fromUtf8 = typeof Buffer !== \"undefined\" && Buffer.from\n ? function (input) { return Buffer.from(input, \"utf8\"); }\n : fromUtf8Browser;\nexport function convertToBuffer(data) {\n // Already a Uint8, do nothing\n if (data instanceof Uint8Array)\n return data;\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n}\n//# sourceMappingURL=convertToBuffer.js.map","export * from \"./fromUtf8\";\nexport * from \"./toUint8Array\";\nexport * from \"./toUtf8\";\n","export const fromUtf8 = (input) => new TextEncoder().encode(input);\n","import { fromUtf8 } from \"./fromUtf8\";\nexport const toUint8Array = (data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n};\n","export const toUtf8 = (input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return new TextDecoder(\"utf-8\").decode(input);\n};\n","// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport function isEmptyData(data) {\n if (typeof data === \"string\") {\n return data.length === 0;\n }\n return data.byteLength === 0;\n}\n//# sourceMappingURL=isEmptyData.js.map","// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport function numToUint8(num) {\n return new Uint8Array([\n (num & 0xff000000) >> 24,\n (num & 0x00ff0000) >> 16,\n (num & 0x0000ff00) >> 8,\n num & 0x000000ff,\n ]);\n}\n//# sourceMappingURL=numToUint8.js.map","// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// IE 11 does not support Array.from, so we do it manually\nexport function uint32ArrayFrom(a_lookUpTable) {\n if (!Uint32Array.from) {\n var return_array = new Uint32Array(a_lookUpTable.length);\n var a_index = 0;\n while (a_index < a_lookUpTable.length) {\n return_array[a_index] = a_lookUpTable[a_index];\n a_index += 1;\n }\n return return_array;\n }\n return Uint32Array.from(a_lookUpTable);\n}\n//# sourceMappingURL=uint32ArrayFrom.js.map","const SHORT_TO_HEX = {};\nconst HEX_TO_SHORT = {};\nfor (let i = 0; i < 256; i++) {\n let encodedByte = i.toString(16).toLowerCase();\n if (encodedByte.length === 1) {\n encodedByte = `0${encodedByte}`;\n }\n SHORT_TO_HEX[i] = encodedByte;\n HEX_TO_SHORT[encodedByte] = i;\n}\nexport function fromHex(encoded) {\n if (encoded.length % 2 !== 0) {\n throw new Error(\"Hex encoded strings must have an even number length\");\n }\n const out = new Uint8Array(encoded.length / 2);\n for (let i = 0; i < encoded.length; i += 2) {\n const encodedByte = encoded.slice(i, i + 2).toLowerCase();\n if (encodedByte in HEX_TO_SHORT) {\n out[i / 2] = HEX_TO_SHORT[encodedByte];\n }\n else {\n throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);\n }\n }\n return out;\n}\nexport function toHex(bytes) {\n let out = \"\";\n for (let i = 0; i < bytes.byteLength; i++) {\n out += SHORT_TO_HEX[bytes[i]];\n }\n return out;\n}\n","import { Framework } from './types.mjs';\nimport { version } from './version.mjs';\nimport { detectFramework, observeFrameworkChanges } from './detectFramework.mjs';\nimport { getCustomUserAgent } from './customUserAgent.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst BASE_USER_AGENT = `aws-amplify`;\n/** Sanitize Amplify version string be removing special character + and character post the special character */\nconst sanitizeAmplifyVersion = (amplifyVersion) => amplifyVersion.replace(/\\+.*/, '');\nclass PlatformBuilder {\n constructor() {\n this.userAgent = `${BASE_USER_AGENT}/${sanitizeAmplifyVersion(version)}`;\n }\n get framework() {\n return detectFramework();\n }\n get isReactNative() {\n return (this.framework === Framework.ReactNative ||\n this.framework === Framework.Expo);\n }\n observeFrameworkChanges(fcn) {\n observeFrameworkChanges(fcn);\n }\n}\nconst Platform = new PlatformBuilder();\nconst getAmplifyUserAgentObject = ({ category, action, } = {}) => {\n const userAgent = [\n [BASE_USER_AGENT, sanitizeAmplifyVersion(version)],\n ];\n if (category) {\n userAgent.push([category, action]);\n }\n userAgent.push(['framework', detectFramework()]);\n if (category && action) {\n const customState = getCustomUserAgent(category, action);\n if (customState) {\n customState.forEach(state => {\n userAgent.push(state);\n });\n }\n }\n return userAgent;\n};\nconst getAmplifyUserAgent = (customUserAgentDetails) => {\n const userAgent = getAmplifyUserAgentObject(customUserAgentDetails);\n const userAgentString = userAgent\n .map(([agentKey, agentValue]) => agentKey && agentValue ? `${agentKey}/${agentValue}` : agentKey)\n .join(' ');\n return userAgentString;\n};\n\nexport { Platform, getAmplifyUserAgent, getAmplifyUserAgentObject, sanitizeAmplifyVersion };\n//# sourceMappingURL=index.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar Framework;\n(function (Framework) {\n // < 100 - Web frameworks\n Framework[\"WebUnknown\"] = \"0\";\n Framework[\"React\"] = \"1\";\n Framework[\"NextJs\"] = \"2\";\n Framework[\"Angular\"] = \"3\";\n Framework[\"VueJs\"] = \"4\";\n Framework[\"Nuxt\"] = \"5\";\n Framework[\"Svelte\"] = \"6\";\n // 100s - Server side frameworks\n Framework[\"ServerSideUnknown\"] = \"100\";\n Framework[\"ReactSSR\"] = \"101\";\n Framework[\"NextJsSSR\"] = \"102\";\n Framework[\"AngularSSR\"] = \"103\";\n Framework[\"VueJsSSR\"] = \"104\";\n Framework[\"NuxtSSR\"] = \"105\";\n Framework[\"SvelteSSR\"] = \"106\";\n // 200s - Mobile framework\n Framework[\"ReactNative\"] = \"201\";\n Framework[\"Expo\"] = \"202\";\n})(Framework || (Framework = {}));\nvar Category;\n(function (Category) {\n Category[\"AI\"] = \"ai\";\n Category[\"API\"] = \"api\";\n Category[\"Auth\"] = \"auth\";\n Category[\"Analytics\"] = \"analytics\";\n Category[\"DataStore\"] = \"datastore\";\n Category[\"Geo\"] = \"geo\";\n Category[\"InAppMessaging\"] = \"inappmessaging\";\n Category[\"Interactions\"] = \"interactions\";\n Category[\"Predictions\"] = \"predictions\";\n Category[\"PubSub\"] = \"pubsub\";\n Category[\"PushNotification\"] = \"pushnotification\";\n Category[\"Storage\"] = \"storage\";\n})(Category || (Category = {}));\nvar AiAction;\n(function (AiAction) {\n AiAction[\"CreateConversation\"] = \"1\";\n AiAction[\"GetConversation\"] = \"2\";\n AiAction[\"ListConversations\"] = \"3\";\n AiAction[\"DeleteConversation\"] = \"4\";\n AiAction[\"SendMessage\"] = \"5\";\n AiAction[\"ListMessages\"] = \"6\";\n AiAction[\"OnMessage\"] = \"7\";\n AiAction[\"Generation\"] = \"8\";\n AiAction[\"UpdateConversation\"] = \"9\";\n})(AiAction || (AiAction = {}));\nvar AnalyticsAction;\n(function (AnalyticsAction) {\n AnalyticsAction[\"Record\"] = \"1\";\n AnalyticsAction[\"IdentifyUser\"] = \"2\";\n})(AnalyticsAction || (AnalyticsAction = {}));\nvar ApiAction;\n(function (ApiAction) {\n ApiAction[\"GraphQl\"] = \"1\";\n ApiAction[\"Get\"] = \"2\";\n ApiAction[\"Post\"] = \"3\";\n ApiAction[\"Put\"] = \"4\";\n ApiAction[\"Patch\"] = \"5\";\n ApiAction[\"Del\"] = \"6\";\n ApiAction[\"Head\"] = \"7\";\n})(ApiAction || (ApiAction = {}));\nvar AuthAction;\n(function (AuthAction) {\n AuthAction[\"SignUp\"] = \"1\";\n AuthAction[\"ConfirmSignUp\"] = \"2\";\n AuthAction[\"ResendSignUpCode\"] = \"3\";\n AuthAction[\"SignIn\"] = \"4\";\n AuthAction[\"FetchMFAPreference\"] = \"6\";\n AuthAction[\"UpdateMFAPreference\"] = \"7\";\n AuthAction[\"SetUpTOTP\"] = \"10\";\n AuthAction[\"VerifyTOTPSetup\"] = \"11\";\n AuthAction[\"ConfirmSignIn\"] = \"12\";\n AuthAction[\"DeleteUserAttributes\"] = \"15\";\n AuthAction[\"DeleteUser\"] = \"16\";\n AuthAction[\"UpdateUserAttributes\"] = \"17\";\n AuthAction[\"FetchUserAttributes\"] = \"18\";\n AuthAction[\"ConfirmUserAttribute\"] = \"22\";\n AuthAction[\"SignOut\"] = \"26\";\n AuthAction[\"UpdatePassword\"] = \"27\";\n AuthAction[\"ResetPassword\"] = \"28\";\n AuthAction[\"ConfirmResetPassword\"] = \"29\";\n AuthAction[\"FederatedSignIn\"] = \"30\";\n AuthAction[\"RememberDevice\"] = \"32\";\n AuthAction[\"ForgetDevice\"] = \"33\";\n AuthAction[\"FetchDevices\"] = \"34\";\n AuthAction[\"SendUserAttributeVerificationCode\"] = \"35\";\n AuthAction[\"SignInWithRedirect\"] = \"36\";\n AuthAction[\"StartWebAuthnRegistration\"] = \"37\";\n AuthAction[\"CompleteWebAuthnRegistration\"] = \"38\";\n AuthAction[\"ListWebAuthnCredentials\"] = \"39\";\n AuthAction[\"DeleteWebAuthnCredential\"] = \"40\";\n})(AuthAction || (AuthAction = {}));\nvar DataStoreAction;\n(function (DataStoreAction) {\n DataStoreAction[\"Subscribe\"] = \"1\";\n DataStoreAction[\"GraphQl\"] = \"2\";\n})(DataStoreAction || (DataStoreAction = {}));\nvar GeoAction;\n(function (GeoAction) {\n GeoAction[\"SearchByText\"] = \"0\";\n GeoAction[\"SearchByCoordinates\"] = \"1\";\n GeoAction[\"SearchForSuggestions\"] = \"2\";\n GeoAction[\"SearchByPlaceId\"] = \"3\";\n GeoAction[\"SaveGeofences\"] = \"4\";\n GeoAction[\"GetGeofence\"] = \"5\";\n GeoAction[\"ListGeofences\"] = \"6\";\n GeoAction[\"DeleteGeofences\"] = \"7\";\n})(GeoAction || (GeoAction = {}));\nvar InAppMessagingAction;\n(function (InAppMessagingAction) {\n InAppMessagingAction[\"SyncMessages\"] = \"1\";\n InAppMessagingAction[\"IdentifyUser\"] = \"2\";\n InAppMessagingAction[\"NotifyMessageInteraction\"] = \"3\";\n})(InAppMessagingAction || (InAppMessagingAction = {}));\nvar InteractionsAction;\n(function (InteractionsAction) {\n InteractionsAction[\"None\"] = \"0\";\n})(InteractionsAction || (InteractionsAction = {}));\nvar PredictionsAction;\n(function (PredictionsAction) {\n PredictionsAction[\"Convert\"] = \"1\";\n PredictionsAction[\"Identify\"] = \"2\";\n PredictionsAction[\"Interpret\"] = \"3\";\n})(PredictionsAction || (PredictionsAction = {}));\nvar PubSubAction;\n(function (PubSubAction) {\n PubSubAction[\"Subscribe\"] = \"1\";\n})(PubSubAction || (PubSubAction = {}));\nvar PushNotificationAction;\n(function (PushNotificationAction) {\n PushNotificationAction[\"InitializePushNotifications\"] = \"1\";\n PushNotificationAction[\"IdentifyUser\"] = \"2\";\n})(PushNotificationAction || (PushNotificationAction = {}));\nvar StorageAction;\n(function (StorageAction) {\n StorageAction[\"UploadData\"] = \"1\";\n StorageAction[\"DownloadData\"] = \"2\";\n StorageAction[\"List\"] = \"3\";\n StorageAction[\"Copy\"] = \"4\";\n StorageAction[\"Remove\"] = \"5\";\n StorageAction[\"GetProperties\"] = \"6\";\n StorageAction[\"GetUrl\"] = \"7\";\n StorageAction[\"GetDataAccess\"] = \"8\";\n StorageAction[\"ListCallerAccessGrants\"] = \"9\";\n})(StorageAction || (StorageAction = {}));\n\nexport { AiAction, AnalyticsAction, ApiAction, AuthAction, Category, DataStoreAction, Framework, GeoAction, InAppMessagingAction, InteractionsAction, PredictionsAction, PubSubAction, PushNotificationAction, StorageAction };\n//# sourceMappingURL=types.mjs.map\n","// generated by genversion\nconst version = '6.10.3';\n\nexport { version };\n//# sourceMappingURL=version.mjs.map\n","import { Framework } from './types.mjs';\nimport { detect } from './detection/index.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// We want to cache detection since the framework won't change\nlet frameworkCache;\nconst frameworkChangeObservers = [];\n// Setup the detection reset tracking / timeout delays\nlet resetTriggered = false;\nconst SSR_RESET_TIMEOUT = 10; // ms\nconst WEB_RESET_TIMEOUT = 10; // ms\nconst PRIME_FRAMEWORK_DELAY = 1000; // ms\nconst detectFramework = () => {\n if (!frameworkCache) {\n frameworkCache = detect();\n if (resetTriggered) {\n // The final run of detectFramework:\n // Starting from this point, the `frameworkCache` becomes \"final\".\n // So we don't need to notify the observers again so the observer\n // can be removed after the final notice.\n while (frameworkChangeObservers.length) {\n frameworkChangeObservers.pop()?.();\n }\n }\n else {\n // The first run of detectFramework:\n // Every time we update the cache, call each observer function\n frameworkChangeObservers.forEach(fcn => {\n fcn();\n });\n }\n // Retry once for either Unknown type after a delay (explained below)\n resetTimeout(Framework.ServerSideUnknown, SSR_RESET_TIMEOUT);\n resetTimeout(Framework.WebUnknown, WEB_RESET_TIMEOUT);\n }\n return frameworkCache;\n};\n/**\n * @internal Setup observer callback that will be called everytime the framework changes\n */\nconst observeFrameworkChanges = (fcn) => {\n // When the `frameworkCache` won't be updated again, we ignore all incoming\n // observers.\n if (resetTriggered) {\n return;\n }\n frameworkChangeObservers.push(fcn);\n};\nfunction clearCache() {\n frameworkCache = undefined;\n}\n// For a framework type and a delay amount, setup the event to re-detect\n// During the runtime boot, it is possible that framework detection will\n// be triggered before the framework has made modifications to the\n// global/window/etc needed for detection. When no framework is detected\n// we will reset and try again to ensure we don't use a cached\n// non-framework detection result for all requests.\nfunction resetTimeout(framework, delay) {\n if (frameworkCache === framework && !resetTriggered) {\n setTimeout(() => {\n clearCache();\n resetTriggered = true;\n setTimeout(detectFramework, PRIME_FRAMEWORK_DELAY);\n }, delay);\n }\n}\n\nexport { clearCache, detectFramework, frameworkChangeObservers, observeFrameworkChanges };\n//# sourceMappingURL=detectFramework.mjs.map\n","import { Framework } from '../types.mjs';\nimport { reactWebDetect, reactSSRDetect } from './React.mjs';\nimport { vueWebDetect, vueSSRDetect } from './Vue.mjs';\nimport { svelteWebDetect, svelteSSRDetect } from './Svelte.mjs';\nimport { nextWebDetect, nextSSRDetect } from './Next.mjs';\nimport { nuxtWebDetect, nuxtSSRDetect } from './Nuxt.mjs';\nimport { angularWebDetect, angularSSRDetect } from './Angular.mjs';\nimport { reactNativeDetect } from './ReactNative.mjs';\nimport { expoDetect } from './Expo.mjs';\nimport { webDetect } from './Web.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// These are in the order of detection where when both are detectable, the early Framework will be reported\nconst detectionMap = [\n // First, detect mobile\n { platform: Framework.Expo, detectionMethod: expoDetect },\n { platform: Framework.ReactNative, detectionMethod: reactNativeDetect },\n // Next, detect web frameworks\n { platform: Framework.NextJs, detectionMethod: nextWebDetect },\n { platform: Framework.Nuxt, detectionMethod: nuxtWebDetect },\n { platform: Framework.Angular, detectionMethod: angularWebDetect },\n { platform: Framework.React, detectionMethod: reactWebDetect },\n { platform: Framework.VueJs, detectionMethod: vueWebDetect },\n { platform: Framework.Svelte, detectionMethod: svelteWebDetect },\n { platform: Framework.WebUnknown, detectionMethod: webDetect },\n // Last, detect ssr frameworks\n { platform: Framework.NextJsSSR, detectionMethod: nextSSRDetect },\n { platform: Framework.NuxtSSR, detectionMethod: nuxtSSRDetect },\n { platform: Framework.ReactSSR, detectionMethod: reactSSRDetect },\n { platform: Framework.VueJsSSR, detectionMethod: vueSSRDetect },\n { platform: Framework.AngularSSR, detectionMethod: angularSSRDetect },\n { platform: Framework.SvelteSSR, detectionMethod: svelteSSRDetect },\n];\nfunction detect() {\n return (detectionMap.find(detectionEntry => detectionEntry.detectionMethod())\n ?.platform || Framework.ServerSideUnknown);\n}\n\nexport { detect };\n//# sourceMappingURL=index.mjs.map\n","import { documentExists, processExists } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with react 18.2 - built using Vite\nfunction reactWebDetect() {\n const elementKeyPrefixedWithReact = (key) => {\n return key.startsWith('_react') || key.startsWith('__react');\n };\n const elementIsReactEnabled = (element) => {\n return Object.keys(element).find(elementKeyPrefixedWithReact);\n };\n const allElementsWithId = () => Array.from(document.querySelectorAll('[id]'));\n return documentExists() && allElementsWithId().some(elementIsReactEnabled);\n}\nfunction reactSSRDetect() {\n return (processExists() &&\n typeof process.env !== 'undefined' &&\n !!Object.keys(process.env).find(key => key.includes('react')));\n}\n// use the some\n\nexport { reactSSRDetect, reactWebDetect };\n//# sourceMappingURL=React.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst globalExists = () => {\n return typeof global !== 'undefined';\n};\nconst globalThisExists = () => {\n return typeof globalThis !== 'undefined';\n};\nconst windowExists = () => {\n return typeof window !== 'undefined';\n};\nconst documentExists = () => {\n return typeof document !== 'undefined';\n};\nconst processExists = () => {\n return typeof process !== 'undefined';\n};\nconst keyPrefixMatch = (object, prefix) => {\n return !!Object.keys(object).find(key => key.startsWith(prefix));\n};\n\nexport { documentExists, globalExists, globalThisExists, keyPrefixMatch, processExists, windowExists };\n//# sourceMappingURL=helpers.mjs.map\n","import { windowExists, keyPrefixMatch, globalExists } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with vue 3.3.2\nfunction vueWebDetect() {\n return windowExists() && keyPrefixMatch(window, '__VUE');\n}\nfunction vueSSRDetect() {\n return globalExists() && keyPrefixMatch(global, '__VUE');\n}\n\nexport { vueSSRDetect, vueWebDetect };\n//# sourceMappingURL=Vue.mjs.map\n","import { windowExists, keyPrefixMatch, processExists } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with svelte 3.59\nfunction svelteWebDetect() {\n return windowExists() && keyPrefixMatch(window, '__SVELTE');\n}\nfunction svelteSSRDetect() {\n return (processExists() &&\n typeof process.env !== 'undefined' &&\n !!Object.keys(process.env).find(key => key.includes('svelte')));\n}\n\nexport { svelteSSRDetect, svelteWebDetect };\n//# sourceMappingURL=Svelte.mjs.map\n","import { windowExists, globalExists, keyPrefixMatch } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with next 13.4 / react 18.2\nfunction nextWebDetect() {\n return (windowExists() &&\n window.next &&\n typeof window.next === 'object');\n}\nfunction nextSSRDetect() {\n return (globalExists() &&\n (keyPrefixMatch(global, '__next') || keyPrefixMatch(global, '__NEXT')));\n}\n\nexport { nextSSRDetect, nextWebDetect };\n//# sourceMappingURL=Next.mjs.map\n","import { windowExists, globalExists } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with nuxt 2.15 / vue 2.7\nfunction nuxtWebDetect() {\n return (windowExists() &&\n (window.__NUXT__ !== undefined ||\n window.$nuxt !== undefined));\n}\nfunction nuxtSSRDetect() {\n return (globalExists() && typeof global.__NUXT_PATHS__ !== 'undefined');\n}\n\nexport { nuxtSSRDetect, nuxtWebDetect };\n//# sourceMappingURL=Nuxt.mjs.map\n","import { documentExists, processExists, windowExists } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with @angular/core 16.0.0\nfunction angularWebDetect() {\n const angularVersionSetInDocument = Boolean(documentExists() && document.querySelector('[ng-version]'));\n const angularContentSetInWindow = Boolean(windowExists() && typeof window.ng !== 'undefined');\n return angularVersionSetInDocument || angularContentSetInWindow;\n}\nfunction angularSSRDetect() {\n return ((processExists() &&\n typeof process.env === 'object' &&\n process.env.npm_lifecycle_script?.startsWith('ng ')) ||\n false);\n}\n\nexport { angularSSRDetect, angularWebDetect };\n//# sourceMappingURL=Angular.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with react-native 0.17.7\nfunction reactNativeDetect() {\n return (typeof navigator !== 'undefined' &&\n typeof navigator.product !== 'undefined' &&\n navigator.product === 'ReactNative');\n}\n\nexport { reactNativeDetect };\n//# sourceMappingURL=ReactNative.mjs.map\n","import { globalExists } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Tested with expo 48 / react-native 0.71.3\nfunction expoDetect() {\n return globalExists() && typeof global.expo !== 'undefined';\n}\n\nexport { expoDetect };\n//# sourceMappingURL=Expo.mjs.map\n","import { windowExists } from './helpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction webDetect() {\n return windowExists();\n}\n\nexport { webDetect };\n//# sourceMappingURL=Web.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Maintains custom user-agent state set by external consumers.\nconst customUserAgentState = {};\n/**\n * Sets custom user agent state which will be appended to applicable requests. Returns a function that can be used to\n * clean up any custom state set with this API.\n *\n * @note\n * This API operates globally. Calling this API multiple times will result in the most recently set values for a\n * particular API being used.\n *\n * @note\n * This utility IS NOT compatible with SSR.\n *\n * @param input - SetCustomUserAgentInput that defines custom state to apply to the specified APIs.\n */\nconst setCustomUserAgent = (input) => {\n // Save custom user-agent state & increment reference counter\n // TODO Remove `any` when we upgrade to TypeScript 5.2, see: https://github.com/microsoft/TypeScript/issues/44373\n customUserAgentState[input.category] = input.apis.reduce((acc, api) => ({\n ...acc,\n [api]: {\n refCount: acc[api]?.refCount ? acc[api].refCount + 1 : 1,\n additionalDetails: input.additionalDetails,\n },\n }), customUserAgentState[input.category] ?? {});\n // Callback that cleans up state for APIs recorded by this call\n let cleanUpCallbackCalled = false;\n const cleanUpCallback = () => {\n // Only allow the cleanup callback to be called once\n if (cleanUpCallbackCalled) {\n return;\n }\n cleanUpCallbackCalled = true;\n input.apis.forEach(api => {\n const apiRefCount = customUserAgentState[input.category][api].refCount;\n if (apiRefCount > 1) {\n customUserAgentState[input.category][api].refCount = apiRefCount - 1;\n }\n else {\n delete customUserAgentState[input.category][api];\n // Clean up category if no more APIs set\n if (!Object.keys(customUserAgentState[input.category]).length) {\n delete customUserAgentState[input.category];\n }\n }\n });\n };\n return cleanUpCallback;\n};\nconst getCustomUserAgent = (category, api) => customUserAgentState[category]?.[api]?.additionalDetails;\n\nexport { getCustomUserAgent, setCustomUserAgent };\n//# sourceMappingURL=customUserAgent.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * All possible states a `BackgroundProcessManager` instance can be in.\n */\nvar BackgroundProcessManagerState;\n(function (BackgroundProcessManagerState) {\n /**\n * Accepting new jobs.\n */\n BackgroundProcessManagerState[\"Open\"] = \"Open\";\n /**\n * Not accepting new jobs. Waiting for submitted jobs to complete.\n */\n BackgroundProcessManagerState[\"Closing\"] = \"Closing\";\n /**\n * Not accepting new jobs. All submitted jobs are complete.\n */\n BackgroundProcessManagerState[\"Closed\"] = \"Closed\";\n})(BackgroundProcessManagerState || (BackgroundProcessManagerState = {}));\n\nexport { BackgroundProcessManagerState };\n//# sourceMappingURL=types.mjs.map\n","import { from, Observable } from 'rxjs';\nimport '../utils/getClientInfo/getClientInfo.mjs';\nimport { isWebWorker } from '../utils/isWebWorker.mjs';\nimport '../utils/retry/retry.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass Reachability {\n networkMonitor(_) {\n const globalObj = isWebWorker()\n ? self\n : typeof window !== 'undefined' && window;\n if (!globalObj) {\n return from([{ online: true }]);\n }\n return new Observable(observer => {\n observer.next({ online: globalObj.navigator.onLine });\n const notifyOnline = () => {\n observer.next({ online: true });\n };\n const notifyOffline = () => {\n observer.next({ online: false });\n };\n globalObj.addEventListener('online', notifyOnline);\n globalObj.addEventListener('offline', notifyOffline);\n Reachability._observers.push(observer);\n return () => {\n globalObj.removeEventListener('online', notifyOnline);\n globalObj.removeEventListener('offline', notifyOffline);\n Reachability._observers = Reachability._observers.filter(_observer => _observer !== observer);\n };\n });\n }\n // expose observers to simulate offline mode for integration testing\n static _observerOverride(status) {\n for (const observer of this._observers) {\n if (observer.closed) {\n this._observers = this._observers.filter(_observer => _observer !== observer);\n continue;\n }\n observer?.next && observer.next(status);\n }\n }\n}\nReachability._observers = [];\n\nexport { Reachability };\n//# sourceMappingURL=Reachability.mjs.map\n","export { Observable } from './internal/Observable';\nexport { ConnectableObservable } from './internal/observable/ConnectableObservable';\nexport { observable } from './internal/symbol/observable';\nexport { animationFrames } from './internal/observable/dom/animationFrames';\nexport { Subject } from './internal/Subject';\nexport { BehaviorSubject } from './internal/BehaviorSubject';\nexport { ReplaySubject } from './internal/ReplaySubject';\nexport { AsyncSubject } from './internal/AsyncSubject';\nexport { asap, asapScheduler } from './internal/scheduler/asap';\nexport { async, asyncScheduler } from './internal/scheduler/async';\nexport { queue, queueScheduler } from './internal/scheduler/queue';\nexport { animationFrame, animationFrameScheduler } from './internal/scheduler/animationFrame';\nexport { VirtualTimeScheduler, VirtualAction } from './internal/scheduler/VirtualTimeScheduler';\nexport { Scheduler } from './internal/Scheduler';\nexport { Subscription } from './internal/Subscription';\nexport { Subscriber } from './internal/Subscriber';\nexport { Notification, NotificationKind } from './internal/Notification';\nexport { pipe } from './internal/util/pipe';\nexport { noop } from './internal/util/noop';\nexport { identity } from './internal/util/identity';\nexport { isObservable } from './internal/util/isObservable';\nexport { lastValueFrom } from './internal/lastValueFrom';\nexport { firstValueFrom } from './internal/firstValueFrom';\nexport { ArgumentOutOfRangeError } from './internal/util/ArgumentOutOfRangeError';\nexport { EmptyError } from './internal/util/EmptyError';\nexport { NotFoundError } from './internal/util/NotFoundError';\nexport { ObjectUnsubscribedError } from './internal/util/ObjectUnsubscribedError';\nexport { SequenceError } from './internal/util/SequenceError';\nexport { TimeoutError } from './internal/operators/timeout';\nexport { UnsubscriptionError } from './internal/util/UnsubscriptionError';\nexport { bindCallback } from './internal/observable/bindCallback';\nexport { bindNodeCallback } from './internal/observable/bindNodeCallback';\nexport { combineLatest } from './internal/observable/combineLatest';\nexport { concat } from './internal/observable/concat';\nexport { connectable } from './internal/observable/connectable';\nexport { defer } from './internal/observable/defer';\nexport { empty } from './internal/observable/empty';\nexport { forkJoin } from './internal/observable/forkJoin';\nexport { from } from './internal/observable/from';\nexport { fromEvent } from './internal/observable/fromEvent';\nexport { fromEventPattern } from './internal/observable/fromEventPattern';\nexport { generate } from './internal/observable/generate';\nexport { iif } from './internal/observable/iif';\nexport { interval } from './internal/observable/interval';\nexport { merge } from './internal/observable/merge';\nexport { never } from './internal/observable/never';\nexport { of } from './internal/observable/of';\nexport { onErrorResumeNext } from './internal/observable/onErrorResumeNext';\nexport { pairs } from './internal/observable/pairs';\nexport { partition } from './internal/observable/partition';\nexport { race } from './internal/observable/race';\nexport { range } from './internal/observable/range';\nexport { throwError } from './internal/observable/throwError';\nexport { timer } from './internal/observable/timer';\nexport { using } from './internal/observable/using';\nexport { zip } from './internal/observable/zip';\nexport { scheduled } from './internal/scheduled/scheduled';\nexport { EMPTY } from './internal/observable/empty';\nexport { NEVER } from './internal/observable/never';\nexport * from './internal/types';\nexport { config } from './internal/config';\nexport { audit } from './internal/operators/audit';\nexport { auditTime } from './internal/operators/auditTime';\nexport { buffer } from './internal/operators/buffer';\nexport { bufferCount } from './internal/operators/bufferCount';\nexport { bufferTime } from './internal/operators/bufferTime';\nexport { bufferToggle } from './internal/operators/bufferToggle';\nexport { bufferWhen } from './internal/operators/bufferWhen';\nexport { catchError } from './internal/operators/catchError';\nexport { combineAll } from './internal/operators/combineAll';\nexport { combineLatestAll } from './internal/operators/combineLatestAll';\nexport { combineLatestWith } from './internal/operators/combineLatestWith';\nexport { concatAll } from './internal/operators/concatAll';\nexport { concatMap } from './internal/operators/concatMap';\nexport { concatMapTo } from './internal/operators/concatMapTo';\nexport { concatWith } from './internal/operators/concatWith';\nexport { connect } from './internal/operators/connect';\nexport { count } from './internal/operators/count';\nexport { debounce } from './internal/operators/debounce';\nexport { debounceTime } from './internal/operators/debounceTime';\nexport { defaultIfEmpty } from './internal/operators/defaultIfEmpty';\nexport { delay } from './internal/operators/delay';\nexport { delayWhen } from './internal/operators/delayWhen';\nexport { dematerialize } from './internal/operators/dematerialize';\nexport { distinct } from './internal/operators/distinct';\nexport { distinctUntilChanged } from './internal/operators/distinctUntilChanged';\nexport { distinctUntilKeyChanged } from './internal/operators/distinctUntilKeyChanged';\nexport { elementAt } from './internal/operators/elementAt';\nexport { endWith } from './internal/operators/endWith';\nexport { every } from './internal/operators/every';\nexport { exhaust } from './internal/operators/exhaust';\nexport { exhaustAll } from './internal/operators/exhaustAll';\nexport { exhaustMap } from './internal/operators/exhaustMap';\nexport { expand } from './internal/operators/expand';\nexport { filter } from './internal/operators/filter';\nexport { finalize } from './internal/operators/finalize';\nexport { find } from './internal/operators/find';\nexport { findIndex } from './internal/operators/findIndex';\nexport { first } from './internal/operators/first';\nexport { groupBy } from './internal/operators/groupBy';\nexport { ignoreElements } from './internal/operators/ignoreElements';\nexport { isEmpty } from './internal/operators/isEmpty';\nexport { last } from './internal/operators/last';\nexport { map } from './internal/operators/map';\nexport { mapTo } from './internal/operators/mapTo';\nexport { materialize } from './internal/operators/materialize';\nexport { max } from './internal/operators/max';\nexport { mergeAll } from './internal/operators/mergeAll';\nexport { flatMap } from './internal/operators/flatMap';\nexport { mergeMap } from './internal/operators/mergeMap';\nexport { mergeMapTo } from './internal/operators/mergeMapTo';\nexport { mergeScan } from './internal/operators/mergeScan';\nexport { mergeWith } from './internal/operators/mergeWith';\nexport { min } from './internal/operators/min';\nexport { multicast } from './internal/operators/multicast';\nexport { observeOn } from './internal/operators/observeOn';\nexport { onErrorResumeNextWith } from './internal/operators/onErrorResumeNextWith';\nexport { pairwise } from './internal/operators/pairwise';\nexport { pluck } from './internal/operators/pluck';\nexport { publish } from './internal/operators/publish';\nexport { publishBehavior } from './internal/operators/publishBehavior';\nexport { publishLast } from './internal/operators/publishLast';\nexport { publishReplay } from './internal/operators/publishReplay';\nexport { raceWith } from './internal/operators/raceWith';\nexport { reduce } from './internal/operators/reduce';\nexport { repeat } from './internal/operators/repeat';\nexport { repeatWhen } from './internal/operators/repeatWhen';\nexport { retry } from './internal/operators/retry';\nexport { retryWhen } from './internal/operators/retryWhen';\nexport { refCount } from './internal/operators/refCount';\nexport { sample } from './internal/operators/sample';\nexport { sampleTime } from './internal/operators/sampleTime';\nexport { scan } from './internal/operators/scan';\nexport { sequenceEqual } from './internal/operators/sequenceEqual';\nexport { share } from './internal/operators/share';\nexport { shareReplay } from './internal/operators/shareReplay';\nexport { single } from './internal/operators/single';\nexport { skip } from './internal/operators/skip';\nexport { skipLast } from './internal/operators/skipLast';\nexport { skipUntil } from './internal/operators/skipUntil';\nexport { skipWhile } from './internal/operators/skipWhile';\nexport { startWith } from './internal/operators/startWith';\nexport { subscribeOn } from './internal/operators/subscribeOn';\nexport { switchAll } from './internal/operators/switchAll';\nexport { switchMap } from './internal/operators/switchMap';\nexport { switchMapTo } from './internal/operators/switchMapTo';\nexport { switchScan } from './internal/operators/switchScan';\nexport { take } from './internal/operators/take';\nexport { takeLast } from './internal/operators/takeLast';\nexport { takeUntil } from './internal/operators/takeUntil';\nexport { takeWhile } from './internal/operators/takeWhile';\nexport { tap } from './internal/operators/tap';\nexport { throttle } from './internal/operators/throttle';\nexport { throttleTime } from './internal/operators/throttleTime';\nexport { throwIfEmpty } from './internal/operators/throwIfEmpty';\nexport { timeInterval } from './internal/operators/timeInterval';\nexport { timeout } from './internal/operators/timeout';\nexport { timeoutWith } from './internal/operators/timeoutWith';\nexport { timestamp } from './internal/operators/timestamp';\nexport { toArray } from './internal/operators/toArray';\nexport { window } from './internal/operators/window';\nexport { windowCount } from './internal/operators/windowCount';\nexport { windowTime } from './internal/operators/windowTime';\nexport { windowToggle } from './internal/operators/windowToggle';\nexport { windowWhen } from './internal/operators/windowWhen';\nexport { withLatestFrom } from './internal/operators/withLatestFrom';\nexport { zipAll } from './internal/operators/zipAll';\nexport { zipWith } from './internal/operators/zipWith';\n//# sourceMappingURL=index.js.map","import { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription } from './Subscription';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\nvar Observable = (function () {\n function Observable(subscribe) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n Observable.prototype.lift = function (operator) {\n var observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n };\n Observable.prototype.subscribe = function (observerOrNext, error, complete) {\n var _this = this;\n var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n errorContext(function () {\n var _a = _this, operator = _a.operator, source = _a.source;\n subscriber.add(operator\n ?\n operator.call(subscriber, source)\n : source\n ?\n _this._subscribe(subscriber)\n :\n _this._trySubscribe(subscriber));\n });\n return subscriber;\n };\n Observable.prototype._trySubscribe = function (sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n sink.error(err);\n }\n };\n Observable.prototype.forEach = function (next, promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var subscriber = new SafeSubscriber({\n next: function (value) {\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n _this.subscribe(subscriber);\n });\n };\n Observable.prototype._subscribe = function (subscriber) {\n var _a;\n return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);\n };\n Observable.prototype[Symbol_observable] = function () {\n return this;\n };\n Observable.prototype.pipe = function () {\n var operations = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n operations[_i] = arguments[_i];\n }\n return pipeFromArray(operations)(this);\n };\n Observable.prototype.toPromise = function (promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var value;\n _this.subscribe(function (x) { return (value = x); }, function (err) { return reject(err); }, function () { return resolve(value); });\n });\n };\n Observable.create = function (subscribe) {\n return new Observable(subscribe);\n };\n return Observable;\n}());\nexport { Observable };\nfunction getPromiseCtor(promiseCtor) {\n var _a;\n return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;\n}\nfunction isObserver(value) {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\nfunction isSubscriber(value) {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n//# sourceMappingURL=Observable.js.map","import { __extends } from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\nvar Subscriber = (function (_super) {\n __extends(Subscriber, _super);\n function Subscriber(destination) {\n var _this = _super.call(this) || this;\n _this.isStopped = false;\n if (destination) {\n _this.destination = destination;\n if (isSubscription(destination)) {\n destination.add(_this);\n }\n }\n else {\n _this.destination = EMPTY_OBSERVER;\n }\n return _this;\n }\n Subscriber.create = function (next, error, complete) {\n return new SafeSubscriber(next, error, complete);\n };\n Subscriber.prototype.next = function (value) {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n }\n else {\n this._next(value);\n }\n };\n Subscriber.prototype.error = function (err) {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n }\n else {\n this.isStopped = true;\n this._error(err);\n }\n };\n Subscriber.prototype.complete = function () {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n }\n else {\n this.isStopped = true;\n this._complete();\n }\n };\n Subscriber.prototype.unsubscribe = function () {\n if (!this.closed) {\n this.isStopped = true;\n _super.prototype.unsubscribe.call(this);\n this.destination = null;\n }\n };\n Subscriber.prototype._next = function (value) {\n this.destination.next(value);\n };\n Subscriber.prototype._error = function (err) {\n try {\n this.destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n };\n Subscriber.prototype._complete = function () {\n try {\n this.destination.complete();\n }\n finally {\n this.unsubscribe();\n }\n };\n return Subscriber;\n}(Subscription));\nexport { Subscriber };\nvar _bind = Function.prototype.bind;\nfunction bind(fn, thisArg) {\n return _bind.call(fn, thisArg);\n}\nvar ConsumerObserver = (function () {\n function ConsumerObserver(partialObserver) {\n this.partialObserver = partialObserver;\n }\n ConsumerObserver.prototype.next = function (value) {\n var partialObserver = this.partialObserver;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n };\n ConsumerObserver.prototype.error = function (err) {\n var partialObserver = this.partialObserver;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n else {\n handleUnhandledError(err);\n }\n };\n ConsumerObserver.prototype.complete = function () {\n var partialObserver = this.partialObserver;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n };\n return ConsumerObserver;\n}());\nvar SafeSubscriber = (function (_super) {\n __extends(SafeSubscriber, _super);\n function SafeSubscriber(observerOrNext, error, complete) {\n var _this = _super.call(this) || this;\n var partialObserver;\n if (isFunction(observerOrNext) || !observerOrNext) {\n partialObserver = {\n next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined),\n error: error !== null && error !== void 0 ? error : undefined,\n complete: complete !== null && complete !== void 0 ? complete : undefined,\n };\n }\n else {\n var context_1;\n if (_this && config.useDeprecatedNextContext) {\n context_1 = Object.create(observerOrNext);\n context_1.unsubscribe = function () { return _this.unsubscribe(); };\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context_1),\n error: observerOrNext.error && bind(observerOrNext.error, context_1),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context_1),\n };\n }\n else {\n partialObserver = observerOrNext;\n }\n }\n _this.destination = new ConsumerObserver(partialObserver);\n return _this;\n }\n return SafeSubscriber;\n}(Subscriber));\nexport { SafeSubscriber };\nfunction handleUnhandledError(error) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n }\n else {\n reportUnhandledError(error);\n }\n}\nfunction defaultErrorHandler(err) {\n throw err;\n}\nfunction handleStoppedNotification(notification, subscriber) {\n var onStoppedNotification = config.onStoppedNotification;\n onStoppedNotification && timeoutProvider.setTimeout(function () { return onStoppedNotification(notification, subscriber); });\n}\nexport var EMPTY_OBSERVER = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n//# sourceMappingURL=Subscriber.js.map","export function isFunction(value) {\n return typeof value === 'function';\n}\n//# sourceMappingURL=isFunction.js.map","import { __read, __spreadArray, __values } from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { arrRemove } from './util/arrRemove';\nvar Subscription = (function () {\n function Subscription(initialTeardown) {\n this.initialTeardown = initialTeardown;\n this.closed = false;\n this._parentage = null;\n this._finalizers = null;\n }\n Subscription.prototype.unsubscribe = function () {\n var e_1, _a, e_2, _b;\n var errors;\n if (!this.closed) {\n this.closed = true;\n var _parentage = this._parentage;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n try {\n for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {\n var parent_1 = _parentage_1_1.value;\n parent_1.remove(this);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n else {\n _parentage.remove(this);\n }\n }\n var initialFinalizer = this.initialTeardown;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n }\n catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n var _finalizers = this._finalizers;\n if (_finalizers) {\n this._finalizers = null;\n try {\n for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) {\n var finalizer = _finalizers_1_1.value;\n try {\n execFinalizer(finalizer);\n }\n catch (err) {\n errors = errors !== null && errors !== void 0 ? errors : [];\n if (err instanceof UnsubscriptionError) {\n errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors));\n }\n else {\n errors.push(err);\n }\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n };\n Subscription.prototype.add = function (teardown) {\n var _a;\n if (teardown && teardown !== this) {\n if (this.closed) {\n execFinalizer(teardown);\n }\n else {\n if (teardown instanceof Subscription) {\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);\n }\n }\n };\n Subscription.prototype._hasParent = function (parent) {\n var _parentage = this._parentage;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n };\n Subscription.prototype._addParent = function (parent) {\n var _parentage = this._parentage;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n };\n Subscription.prototype._removeParent = function (parent) {\n var _parentage = this._parentage;\n if (_parentage === parent) {\n this._parentage = null;\n }\n else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n };\n Subscription.prototype.remove = function (teardown) {\n var _finalizers = this._finalizers;\n _finalizers && arrRemove(_finalizers, teardown);\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n };\n Subscription.EMPTY = (function () {\n var empty = new Subscription();\n empty.closed = true;\n return empty;\n })();\n return Subscription;\n}());\nexport { Subscription };\nexport var EMPTY_SUBSCRIPTION = Subscription.EMPTY;\nexport function isSubscription(value) {\n return (value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));\n}\nfunction execFinalizer(finalizer) {\n if (isFunction(finalizer)) {\n finalizer();\n }\n else {\n finalizer.unsubscribe();\n }\n}\n//# sourceMappingURL=Subscription.js.map","import { createErrorClass } from './createErrorClass';\nexport var UnsubscriptionError = createErrorClass(function (_super) {\n return function UnsubscriptionErrorImpl(errors) {\n _super(this);\n this.message = errors\n ? errors.length + \" errors occurred during unsubscription:\\n\" + errors.map(function (err, i) { return i + 1 + \") \" + err.toString(); }).join('\\n ')\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n };\n});\n//# sourceMappingURL=UnsubscriptionError.js.map","export function createErrorClass(createImpl) {\n var _super = function (instance) {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n var ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n//# sourceMappingURL=createErrorClass.js.map","export function arrRemove(arr, item) {\n if (arr) {\n var index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n//# sourceMappingURL=arrRemove.js.map","export var config = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n//# sourceMappingURL=config.js.map","import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\nexport function reportUnhandledError(err) {\n timeoutProvider.setTimeout(function () {\n var onUnhandledError = config.onUnhandledError;\n if (onUnhandledError) {\n onUnhandledError(err);\n }\n else {\n throw err;\n }\n });\n}\n//# sourceMappingURL=reportUnhandledError.js.map","import { __read, __spreadArray } from \"tslib\";\nexport var timeoutProvider = {\n setTimeout: function (handler, timeout) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n var delegate = timeoutProvider.delegate;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {\n return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args)));\n }\n return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args)));\n },\n clearTimeout: function (handle) {\n var delegate = timeoutProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=timeoutProvider.js.map","export function noop() { }\n//# sourceMappingURL=noop.js.map","export var COMPLETE_NOTIFICATION = (function () { return createNotification('C', undefined, undefined); })();\nexport function errorNotification(error) {\n return createNotification('E', undefined, error);\n}\nexport function nextNotification(value) {\n return createNotification('N', value, undefined);\n}\nexport function createNotification(kind, value, error) {\n return {\n kind: kind,\n value: value,\n error: error,\n };\n}\n//# sourceMappingURL=NotificationFactories.js.map","import { config } from '../config';\nvar context = null;\nexport function errorContext(cb) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n var isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n var _a = context, errorThrown = _a.errorThrown, error = _a.error;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n }\n else {\n cb();\n }\n}\nexport function captureError(err) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n//# sourceMappingURL=errorContext.js.map","export var observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })();\n//# sourceMappingURL=observable.js.map","import { identity } from './identity';\nexport function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n if (fns.length === 0) {\n return identity;\n }\n if (fns.length === 1) {\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce(function (prev, fn) { return fn(prev); }, input);\n };\n}\n//# sourceMappingURL=pipe.js.map","export function identity(x) {\n return x;\n}\n//# sourceMappingURL=identity.js.map","import { __extends } from \"tslib\";\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { refCount as higherOrderRefCount } from '../operators/refCount';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { hasLift } from '../util/lift';\nvar ConnectableObservable = (function (_super) {\n __extends(ConnectableObservable, _super);\n function ConnectableObservable(source, subjectFactory) {\n var _this = _super.call(this) || this;\n _this.source = source;\n _this.subjectFactory = subjectFactory;\n _this._subject = null;\n _this._refCount = 0;\n _this._connection = null;\n if (hasLift(source)) {\n _this.lift = source.lift;\n }\n return _this;\n }\n ConnectableObservable.prototype._subscribe = function (subscriber) {\n return this.getSubject().subscribe(subscriber);\n };\n ConnectableObservable.prototype.getSubject = function () {\n var subject = this._subject;\n if (!subject || subject.isStopped) {\n this._subject = this.subjectFactory();\n }\n return this._subject;\n };\n ConnectableObservable.prototype._teardown = function () {\n this._refCount = 0;\n var _connection = this._connection;\n this._subject = this._connection = null;\n _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe();\n };\n ConnectableObservable.prototype.connect = function () {\n var _this = this;\n var connection = this._connection;\n if (!connection) {\n connection = this._connection = new Subscription();\n var subject_1 = this.getSubject();\n connection.add(this.source.subscribe(createOperatorSubscriber(subject_1, undefined, function () {\n _this._teardown();\n subject_1.complete();\n }, function (err) {\n _this._teardown();\n subject_1.error(err);\n }, function () { return _this._teardown(); })));\n if (connection.closed) {\n this._connection = null;\n connection = Subscription.EMPTY;\n }\n }\n return connection;\n };\n ConnectableObservable.prototype.refCount = function () {\n return higherOrderRefCount()(this);\n };\n return ConnectableObservable;\n}(Observable));\nexport { ConnectableObservable };\n//# sourceMappingURL=ConnectableObservable.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function refCount() {\n return operate(function (source, subscriber) {\n var connection = null;\n source._refCount++;\n var refCounter = createOperatorSubscriber(subscriber, undefined, undefined, undefined, function () {\n if (!source || source._refCount <= 0 || 0 < --source._refCount) {\n connection = null;\n return;\n }\n var sharedConnection = source._connection;\n var conn = connection;\n connection = null;\n if (sharedConnection && (!conn || sharedConnection === conn)) {\n sharedConnection.unsubscribe();\n }\n subscriber.unsubscribe();\n });\n source.subscribe(refCounter);\n if (!refCounter.closed) {\n connection = source.connect();\n }\n });\n}\n//# sourceMappingURL=refCount.js.map","import { isFunction } from './isFunction';\nexport function hasLift(source) {\n return isFunction(source === null || source === void 0 ? void 0 : source.lift);\n}\nexport function operate(init) {\n return function (source) {\n if (hasLift(source)) {\n return source.lift(function (liftedSource) {\n try {\n return init(liftedSource, this);\n }\n catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n//# sourceMappingURL=lift.js.map","import { __extends } from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {\n return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\nvar OperatorSubscriber = (function (_super) {\n __extends(OperatorSubscriber, _super);\n function OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {\n var _this = _super.call(this, destination) || this;\n _this.onFinalize = onFinalize;\n _this.shouldUnsubscribe = shouldUnsubscribe;\n _this._next = onNext\n ? function (value) {\n try {\n onNext(value);\n }\n catch (err) {\n destination.error(err);\n }\n }\n : _super.prototype._next;\n _this._error = onError\n ? function (err) {\n try {\n onError(err);\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : _super.prototype._error;\n _this._complete = onComplete\n ? function () {\n try {\n onComplete();\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : _super.prototype._complete;\n return _this;\n }\n OperatorSubscriber.prototype.unsubscribe = function () {\n var _a;\n if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n var closed_1 = this.closed;\n _super.prototype.unsubscribe.call(this);\n !closed_1 && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));\n }\n };\n return OperatorSubscriber;\n}(Subscriber));\nexport { OperatorSubscriber };\n//# sourceMappingURL=OperatorSubscriber.js.map","import { Observable } from '../../Observable';\nimport { performanceTimestampProvider } from '../../scheduler/performanceTimestampProvider';\nimport { animationFrameProvider } from '../../scheduler/animationFrameProvider';\nexport function animationFrames(timestampProvider) {\n return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES;\n}\nfunction animationFramesFactory(timestampProvider) {\n return new Observable(function (subscriber) {\n var provider = timestampProvider || performanceTimestampProvider;\n var start = provider.now();\n var id = 0;\n var run = function () {\n if (!subscriber.closed) {\n id = animationFrameProvider.requestAnimationFrame(function (timestamp) {\n id = 0;\n var now = provider.now();\n subscriber.next({\n timestamp: timestampProvider ? now : timestamp,\n elapsed: now - start,\n });\n run();\n });\n }\n };\n run();\n return function () {\n if (id) {\n animationFrameProvider.cancelAnimationFrame(id);\n }\n };\n });\n}\nvar DEFAULT_ANIMATION_FRAMES = animationFramesFactory();\n//# sourceMappingURL=animationFrames.js.map","export var performanceTimestampProvider = {\n now: function () {\n return (performanceTimestampProvider.delegate || performance).now();\n },\n delegate: undefined,\n};\n//# sourceMappingURL=performanceTimestampProvider.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { Subscription } from '../Subscription';\nexport var animationFrameProvider = {\n schedule: function (callback) {\n var request = requestAnimationFrame;\n var cancel = cancelAnimationFrame;\n var delegate = animationFrameProvider.delegate;\n if (delegate) {\n request = delegate.requestAnimationFrame;\n cancel = delegate.cancelAnimationFrame;\n }\n var handle = request(function (timestamp) {\n cancel = undefined;\n callback(timestamp);\n });\n return new Subscription(function () { return cancel === null || cancel === void 0 ? void 0 : cancel(handle); });\n },\n requestAnimationFrame: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var delegate = animationFrameProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame).apply(void 0, __spreadArray([], __read(args)));\n },\n cancelAnimationFrame: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var delegate = animationFrameProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame).apply(void 0, __spreadArray([], __read(args)));\n },\n delegate: undefined,\n};\n//# sourceMappingURL=animationFrameProvider.js.map","import { __extends, __values } from \"tslib\";\nimport { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nvar Subject = (function (_super) {\n __extends(Subject, _super);\n function Subject() {\n var _this = _super.call(this) || this;\n _this.closed = false;\n _this.currentObservers = null;\n _this.observers = [];\n _this.isStopped = false;\n _this.hasError = false;\n _this.thrownError = null;\n return _this;\n }\n Subject.prototype.lift = function (operator) {\n var subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n };\n Subject.prototype._throwIfClosed = function () {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n };\n Subject.prototype.next = function (value) {\n var _this = this;\n errorContext(function () {\n var e_1, _a;\n _this._throwIfClosed();\n if (!_this.isStopped) {\n if (!_this.currentObservers) {\n _this.currentObservers = Array.from(_this.observers);\n }\n try {\n for (var _b = __values(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) {\n var observer = _c.value;\n observer.next(value);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n });\n };\n Subject.prototype.error = function (err) {\n var _this = this;\n errorContext(function () {\n _this._throwIfClosed();\n if (!_this.isStopped) {\n _this.hasError = _this.isStopped = true;\n _this.thrownError = err;\n var observers = _this.observers;\n while (observers.length) {\n observers.shift().error(err);\n }\n }\n });\n };\n Subject.prototype.complete = function () {\n var _this = this;\n errorContext(function () {\n _this._throwIfClosed();\n if (!_this.isStopped) {\n _this.isStopped = true;\n var observers = _this.observers;\n while (observers.length) {\n observers.shift().complete();\n }\n }\n });\n };\n Subject.prototype.unsubscribe = function () {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null;\n };\n Object.defineProperty(Subject.prototype, \"observed\", {\n get: function () {\n var _a;\n return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n },\n enumerable: false,\n configurable: true\n });\n Subject.prototype._trySubscribe = function (subscriber) {\n this._throwIfClosed();\n return _super.prototype._trySubscribe.call(this, subscriber);\n };\n Subject.prototype._subscribe = function (subscriber) {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n };\n Subject.prototype._innerSubscribe = function (subscriber) {\n var _this = this;\n var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(function () {\n _this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n };\n Subject.prototype._checkFinalizedStatuses = function (subscriber) {\n var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped;\n if (hasError) {\n subscriber.error(thrownError);\n }\n else if (isStopped) {\n subscriber.complete();\n }\n };\n Subject.prototype.asObservable = function () {\n var observable = new Observable();\n observable.source = this;\n return observable;\n };\n Subject.create = function (destination, source) {\n return new AnonymousSubject(destination, source);\n };\n return Subject;\n}(Observable));\nexport { Subject };\nvar AnonymousSubject = (function (_super) {\n __extends(AnonymousSubject, _super);\n function AnonymousSubject(destination, source) {\n var _this = _super.call(this) || this;\n _this.destination = destination;\n _this.source = source;\n return _this;\n }\n AnonymousSubject.prototype.next = function (value) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n };\n AnonymousSubject.prototype.error = function (err) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n };\n AnonymousSubject.prototype.complete = function () {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n };\n AnonymousSubject.prototype._subscribe = function (subscriber) {\n var _a, _b;\n return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n };\n return AnonymousSubject;\n}(Subject));\nexport { AnonymousSubject };\n//# sourceMappingURL=Subject.js.map","import { createErrorClass } from './createErrorClass';\nexport var ObjectUnsubscribedError = createErrorClass(function (_super) {\n return function ObjectUnsubscribedErrorImpl() {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n };\n});\n//# sourceMappingURL=ObjectUnsubscribedError.js.map","import { __extends } from \"tslib\";\nimport { Subject } from './Subject';\nvar BehaviorSubject = (function (_super) {\n __extends(BehaviorSubject, _super);\n function BehaviorSubject(_value) {\n var _this = _super.call(this) || this;\n _this._value = _value;\n return _this;\n }\n Object.defineProperty(BehaviorSubject.prototype, \"value\", {\n get: function () {\n return this.getValue();\n },\n enumerable: false,\n configurable: true\n });\n BehaviorSubject.prototype._subscribe = function (subscriber) {\n var subscription = _super.prototype._subscribe.call(this, subscriber);\n !subscription.closed && subscriber.next(this._value);\n return subscription;\n };\n BehaviorSubject.prototype.getValue = function () {\n var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, _value = _a._value;\n if (hasError) {\n throw thrownError;\n }\n this._throwIfClosed();\n return _value;\n };\n BehaviorSubject.prototype.next = function (value) {\n _super.prototype.next.call(this, (this._value = value));\n };\n return BehaviorSubject;\n}(Subject));\nexport { BehaviorSubject };\n//# sourceMappingURL=BehaviorSubject.js.map","import { __extends } from \"tslib\";\nimport { Subject } from './Subject';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nvar ReplaySubject = (function (_super) {\n __extends(ReplaySubject, _super);\n function ReplaySubject(_bufferSize, _windowTime, _timestampProvider) {\n if (_bufferSize === void 0) { _bufferSize = Infinity; }\n if (_windowTime === void 0) { _windowTime = Infinity; }\n if (_timestampProvider === void 0) { _timestampProvider = dateTimestampProvider; }\n var _this = _super.call(this) || this;\n _this._bufferSize = _bufferSize;\n _this._windowTime = _windowTime;\n _this._timestampProvider = _timestampProvider;\n _this._buffer = [];\n _this._infiniteTimeWindow = true;\n _this._infiniteTimeWindow = _windowTime === Infinity;\n _this._bufferSize = Math.max(1, _bufferSize);\n _this._windowTime = Math.max(1, _windowTime);\n return _this;\n }\n ReplaySubject.prototype.next = function (value) {\n var _a = this, isStopped = _a.isStopped, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime;\n if (!isStopped) {\n _buffer.push(value);\n !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);\n }\n this._trimBuffer();\n _super.prototype.next.call(this, value);\n };\n ReplaySubject.prototype._subscribe = function (subscriber) {\n this._throwIfClosed();\n this._trimBuffer();\n var subscription = this._innerSubscribe(subscriber);\n var _a = this, _infiniteTimeWindow = _a._infiniteTimeWindow, _buffer = _a._buffer;\n var copy = _buffer.slice();\n for (var i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {\n subscriber.next(copy[i]);\n }\n this._checkFinalizedStatuses(subscriber);\n return subscription;\n };\n ReplaySubject.prototype._trimBuffer = function () {\n var _a = this, _bufferSize = _a._bufferSize, _timestampProvider = _a._timestampProvider, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow;\n var adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;\n _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);\n if (!_infiniteTimeWindow) {\n var now = _timestampProvider.now();\n var last = 0;\n for (var i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) {\n last = i;\n }\n last && _buffer.splice(0, last + 1);\n }\n };\n return ReplaySubject;\n}(Subject));\nexport { ReplaySubject };\n//# sourceMappingURL=ReplaySubject.js.map","export var dateTimestampProvider = {\n now: function () {\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n//# sourceMappingURL=dateTimestampProvider.js.map","import { __extends } from \"tslib\";\nimport { Subject } from './Subject';\nvar AsyncSubject = (function (_super) {\n __extends(AsyncSubject, _super);\n function AsyncSubject() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._value = null;\n _this._hasValue = false;\n _this._isComplete = false;\n return _this;\n }\n AsyncSubject.prototype._checkFinalizedStatuses = function (subscriber) {\n var _a = this, hasError = _a.hasError, _hasValue = _a._hasValue, _value = _a._value, thrownError = _a.thrownError, isStopped = _a.isStopped, _isComplete = _a._isComplete;\n if (hasError) {\n subscriber.error(thrownError);\n }\n else if (isStopped || _isComplete) {\n _hasValue && subscriber.next(_value);\n subscriber.complete();\n }\n };\n AsyncSubject.prototype.next = function (value) {\n if (!this.isStopped) {\n this._value = value;\n this._hasValue = true;\n }\n };\n AsyncSubject.prototype.complete = function () {\n var _a = this, _hasValue = _a._hasValue, _value = _a._value, _isComplete = _a._isComplete;\n if (!_isComplete) {\n this._isComplete = true;\n _hasValue && _super.prototype.next.call(this, _value);\n _super.prototype.complete.call(this);\n }\n };\n return AsyncSubject;\n}(Subject));\nexport { AsyncSubject };\n//# sourceMappingURL=AsyncSubject.js.map","import { AsapAction } from './AsapAction';\nimport { AsapScheduler } from './AsapScheduler';\nexport var asapScheduler = new AsapScheduler(AsapAction);\nexport var asap = asapScheduler;\n//# sourceMappingURL=asap.js.map","import { __extends } from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\nimport { immediateProvider } from './immediateProvider';\nvar AsapAction = (function (_super) {\n __extends(AsapAction, _super);\n function AsapAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n return _this;\n }\n AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n if (delay !== null && delay > 0) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\n scheduler.actions.push(this);\n return scheduler._scheduled || (scheduler._scheduled = immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined)));\n };\n AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n var _a;\n if (delay === void 0) { delay = 0; }\n if (delay != null ? delay > 0 : this.delay > 0) {\n return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);\n }\n var actions = scheduler.actions;\n if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) {\n immediateProvider.clearImmediate(id);\n if (scheduler._scheduled === id) {\n scheduler._scheduled = undefined;\n }\n }\n return undefined;\n };\n return AsapAction;\n}(AsyncAction));\nexport { AsapAction };\n//# sourceMappingURL=AsapAction.js.map","import { __extends } from \"tslib\";\nimport { Action } from './Action';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nvar AsyncAction = (function (_super) {\n __extends(AsyncAction, _super);\n function AsyncAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n _this.pending = false;\n return _this;\n }\n AsyncAction.prototype.schedule = function (state, delay) {\n var _a;\n if (delay === void 0) { delay = 0; }\n if (this.closed) {\n return this;\n }\n this.state = state;\n var id = this.id;\n var scheduler = this.scheduler;\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n this.pending = true;\n this.delay = delay;\n this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay);\n return this;\n };\n AsyncAction.prototype.requestAsyncId = function (scheduler, _id, delay) {\n if (delay === void 0) { delay = 0; }\n return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n };\n AsyncAction.prototype.recycleAsyncId = function (_scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n if (delay != null && this.delay === delay && this.pending === false) {\n return id;\n }\n if (id != null) {\n intervalProvider.clearInterval(id);\n }\n return undefined;\n };\n AsyncAction.prototype.execute = function (state, delay) {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n this.pending = false;\n var error = this._execute(state, delay);\n if (error) {\n return error;\n }\n else if (this.pending === false && this.id != null) {\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n };\n AsyncAction.prototype._execute = function (state, _delay) {\n var errored = false;\n var errorValue;\n try {\n this.work(state);\n }\n catch (e) {\n errored = true;\n errorValue = e ? e : new Error('Scheduled action threw falsy error');\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n };\n AsyncAction.prototype.unsubscribe = function () {\n if (!this.closed) {\n var _a = this, id = _a.id, scheduler = _a.scheduler;\n var actions = scheduler.actions;\n this.work = this.state = this.scheduler = null;\n this.pending = false;\n arrRemove(actions, this);\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n this.delay = null;\n _super.prototype.unsubscribe.call(this);\n }\n };\n return AsyncAction;\n}(Action));\nexport { AsyncAction };\n//# sourceMappingURL=AsyncAction.js.map","import { __extends } from \"tslib\";\nimport { Subscription } from '../Subscription';\nvar Action = (function (_super) {\n __extends(Action, _super);\n function Action(scheduler, work) {\n return _super.call(this) || this;\n }\n Action.prototype.schedule = function (state, delay) {\n if (delay === void 0) { delay = 0; }\n return this;\n };\n return Action;\n}(Subscription));\nexport { Action };\n//# sourceMappingURL=Action.js.map","import { __read, __spreadArray } from \"tslib\";\nexport var intervalProvider = {\n setInterval: function (handler, timeout) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n var delegate = intervalProvider.delegate;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) {\n return delegate.setInterval.apply(delegate, __spreadArray([handler, timeout], __read(args)));\n }\n return setInterval.apply(void 0, __spreadArray([handler, timeout], __read(args)));\n },\n clearInterval: function (handle) {\n var delegate = intervalProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=intervalProvider.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { Immediate } from '../util/Immediate';\nvar setImmediate = Immediate.setImmediate, clearImmediate = Immediate.clearImmediate;\nexport var immediateProvider = {\n setImmediate: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var delegate = immediateProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate).apply(void 0, __spreadArray([], __read(args)));\n },\n clearImmediate: function (handle) {\n var delegate = immediateProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=immediateProvider.js.map","var nextHandle = 1;\nvar resolved;\nvar activeHandles = {};\nfunction findAndClearHandle(handle) {\n if (handle in activeHandles) {\n delete activeHandles[handle];\n return true;\n }\n return false;\n}\nexport var Immediate = {\n setImmediate: function (cb) {\n var handle = nextHandle++;\n activeHandles[handle] = true;\n if (!resolved) {\n resolved = Promise.resolve();\n }\n resolved.then(function () { return findAndClearHandle(handle) && cb(); });\n return handle;\n },\n clearImmediate: function (handle) {\n findAndClearHandle(handle);\n },\n};\nexport var TestTools = {\n pending: function () {\n return Object.keys(activeHandles).length;\n }\n};\n//# sourceMappingURL=Immediate.js.map","import { __extends } from \"tslib\";\nimport { AsyncScheduler } from './AsyncScheduler';\nvar AsapScheduler = (function (_super) {\n __extends(AsapScheduler, _super);\n function AsapScheduler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AsapScheduler.prototype.flush = function (action) {\n this._active = true;\n var flushId = this._scheduled;\n this._scheduled = undefined;\n var actions = this.actions;\n var error;\n action = action || actions.shift();\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions[0]) && action.id === flushId && actions.shift());\n this._active = false;\n if (error) {\n while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n return AsapScheduler;\n}(AsyncScheduler));\nexport { AsapScheduler };\n//# sourceMappingURL=AsapScheduler.js.map","import { __extends } from \"tslib\";\nimport { Scheduler } from '../Scheduler';\nvar AsyncScheduler = (function (_super) {\n __extends(AsyncScheduler, _super);\n function AsyncScheduler(SchedulerAction, now) {\n if (now === void 0) { now = Scheduler.now; }\n var _this = _super.call(this, SchedulerAction, now) || this;\n _this.actions = [];\n _this._active = false;\n return _this;\n }\n AsyncScheduler.prototype.flush = function (action) {\n var actions = this.actions;\n if (this._active) {\n actions.push(action);\n return;\n }\n var error;\n this._active = true;\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions.shift()));\n this._active = false;\n if (error) {\n while ((action = actions.shift())) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n return AsyncScheduler;\n}(Scheduler));\nexport { AsyncScheduler };\n//# sourceMappingURL=AsyncScheduler.js.map","import { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nvar Scheduler = (function () {\n function Scheduler(schedulerActionCtor, now) {\n if (now === void 0) { now = Scheduler.now; }\n this.schedulerActionCtor = schedulerActionCtor;\n this.now = now;\n }\n Scheduler.prototype.schedule = function (work, delay, state) {\n if (delay === void 0) { delay = 0; }\n return new this.schedulerActionCtor(this, work).schedule(state, delay);\n };\n Scheduler.now = dateTimestampProvider.now;\n return Scheduler;\n}());\nexport { Scheduler };\n//# sourceMappingURL=Scheduler.js.map","import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport var asyncScheduler = new AsyncScheduler(AsyncAction);\nexport var async = asyncScheduler;\n//# sourceMappingURL=async.js.map","import { QueueAction } from './QueueAction';\nimport { QueueScheduler } from './QueueScheduler';\nexport var queueScheduler = new QueueScheduler(QueueAction);\nexport var queue = queueScheduler;\n//# sourceMappingURL=queue.js.map","import { __extends } from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\nvar QueueAction = (function (_super) {\n __extends(QueueAction, _super);\n function QueueAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n return _this;\n }\n QueueAction.prototype.schedule = function (state, delay) {\n if (delay === void 0) { delay = 0; }\n if (delay > 0) {\n return _super.prototype.schedule.call(this, state, delay);\n }\n this.delay = delay;\n this.state = state;\n this.scheduler.flush(this);\n return this;\n };\n QueueAction.prototype.execute = function (state, delay) {\n return delay > 0 || this.closed ? _super.prototype.execute.call(this, state, delay) : this._execute(state, delay);\n };\n QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\n scheduler.flush(this);\n return 0;\n };\n return QueueAction;\n}(AsyncAction));\nexport { QueueAction };\n//# sourceMappingURL=QueueAction.js.map","import { __extends } from \"tslib\";\nimport { AsyncScheduler } from './AsyncScheduler';\nvar QueueScheduler = (function (_super) {\n __extends(QueueScheduler, _super);\n function QueueScheduler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return QueueScheduler;\n}(AsyncScheduler));\nexport { QueueScheduler };\n//# sourceMappingURL=QueueScheduler.js.map","import { AnimationFrameAction } from './AnimationFrameAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\nexport var animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction);\nexport var animationFrame = animationFrameScheduler;\n//# sourceMappingURL=animationFrame.js.map","import { __extends } from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\nimport { animationFrameProvider } from './animationFrameProvider';\nvar AnimationFrameAction = (function (_super) {\n __extends(AnimationFrameAction, _super);\n function AnimationFrameAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n return _this;\n }\n AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n if (delay !== null && delay > 0) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\n scheduler.actions.push(this);\n return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(function () { return scheduler.flush(undefined); }));\n };\n AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n var _a;\n if (delay === void 0) { delay = 0; }\n if (delay != null ? delay > 0 : this.delay > 0) {\n return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);\n }\n var actions = scheduler.actions;\n if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) {\n animationFrameProvider.cancelAnimationFrame(id);\n scheduler._scheduled = undefined;\n }\n return undefined;\n };\n return AnimationFrameAction;\n}(AsyncAction));\nexport { AnimationFrameAction };\n//# sourceMappingURL=AnimationFrameAction.js.map","import { __extends } from \"tslib\";\nimport { AsyncScheduler } from './AsyncScheduler';\nvar AnimationFrameScheduler = (function (_super) {\n __extends(AnimationFrameScheduler, _super);\n function AnimationFrameScheduler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AnimationFrameScheduler.prototype.flush = function (action) {\n this._active = true;\n var flushId = this._scheduled;\n this._scheduled = undefined;\n var actions = this.actions;\n var error;\n action = action || actions.shift();\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions[0]) && action.id === flushId && actions.shift());\n this._active = false;\n if (error) {\n while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n return AnimationFrameScheduler;\n}(AsyncScheduler));\nexport { AnimationFrameScheduler };\n//# sourceMappingURL=AnimationFrameScheduler.js.map","import { __extends } from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\nimport { Subscription } from '../Subscription';\nimport { AsyncScheduler } from './AsyncScheduler';\nvar VirtualTimeScheduler = (function (_super) {\n __extends(VirtualTimeScheduler, _super);\n function VirtualTimeScheduler(schedulerActionCtor, maxFrames) {\n if (schedulerActionCtor === void 0) { schedulerActionCtor = VirtualAction; }\n if (maxFrames === void 0) { maxFrames = Infinity; }\n var _this = _super.call(this, schedulerActionCtor, function () { return _this.frame; }) || this;\n _this.maxFrames = maxFrames;\n _this.frame = 0;\n _this.index = -1;\n return _this;\n }\n VirtualTimeScheduler.prototype.flush = function () {\n var _a = this, actions = _a.actions, maxFrames = _a.maxFrames;\n var error;\n var action;\n while ((action = actions[0]) && action.delay <= maxFrames) {\n actions.shift();\n this.frame = action.delay;\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n }\n if (error) {\n while ((action = actions.shift())) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n VirtualTimeScheduler.frameTimeFactor = 10;\n return VirtualTimeScheduler;\n}(AsyncScheduler));\nexport { VirtualTimeScheduler };\nvar VirtualAction = (function (_super) {\n __extends(VirtualAction, _super);\n function VirtualAction(scheduler, work, index) {\n if (index === void 0) { index = (scheduler.index += 1); }\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n _this.index = index;\n _this.active = true;\n _this.index = scheduler.index = index;\n return _this;\n }\n VirtualAction.prototype.schedule = function (state, delay) {\n if (delay === void 0) { delay = 0; }\n if (Number.isFinite(delay)) {\n if (!this.id) {\n return _super.prototype.schedule.call(this, state, delay);\n }\n this.active = false;\n var action = new VirtualAction(this.scheduler, this.work);\n this.add(action);\n return action.schedule(state, delay);\n }\n else {\n return Subscription.EMPTY;\n }\n };\n VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n this.delay = scheduler.frame + delay;\n var actions = scheduler.actions;\n actions.push(this);\n actions.sort(VirtualAction.sortActions);\n return 1;\n };\n VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n return undefined;\n };\n VirtualAction.prototype._execute = function (state, delay) {\n if (this.active === true) {\n return _super.prototype._execute.call(this, state, delay);\n }\n };\n VirtualAction.sortActions = function (a, b) {\n if (a.delay === b.delay) {\n if (a.index === b.index) {\n return 0;\n }\n else if (a.index > b.index) {\n return 1;\n }\n else {\n return -1;\n }\n }\n else if (a.delay > b.delay) {\n return 1;\n }\n else {\n return -1;\n }\n };\n return VirtualAction;\n}(AsyncAction));\nexport { VirtualAction };\n//# sourceMappingURL=VirtualTimeScheduler.js.map","import { EMPTY } from './observable/empty';\nimport { of } from './observable/of';\nimport { throwError } from './observable/throwError';\nimport { isFunction } from './util/isFunction';\nexport var NotificationKind;\n(function (NotificationKind) {\n NotificationKind[\"NEXT\"] = \"N\";\n NotificationKind[\"ERROR\"] = \"E\";\n NotificationKind[\"COMPLETE\"] = \"C\";\n})(NotificationKind || (NotificationKind = {}));\nvar Notification = (function () {\n function Notification(kind, value, error) {\n this.kind = kind;\n this.value = value;\n this.error = error;\n this.hasValue = kind === 'N';\n }\n Notification.prototype.observe = function (observer) {\n return observeNotification(this, observer);\n };\n Notification.prototype.do = function (nextHandler, errorHandler, completeHandler) {\n var _a = this, kind = _a.kind, value = _a.value, error = _a.error;\n return kind === 'N' ? nextHandler === null || nextHandler === void 0 ? void 0 : nextHandler(value) : kind === 'E' ? errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler(error) : completeHandler === null || completeHandler === void 0 ? void 0 : completeHandler();\n };\n Notification.prototype.accept = function (nextOrObserver, error, complete) {\n var _a;\n return isFunction((_a = nextOrObserver) === null || _a === void 0 ? void 0 : _a.next)\n ? this.observe(nextOrObserver)\n : this.do(nextOrObserver, error, complete);\n };\n Notification.prototype.toObservable = function () {\n var _a = this, kind = _a.kind, value = _a.value, error = _a.error;\n var result = kind === 'N'\n ?\n of(value)\n :\n kind === 'E'\n ?\n throwError(function () { return error; })\n :\n kind === 'C'\n ?\n EMPTY\n :\n 0;\n if (!result) {\n throw new TypeError(\"Unexpected notification kind \" + kind);\n }\n return result;\n };\n Notification.createNext = function (value) {\n return new Notification('N', value);\n };\n Notification.createError = function (err) {\n return new Notification('E', undefined, err);\n };\n Notification.createComplete = function () {\n return Notification.completeNotification;\n };\n Notification.completeNotification = new Notification('C');\n return Notification;\n}());\nexport { Notification };\nexport function observeNotification(notification, observer) {\n var _a, _b, _c;\n var _d = notification, kind = _d.kind, value = _d.value, error = _d.error;\n if (typeof kind !== 'string') {\n throw new TypeError('Invalid notification, missing \"kind\"');\n }\n kind === 'N' ? (_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, value) : kind === 'E' ? (_b = observer.error) === null || _b === void 0 ? void 0 : _b.call(observer, error) : (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.call(observer);\n}\n//# sourceMappingURL=Notification.js.map","import { Observable } from '../Observable';\nexport var EMPTY = new Observable(function (subscriber) { return subscriber.complete(); });\nexport function empty(scheduler) {\n return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\nfunction emptyScheduled(scheduler) {\n return new Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });\n}\n//# sourceMappingURL=empty.js.map","import { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function of() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = popScheduler(args);\n return from(args, scheduler);\n}\n//# sourceMappingURL=of.js.map","import { isFunction } from './isFunction';\nimport { isScheduler } from './isScheduler';\nfunction last(arr) {\n return arr[arr.length - 1];\n}\nexport function popResultSelector(args) {\n return isFunction(last(args)) ? args.pop() : undefined;\n}\nexport function popScheduler(args) {\n return isScheduler(last(args)) ? args.pop() : undefined;\n}\nexport function popNumber(args, defaultValue) {\n return typeof last(args) === 'number' ? args.pop() : defaultValue;\n}\n//# sourceMappingURL=args.js.map","import { isFunction } from './isFunction';\nexport function isScheduler(value) {\n return value && isFunction(value.schedule);\n}\n//# sourceMappingURL=isScheduler.js.map","import { scheduled } from '../scheduled/scheduled';\nimport { innerFrom } from './innerFrom';\nexport function from(input, scheduler) {\n return scheduler ? scheduled(input, scheduler) : innerFrom(input);\n}\n//# sourceMappingURL=from.js.map","import { scheduleObservable } from './scheduleObservable';\nimport { schedulePromise } from './schedulePromise';\nimport { scheduleArray } from './scheduleArray';\nimport { scheduleIterable } from './scheduleIterable';\nimport { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isPromise } from '../util/isPromise';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isIterable } from '../util/isIterable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isReadableStreamLike } from '../util/isReadableStreamLike';\nimport { scheduleReadableStreamLike } from './scheduleReadableStreamLike';\nexport function scheduled(input, scheduler) {\n if (input != null) {\n if (isInteropObservable(input)) {\n return scheduleObservable(input, scheduler);\n }\n if (isArrayLike(input)) {\n return scheduleArray(input, scheduler);\n }\n if (isPromise(input)) {\n return schedulePromise(input, scheduler);\n }\n if (isAsyncIterable(input)) {\n return scheduleAsyncIterable(input, scheduler);\n }\n if (isIterable(input)) {\n return scheduleIterable(input, scheduler);\n }\n if (isReadableStreamLike(input)) {\n return scheduleReadableStreamLike(input, scheduler);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\n//# sourceMappingURL=scheduled.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function scheduleObservable(input, scheduler) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n//# sourceMappingURL=scheduleObservable.js.map","import { __asyncValues, __awaiter, __generator, __values } from \"tslib\";\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isPromise } from '../util/isPromise';\nimport { Observable } from '../Observable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isIterable } from '../util/isIterable';\nimport { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nimport { isFunction } from '../util/isFunction';\nimport { reportUnhandledError } from '../util/reportUnhandledError';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function innerFrom(input) {\n if (input instanceof Observable) {\n return input;\n }\n if (input != null) {\n if (isInteropObservable(input)) {\n return fromInteropObservable(input);\n }\n if (isArrayLike(input)) {\n return fromArrayLike(input);\n }\n if (isPromise(input)) {\n return fromPromise(input);\n }\n if (isAsyncIterable(input)) {\n return fromAsyncIterable(input);\n }\n if (isIterable(input)) {\n return fromIterable(input);\n }\n if (isReadableStreamLike(input)) {\n return fromReadableStreamLike(input);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\nexport function fromInteropObservable(obj) {\n return new Observable(function (subscriber) {\n var obs = obj[Symbol_observable]();\n if (isFunction(obs.subscribe)) {\n return obs.subscribe(subscriber);\n }\n throw new TypeError('Provided object does not correctly implement Symbol.observable');\n });\n}\nexport function fromArrayLike(array) {\n return new Observable(function (subscriber) {\n for (var i = 0; i < array.length && !subscriber.closed; i++) {\n subscriber.next(array[i]);\n }\n subscriber.complete();\n });\n}\nexport function fromPromise(promise) {\n return new Observable(function (subscriber) {\n promise\n .then(function (value) {\n if (!subscriber.closed) {\n subscriber.next(value);\n subscriber.complete();\n }\n }, function (err) { return subscriber.error(err); })\n .then(null, reportUnhandledError);\n });\n}\nexport function fromIterable(iterable) {\n return new Observable(function (subscriber) {\n var e_1, _a;\n try {\n for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) {\n var value = iterable_1_1.value;\n subscriber.next(value);\n if (subscriber.closed) {\n return;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) _a.call(iterable_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n subscriber.complete();\n });\n}\nexport function fromAsyncIterable(asyncIterable) {\n return new Observable(function (subscriber) {\n process(asyncIterable, subscriber).catch(function (err) { return subscriber.error(err); });\n });\n}\nexport function fromReadableStreamLike(readableStream) {\n return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));\n}\nfunction process(asyncIterable, subscriber) {\n var asyncIterable_1, asyncIterable_1_1;\n var e_2, _a;\n return __awaiter(this, void 0, void 0, function () {\n var value, e_2_1;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _b.trys.push([0, 5, 6, 11]);\n asyncIterable_1 = __asyncValues(asyncIterable);\n _b.label = 1;\n case 1: return [4, asyncIterable_1.next()];\n case 2:\n if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done)) return [3, 4];\n value = asyncIterable_1_1.value;\n subscriber.next(value);\n if (subscriber.closed) {\n return [2];\n }\n _b.label = 3;\n case 3: return [3, 1];\n case 4: return [3, 11];\n case 5:\n e_2_1 = _b.sent();\n e_2 = { error: e_2_1 };\n return [3, 11];\n case 6:\n _b.trys.push([6, , 9, 10]);\n if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return))) return [3, 8];\n return [4, _a.call(asyncIterable_1)];\n case 7:\n _b.sent();\n _b.label = 8;\n case 8: return [3, 10];\n case 9:\n if (e_2) throw e_2.error;\n return [7];\n case 10: return [7];\n case 11:\n subscriber.complete();\n return [2];\n }\n });\n });\n}\n//# sourceMappingURL=innerFrom.js.map","export var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });\n//# sourceMappingURL=isArrayLike.js.map","import { isFunction } from \"./isFunction\";\nexport function isPromise(value) {\n return isFunction(value === null || value === void 0 ? void 0 : value.then);\n}\n//# sourceMappingURL=isPromise.js.map","import { observable as Symbol_observable } from '../symbol/observable';\nimport { isFunction } from './isFunction';\nexport function isInteropObservable(input) {\n return isFunction(input[Symbol_observable]);\n}\n//# sourceMappingURL=isInteropObservable.js.map","import { isFunction } from './isFunction';\nexport function isAsyncIterable(obj) {\n return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);\n}\n//# sourceMappingURL=isAsyncIterable.js.map","export function createInvalidObservableTypeError(input) {\n return new TypeError(\"You provided \" + (input !== null && typeof input === 'object' ? 'an invalid object' : \"'\" + input + \"'\") + \" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.\");\n}\n//# sourceMappingURL=throwUnobservableError.js.map","import { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from './isFunction';\nexport function isIterable(input) {\n return isFunction(input === null || input === void 0 ? void 0 : input[Symbol_iterator]);\n}\n//# sourceMappingURL=isIterable.js.map","export function getSymbolIterator() {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator';\n }\n return Symbol.iterator;\n}\nexport var iterator = getSymbolIterator();\n//# sourceMappingURL=iterator.js.map","import { __asyncGenerator, __await, __generator } from \"tslib\";\nimport { isFunction } from './isFunction';\nexport function readableStreamLikeToAsyncGenerator(readableStream) {\n return __asyncGenerator(this, arguments, function readableStreamLikeToAsyncGenerator_1() {\n var reader, _a, value, done;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n reader = readableStream.getReader();\n _b.label = 1;\n case 1:\n _b.trys.push([1, , 9, 10]);\n _b.label = 2;\n case 2:\n if (!true) return [3, 8];\n return [4, __await(reader.read())];\n case 3:\n _a = _b.sent(), value = _a.value, done = _a.done;\n if (!done) return [3, 5];\n return [4, __await(void 0)];\n case 4: return [2, _b.sent()];\n case 5: return [4, __await(value)];\n case 6: return [4, _b.sent()];\n case 7:\n _b.sent();\n return [3, 2];\n case 8: return [3, 10];\n case 9:\n reader.releaseLock();\n return [7];\n case 10: return [2];\n }\n });\n });\n}\nexport function isReadableStreamLike(obj) {\n return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader);\n}\n//# sourceMappingURL=isReadableStreamLike.js.map","import { executeSchedule } from '../util/executeSchedule';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function observeOn(scheduler, delay) {\n if (delay === void 0) { delay = 0; }\n return operate(function (source, subscriber) {\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return executeSchedule(subscriber, scheduler, function () { return subscriber.next(value); }, delay); }, function () { return executeSchedule(subscriber, scheduler, function () { return subscriber.complete(); }, delay); }, function (err) { return executeSchedule(subscriber, scheduler, function () { return subscriber.error(err); }, delay); }));\n });\n}\n//# sourceMappingURL=observeOn.js.map","export function executeSchedule(parentSubscription, scheduler, work, delay, repeat) {\n if (delay === void 0) { delay = 0; }\n if (repeat === void 0) { repeat = false; }\n var scheduleSubscription = scheduler.schedule(function () {\n work();\n if (repeat) {\n parentSubscription.add(this.schedule(null, delay));\n }\n else {\n this.unsubscribe();\n }\n }, delay);\n parentSubscription.add(scheduleSubscription);\n if (!repeat) {\n return scheduleSubscription;\n }\n}\n//# sourceMappingURL=executeSchedule.js.map","import { operate } from '../util/lift';\nexport function subscribeOn(scheduler, delay) {\n if (delay === void 0) { delay = 0; }\n return operate(function (source, subscriber) {\n subscriber.add(scheduler.schedule(function () { return source.subscribe(subscriber); }, delay));\n });\n}\n//# sourceMappingURL=subscribeOn.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function schedulePromise(input, scheduler) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n//# sourceMappingURL=schedulePromise.js.map","import { Observable } from '../Observable';\nexport function scheduleArray(input, scheduler) {\n return new Observable(function (subscriber) {\n var i = 0;\n return scheduler.schedule(function () {\n if (i === input.length) {\n subscriber.complete();\n }\n else {\n subscriber.next(input[i++]);\n if (!subscriber.closed) {\n this.schedule();\n }\n }\n });\n });\n}\n//# sourceMappingURL=scheduleArray.js.map","import { Observable } from '../Observable';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from '../util/isFunction';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleIterable(input, scheduler) {\n return new Observable(function (subscriber) {\n var iterator;\n executeSchedule(subscriber, scheduler, function () {\n iterator = input[Symbol_iterator]();\n executeSchedule(subscriber, scheduler, function () {\n var _a;\n var value;\n var done;\n try {\n (_a = iterator.next(), value = _a.value, done = _a.done);\n }\n catch (err) {\n subscriber.error(err);\n return;\n }\n if (done) {\n subscriber.complete();\n }\n else {\n subscriber.next(value);\n }\n }, 0, true);\n });\n return function () { return isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return(); };\n });\n}\n//# sourceMappingURL=scheduleIterable.js.map","import { Observable } from '../Observable';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleAsyncIterable(input, scheduler) {\n if (!input) {\n throw new Error('Iterable cannot be null');\n }\n return new Observable(function (subscriber) {\n executeSchedule(subscriber, scheduler, function () {\n var iterator = input[Symbol.asyncIterator]();\n executeSchedule(subscriber, scheduler, function () {\n iterator.next().then(function (result) {\n if (result.done) {\n subscriber.complete();\n }\n else {\n subscriber.next(result.value);\n }\n });\n }, 0, true);\n });\n });\n}\n//# sourceMappingURL=scheduleAsyncIterable.js.map","import { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nexport function scheduleReadableStreamLike(input, scheduler) {\n return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler);\n}\n//# sourceMappingURL=scheduleReadableStreamLike.js.map","import { Observable } from '../Observable';\nimport { isFunction } from '../util/isFunction';\nexport function throwError(errorOrErrorFactory, scheduler) {\n var errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : function () { return errorOrErrorFactory; };\n var init = function (subscriber) { return subscriber.error(errorFactory()); };\n return new Observable(scheduler ? function (subscriber) { return scheduler.schedule(init, 0, subscriber); } : init);\n}\n//# sourceMappingURL=throwError.js.map","import { Observable } from '../Observable';\nimport { isFunction } from './isFunction';\nexport function isObservable(obj) {\n return !!obj && (obj instanceof Observable || (isFunction(obj.lift) && isFunction(obj.subscribe)));\n}\n//# sourceMappingURL=isObservable.js.map","import { EmptyError } from './util/EmptyError';\nexport function lastValueFrom(source, config) {\n var hasConfig = typeof config === 'object';\n return new Promise(function (resolve, reject) {\n var _hasValue = false;\n var _value;\n source.subscribe({\n next: function (value) {\n _value = value;\n _hasValue = true;\n },\n error: reject,\n complete: function () {\n if (_hasValue) {\n resolve(_value);\n }\n else if (hasConfig) {\n resolve(config.defaultValue);\n }\n else {\n reject(new EmptyError());\n }\n },\n });\n });\n}\n//# sourceMappingURL=lastValueFrom.js.map","import { createErrorClass } from './createErrorClass';\nexport var EmptyError = createErrorClass(function (_super) { return function EmptyErrorImpl() {\n _super(this);\n this.name = 'EmptyError';\n this.message = 'no elements in sequence';\n}; });\n//# sourceMappingURL=EmptyError.js.map","import { EmptyError } from './util/EmptyError';\nimport { SafeSubscriber } from './Subscriber';\nexport function firstValueFrom(source, config) {\n var hasConfig = typeof config === 'object';\n return new Promise(function (resolve, reject) {\n var subscriber = new SafeSubscriber({\n next: function (value) {\n resolve(value);\n subscriber.unsubscribe();\n },\n error: reject,\n complete: function () {\n if (hasConfig) {\n resolve(config.defaultValue);\n }\n else {\n reject(new EmptyError());\n }\n },\n });\n source.subscribe(subscriber);\n });\n}\n//# sourceMappingURL=firstValueFrom.js.map","import { createErrorClass } from './createErrorClass';\nexport var ArgumentOutOfRangeError = createErrorClass(function (_super) {\n return function ArgumentOutOfRangeErrorImpl() {\n _super(this);\n this.name = 'ArgumentOutOfRangeError';\n this.message = 'argument out of range';\n };\n});\n//# sourceMappingURL=ArgumentOutOfRangeError.js.map","import { createErrorClass } from './createErrorClass';\nexport var NotFoundError = createErrorClass(function (_super) {\n return function NotFoundErrorImpl(message) {\n _super(this);\n this.name = 'NotFoundError';\n this.message = message;\n };\n});\n//# sourceMappingURL=NotFoundError.js.map","import { createErrorClass } from './createErrorClass';\nexport var SequenceError = createErrorClass(function (_super) {\n return function SequenceErrorImpl(message) {\n _super(this);\n this.name = 'SequenceError';\n this.message = message;\n };\n});\n//# sourceMappingURL=SequenceError.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { isValidDate } from '../util/isDate';\nimport { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createErrorClass } from '../util/createErrorClass';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { executeSchedule } from '../util/executeSchedule';\nexport var TimeoutError = createErrorClass(function (_super) {\n return function TimeoutErrorImpl(info) {\n if (info === void 0) { info = null; }\n _super(this);\n this.message = 'Timeout has occurred';\n this.name = 'TimeoutError';\n this.info = info;\n };\n});\nexport function timeout(config, schedulerArg) {\n var _a = (isValidDate(config) ? { first: config } : typeof config === 'number' ? { each: config } : config), first = _a.first, each = _a.each, _b = _a.with, _with = _b === void 0 ? timeoutErrorFactory : _b, _c = _a.scheduler, scheduler = _c === void 0 ? schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : asyncScheduler : _c, _d = _a.meta, meta = _d === void 0 ? null : _d;\n if (first == null && each == null) {\n throw new TypeError('No timeout provided.');\n }\n return operate(function (source, subscriber) {\n var originalSourceSubscription;\n var timerSubscription;\n var lastValue = null;\n var seen = 0;\n var startTimer = function (delay) {\n timerSubscription = executeSchedule(subscriber, scheduler, function () {\n try {\n originalSourceSubscription.unsubscribe();\n innerFrom(_with({\n meta: meta,\n lastValue: lastValue,\n seen: seen,\n })).subscribe(subscriber);\n }\n catch (err) {\n subscriber.error(err);\n }\n }, delay);\n };\n originalSourceSubscription = source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe();\n seen++;\n subscriber.next((lastValue = value));\n each > 0 && startTimer(each);\n }, undefined, undefined, function () {\n if (!(timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.closed)) {\n timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe();\n }\n lastValue = null;\n }));\n !seen && startTimer(first != null ? (typeof first === 'number' ? first : +first - scheduler.now()) : each);\n });\n}\nfunction timeoutErrorFactory(info) {\n throw new TimeoutError(info);\n}\n//# sourceMappingURL=timeout.js.map","export function isValidDate(value) {\n return value instanceof Date && !isNaN(value);\n}\n//# sourceMappingURL=isDate.js.map","import { bindCallbackInternals } from './bindCallbackInternals';\nexport function bindCallback(callbackFunc, resultSelector, scheduler) {\n return bindCallbackInternals(false, callbackFunc, resultSelector, scheduler);\n}\n//# sourceMappingURL=bindCallback.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { isScheduler } from '../util/isScheduler';\nimport { Observable } from '../Observable';\nimport { subscribeOn } from '../operators/subscribeOn';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { observeOn } from '../operators/observeOn';\nimport { AsyncSubject } from '../AsyncSubject';\nexport function bindCallbackInternals(isNodeStyle, callbackFunc, resultSelector, scheduler) {\n if (resultSelector) {\n if (isScheduler(resultSelector)) {\n scheduler = resultSelector;\n }\n else {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return bindCallbackInternals(isNodeStyle, callbackFunc, scheduler)\n .apply(this, args)\n .pipe(mapOneOrManyArgs(resultSelector));\n };\n }\n }\n if (scheduler) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return bindCallbackInternals(isNodeStyle, callbackFunc)\n .apply(this, args)\n .pipe(subscribeOn(scheduler), observeOn(scheduler));\n };\n }\n return function () {\n var _this = this;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var subject = new AsyncSubject();\n var uninitialized = true;\n return new Observable(function (subscriber) {\n var subs = subject.subscribe(subscriber);\n if (uninitialized) {\n uninitialized = false;\n var isAsync_1 = false;\n var isComplete_1 = false;\n callbackFunc.apply(_this, __spreadArray(__spreadArray([], __read(args)), [\n function () {\n var results = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n results[_i] = arguments[_i];\n }\n if (isNodeStyle) {\n var err = results.shift();\n if (err != null) {\n subject.error(err);\n return;\n }\n }\n subject.next(1 < results.length ? results : results[0]);\n isComplete_1 = true;\n if (isAsync_1) {\n subject.complete();\n }\n },\n ]));\n if (isComplete_1) {\n subject.complete();\n }\n isAsync_1 = true;\n }\n return subs;\n });\n };\n}\n//# sourceMappingURL=bindCallbackInternals.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { map } from \"../operators/map\";\nvar isArray = Array.isArray;\nfunction callOrApply(fn, args) {\n return isArray(args) ? fn.apply(void 0, __spreadArray([], __read(args))) : fn(args);\n}\nexport function mapOneOrManyArgs(fn) {\n return map(function (args) { return callOrApply(fn, args); });\n}\n//# sourceMappingURL=mapOneOrManyArgs.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function map(project, thisArg) {\n return operate(function (source, subscriber) {\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n subscriber.next(project.call(thisArg, value, index++));\n }));\n });\n}\n//# sourceMappingURL=map.js.map","import { bindCallbackInternals } from './bindCallbackInternals';\nexport function bindNodeCallback(callbackFunc, resultSelector, scheduler) {\n return bindCallbackInternals(true, callbackFunc, resultSelector, scheduler);\n}\n//# sourceMappingURL=bindNodeCallback.js.map","import { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { from } from './from';\nimport { identity } from '../util/identity';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { popResultSelector, popScheduler } from '../util/args';\nimport { createObject } from '../util/createObject';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function combineLatest() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = popScheduler(args);\n var resultSelector = popResultSelector(args);\n var _a = argsArgArrayOrObject(args), observables = _a.args, keys = _a.keys;\n if (observables.length === 0) {\n return from([], scheduler);\n }\n var result = new Observable(combineLatestInit(observables, scheduler, keys\n ?\n function (values) { return createObject(keys, values); }\n :\n identity));\n return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\nexport function combineLatestInit(observables, scheduler, valueTransform) {\n if (valueTransform === void 0) { valueTransform = identity; }\n return function (subscriber) {\n maybeSchedule(scheduler, function () {\n var length = observables.length;\n var values = new Array(length);\n var active = length;\n var remainingFirstValues = length;\n var _loop_1 = function (i) {\n maybeSchedule(scheduler, function () {\n var source = from(observables[i], scheduler);\n var hasFirstValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n values[i] = value;\n if (!hasFirstValue) {\n hasFirstValue = true;\n remainingFirstValues--;\n }\n if (!remainingFirstValues) {\n subscriber.next(valueTransform(values.slice()));\n }\n }, function () {\n if (!--active) {\n subscriber.complete();\n }\n }));\n }, subscriber);\n };\n for (var i = 0; i < length; i++) {\n _loop_1(i);\n }\n }, subscriber);\n };\n}\nfunction maybeSchedule(scheduler, execute, subscription) {\n if (scheduler) {\n executeSchedule(subscription, scheduler, execute);\n }\n else {\n execute();\n }\n}\n//# sourceMappingURL=combineLatest.js.map","var isArray = Array.isArray;\nvar getPrototypeOf = Object.getPrototypeOf, objectProto = Object.prototype, getKeys = Object.keys;\nexport function argsArgArrayOrObject(args) {\n if (args.length === 1) {\n var first_1 = args[0];\n if (isArray(first_1)) {\n return { args: first_1, keys: null };\n }\n if (isPOJO(first_1)) {\n var keys = getKeys(first_1);\n return {\n args: keys.map(function (key) { return first_1[key]; }),\n keys: keys,\n };\n }\n }\n return { args: args, keys: null };\n}\nfunction isPOJO(obj) {\n return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto;\n}\n//# sourceMappingURL=argsArgArrayOrObject.js.map","export function createObject(keys, values) {\n return keys.reduce(function (result, key, i) { return ((result[key] = values[i]), result); }, {});\n}\n//# sourceMappingURL=createObject.js.map","import { concatAll } from '../operators/concatAll';\nimport { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function concat() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return concatAll()(from(args, popScheduler(args)));\n}\n//# sourceMappingURL=concat.js.map","import { mergeAll } from './mergeAll';\nexport function concatAll() {\n return mergeAll(1);\n}\n//# sourceMappingURL=concatAll.js.map","import { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent) {\n if (concurrent === void 0) { concurrent = Infinity; }\n return mergeMap(identity, concurrent);\n}\n//# sourceMappingURL=mergeAll.js.map","import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nimport { isFunction } from '../util/isFunction';\nexport function mergeMap(project, resultSelector, concurrent) {\n if (concurrent === void 0) { concurrent = Infinity; }\n if (isFunction(resultSelector)) {\n return mergeMap(function (a, i) { return map(function (b, ii) { return resultSelector(a, b, i, ii); })(innerFrom(project(a, i))); }, concurrent);\n }\n else if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return operate(function (source, subscriber) { return mergeInternals(source, subscriber, project, concurrent); });\n}\n//# sourceMappingURL=mergeMap.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { executeSchedule } from '../util/executeSchedule';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {\n var buffer = [];\n var active = 0;\n var index = 0;\n var isComplete = false;\n var checkComplete = function () {\n if (isComplete && !buffer.length && !active) {\n subscriber.complete();\n }\n };\n var outerNext = function (value) { return (active < concurrent ? doInnerSub(value) : buffer.push(value)); };\n var doInnerSub = function (value) {\n expand && subscriber.next(value);\n active++;\n var innerComplete = false;\n innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, function (innerValue) {\n onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);\n if (expand) {\n outerNext(innerValue);\n }\n else {\n subscriber.next(innerValue);\n }\n }, function () {\n innerComplete = true;\n }, undefined, function () {\n if (innerComplete) {\n try {\n active--;\n var _loop_1 = function () {\n var bufferedValue = buffer.shift();\n if (innerSubScheduler) {\n executeSchedule(subscriber, innerSubScheduler, function () { return doInnerSub(bufferedValue); });\n }\n else {\n doInnerSub(bufferedValue);\n }\n };\n while (buffer.length && active < concurrent) {\n _loop_1();\n }\n checkComplete();\n }\n catch (err) {\n subscriber.error(err);\n }\n }\n }));\n };\n source.subscribe(createOperatorSubscriber(subscriber, outerNext, function () {\n isComplete = true;\n checkComplete();\n }));\n return function () {\n additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();\n };\n}\n//# sourceMappingURL=mergeInternals.js.map","import { Subject } from '../Subject';\nimport { Observable } from '../Observable';\nimport { defer } from './defer';\nvar DEFAULT_CONFIG = {\n connector: function () { return new Subject(); },\n resetOnDisconnect: true,\n};\nexport function connectable(source, config) {\n if (config === void 0) { config = DEFAULT_CONFIG; }\n var connection = null;\n var connector = config.connector, _a = config.resetOnDisconnect, resetOnDisconnect = _a === void 0 ? true : _a;\n var subject = connector();\n var result = new Observable(function (subscriber) {\n return subject.subscribe(subscriber);\n });\n result.connect = function () {\n if (!connection || connection.closed) {\n connection = defer(function () { return source; }).subscribe(subject);\n if (resetOnDisconnect) {\n connection.add(function () { return (subject = connector()); });\n }\n }\n return connection;\n };\n return result;\n}\n//# sourceMappingURL=connectable.js.map","import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nexport function defer(observableFactory) {\n return new Observable(function (subscriber) {\n innerFrom(observableFactory()).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=defer.js.map","import { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { innerFrom } from './innerFrom';\nimport { popResultSelector } from '../util/args';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { createObject } from '../util/createObject';\nexport function forkJoin() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var resultSelector = popResultSelector(args);\n var _a = argsArgArrayOrObject(args), sources = _a.args, keys = _a.keys;\n var result = new Observable(function (subscriber) {\n var length = sources.length;\n if (!length) {\n subscriber.complete();\n return;\n }\n var values = new Array(length);\n var remainingCompletions = length;\n var remainingEmissions = length;\n var _loop_1 = function (sourceIndex) {\n var hasValue = false;\n innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, function (value) {\n if (!hasValue) {\n hasValue = true;\n remainingEmissions--;\n }\n values[sourceIndex] = value;\n }, function () { return remainingCompletions--; }, undefined, function () {\n if (!remainingCompletions || !hasValue) {\n if (!remainingEmissions) {\n subscriber.next(keys ? createObject(keys, values) : values);\n }\n subscriber.complete();\n }\n }));\n };\n for (var sourceIndex = 0; sourceIndex < length; sourceIndex++) {\n _loop_1(sourceIndex);\n }\n });\n return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\n//# sourceMappingURL=forkJoin.js.map","import { __read } from \"tslib\";\nimport { innerFrom } from '../observable/innerFrom';\nimport { Observable } from '../Observable';\nimport { mergeMap } from '../operators/mergeMap';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isFunction } from '../util/isFunction';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nvar nodeEventEmitterMethods = ['addListener', 'removeListener'];\nvar eventTargetMethods = ['addEventListener', 'removeEventListener'];\nvar jqueryMethods = ['on', 'off'];\nexport function fromEvent(target, eventName, options, resultSelector) {\n if (isFunction(options)) {\n resultSelector = options;\n options = undefined;\n }\n if (resultSelector) {\n return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector));\n }\n var _a = __read(isEventTarget(target)\n ? eventTargetMethods.map(function (methodName) { return function (handler) { return target[methodName](eventName, handler, options); }; })\n :\n isNodeStyleEventEmitter(target)\n ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName))\n : isJQueryStyleEventEmitter(target)\n ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName))\n : [], 2), add = _a[0], remove = _a[1];\n if (!add) {\n if (isArrayLike(target)) {\n return mergeMap(function (subTarget) { return fromEvent(subTarget, eventName, options); })(innerFrom(target));\n }\n }\n if (!add) {\n throw new TypeError('Invalid event target');\n }\n return new Observable(function (subscriber) {\n var handler = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return subscriber.next(1 < args.length ? args : args[0]);\n };\n add(handler);\n return function () { return remove(handler); };\n });\n}\nfunction toCommonHandlerRegistry(target, eventName) {\n return function (methodName) { return function (handler) { return target[methodName](eventName, handler); }; };\n}\nfunction isNodeStyleEventEmitter(target) {\n return isFunction(target.addListener) && isFunction(target.removeListener);\n}\nfunction isJQueryStyleEventEmitter(target) {\n return isFunction(target.on) && isFunction(target.off);\n}\nfunction isEventTarget(target) {\n return isFunction(target.addEventListener) && isFunction(target.removeEventListener);\n}\n//# sourceMappingURL=fromEvent.js.map","import { Observable } from '../Observable';\nimport { isFunction } from '../util/isFunction';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nexport function fromEventPattern(addHandler, removeHandler, resultSelector) {\n if (resultSelector) {\n return fromEventPattern(addHandler, removeHandler).pipe(mapOneOrManyArgs(resultSelector));\n }\n return new Observable(function (subscriber) {\n var handler = function () {\n var e = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n e[_i] = arguments[_i];\n }\n return subscriber.next(e.length === 1 ? e[0] : e);\n };\n var retValue = addHandler(handler);\n return isFunction(removeHandler) ? function () { return removeHandler(handler, retValue); } : undefined;\n });\n}\n//# sourceMappingURL=fromEventPattern.js.map","import { __generator } from \"tslib\";\nimport { identity } from '../util/identity';\nimport { isScheduler } from '../util/isScheduler';\nimport { defer } from './defer';\nimport { scheduleIterable } from '../scheduled/scheduleIterable';\nexport function generate(initialStateOrOptions, condition, iterate, resultSelectorOrScheduler, scheduler) {\n var _a, _b;\n var resultSelector;\n var initialState;\n if (arguments.length === 1) {\n (_a = initialStateOrOptions, initialState = _a.initialState, condition = _a.condition, iterate = _a.iterate, _b = _a.resultSelector, resultSelector = _b === void 0 ? identity : _b, scheduler = _a.scheduler);\n }\n else {\n initialState = initialStateOrOptions;\n if (!resultSelectorOrScheduler || isScheduler(resultSelectorOrScheduler)) {\n resultSelector = identity;\n scheduler = resultSelectorOrScheduler;\n }\n else {\n resultSelector = resultSelectorOrScheduler;\n }\n }\n function gen() {\n var state;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n state = initialState;\n _a.label = 1;\n case 1:\n if (!(!condition || condition(state))) return [3, 4];\n return [4, resultSelector(state)];\n case 2:\n _a.sent();\n _a.label = 3;\n case 3:\n state = iterate(state);\n return [3, 1];\n case 4: return [2];\n }\n });\n }\n return defer((scheduler\n ?\n function () { return scheduleIterable(gen(), scheduler); }\n :\n gen));\n}\n//# sourceMappingURL=generate.js.map","import { defer } from './defer';\nexport function iif(condition, trueResult, falseResult) {\n return defer(function () { return (condition() ? trueResult : falseResult); });\n}\n//# sourceMappingURL=iif.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { timer } from './timer';\nexport function interval(period, scheduler) {\n if (period === void 0) { period = 0; }\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n if (period < 0) {\n period = 0;\n }\n return timer(period, period, scheduler);\n}\n//# sourceMappingURL=interval.js.map","import { Observable } from '../Observable';\nimport { async as asyncScheduler } from '../scheduler/async';\nimport { isScheduler } from '../util/isScheduler';\nimport { isValidDate } from '../util/isDate';\nexport function timer(dueTime, intervalOrScheduler, scheduler) {\n if (dueTime === void 0) { dueTime = 0; }\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n var intervalDuration = -1;\n if (intervalOrScheduler != null) {\n if (isScheduler(intervalOrScheduler)) {\n scheduler = intervalOrScheduler;\n }\n else {\n intervalDuration = intervalOrScheduler;\n }\n }\n return new Observable(function (subscriber) {\n var due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime;\n if (due < 0) {\n due = 0;\n }\n var n = 0;\n return scheduler.schedule(function () {\n if (!subscriber.closed) {\n subscriber.next(n++);\n if (0 <= intervalDuration) {\n this.schedule(undefined, intervalDuration);\n }\n else {\n subscriber.complete();\n }\n }\n }, due);\n });\n}\n//# sourceMappingURL=timer.js.map","import { mergeAll } from '../operators/mergeAll';\nimport { innerFrom } from './innerFrom';\nimport { EMPTY } from './empty';\nimport { popNumber, popScheduler } from '../util/args';\nimport { from } from './from';\nexport function merge() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = popScheduler(args);\n var concurrent = popNumber(args, Infinity);\n var sources = args;\n return !sources.length\n ?\n EMPTY\n : sources.length === 1\n ?\n innerFrom(sources[0])\n :\n mergeAll(concurrent)(from(sources, scheduler));\n}\n//# sourceMappingURL=merge.js.map","import { Observable } from '../Observable';\nimport { noop } from '../util/noop';\nexport var NEVER = new Observable(noop);\nexport function never() {\n return NEVER;\n}\n//# sourceMappingURL=never.js.map","import { Observable } from '../Observable';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { OperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { noop } from '../util/noop';\nimport { innerFrom } from './innerFrom';\nexport function onErrorResumeNext() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n var nextSources = argsOrArgArray(sources);\n return new Observable(function (subscriber) {\n var sourceIndex = 0;\n var subscribeNext = function () {\n if (sourceIndex < nextSources.length) {\n var nextSource = void 0;\n try {\n nextSource = innerFrom(nextSources[sourceIndex++]);\n }\n catch (err) {\n subscribeNext();\n return;\n }\n var innerSubscriber = new OperatorSubscriber(subscriber, undefined, noop, noop);\n nextSource.subscribe(innerSubscriber);\n innerSubscriber.add(subscribeNext);\n }\n else {\n subscriber.complete();\n }\n };\n subscribeNext();\n });\n}\n//# sourceMappingURL=onErrorResumeNext.js.map","var isArray = Array.isArray;\nexport function argsOrArgArray(args) {\n return args.length === 1 && isArray(args[0]) ? args[0] : args;\n}\n//# sourceMappingURL=argsOrArgArray.js.map","import { from } from './from';\nexport function pairs(obj, scheduler) {\n return from(Object.entries(obj), scheduler);\n}\n//# sourceMappingURL=pairs.js.map","import { not } from '../util/not';\nimport { filter } from '../operators/filter';\nimport { innerFrom } from './innerFrom';\nexport function partition(source, predicate, thisArg) {\n return [filter(predicate, thisArg)(innerFrom(source)), filter(not(predicate, thisArg))(innerFrom(source))];\n}\n//# sourceMappingURL=partition.js.map","export function not(pred, thisArg) {\n return function (value, index) { return !pred.call(thisArg, value, index); };\n}\n//# sourceMappingURL=not.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function filter(predicate, thisArg) {\n return operate(function (source, subscriber) {\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); }));\n });\n}\n//# sourceMappingURL=filter.js.map","import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nexport function race() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n sources = argsOrArgArray(sources);\n return sources.length === 1 ? innerFrom(sources[0]) : new Observable(raceInit(sources));\n}\nexport function raceInit(sources) {\n return function (subscriber) {\n var subscriptions = [];\n var _loop_1 = function (i) {\n subscriptions.push(innerFrom(sources[i]).subscribe(createOperatorSubscriber(subscriber, function (value) {\n if (subscriptions) {\n for (var s = 0; s < subscriptions.length; s++) {\n s !== i && subscriptions[s].unsubscribe();\n }\n subscriptions = null;\n }\n subscriber.next(value);\n })));\n };\n for (var i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) {\n _loop_1(i);\n }\n };\n}\n//# sourceMappingURL=race.js.map","import { Observable } from '../Observable';\nimport { EMPTY } from './empty';\nexport function range(start, count, scheduler) {\n if (count == null) {\n count = start;\n start = 0;\n }\n if (count <= 0) {\n return EMPTY;\n }\n var end = count + start;\n return new Observable(scheduler\n ?\n function (subscriber) {\n var n = start;\n return scheduler.schedule(function () {\n if (n < end) {\n subscriber.next(n++);\n this.schedule();\n }\n else {\n subscriber.complete();\n }\n });\n }\n :\n function (subscriber) {\n var n = start;\n while (n < end && !subscriber.closed) {\n subscriber.next(n++);\n }\n subscriber.complete();\n });\n}\n//# sourceMappingURL=range.js.map","import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nimport { EMPTY } from './empty';\nexport function using(resourceFactory, observableFactory) {\n return new Observable(function (subscriber) {\n var resource = resourceFactory();\n var result = observableFactory(resource);\n var source = result ? innerFrom(result) : EMPTY;\n source.subscribe(subscriber);\n return function () {\n if (resource) {\n resource.unsubscribe();\n }\n };\n });\n}\n//# sourceMappingURL=using.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { EMPTY } from './empty';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { popResultSelector } from '../util/args';\nexport function zip() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var resultSelector = popResultSelector(args);\n var sources = argsOrArgArray(args);\n return sources.length\n ? new Observable(function (subscriber) {\n var buffers = sources.map(function () { return []; });\n var completed = sources.map(function () { return false; });\n subscriber.add(function () {\n buffers = completed = null;\n });\n var _loop_1 = function (sourceIndex) {\n innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, function (value) {\n buffers[sourceIndex].push(value);\n if (buffers.every(function (buffer) { return buffer.length; })) {\n var result = buffers.map(function (buffer) { return buffer.shift(); });\n subscriber.next(resultSelector ? resultSelector.apply(void 0, __spreadArray([], __read(result))) : result);\n if (buffers.some(function (buffer, i) { return !buffer.length && completed[i]; })) {\n subscriber.complete();\n }\n }\n }, function () {\n completed[sourceIndex] = true;\n !buffers[sourceIndex].length && subscriber.complete();\n }));\n };\n for (var sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) {\n _loop_1(sourceIndex);\n }\n return function () {\n buffers = completed = null;\n };\n })\n : EMPTY;\n}\n//# sourceMappingURL=zip.js.map","export {};\n//# sourceMappingURL=types.js.map","import { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function audit(durationSelector) {\n return operate(function (source, subscriber) {\n var hasValue = false;\n var lastValue = null;\n var durationSubscriber = null;\n var isComplete = false;\n var endDuration = function () {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n durationSubscriber = null;\n if (hasValue) {\n hasValue = false;\n var value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n isComplete && subscriber.complete();\n };\n var cleanupDuration = function () {\n durationSubscriber = null;\n isComplete && subscriber.complete();\n };\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n hasValue = true;\n lastValue = value;\n if (!durationSubscriber) {\n innerFrom(durationSelector(value)).subscribe((durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration)));\n }\n }, function () {\n isComplete = true;\n (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=audit.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { audit } from './audit';\nimport { timer } from '../observable/timer';\nexport function auditTime(duration, scheduler) {\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n return audit(function () { return timer(duration, scheduler); });\n}\n//# sourceMappingURL=auditTime.js.map","import { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function buffer(closingNotifier) {\n return operate(function (source, subscriber) {\n var currentBuffer = [];\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return currentBuffer.push(value); }, function () {\n subscriber.next(currentBuffer);\n subscriber.complete();\n }));\n innerFrom(closingNotifier).subscribe(createOperatorSubscriber(subscriber, function () {\n var b = currentBuffer;\n currentBuffer = [];\n subscriber.next(b);\n }, noop));\n return function () {\n currentBuffer = null;\n };\n });\n}\n//# sourceMappingURL=buffer.js.map","import { __values } from \"tslib\";\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { arrRemove } from '../util/arrRemove';\nexport function bufferCount(bufferSize, startBufferEvery) {\n if (startBufferEvery === void 0) { startBufferEvery = null; }\n startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize;\n return operate(function (source, subscriber) {\n var buffers = [];\n var count = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var e_1, _a, e_2, _b;\n var toEmit = null;\n if (count++ % startBufferEvery === 0) {\n buffers.push([]);\n }\n try {\n for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) {\n var buffer = buffers_1_1.value;\n buffer.push(value);\n if (bufferSize <= buffer.length) {\n toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : [];\n toEmit.push(buffer);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n if (toEmit) {\n try {\n for (var toEmit_1 = __values(toEmit), toEmit_1_1 = toEmit_1.next(); !toEmit_1_1.done; toEmit_1_1 = toEmit_1.next()) {\n var buffer = toEmit_1_1.value;\n arrRemove(buffers, buffer);\n subscriber.next(buffer);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (toEmit_1_1 && !toEmit_1_1.done && (_b = toEmit_1.return)) _b.call(toEmit_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n }, function () {\n var e_3, _a;\n try {\n for (var buffers_2 = __values(buffers), buffers_2_1 = buffers_2.next(); !buffers_2_1.done; buffers_2_1 = buffers_2.next()) {\n var buffer = buffers_2_1.value;\n subscriber.next(buffer);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (buffers_2_1 && !buffers_2_1.done && (_a = buffers_2.return)) _a.call(buffers_2);\n }\n finally { if (e_3) throw e_3.error; }\n }\n subscriber.complete();\n }, undefined, function () {\n buffers = null;\n }));\n });\n}\n//# sourceMappingURL=bufferCount.js.map","import { __values } from \"tslib\";\nimport { Subscription } from '../Subscription';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { arrRemove } from '../util/arrRemove';\nimport { asyncScheduler } from '../scheduler/async';\nimport { popScheduler } from '../util/args';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function bufferTime(bufferTimeSpan) {\n var _a, _b;\n var otherArgs = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n otherArgs[_i - 1] = arguments[_i];\n }\n var scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler;\n var bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null;\n var maxBufferSize = otherArgs[1] || Infinity;\n return operate(function (source, subscriber) {\n var bufferRecords = [];\n var restartOnEmit = false;\n var emit = function (record) {\n var buffer = record.buffer, subs = record.subs;\n subs.unsubscribe();\n arrRemove(bufferRecords, record);\n subscriber.next(buffer);\n restartOnEmit && startBuffer();\n };\n var startBuffer = function () {\n if (bufferRecords) {\n var subs = new Subscription();\n subscriber.add(subs);\n var buffer = [];\n var record_1 = {\n buffer: buffer,\n subs: subs,\n };\n bufferRecords.push(record_1);\n executeSchedule(subs, scheduler, function () { return emit(record_1); }, bufferTimeSpan);\n }\n };\n if (bufferCreationInterval !== null && bufferCreationInterval >= 0) {\n executeSchedule(subscriber, scheduler, startBuffer, bufferCreationInterval, true);\n }\n else {\n restartOnEmit = true;\n }\n startBuffer();\n var bufferTimeSubscriber = createOperatorSubscriber(subscriber, function (value) {\n var e_1, _a;\n var recordsCopy = bufferRecords.slice();\n try {\n for (var recordsCopy_1 = __values(recordsCopy), recordsCopy_1_1 = recordsCopy_1.next(); !recordsCopy_1_1.done; recordsCopy_1_1 = recordsCopy_1.next()) {\n var record = recordsCopy_1_1.value;\n var buffer = record.buffer;\n buffer.push(value);\n maxBufferSize <= buffer.length && emit(record);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (recordsCopy_1_1 && !recordsCopy_1_1.done && (_a = recordsCopy_1.return)) _a.call(recordsCopy_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }, function () {\n while (bufferRecords === null || bufferRecords === void 0 ? void 0 : bufferRecords.length) {\n subscriber.next(bufferRecords.shift().buffer);\n }\n bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 ? void 0 : bufferTimeSubscriber.unsubscribe();\n subscriber.complete();\n subscriber.unsubscribe();\n }, undefined, function () { return (bufferRecords = null); });\n source.subscribe(bufferTimeSubscriber);\n });\n}\n//# sourceMappingURL=bufferTime.js.map","import { __values } from \"tslib\";\nimport { Subscription } from '../Subscription';\nimport { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nimport { arrRemove } from '../util/arrRemove';\nexport function bufferToggle(openings, closingSelector) {\n return operate(function (source, subscriber) {\n var buffers = [];\n innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, function (openValue) {\n var buffer = [];\n buffers.push(buffer);\n var closingSubscription = new Subscription();\n var emitBuffer = function () {\n arrRemove(buffers, buffer);\n subscriber.next(buffer);\n closingSubscription.unsubscribe();\n };\n closingSubscription.add(innerFrom(closingSelector(openValue)).subscribe(createOperatorSubscriber(subscriber, emitBuffer, noop)));\n }, noop));\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var e_1, _a;\n try {\n for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) {\n var buffer = buffers_1_1.value;\n buffer.push(value);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }, function () {\n while (buffers.length > 0) {\n subscriber.next(buffers.shift());\n }\n subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=bufferToggle.js.map","import { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function bufferWhen(closingSelector) {\n return operate(function (source, subscriber) {\n var buffer = null;\n var closingSubscriber = null;\n var openBuffer = function () {\n closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe();\n var b = buffer;\n buffer = [];\n b && subscriber.next(b);\n innerFrom(closingSelector()).subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openBuffer, noop)));\n };\n openBuffer();\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return buffer === null || buffer === void 0 ? void 0 : buffer.push(value); }, function () {\n buffer && subscriber.next(buffer);\n subscriber.complete();\n }, undefined, function () { return (buffer = closingSubscriber = null); }));\n });\n}\n//# sourceMappingURL=bufferWhen.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { operate } from '../util/lift';\nexport function catchError(selector) {\n return operate(function (source, subscriber) {\n var innerSub = null;\n var syncUnsub = false;\n var handledResult;\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, function (err) {\n handledResult = innerFrom(selector(err, catchError(selector)(source)));\n if (innerSub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n else {\n syncUnsub = true;\n }\n }));\n if (syncUnsub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n });\n}\n//# sourceMappingURL=catchError.js.map","import { combineLatestAll } from './combineLatestAll';\nexport var combineAll = combineLatestAll;\n//# sourceMappingURL=combineAll.js.map","import { combineLatest } from '../observable/combineLatest';\nimport { joinAllInternals } from './joinAllInternals';\nexport function combineLatestAll(project) {\n return joinAllInternals(combineLatest, project);\n}\n//# sourceMappingURL=combineLatestAll.js.map","import { identity } from '../util/identity';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { pipe } from '../util/pipe';\nimport { mergeMap } from './mergeMap';\nimport { toArray } from './toArray';\nexport function joinAllInternals(joinFn, project) {\n return pipe(toArray(), mergeMap(function (sources) { return joinFn(sources); }), project ? mapOneOrManyArgs(project) : identity);\n}\n//# sourceMappingURL=joinAllInternals.js.map","import { reduce } from './reduce';\nimport { operate } from '../util/lift';\nvar arrReducer = function (arr, value) { return (arr.push(value), arr); };\nexport function toArray() {\n return operate(function (source, subscriber) {\n reduce(arrReducer, [])(source).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=toArray.js.map","import { scanInternals } from './scanInternals';\nimport { operate } from '../util/lift';\nexport function reduce(accumulator, seed) {\n return operate(scanInternals(accumulator, seed, arguments.length >= 2, false, true));\n}\n//# sourceMappingURL=reduce.js.map","import { createOperatorSubscriber } from './OperatorSubscriber';\nexport function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) {\n return function (source, subscriber) {\n var hasState = hasSeed;\n var state = seed;\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var i = index++;\n state = hasState\n ?\n accumulator(state, value, i)\n :\n ((hasState = true), value);\n emitOnNext && subscriber.next(state);\n }, emitBeforeComplete &&\n (function () {\n hasState && subscriber.next(state);\n subscriber.complete();\n })));\n };\n}\n//# sourceMappingURL=scanInternals.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { combineLatest } from './combineLatest';\nexport function combineLatestWith() {\n var otherSources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n otherSources[_i] = arguments[_i];\n }\n return combineLatest.apply(void 0, __spreadArray([], __read(otherSources)));\n}\n//# sourceMappingURL=combineLatestWith.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { combineLatestInit } from '../observable/combineLatest';\nimport { operate } from '../util/lift';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { pipe } from '../util/pipe';\nimport { popResultSelector } from '../util/args';\nexport function combineLatest() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var resultSelector = popResultSelector(args);\n return resultSelector\n ? pipe(combineLatest.apply(void 0, __spreadArray([], __read(args))), mapOneOrManyArgs(resultSelector))\n : operate(function (source, subscriber) {\n combineLatestInit(__spreadArray([source], __read(argsOrArgArray(args))))(subscriber);\n });\n}\n//# sourceMappingURL=combineLatest.js.map","import { mergeMap } from './mergeMap';\nimport { isFunction } from '../util/isFunction';\nexport function concatMap(project, resultSelector) {\n return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1);\n}\n//# sourceMappingURL=concatMap.js.map","import { concatMap } from './concatMap';\nimport { isFunction } from '../util/isFunction';\nexport function concatMapTo(innerObservable, resultSelector) {\n return isFunction(resultSelector) ? concatMap(function () { return innerObservable; }, resultSelector) : concatMap(function () { return innerObservable; });\n}\n//# sourceMappingURL=concatMapTo.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { concat } from './concat';\nexport function concatWith() {\n var otherSources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n otherSources[_i] = arguments[_i];\n }\n return concat.apply(void 0, __spreadArray([], __read(otherSources)));\n}\n//# sourceMappingURL=concatWith.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { operate } from '../util/lift';\nimport { concatAll } from './concatAll';\nimport { popScheduler } from '../util/args';\nimport { from } from '../observable/from';\nexport function concat() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = popScheduler(args);\n return operate(function (source, subscriber) {\n concatAll()(from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=concat.js.map","import { Subject } from '../Subject';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { fromSubscribable } from '../observable/fromSubscribable';\nvar DEFAULT_CONFIG = {\n connector: function () { return new Subject(); },\n};\nexport function connect(selector, config) {\n if (config === void 0) { config = DEFAULT_CONFIG; }\n var connector = config.connector;\n return operate(function (source, subscriber) {\n var subject = connector();\n innerFrom(selector(fromSubscribable(subject))).subscribe(subscriber);\n subscriber.add(source.subscribe(subject));\n });\n}\n//# sourceMappingURL=connect.js.map","import { Observable } from '../Observable';\nexport function fromSubscribable(subscribable) {\n return new Observable(function (subscriber) { return subscribable.subscribe(subscriber); });\n}\n//# sourceMappingURL=fromSubscribable.js.map","import { reduce } from './reduce';\nexport function count(predicate) {\n return reduce(function (total, value, i) { return (!predicate || predicate(value, i) ? total + 1 : total); }, 0);\n}\n//# sourceMappingURL=count.js.map","import { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function debounce(durationSelector) {\n return operate(function (source, subscriber) {\n var hasValue = false;\n var lastValue = null;\n var durationSubscriber = null;\n var emit = function () {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n durationSubscriber = null;\n if (hasValue) {\n hasValue = false;\n var value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n };\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n hasValue = true;\n lastValue = value;\n durationSubscriber = createOperatorSubscriber(subscriber, emit, noop);\n innerFrom(durationSelector(value)).subscribe(durationSubscriber);\n }, function () {\n emit();\n subscriber.complete();\n }, undefined, function () {\n lastValue = durationSubscriber = null;\n }));\n });\n}\n//# sourceMappingURL=debounce.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function debounceTime(dueTime, scheduler) {\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n return operate(function (source, subscriber) {\n var activeTask = null;\n var lastValue = null;\n var lastTime = null;\n var emit = function () {\n if (activeTask) {\n activeTask.unsubscribe();\n activeTask = null;\n var value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n };\n function emitWhenIdle() {\n var targetTime = lastTime + dueTime;\n var now = scheduler.now();\n if (now < targetTime) {\n activeTask = this.schedule(undefined, targetTime - now);\n subscriber.add(activeTask);\n return;\n }\n emit();\n }\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n lastValue = value;\n lastTime = scheduler.now();\n if (!activeTask) {\n activeTask = scheduler.schedule(emitWhenIdle, dueTime);\n subscriber.add(activeTask);\n }\n }, function () {\n emit();\n subscriber.complete();\n }, undefined, function () {\n lastValue = activeTask = null;\n }));\n });\n}\n//# sourceMappingURL=debounceTime.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function defaultIfEmpty(defaultValue) {\n return operate(function (source, subscriber) {\n var hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n hasValue = true;\n subscriber.next(value);\n }, function () {\n if (!hasValue) {\n subscriber.next(defaultValue);\n }\n subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=defaultIfEmpty.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { delayWhen } from './delayWhen';\nimport { timer } from '../observable/timer';\nexport function delay(due, scheduler) {\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n var duration = timer(due, scheduler);\n return delayWhen(function () { return duration; });\n}\n//# sourceMappingURL=delay.js.map","import { concat } from '../observable/concat';\nimport { take } from './take';\nimport { ignoreElements } from './ignoreElements';\nimport { mapTo } from './mapTo';\nimport { mergeMap } from './mergeMap';\nimport { innerFrom } from '../observable/innerFrom';\nexport function delayWhen(delayDurationSelector, subscriptionDelay) {\n if (subscriptionDelay) {\n return function (source) {\n return concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector)));\n };\n }\n return mergeMap(function (value, index) { return innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)); });\n}\n//# sourceMappingURL=delayWhen.js.map","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function take(count) {\n return count <= 0\n ?\n function () { return EMPTY; }\n : operate(function (source, subscriber) {\n var seen = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n if (++seen <= count) {\n subscriber.next(value);\n if (count <= seen) {\n subscriber.complete();\n }\n }\n }));\n });\n}\n//# sourceMappingURL=take.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nexport function ignoreElements() {\n return operate(function (source, subscriber) {\n source.subscribe(createOperatorSubscriber(subscriber, noop));\n });\n}\n//# sourceMappingURL=ignoreElements.js.map","import { map } from './map';\nexport function mapTo(value) {\n return map(function () { return value; });\n}\n//# sourceMappingURL=mapTo.js.map","import { observeNotification } from '../Notification';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function dematerialize() {\n return operate(function (source, subscriber) {\n source.subscribe(createOperatorSubscriber(subscriber, function (notification) { return observeNotification(notification, subscriber); }));\n });\n}\n//# sourceMappingURL=dematerialize.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nimport { innerFrom } from '../observable/innerFrom';\nexport function distinct(keySelector, flushes) {\n return operate(function (source, subscriber) {\n var distinctKeys = new Set();\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var key = keySelector ? keySelector(value) : value;\n if (!distinctKeys.has(key)) {\n distinctKeys.add(key);\n subscriber.next(value);\n }\n }));\n flushes && innerFrom(flushes).subscribe(createOperatorSubscriber(subscriber, function () { return distinctKeys.clear(); }, noop));\n });\n}\n//# sourceMappingURL=distinct.js.map","import { identity } from '../util/identity';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function distinctUntilChanged(comparator, keySelector) {\n if (keySelector === void 0) { keySelector = identity; }\n comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare;\n return operate(function (source, subscriber) {\n var previousKey;\n var first = true;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var currentKey = keySelector(value);\n if (first || !comparator(previousKey, currentKey)) {\n first = false;\n previousKey = currentKey;\n subscriber.next(value);\n }\n }));\n });\n}\nfunction defaultCompare(a, b) {\n return a === b;\n}\n//# sourceMappingURL=distinctUntilChanged.js.map","import { distinctUntilChanged } from './distinctUntilChanged';\nexport function distinctUntilKeyChanged(key, compare) {\n return distinctUntilChanged(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; });\n}\n//# sourceMappingURL=distinctUntilKeyChanged.js.map","import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { filter } from './filter';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { take } from './take';\nexport function elementAt(index, defaultValue) {\n if (index < 0) {\n throw new ArgumentOutOfRangeError();\n }\n var hasDefaultValue = arguments.length >= 2;\n return function (source) {\n return source.pipe(filter(function (v, i) { return i === index; }), take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new ArgumentOutOfRangeError(); }));\n };\n}\n//# sourceMappingURL=elementAt.js.map","import { EmptyError } from '../util/EmptyError';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function throwIfEmpty(errorFactory) {\n if (errorFactory === void 0) { errorFactory = defaultErrorFactory; }\n return operate(function (source, subscriber) {\n var hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n hasValue = true;\n subscriber.next(value);\n }, function () { return (hasValue ? subscriber.complete() : subscriber.error(errorFactory())); }));\n });\n}\nfunction defaultErrorFactory() {\n return new EmptyError();\n}\n//# sourceMappingURL=throwIfEmpty.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { concat } from '../observable/concat';\nimport { of } from '../observable/of';\nexport function endWith() {\n var values = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n values[_i] = arguments[_i];\n }\n return function (source) { return concat(source, of.apply(void 0, __spreadArray([], __read(values)))); };\n}\n//# sourceMappingURL=endWith.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function every(predicate, thisArg) {\n return operate(function (source, subscriber) {\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n if (!predicate.call(thisArg, value, index++, source)) {\n subscriber.next(false);\n subscriber.complete();\n }\n }, function () {\n subscriber.next(true);\n subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=every.js.map","import { exhaustAll } from './exhaustAll';\nexport var exhaust = exhaustAll;\n//# sourceMappingURL=exhaust.js.map","import { exhaustMap } from './exhaustMap';\nimport { identity } from '../util/identity';\nexport function exhaustAll() {\n return exhaustMap(identity);\n}\n//# sourceMappingURL=exhaustAll.js.map","import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function exhaustMap(project, resultSelector) {\n if (resultSelector) {\n return function (source) {\n return source.pipe(exhaustMap(function (a, i) { return innerFrom(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); }));\n };\n }\n return operate(function (source, subscriber) {\n var index = 0;\n var innerSub = null;\n var isComplete = false;\n source.subscribe(createOperatorSubscriber(subscriber, function (outerValue) {\n if (!innerSub) {\n innerSub = createOperatorSubscriber(subscriber, undefined, function () {\n innerSub = null;\n isComplete && subscriber.complete();\n });\n innerFrom(project(outerValue, index++)).subscribe(innerSub);\n }\n }, function () {\n isComplete = true;\n !innerSub && subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=exhaustMap.js.map","import { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nexport function expand(project, concurrent, scheduler) {\n if (concurrent === void 0) { concurrent = Infinity; }\n concurrent = (concurrent || 0) < 1 ? Infinity : concurrent;\n return operate(function (source, subscriber) {\n return mergeInternals(source, subscriber, project, concurrent, undefined, true, scheduler);\n });\n}\n//# sourceMappingURL=expand.js.map","import { operate } from '../util/lift';\nexport function finalize(callback) {\n return operate(function (source, subscriber) {\n try {\n source.subscribe(subscriber);\n }\n finally {\n subscriber.add(callback);\n }\n });\n}\n//# sourceMappingURL=finalize.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function find(predicate, thisArg) {\n return operate(createFind(predicate, thisArg, 'value'));\n}\nexport function createFind(predicate, thisArg, emit) {\n var findIndex = emit === 'index';\n return function (source, subscriber) {\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var i = index++;\n if (predicate.call(thisArg, value, i, source)) {\n subscriber.next(findIndex ? i : value);\n subscriber.complete();\n }\n }, function () {\n subscriber.next(findIndex ? -1 : undefined);\n subscriber.complete();\n }));\n };\n}\n//# sourceMappingURL=find.js.map","import { operate } from '../util/lift';\nimport { createFind } from './find';\nexport function findIndex(predicate, thisArg) {\n return operate(createFind(predicate, thisArg, 'index'));\n}\n//# sourceMappingURL=findIndex.js.map","import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { take } from './take';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { identity } from '../util/identity';\nexport function first(predicate, defaultValue) {\n var hasDefaultValue = arguments.length >= 2;\n return function (source) {\n return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); }));\n };\n}\n//# sourceMappingURL=first.js.map","import { Observable } from '../Observable';\nimport { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber, OperatorSubscriber } from './OperatorSubscriber';\nexport function groupBy(keySelector, elementOrOptions, duration, connector) {\n return operate(function (source, subscriber) {\n var element;\n if (!elementOrOptions || typeof elementOrOptions === 'function') {\n element = elementOrOptions;\n }\n else {\n (duration = elementOrOptions.duration, element = elementOrOptions.element, connector = elementOrOptions.connector);\n }\n var groups = new Map();\n var notify = function (cb) {\n groups.forEach(cb);\n cb(subscriber);\n };\n var handleError = function (err) { return notify(function (consumer) { return consumer.error(err); }); };\n var activeGroups = 0;\n var teardownAttempted = false;\n var groupBySourceSubscriber = new OperatorSubscriber(subscriber, function (value) {\n try {\n var key_1 = keySelector(value);\n var group_1 = groups.get(key_1);\n if (!group_1) {\n groups.set(key_1, (group_1 = connector ? connector() : new Subject()));\n var grouped = createGroupedObservable(key_1, group_1);\n subscriber.next(grouped);\n if (duration) {\n var durationSubscriber_1 = createOperatorSubscriber(group_1, function () {\n group_1.complete();\n durationSubscriber_1 === null || durationSubscriber_1 === void 0 ? void 0 : durationSubscriber_1.unsubscribe();\n }, undefined, undefined, function () { return groups.delete(key_1); });\n groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber_1));\n }\n }\n group_1.next(element ? element(value) : value);\n }\n catch (err) {\n handleError(err);\n }\n }, function () { return notify(function (consumer) { return consumer.complete(); }); }, handleError, function () { return groups.clear(); }, function () {\n teardownAttempted = true;\n return activeGroups === 0;\n });\n source.subscribe(groupBySourceSubscriber);\n function createGroupedObservable(key, groupSubject) {\n var result = new Observable(function (groupSubscriber) {\n activeGroups++;\n var innerSub = groupSubject.subscribe(groupSubscriber);\n return function () {\n innerSub.unsubscribe();\n --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe();\n };\n });\n result.key = key;\n return result;\n }\n });\n}\n//# sourceMappingURL=groupBy.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function isEmpty() {\n return operate(function (source, subscriber) {\n source.subscribe(createOperatorSubscriber(subscriber, function () {\n subscriber.next(false);\n subscriber.complete();\n }, function () {\n subscriber.next(true);\n subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=isEmpty.js.map","import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { takeLast } from './takeLast';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { identity } from '../util/identity';\nexport function last(predicate, defaultValue) {\n var hasDefaultValue = arguments.length >= 2;\n return function (source) {\n return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); }));\n };\n}\n//# sourceMappingURL=last.js.map","import { __values } from \"tslib\";\nimport { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeLast(count) {\n return count <= 0\n ? function () { return EMPTY; }\n : operate(function (source, subscriber) {\n var buffer = [];\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n buffer.push(value);\n count < buffer.length && buffer.shift();\n }, function () {\n var e_1, _a;\n try {\n for (var buffer_1 = __values(buffer), buffer_1_1 = buffer_1.next(); !buffer_1_1.done; buffer_1_1 = buffer_1.next()) {\n var value = buffer_1_1.value;\n subscriber.next(value);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (buffer_1_1 && !buffer_1_1.done && (_a = buffer_1.return)) _a.call(buffer_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n subscriber.complete();\n }, undefined, function () {\n buffer = null;\n }));\n });\n}\n//# sourceMappingURL=takeLast.js.map","import { Notification } from '../Notification';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function materialize() {\n return operate(function (source, subscriber) {\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n subscriber.next(Notification.createNext(value));\n }, function () {\n subscriber.next(Notification.createComplete());\n subscriber.complete();\n }, function (err) {\n subscriber.next(Notification.createError(err));\n subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=materialize.js.map","import { reduce } from './reduce';\nimport { isFunction } from '../util/isFunction';\nexport function max(comparer) {\n return reduce(isFunction(comparer) ? function (x, y) { return (comparer(x, y) > 0 ? x : y); } : function (x, y) { return (x > y ? x : y); });\n}\n//# sourceMappingURL=max.js.map","import { mergeMap } from './mergeMap';\nexport var flatMap = mergeMap;\n//# sourceMappingURL=flatMap.js.map","import { mergeMap } from './mergeMap';\nimport { isFunction } from '../util/isFunction';\nexport function mergeMapTo(innerObservable, resultSelector, concurrent) {\n if (concurrent === void 0) { concurrent = Infinity; }\n if (isFunction(resultSelector)) {\n return mergeMap(function () { return innerObservable; }, resultSelector, concurrent);\n }\n if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return mergeMap(function () { return innerObservable; }, concurrent);\n}\n//# sourceMappingURL=mergeMapTo.js.map","import { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nexport function mergeScan(accumulator, seed, concurrent) {\n if (concurrent === void 0) { concurrent = Infinity; }\n return operate(function (source, subscriber) {\n var state = seed;\n return mergeInternals(source, subscriber, function (value, index) { return accumulator(state, value, index); }, concurrent, function (value) {\n state = value;\n }, false, undefined, function () { return (state = null); });\n });\n}\n//# sourceMappingURL=mergeScan.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { merge } from './merge';\nexport function mergeWith() {\n var otherSources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n otherSources[_i] = arguments[_i];\n }\n return merge.apply(void 0, __spreadArray([], __read(otherSources)));\n}\n//# sourceMappingURL=mergeWith.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { operate } from '../util/lift';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { mergeAll } from './mergeAll';\nimport { popNumber, popScheduler } from '../util/args';\nimport { from } from '../observable/from';\nexport function merge() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = popScheduler(args);\n var concurrent = popNumber(args, Infinity);\n args = argsOrArgArray(args);\n return operate(function (source, subscriber) {\n mergeAll(concurrent)(from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=merge.js.map","import { reduce } from './reduce';\nimport { isFunction } from '../util/isFunction';\nexport function min(comparer) {\n return reduce(isFunction(comparer) ? function (x, y) { return (comparer(x, y) < 0 ? x : y); } : function (x, y) { return (x < y ? x : y); });\n}\n//# sourceMappingURL=min.js.map","import { ConnectableObservable } from '../observable/ConnectableObservable';\nimport { isFunction } from '../util/isFunction';\nimport { connect } from './connect';\nexport function multicast(subjectOrSubjectFactory, selector) {\n var subjectFactory = isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : function () { return subjectOrSubjectFactory; };\n if (isFunction(selector)) {\n return connect(selector, {\n connector: subjectFactory,\n });\n }\n return function (source) { return new ConnectableObservable(source, subjectFactory); };\n}\n//# sourceMappingURL=multicast.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { onErrorResumeNext as oERNCreate } from '../observable/onErrorResumeNext';\nexport function onErrorResumeNextWith() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n var nextSources = argsOrArgArray(sources);\n return function (source) { return oERNCreate.apply(void 0, __spreadArray([source], __read(nextSources))); };\n}\nexport var onErrorResumeNext = onErrorResumeNextWith;\n//# sourceMappingURL=onErrorResumeNextWith.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function pairwise() {\n return operate(function (source, subscriber) {\n var prev;\n var hasPrev = false;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var p = prev;\n prev = value;\n hasPrev && subscriber.next([p, value]);\n hasPrev = true;\n }));\n });\n}\n//# sourceMappingURL=pairwise.js.map","import { map } from './map';\nexport function pluck() {\n var properties = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n properties[_i] = arguments[_i];\n }\n var length = properties.length;\n if (length === 0) {\n throw new Error('list of properties cannot be empty.');\n }\n return map(function (x) {\n var currentProp = x;\n for (var i = 0; i < length; i++) {\n var p = currentProp === null || currentProp === void 0 ? void 0 : currentProp[properties[i]];\n if (typeof p !== 'undefined') {\n currentProp = p;\n }\n else {\n return undefined;\n }\n }\n return currentProp;\n });\n}\n//# sourceMappingURL=pluck.js.map","import { Subject } from '../Subject';\nimport { multicast } from './multicast';\nimport { connect } from './connect';\nexport function publish(selector) {\n return selector ? function (source) { return connect(selector)(source); } : function (source) { return multicast(new Subject())(source); };\n}\n//# sourceMappingURL=publish.js.map","import { BehaviorSubject } from '../BehaviorSubject';\nimport { ConnectableObservable } from '../observable/ConnectableObservable';\nexport function publishBehavior(initialValue) {\n return function (source) {\n var subject = new BehaviorSubject(initialValue);\n return new ConnectableObservable(source, function () { return subject; });\n };\n}\n//# sourceMappingURL=publishBehavior.js.map","import { AsyncSubject } from '../AsyncSubject';\nimport { ConnectableObservable } from '../observable/ConnectableObservable';\nexport function publishLast() {\n return function (source) {\n var subject = new AsyncSubject();\n return new ConnectableObservable(source, function () { return subject; });\n };\n}\n//# sourceMappingURL=publishLast.js.map","import { ReplaySubject } from '../ReplaySubject';\nimport { multicast } from './multicast';\nimport { isFunction } from '../util/isFunction';\nexport function publishReplay(bufferSize, windowTime, selectorOrScheduler, timestampProvider) {\n if (selectorOrScheduler && !isFunction(selectorOrScheduler)) {\n timestampProvider = selectorOrScheduler;\n }\n var selector = isFunction(selectorOrScheduler) ? selectorOrScheduler : undefined;\n return function (source) { return multicast(new ReplaySubject(bufferSize, windowTime, timestampProvider), selector)(source); };\n}\n//# sourceMappingURL=publishReplay.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { raceInit } from '../observable/race';\nimport { operate } from '../util/lift';\nimport { identity } from '../util/identity';\nexport function raceWith() {\n var otherSources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n otherSources[_i] = arguments[_i];\n }\n return !otherSources.length\n ? identity\n : operate(function (source, subscriber) {\n raceInit(__spreadArray([source], __read(otherSources)))(subscriber);\n });\n}\n//# sourceMappingURL=raceWith.js.map","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { timer } from '../observable/timer';\nexport function repeat(countOrConfig) {\n var _a;\n var count = Infinity;\n var delay;\n if (countOrConfig != null) {\n if (typeof countOrConfig === 'object') {\n (_a = countOrConfig.count, count = _a === void 0 ? Infinity : _a, delay = countOrConfig.delay);\n }\n else {\n count = countOrConfig;\n }\n }\n return count <= 0\n ? function () { return EMPTY; }\n : operate(function (source, subscriber) {\n var soFar = 0;\n var sourceSub;\n var resubscribe = function () {\n sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe();\n sourceSub = null;\n if (delay != null) {\n var notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(soFar));\n var notifierSubscriber_1 = createOperatorSubscriber(subscriber, function () {\n notifierSubscriber_1.unsubscribe();\n subscribeToSource();\n });\n notifier.subscribe(notifierSubscriber_1);\n }\n else {\n subscribeToSource();\n }\n };\n var subscribeToSource = function () {\n var syncUnsub = false;\n sourceSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, function () {\n if (++soFar < count) {\n if (sourceSub) {\n resubscribe();\n }\n else {\n syncUnsub = true;\n }\n }\n else {\n subscriber.complete();\n }\n }));\n if (syncUnsub) {\n resubscribe();\n }\n };\n subscribeToSource();\n });\n}\n//# sourceMappingURL=repeat.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function repeatWhen(notifier) {\n return operate(function (source, subscriber) {\n var innerSub;\n var syncResub = false;\n var completions$;\n var isNotifierComplete = false;\n var isMainComplete = false;\n var checkComplete = function () { return isMainComplete && isNotifierComplete && (subscriber.complete(), true); };\n var getCompletionSubject = function () {\n if (!completions$) {\n completions$ = new Subject();\n innerFrom(notifier(completions$)).subscribe(createOperatorSubscriber(subscriber, function () {\n if (innerSub) {\n subscribeForRepeatWhen();\n }\n else {\n syncResub = true;\n }\n }, function () {\n isNotifierComplete = true;\n checkComplete();\n }));\n }\n return completions$;\n };\n var subscribeForRepeatWhen = function () {\n isMainComplete = false;\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, function () {\n isMainComplete = true;\n !checkComplete() && getCompletionSubject().next();\n }));\n if (syncResub) {\n innerSub.unsubscribe();\n innerSub = null;\n syncResub = false;\n subscribeForRepeatWhen();\n }\n };\n subscribeForRepeatWhen();\n });\n}\n//# sourceMappingURL=repeatWhen.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nimport { timer } from '../observable/timer';\nimport { innerFrom } from '../observable/innerFrom';\nexport function retry(configOrCount) {\n if (configOrCount === void 0) { configOrCount = Infinity; }\n var config;\n if (configOrCount && typeof configOrCount === 'object') {\n config = configOrCount;\n }\n else {\n config = {\n count: configOrCount,\n };\n }\n var _a = config.count, count = _a === void 0 ? Infinity : _a, delay = config.delay, _b = config.resetOnSuccess, resetOnSuccess = _b === void 0 ? false : _b;\n return count <= 0\n ? identity\n : operate(function (source, subscriber) {\n var soFar = 0;\n var innerSub;\n var subscribeForRetry = function () {\n var syncUnsub = false;\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n if (resetOnSuccess) {\n soFar = 0;\n }\n subscriber.next(value);\n }, undefined, function (err) {\n if (soFar++ < count) {\n var resub_1 = function () {\n if (innerSub) {\n innerSub.unsubscribe();\n innerSub = null;\n subscribeForRetry();\n }\n else {\n syncUnsub = true;\n }\n };\n if (delay != null) {\n var notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(err, soFar));\n var notifierSubscriber_1 = createOperatorSubscriber(subscriber, function () {\n notifierSubscriber_1.unsubscribe();\n resub_1();\n }, function () {\n subscriber.complete();\n });\n notifier.subscribe(notifierSubscriber_1);\n }\n else {\n resub_1();\n }\n }\n else {\n subscriber.error(err);\n }\n }));\n if (syncUnsub) {\n innerSub.unsubscribe();\n innerSub = null;\n subscribeForRetry();\n }\n };\n subscribeForRetry();\n });\n}\n//# sourceMappingURL=retry.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function retryWhen(notifier) {\n return operate(function (source, subscriber) {\n var innerSub;\n var syncResub = false;\n var errors$;\n var subscribeForRetryWhen = function () {\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, function (err) {\n if (!errors$) {\n errors$ = new Subject();\n innerFrom(notifier(errors$)).subscribe(createOperatorSubscriber(subscriber, function () {\n return innerSub ? subscribeForRetryWhen() : (syncResub = true);\n }));\n }\n if (errors$) {\n errors$.next(err);\n }\n }));\n if (syncResub) {\n innerSub.unsubscribe();\n innerSub = null;\n syncResub = false;\n subscribeForRetryWhen();\n }\n };\n subscribeForRetryWhen();\n });\n}\n//# sourceMappingURL=retryWhen.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function sample(notifier) {\n return operate(function (source, subscriber) {\n var hasValue = false;\n var lastValue = null;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n hasValue = true;\n lastValue = value;\n }));\n innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, function () {\n if (hasValue) {\n hasValue = false;\n var value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n }, noop));\n });\n}\n//# sourceMappingURL=sample.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { sample } from './sample';\nimport { interval } from '../observable/interval';\nexport function sampleTime(period, scheduler) {\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n return sample(interval(period, scheduler));\n}\n//# sourceMappingURL=sampleTime.js.map","import { operate } from '../util/lift';\nimport { scanInternals } from './scanInternals';\nexport function scan(accumulator, seed) {\n return operate(scanInternals(accumulator, seed, arguments.length >= 2, true));\n}\n//# sourceMappingURL=scan.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function sequenceEqual(compareTo, comparator) {\n if (comparator === void 0) { comparator = function (a, b) { return a === b; }; }\n return operate(function (source, subscriber) {\n var aState = createState();\n var bState = createState();\n var emit = function (isEqual) {\n subscriber.next(isEqual);\n subscriber.complete();\n };\n var createSubscriber = function (selfState, otherState) {\n var sequenceEqualSubscriber = createOperatorSubscriber(subscriber, function (a) {\n var buffer = otherState.buffer, complete = otherState.complete;\n if (buffer.length === 0) {\n complete ? emit(false) : selfState.buffer.push(a);\n }\n else {\n !comparator(a, buffer.shift()) && emit(false);\n }\n }, function () {\n selfState.complete = true;\n var complete = otherState.complete, buffer = otherState.buffer;\n complete && emit(buffer.length === 0);\n sequenceEqualSubscriber === null || sequenceEqualSubscriber === void 0 ? void 0 : sequenceEqualSubscriber.unsubscribe();\n });\n return sequenceEqualSubscriber;\n };\n source.subscribe(createSubscriber(aState, bState));\n innerFrom(compareTo).subscribe(createSubscriber(bState, aState));\n });\n}\nfunction createState() {\n return {\n buffer: [],\n complete: false,\n };\n}\n//# sourceMappingURL=sequenceEqual.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { SafeSubscriber } from '../Subscriber';\nimport { operate } from '../util/lift';\nexport function share(options) {\n if (options === void 0) { options = {}; }\n var _a = options.connector, connector = _a === void 0 ? function () { return new Subject(); } : _a, _b = options.resetOnError, resetOnError = _b === void 0 ? true : _b, _c = options.resetOnComplete, resetOnComplete = _c === void 0 ? true : _c, _d = options.resetOnRefCountZero, resetOnRefCountZero = _d === void 0 ? true : _d;\n return function (wrapperSource) {\n var connection;\n var resetConnection;\n var subject;\n var refCount = 0;\n var hasCompleted = false;\n var hasErrored = false;\n var cancelReset = function () {\n resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe();\n resetConnection = undefined;\n };\n var reset = function () {\n cancelReset();\n connection = subject = undefined;\n hasCompleted = hasErrored = false;\n };\n var resetAndUnsubscribe = function () {\n var conn = connection;\n reset();\n conn === null || conn === void 0 ? void 0 : conn.unsubscribe();\n };\n return operate(function (source, subscriber) {\n refCount++;\n if (!hasErrored && !hasCompleted) {\n cancelReset();\n }\n var dest = (subject = subject !== null && subject !== void 0 ? subject : connector());\n subscriber.add(function () {\n refCount--;\n if (refCount === 0 && !hasErrored && !hasCompleted) {\n resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero);\n }\n });\n dest.subscribe(subscriber);\n if (!connection &&\n refCount > 0) {\n connection = new SafeSubscriber({\n next: function (value) { return dest.next(value); },\n error: function (err) {\n hasErrored = true;\n cancelReset();\n resetConnection = handleReset(reset, resetOnError, err);\n dest.error(err);\n },\n complete: function () {\n hasCompleted = true;\n cancelReset();\n resetConnection = handleReset(reset, resetOnComplete);\n dest.complete();\n },\n });\n innerFrom(source).subscribe(connection);\n }\n })(wrapperSource);\n };\n}\nfunction handleReset(reset, on) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n if (on === true) {\n reset();\n return;\n }\n if (on === false) {\n return;\n }\n var onSubscriber = new SafeSubscriber({\n next: function () {\n onSubscriber.unsubscribe();\n reset();\n },\n });\n return innerFrom(on.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber);\n}\n//# sourceMappingURL=share.js.map","import { ReplaySubject } from '../ReplaySubject';\nimport { share } from './share';\nexport function shareReplay(configOrBufferSize, windowTime, scheduler) {\n var _a, _b, _c;\n var bufferSize;\n var refCount = false;\n if (configOrBufferSize && typeof configOrBufferSize === 'object') {\n (_a = configOrBufferSize.bufferSize, bufferSize = _a === void 0 ? Infinity : _a, _b = configOrBufferSize.windowTime, windowTime = _b === void 0 ? Infinity : _b, _c = configOrBufferSize.refCount, refCount = _c === void 0 ? false : _c, scheduler = configOrBufferSize.scheduler);\n }\n else {\n bufferSize = (configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity);\n }\n return share({\n connector: function () { return new ReplaySubject(bufferSize, windowTime, scheduler); },\n resetOnError: true,\n resetOnComplete: false,\n resetOnRefCountZero: refCount,\n });\n}\n//# sourceMappingURL=shareReplay.js.map","import { EmptyError } from '../util/EmptyError';\nimport { SequenceError } from '../util/SequenceError';\nimport { NotFoundError } from '../util/NotFoundError';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function single(predicate) {\n return operate(function (source, subscriber) {\n var hasValue = false;\n var singleValue;\n var seenValue = false;\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n seenValue = true;\n if (!predicate || predicate(value, index++, source)) {\n hasValue && subscriber.error(new SequenceError('Too many matching values'));\n hasValue = true;\n singleValue = value;\n }\n }, function () {\n if (hasValue) {\n subscriber.next(singleValue);\n subscriber.complete();\n }\n else {\n subscriber.error(seenValue ? new NotFoundError('No matching values') : new EmptyError());\n }\n }));\n });\n}\n//# sourceMappingURL=single.js.map","import { filter } from './filter';\nexport function skip(count) {\n return filter(function (_, index) { return count <= index; });\n}\n//# sourceMappingURL=skip.js.map","import { identity } from '../util/identity';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function skipLast(skipCount) {\n return skipCount <= 0\n ?\n identity\n : operate(function (source, subscriber) {\n var ring = new Array(skipCount);\n var seen = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var valueIndex = seen++;\n if (valueIndex < skipCount) {\n ring[valueIndex] = value;\n }\n else {\n var index = valueIndex % skipCount;\n var oldValue = ring[index];\n ring[index] = value;\n subscriber.next(oldValue);\n }\n }));\n return function () {\n ring = null;\n };\n });\n}\n//# sourceMappingURL=skipLast.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { noop } from '../util/noop';\nexport function skipUntil(notifier) {\n return operate(function (source, subscriber) {\n var taking = false;\n var skipSubscriber = createOperatorSubscriber(subscriber, function () {\n skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe();\n taking = true;\n }, noop);\n innerFrom(notifier).subscribe(skipSubscriber);\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return taking && subscriber.next(value); }));\n });\n}\n//# sourceMappingURL=skipUntil.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function skipWhile(predicate) {\n return operate(function (source, subscriber) {\n var taking = false;\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return (taking || (taking = !predicate(value, index++))) && subscriber.next(value); }));\n });\n}\n//# sourceMappingURL=skipWhile.js.map","import { concat } from '../observable/concat';\nimport { popScheduler } from '../util/args';\nimport { operate } from '../util/lift';\nexport function startWith() {\n var values = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n values[_i] = arguments[_i];\n }\n var scheduler = popScheduler(values);\n return operate(function (source, subscriber) {\n (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=startWith.js.map","import { switchMap } from './switchMap';\nimport { identity } from '../util/identity';\nexport function switchAll() {\n return switchMap(identity);\n}\n//# sourceMappingURL=switchAll.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function switchMap(project, resultSelector) {\n return operate(function (source, subscriber) {\n var innerSubscriber = null;\n var index = 0;\n var isComplete = false;\n var checkComplete = function () { return isComplete && !innerSubscriber && subscriber.complete(); };\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe();\n var innerIndex = 0;\n var outerIndex = index++;\n innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = createOperatorSubscriber(subscriber, function (innerValue) { return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue); }, function () {\n innerSubscriber = null;\n checkComplete();\n })));\n }, function () {\n isComplete = true;\n checkComplete();\n }));\n });\n}\n//# sourceMappingURL=switchMap.js.map","import { switchMap } from './switchMap';\nimport { isFunction } from '../util/isFunction';\nexport function switchMapTo(innerObservable, resultSelector) {\n return isFunction(resultSelector) ? switchMap(function () { return innerObservable; }, resultSelector) : switchMap(function () { return innerObservable; });\n}\n//# sourceMappingURL=switchMapTo.js.map","import { switchMap } from './switchMap';\nimport { operate } from '../util/lift';\nexport function switchScan(accumulator, seed) {\n return operate(function (source, subscriber) {\n var state = seed;\n switchMap(function (value, index) { return accumulator(state, value, index); }, function (_, innerValue) { return ((state = innerValue), innerValue); })(source).subscribe(subscriber);\n return function () {\n state = null;\n };\n });\n}\n//# sourceMappingURL=switchScan.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { noop } from '../util/noop';\nexport function takeUntil(notifier) {\n return operate(function (source, subscriber) {\n innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, function () { return subscriber.complete(); }, noop));\n !subscriber.closed && source.subscribe(subscriber);\n });\n}\n//# sourceMappingURL=takeUntil.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeWhile(predicate, inclusive) {\n if (inclusive === void 0) { inclusive = false; }\n return operate(function (source, subscriber) {\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var result = predicate(value, index++);\n (result || inclusive) && subscriber.next(value);\n !result && subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=takeWhile.js.map","import { isFunction } from '../util/isFunction';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nexport function tap(observerOrNext, error, complete) {\n var tapObserver = isFunction(observerOrNext) || error || complete\n ?\n { next: observerOrNext, error: error, complete: complete }\n : observerOrNext;\n return tapObserver\n ? operate(function (source, subscriber) {\n var _a;\n (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n var isUnsub = true;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var _a;\n (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value);\n subscriber.next(value);\n }, function () {\n var _a;\n isUnsub = false;\n (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n subscriber.complete();\n }, function (err) {\n var _a;\n isUnsub = false;\n (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err);\n subscriber.error(err);\n }, function () {\n var _a, _b;\n if (isUnsub) {\n (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n }\n (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver);\n }));\n })\n :\n identity;\n}\n//# sourceMappingURL=tap.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function throttle(durationSelector, config) {\n return operate(function (source, subscriber) {\n var _a = config !== null && config !== void 0 ? config : {}, _b = _a.leading, leading = _b === void 0 ? true : _b, _c = _a.trailing, trailing = _c === void 0 ? false : _c;\n var hasValue = false;\n var sendValue = null;\n var throttled = null;\n var isComplete = false;\n var endThrottling = function () {\n throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe();\n throttled = null;\n if (trailing) {\n send();\n isComplete && subscriber.complete();\n }\n };\n var cleanupThrottling = function () {\n throttled = null;\n isComplete && subscriber.complete();\n };\n var startThrottle = function (value) {\n return (throttled = innerFrom(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling)));\n };\n var send = function () {\n if (hasValue) {\n hasValue = false;\n var value = sendValue;\n sendValue = null;\n subscriber.next(value);\n !isComplete && startThrottle(value);\n }\n };\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n hasValue = true;\n sendValue = value;\n !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value));\n }, function () {\n isComplete = true;\n !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=throttle.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { throttle } from './throttle';\nimport { timer } from '../observable/timer';\nexport function throttleTime(duration, scheduler, config) {\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n var duration$ = timer(duration, scheduler);\n return throttle(function () { return duration$; }, config);\n}\n//# sourceMappingURL=throttleTime.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function timeInterval(scheduler) {\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n return operate(function (source, subscriber) {\n var last = scheduler.now();\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var now = scheduler.now();\n var interval = now - last;\n last = now;\n subscriber.next(new TimeInterval(value, interval));\n }));\n });\n}\nvar TimeInterval = (function () {\n function TimeInterval(value, interval) {\n this.value = value;\n this.interval = interval;\n }\n return TimeInterval;\n}());\nexport { TimeInterval };\n//# sourceMappingURL=timeInterval.js.map","import { async } from '../scheduler/async';\nimport { isValidDate } from '../util/isDate';\nimport { timeout } from './timeout';\nexport function timeoutWith(due, withObservable, scheduler) {\n var first;\n var each;\n var _with;\n scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : async;\n if (isValidDate(due)) {\n first = due;\n }\n else if (typeof due === 'number') {\n each = due;\n }\n if (withObservable) {\n _with = function () { return withObservable; };\n }\n else {\n throw new TypeError('No observable provided to switch to');\n }\n if (first == null && each == null) {\n throw new TypeError('No timeout provided.');\n }\n return timeout({\n first: first,\n each: each,\n scheduler: scheduler,\n with: _with,\n });\n}\n//# sourceMappingURL=timeoutWith.js.map","import { dateTimestampProvider } from '../scheduler/dateTimestampProvider';\nimport { map } from './map';\nexport function timestamp(timestampProvider) {\n if (timestampProvider === void 0) { timestampProvider = dateTimestampProvider; }\n return map(function (value) { return ({ value: value, timestamp: timestampProvider.now() }); });\n}\n//# sourceMappingURL=timestamp.js.map","import { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nimport { innerFrom } from '../observable/innerFrom';\nexport function window(windowBoundaries) {\n return operate(function (source, subscriber) {\n var windowSubject = new Subject();\n subscriber.next(windowSubject.asObservable());\n var errorHandler = function (err) {\n windowSubject.error(err);\n subscriber.error(err);\n };\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value); }, function () {\n windowSubject.complete();\n subscriber.complete();\n }, errorHandler));\n innerFrom(windowBoundaries).subscribe(createOperatorSubscriber(subscriber, function () {\n windowSubject.complete();\n subscriber.next((windowSubject = new Subject()));\n }, noop, errorHandler));\n return function () {\n windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.unsubscribe();\n windowSubject = null;\n };\n });\n}\n//# sourceMappingURL=window.js.map","import { __values } from \"tslib\";\nimport { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function windowCount(windowSize, startWindowEvery) {\n if (startWindowEvery === void 0) { startWindowEvery = 0; }\n var startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize;\n return operate(function (source, subscriber) {\n var windows = [new Subject()];\n var starts = [];\n var count = 0;\n subscriber.next(windows[0].asObservable());\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var e_1, _a;\n try {\n for (var windows_1 = __values(windows), windows_1_1 = windows_1.next(); !windows_1_1.done; windows_1_1 = windows_1.next()) {\n var window_1 = windows_1_1.value;\n window_1.next(value);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (windows_1_1 && !windows_1_1.done && (_a = windows_1.return)) _a.call(windows_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var c = count - windowSize + 1;\n if (c >= 0 && c % startEvery === 0) {\n windows.shift().complete();\n }\n if (++count % startEvery === 0) {\n var window_2 = new Subject();\n windows.push(window_2);\n subscriber.next(window_2.asObservable());\n }\n }, function () {\n while (windows.length > 0) {\n windows.shift().complete();\n }\n subscriber.complete();\n }, function (err) {\n while (windows.length > 0) {\n windows.shift().error(err);\n }\n subscriber.error(err);\n }, function () {\n starts = null;\n windows = null;\n }));\n });\n}\n//# sourceMappingURL=windowCount.js.map","import { Subject } from '../Subject';\nimport { asyncScheduler } from '../scheduler/async';\nimport { Subscription } from '../Subscription';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { arrRemove } from '../util/arrRemove';\nimport { popScheduler } from '../util/args';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function windowTime(windowTimeSpan) {\n var _a, _b;\n var otherArgs = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n otherArgs[_i - 1] = arguments[_i];\n }\n var scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler;\n var windowCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null;\n var maxWindowSize = otherArgs[1] || Infinity;\n return operate(function (source, subscriber) {\n var windowRecords = [];\n var restartOnClose = false;\n var closeWindow = function (record) {\n var window = record.window, subs = record.subs;\n window.complete();\n subs.unsubscribe();\n arrRemove(windowRecords, record);\n restartOnClose && startWindow();\n };\n var startWindow = function () {\n if (windowRecords) {\n var subs = new Subscription();\n subscriber.add(subs);\n var window_1 = new Subject();\n var record_1 = {\n window: window_1,\n subs: subs,\n seen: 0,\n };\n windowRecords.push(record_1);\n subscriber.next(window_1.asObservable());\n executeSchedule(subs, scheduler, function () { return closeWindow(record_1); }, windowTimeSpan);\n }\n };\n if (windowCreationInterval !== null && windowCreationInterval >= 0) {\n executeSchedule(subscriber, scheduler, startWindow, windowCreationInterval, true);\n }\n else {\n restartOnClose = true;\n }\n startWindow();\n var loop = function (cb) { return windowRecords.slice().forEach(cb); };\n var terminate = function (cb) {\n loop(function (_a) {\n var window = _a.window;\n return cb(window);\n });\n cb(subscriber);\n subscriber.unsubscribe();\n };\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n loop(function (record) {\n record.window.next(value);\n maxWindowSize <= ++record.seen && closeWindow(record);\n });\n }, function () { return terminate(function (consumer) { return consumer.complete(); }); }, function (err) { return terminate(function (consumer) { return consumer.error(err); }); }));\n return function () {\n windowRecords = null;\n };\n });\n}\n//# sourceMappingURL=windowTime.js.map","import { __values } from \"tslib\";\nimport { Subject } from '../Subject';\nimport { Subscription } from '../Subscription';\nimport { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nimport { arrRemove } from '../util/arrRemove';\nexport function windowToggle(openings, closingSelector) {\n return operate(function (source, subscriber) {\n var windows = [];\n var handleError = function (err) {\n while (0 < windows.length) {\n windows.shift().error(err);\n }\n subscriber.error(err);\n };\n innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, function (openValue) {\n var window = new Subject();\n windows.push(window);\n var closingSubscription = new Subscription();\n var closeWindow = function () {\n arrRemove(windows, window);\n window.complete();\n closingSubscription.unsubscribe();\n };\n var closingNotifier;\n try {\n closingNotifier = innerFrom(closingSelector(openValue));\n }\n catch (err) {\n handleError(err);\n return;\n }\n subscriber.next(window.asObservable());\n closingSubscription.add(closingNotifier.subscribe(createOperatorSubscriber(subscriber, closeWindow, noop, handleError)));\n }, noop));\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var e_1, _a;\n var windowsCopy = windows.slice();\n try {\n for (var windowsCopy_1 = __values(windowsCopy), windowsCopy_1_1 = windowsCopy_1.next(); !windowsCopy_1_1.done; windowsCopy_1_1 = windowsCopy_1.next()) {\n var window_1 = windowsCopy_1_1.value;\n window_1.next(value);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (windowsCopy_1_1 && !windowsCopy_1_1.done && (_a = windowsCopy_1.return)) _a.call(windowsCopy_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }, function () {\n while (0 < windows.length) {\n windows.shift().complete();\n }\n subscriber.complete();\n }, handleError, function () {\n while (0 < windows.length) {\n windows.shift().unsubscribe();\n }\n }));\n });\n}\n//# sourceMappingURL=windowToggle.js.map","import { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function windowWhen(closingSelector) {\n return operate(function (source, subscriber) {\n var window;\n var closingSubscriber;\n var handleError = function (err) {\n window.error(err);\n subscriber.error(err);\n };\n var openWindow = function () {\n closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe();\n window === null || window === void 0 ? void 0 : window.complete();\n window = new Subject();\n subscriber.next(window.asObservable());\n var closingNotifier;\n try {\n closingNotifier = innerFrom(closingSelector());\n }\n catch (err) {\n handleError(err);\n return;\n }\n closingNotifier.subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openWindow, openWindow, handleError)));\n };\n openWindow();\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return window.next(value); }, function () {\n window.complete();\n subscriber.complete();\n }, handleError, function () {\n closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe();\n window = null;\n }));\n });\n}\n//# sourceMappingURL=windowWhen.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { identity } from '../util/identity';\nimport { noop } from '../util/noop';\nimport { popResultSelector } from '../util/args';\nexport function withLatestFrom() {\n var inputs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n inputs[_i] = arguments[_i];\n }\n var project = popResultSelector(inputs);\n return operate(function (source, subscriber) {\n var len = inputs.length;\n var otherValues = new Array(len);\n var hasValue = inputs.map(function () { return false; });\n var ready = false;\n var _loop_1 = function (i) {\n innerFrom(inputs[i]).subscribe(createOperatorSubscriber(subscriber, function (value) {\n otherValues[i] = value;\n if (!ready && !hasValue[i]) {\n hasValue[i] = true;\n (ready = hasValue.every(identity)) && (hasValue = null);\n }\n }, noop));\n };\n for (var i = 0; i < len; i++) {\n _loop_1(i);\n }\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n if (ready) {\n var values = __spreadArray([value], __read(otherValues));\n subscriber.next(project ? project.apply(void 0, __spreadArray([], __read(values))) : values);\n }\n }));\n });\n}\n//# sourceMappingURL=withLatestFrom.js.map","import { zip } from '../observable/zip';\nimport { joinAllInternals } from './joinAllInternals';\nexport function zipAll(project) {\n return joinAllInternals(zip, project);\n}\n//# sourceMappingURL=zipAll.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { zip } from './zip';\nexport function zipWith() {\n var otherInputs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n otherInputs[_i] = arguments[_i];\n }\n return zip.apply(void 0, __spreadArray([], __read(otherInputs)));\n}\n//# sourceMappingURL=zipWith.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { zip as zipStatic } from '../observable/zip';\nimport { operate } from '../util/lift';\nexport function zip() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n return operate(function (source, subscriber) {\n zipStatic.apply(void 0, __spreadArray([source], __read(sources))).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=zip.js.map","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst isWebWorker = () => {\n if (typeof self === 'undefined') {\n return false;\n }\n const selfContext = self;\n return (typeof selfContext.WorkerGlobalScope !== 'undefined' &&\n self instanceof selfContext.WorkerGlobalScope);\n};\n\nexport { isWebWorker };\n//# sourceMappingURL=isWebWorker.mjs.map\n","import { SessionListener } from './SessionListener.mjs';\nexport { SESSION_START_EVENT, SESSION_STOP_EVENT } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst sessionListener = new SessionListener();\n\nexport { sessionListener };\n//# sourceMappingURL=index.mjs.map\n","import { isBrowser } from '../isBrowser.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst stateChangeListeners = new Set();\nclass SessionListener {\n constructor() {\n this.listenerActive = false;\n this.handleVisibilityChange = this.handleVisibilityChange.bind(this);\n // Setup state listeners\n if (isBrowser()) {\n document.addEventListener('visibilitychange', this.handleVisibilityChange, false);\n this.listenerActive = true;\n }\n }\n addStateChangeListener(listener, notifyOnAdd = false) {\n // No-op if document listener is not active\n if (!this.listenerActive) {\n return;\n }\n stateChangeListeners.add(listener);\n // Notify new handlers of the current status on add\n if (notifyOnAdd) {\n listener(this.getSessionState());\n }\n }\n removeStateChangeListener(handler) {\n // No-op if document listener is not active\n if (!this.listenerActive) {\n return;\n }\n stateChangeListeners.delete(handler);\n }\n handleVisibilityChange() {\n this.notifyHandlers();\n }\n notifyHandlers() {\n const sessionState = this.getSessionState();\n stateChangeListeners.forEach(listener => {\n listener(sessionState);\n });\n }\n getSessionState() {\n if (isBrowser() && document.visibilityState !== 'hidden') {\n return 'started';\n }\n // If, for any reason, document is undefined the session will never start\n return 'ended';\n }\n}\n\nexport { SessionListener };\n//# sourceMappingURL=SessionListener.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst isBrowser = () => typeof window !== 'undefined' && typeof window.document !== 'undefined';\n\nexport { isBrowser };\n//# sourceMappingURL=isBrowser.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Standard session start & stop event names\nconst SESSION_START_EVENT = '_session.start';\nconst SESSION_STOP_EVENT = '_session.stop';\n\nexport { SESSION_START_EVENT, SESSION_STOP_EVENT };\n//# sourceMappingURL=constants.mjs.map\n","import { Amplify } from '../Amplify.mjs';\nimport { fetchAuthSession as fetchAuthSession$1 } from './internal/fetchAuthSession.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Fetch the auth session including the tokens and credentials if they are available. By default it\n * does not refresh the auth tokens or credentials if they are loaded in storage already. You can force a refresh\n * with `{ forceRefresh: true }` input.\n *\n * @param options - Options configuring the fetch behavior.\n * @throws {@link AuthError} - Throws error when session information cannot be refreshed.\n * @returns Promise\n */\nconst fetchAuthSession = (options) => {\n return fetchAuthSession$1(Amplify, options);\n};\n\nexport { fetchAuthSession };\n//# sourceMappingURL=fetchAuthSession.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst fetchAuthSession = (amplify, options) => {\n return amplify.Auth.fetchAuthSession(options);\n};\n\nexport { fetchAuthSession };\n//# sourceMappingURL=fetchAuthSession.mjs.map\n","import { Amplify } from '../Amplify.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction clearCredentials() {\n return Amplify.Auth.clearCredentials();\n}\n\nexport { clearCredentials };\n//# sourceMappingURL=clearCredentials.mjs.map\n","import '../../types/errors.mjs';\nimport '../../errors/errorHelpers.mjs';\nimport '../../utils/getClientInfo/getClientInfo.mjs';\nimport '../../utils/retry/retry.mjs';\nimport '@aws-crypto/sha256-js';\nimport '@smithy/util-hex-encoding';\nimport { parseMetadata } from '../../clients/serde/responseInfo.mjs';\nimport { parseJsonError, parseJsonBody } from '../../clients/serde/json.mjs';\nimport { composeServiceApi } from '../../clients/internal/composeServiceApi.mjs';\nimport { defaultConfig, cognitoIdentityTransferHandler, buildHttpRpcRequest, getSharedHeaders } from './base.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst getIdSerializer = (input, endpoint) => {\n const headers = getSharedHeaders('GetId');\n const body = JSON.stringify(input);\n return buildHttpRpcRequest(endpoint, headers, body);\n};\nconst getIdDeserializer = async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n throw error;\n }\n else {\n const body = await parseJsonBody(response);\n return {\n IdentityId: body.IdentityId,\n $metadata: parseMetadata(response),\n };\n }\n};\n/**\n * @internal\n */\nconst getId = composeServiceApi(cognitoIdentityTransferHandler, getIdSerializer, getIdDeserializer, defaultConfig);\n\nexport { getId };\n//# sourceMappingURL=getId.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst parseMetadata = (response) => {\n const { headers, statusCode } = response;\n return {\n ...(isMetadataBearer(response) ? response.$metadata : {}),\n httpStatusCode: statusCode,\n requestId: headers['x-amzn-requestid'] ??\n headers['x-amzn-request-id'] ??\n headers['x-amz-request-id'],\n extendedRequestId: headers['x-amz-id-2'],\n cfId: headers['x-amz-cf-id'],\n };\n};\nconst isMetadataBearer = (response) => typeof response?.$metadata === 'object';\n\nexport { parseMetadata };\n//# sourceMappingURL=responseInfo.mjs.map\n","import { parseMetadata } from './responseInfo.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Utility functions for serializing and deserializing of JSON protocol in general(including: REST-JSON, JSON-RPC, etc.)\n */\n/**\n * Error parser for AWS JSON protocol.\n */\nconst parseJsonError = async (response) => {\n if (!response || response.statusCode < 300) {\n return;\n }\n const body = await parseJsonBody(response);\n const sanitizeErrorCode = (rawValue) => {\n const [cleanValue] = rawValue.toString().split(/[,:]+/);\n if (cleanValue.includes('#')) {\n return cleanValue.split('#')[1];\n }\n return cleanValue;\n };\n const code = sanitizeErrorCode(response.headers['x-amzn-errortype'] ??\n body.code ??\n body.__type ??\n 'UnknownError');\n const message = body.message ?? body.Message ?? 'Unknown error';\n const error = new Error(message);\n return Object.assign(error, {\n name: code,\n $metadata: parseMetadata(response),\n });\n};\n/**\n * Parse JSON response body to JavaScript object.\n */\nconst parseJsonBody = async (response) => {\n if (!response.body) {\n throw new Error('Missing response payload');\n }\n const output = await response.body.json();\n return Object.assign(output, {\n $metadata: parseMetadata(response),\n });\n};\n\nexport { parseJsonBody, parseJsonError };\n//# sourceMappingURL=json.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Compose a service API handler that accepts input as defined shape and responds conforming to defined output shape.\n * A service API handler is composed with:\n * * A transfer handler\n * * A serializer function\n * * A deserializer function\n * * A default config object\n *\n * The returned service API handler, when called, will trigger the following workflow:\n * 1. When calling the service API handler function, the default config object is merged into the input config\n * object to assign the default values of some omitted configs, resulting to a resolved config object.\n * 2. The `endpointResolver` function from the default config object will be invoked with the resolved config object and\n * API input object resulting to an endpoint instance.\n * 3. The serializer function is invoked with API input object and the endpoint instance resulting to an HTTP request\n * instance.\n * 4. The HTTP request instance and the resolved config object is passed to the transfer handler function.\n * 5. The transfer handler function resolves to an HTTP response instance(can be either successful or failed status code).\n * 6. The deserializer function is invoked with the HTTP response instance resulting to the API output object, and\n * return to the caller.\n *\n *\n * @param transferHandler Async function for dispatching HTTP requests and returning HTTP response.\n * @param serializer Async function for converting object in defined input shape into HTTP request targeting a given\n * \tendpoint.\n * @param deserializer Async function for converting HTTP response into output object in defined output shape, or error\n * \tshape.\n * @param defaultConfig object containing default options to be consumed by transfer handler, serializer and\n * deserializer.\n * @returns a async service API handler function that accepts a config object and input object in defined shape, returns\n * \tan output object in defined shape. It may also throw error instance in defined shape in deserializer. The config\n * object type is composed with options type of transferHandler, endpointResolver function as well as endpointResolver\n * function's input options type, region string. The config object property will be marked as optional if it's also\n * \tdefined in defaultConfig.\n *\n * @internal\n */\nconst composeServiceApi = (transferHandler, serializer, deserializer, defaultConfig) => {\n return async (config, input) => {\n const resolvedConfig = {\n ...defaultConfig,\n ...config,\n };\n // We need to allow different endpoints based on both given config(other than region) and input.\n // However for most of non-S3 services, region is the only input for endpoint resolver.\n const endpoint = await resolvedConfig.endpointResolver(resolvedConfig, input);\n // Unlike AWS SDK clients, a serializer should NOT populate the `host` or `content-length` headers.\n // Both of these headers are prohibited per Spec(https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name).\n // They will be populated automatically by browser, or node-fetch polyfill.\n const request = await serializer(input, endpoint);\n const response = await transferHandler(request, {\n ...resolvedConfig,\n });\n return deserializer(response);\n };\n};\n\nexport { composeServiceApi };\n//# sourceMappingURL=composeServiceApi.mjs.map\n","import { getDnsSuffix } from '../../clients/endpoints/getDnsSuffix.mjs';\nimport '../../types/errors.mjs';\nimport '../../errors/errorHelpers.mjs';\nimport { unauthenticatedHandler } from '../../clients/handlers/unauthenticated.mjs';\nimport { jitteredBackoff } from '../../clients/middleware/retry/jitteredBackoff.mjs';\nimport { getRetryDecider } from '../../clients/middleware/retry/defaultRetryDecider.mjs';\nimport '@aws-crypto/sha256-js';\nimport '@smithy/util-hex-encoding';\nimport { AmplifyUrl } from '../../utils/amplifyUrl/index.mjs';\nimport { composeTransferHandler } from '../../clients/internal/composeTransferHandler.mjs';\nimport { parseJsonError } from '../../clients/serde/json.mjs';\nimport { getAmplifyUserAgent } from '../../Platform/index.mjs';\nimport { observeFrameworkChanges } from '../../Platform/detectFramework.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * The service name used to sign requests if the API requires authentication.\n */\nconst SERVICE_NAME = 'cognito-identity';\n/**\n * The endpoint resolver function that returns the endpoint URL for a given region.\n */\nconst endpointResolver = ({ region }) => ({\n url: new AmplifyUrl(`https://cognito-identity.${region}.${getDnsSuffix(region)}`),\n});\n/**\n * A Cognito Identity-specific middleware that disables caching for all requests.\n */\nconst disableCacheMiddlewareFactory = () => next => async function disableCacheMiddleware(request) {\n request.headers['cache-control'] = 'no-store';\n return next(request);\n};\n/**\n * A Cognito Identity-specific transfer handler that does NOT sign requests, and\n * disables caching.\n *\n * @internal\n */\nconst cognitoIdentityTransferHandler = composeTransferHandler(unauthenticatedHandler, [disableCacheMiddlewareFactory]);\n/**\n * @internal\n */\nconst defaultConfig = {\n service: SERVICE_NAME,\n endpointResolver,\n retryDecider: getRetryDecider(parseJsonError),\n computeDelay: jitteredBackoff,\n userAgentValue: getAmplifyUserAgent(),\n cache: 'no-store',\n};\nobserveFrameworkChanges(() => {\n defaultConfig.userAgentValue = getAmplifyUserAgent();\n});\n/**\n * @internal\n */\nconst getSharedHeaders = (operation) => ({\n 'content-type': 'application/x-amz-json-1.1',\n 'x-amz-target': `AWSCognitoIdentityService.${operation}`,\n});\n/**\n * @internal\n */\nconst buildHttpRpcRequest = ({ url }, headers, body) => ({\n headers,\n url,\n body,\n method: 'POST',\n});\n\nexport { buildHttpRpcRequest, cognitoIdentityTransferHandler, defaultConfig, getSharedHeaders };\n//# sourceMappingURL=base.mjs.map\n","import { defaultPartition, partitionsInfo } from './partitions.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Get the AWS Services endpoint URL's DNS suffix for a given region. A typical AWS regional service endpoint URL will\n * follow this pattern: {endpointPrefix}.{region}.{dnsSuffix}. For example, the endpoint URL for Cognito Identity in\n * us-east-1 will be cognito-identity.us-east-1.amazonaws.com. Here the DnsSuffix is `amazonaws.com`.\n *\n * @param region\n * @returns The DNS suffix\n *\n * @internal\n */\nconst getDnsSuffix = (region) => {\n const { partitions } = partitionsInfo;\n for (const { regions, outputs, regionRegex } of partitions) {\n const regex = new RegExp(regionRegex);\n if (regions.includes(region) || regex.test(region)) {\n return outputs.dnsSuffix;\n }\n }\n return defaultPartition.outputs.dnsSuffix;\n};\n\nexport { getDnsSuffix };\n//# sourceMappingURL=getDnsSuffix.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Default partition for AWS services. This is used when the region is not provided or the region is not recognized.\n *\n * @internal\n */\nconst defaultPartition = {\n id: 'aws',\n outputs: {\n dnsSuffix: 'amazonaws.com',\n },\n regionRegex: '^(us|eu|ap|sa|ca|me|af)\\\\-\\\\w+\\\\-\\\\d+$',\n regions: ['aws-global'],\n};\n/**\n * This data is adapted from the partition file from AWS SDK shared utilities but remove some contents for bundle size\n * concern. Information removed are `dualStackDnsSuffix`, `supportDualStack`, `supportFIPS`, restricted partitions, and\n * list of regions for each partition other than global regions.\n *\n * * Ref: https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints\n * * Ref: https://github.com/aws/aws-sdk-js-v3/blob/0201baef03c2379f1f6f7150b9d401d4b230d488/packages/util-endpoints/src/lib/aws/partitions.json#L1\n *\n * @internal\n */\nconst partitionsInfo = {\n partitions: [\n defaultPartition,\n {\n id: 'aws-cn',\n outputs: {\n dnsSuffix: 'amazonaws.com.cn',\n },\n regionRegex: '^cn\\\\-\\\\w+\\\\-\\\\d+$',\n regions: ['aws-cn-global'],\n },\n ],\n};\n\nexport { defaultPartition, partitionsInfo };\n//# sourceMappingURL=partitions.mjs.map\n","import { retryMiddlewareFactory } from '../middleware/retry/middleware.mjs';\nimport '../../utils/getClientInfo/getClientInfo.mjs';\nimport '../../utils/retry/retry.mjs';\nimport '../../types/errors.mjs';\nimport { userAgentMiddlewareFactory } from '../middleware/userAgent/middleware.mjs';\nimport { composeTransferHandler } from '../internal/composeTransferHandler.mjs';\nimport { fetchTransferHandler } from './fetch.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst unauthenticatedHandler = composeTransferHandler(fetchTransferHandler, [userAgentMiddlewareFactory, retryMiddlewareFactory]);\n\nexport { unauthenticatedHandler };\n//# sourceMappingURL=unauthenticated.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst DEFAULT_RETRY_ATTEMPTS = 3;\n/**\n * Retry middleware\n */\nconst retryMiddlewareFactory = ({ maxAttempts = DEFAULT_RETRY_ATTEMPTS, retryDecider, computeDelay, abortSignal, }) => {\n if (maxAttempts < 1) {\n throw new Error('maxAttempts must be greater than 0');\n }\n return (next, context) => async function retryMiddleware(request) {\n let error;\n let attemptsCount = context.attemptsCount ?? 0;\n let response;\n // When retry is not needed or max attempts is reached, either error or response will be set. This function handles either cases.\n const handleTerminalErrorOrResponse = () => {\n if (response) {\n addOrIncrementMetadataAttempts(response, attemptsCount);\n return response;\n }\n else {\n addOrIncrementMetadataAttempts(error, attemptsCount);\n throw error;\n }\n };\n while (!abortSignal?.aborted && attemptsCount < maxAttempts) {\n try {\n response = await next(request);\n error = undefined;\n }\n catch (e) {\n error = e;\n response = undefined;\n }\n // context.attemptsCount may be updated after calling next handler which may retry the request by itself.\n attemptsCount =\n (context.attemptsCount ?? 0) > attemptsCount\n ? (context.attemptsCount ?? 0)\n : attemptsCount + 1;\n context.attemptsCount = attemptsCount;\n const { isCredentialsExpiredError, retryable } = await retryDecider(response, error, context);\n if (retryable) {\n // Setting isCredentialsInvalid flag to notify signing middleware to forceRefresh credentials provider.\n context.isCredentialsExpired = !!isCredentialsExpiredError;\n if (!abortSignal?.aborted && attemptsCount < maxAttempts) {\n // prevent sleep for last attempt or cancelled request;\n const delay = computeDelay(attemptsCount);\n await cancellableSleep(delay, abortSignal);\n }\n continue;\n }\n else {\n return handleTerminalErrorOrResponse();\n }\n }\n if (abortSignal?.aborted) {\n throw new Error('Request aborted.');\n }\n else {\n return handleTerminalErrorOrResponse();\n }\n };\n};\nconst cancellableSleep = (timeoutMs, abortSignal) => {\n if (abortSignal?.aborted) {\n return Promise.resolve();\n }\n let timeoutId;\n let sleepPromiseResolveFn;\n const sleepPromise = new Promise(resolve => {\n sleepPromiseResolveFn = resolve;\n timeoutId = setTimeout(resolve, timeoutMs);\n });\n abortSignal?.addEventListener('abort', function cancelSleep(_) {\n clearTimeout(timeoutId);\n abortSignal?.removeEventListener('abort', cancelSleep);\n sleepPromiseResolveFn();\n });\n return sleepPromise;\n};\nconst addOrIncrementMetadataAttempts = (nextHandlerOutput, attempts) => {\n if (Object.prototype.toString.call(nextHandlerOutput) !== '[object Object]') {\n return;\n }\n nextHandlerOutput.$metadata = {\n ...(nextHandlerOutput.$metadata ?? {}),\n attempts,\n };\n};\n\nexport { retryMiddlewareFactory };\n//# sourceMappingURL=middleware.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Middleware injects user agent string to specified header(default to 'x-amz-user-agent'),\n * if the header is not set already.\n *\n * TODO: incorporate new user agent design\n */\nconst userAgentMiddlewareFactory = ({ userAgentHeader = 'x-amz-user-agent', userAgentValue = '', }) => next => {\n return async function userAgentMiddleware(request) {\n if (userAgentValue.trim().length === 0) {\n const result = await next(request);\n return result;\n }\n else {\n const headerName = userAgentHeader.toLowerCase();\n request.headers[headerName] = request.headers[headerName]\n ? `${request.headers[headerName]} ${userAgentValue}`\n : userAgentValue;\n const response = await next(request);\n return response;\n }\n };\n};\n\nexport { userAgentMiddlewareFactory };\n//# sourceMappingURL=middleware.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Compose a transfer handler with a core transfer handler and a list of middleware.\n * @param coreHandler Core transfer handler\n * @param middleware\tList of middleware\n * @returns A transfer handler whose option type is the union of the core\n * \ttransfer handler's option type and the middleware's option type.\n * @internal\n */\nconst composeTransferHandler = (coreHandler, middleware) => (request, options) => {\n const context = {};\n let composedHandler = (composeHandlerRequest) => coreHandler(composeHandlerRequest, options);\n for (let i = middleware.length - 1; i >= 0; i--) {\n const m = middleware[i];\n const resolvedMiddleware = m(options);\n composedHandler = resolvedMiddleware(composedHandler, context);\n }\n return composedHandler(request);\n};\n\nexport { composeTransferHandler };\n//# sourceMappingURL=composeTransferHandler.mjs.map\n","import { AmplifyError } from '../../errors/AmplifyError.mjs';\nimport { AmplifyErrorCode } from '../../types/errors.mjs';\nimport '../../errors/errorHelpers.mjs';\nimport { withMemoization } from '../utils/memoization.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst shouldSendBody = (method) => !['HEAD', 'GET', 'DELETE'].includes(method.toUpperCase());\n// TODO[AllanZhengYP]: we need to provide isCanceledError utility\nconst fetchTransferHandler = async ({ url, method, headers, body }, { abortSignal, cache, withCrossDomainCredentials }) => {\n let resp;\n try {\n resp = await fetch(url, {\n method,\n headers,\n body: shouldSendBody(method) ? body : undefined,\n signal: abortSignal,\n cache,\n credentials: withCrossDomainCredentials ? 'include' : 'same-origin',\n });\n }\n catch (e) {\n if (e instanceof TypeError) {\n throw new AmplifyError({\n name: AmplifyErrorCode.NetworkError,\n message: 'A network error has occurred.',\n underlyingError: e,\n });\n }\n throw e;\n }\n const responseHeaders = {};\n resp.headers?.forEach((value, key) => {\n responseHeaders[key.toLowerCase()] = value;\n });\n const httpResponse = {\n statusCode: resp.status,\n headers: responseHeaders,\n body: null,\n };\n // resp.body is a ReadableStream according to Fetch API spec, but React Native\n // does not implement it.\n const bodyWithMixin = Object.assign(resp.body ?? {}, {\n text: withMemoization(() => resp.text()),\n blob: withMemoization(() => resp.blob()),\n json: withMemoization(() => resp.json()),\n });\n return {\n ...httpResponse,\n body: bodyWithMixin,\n };\n};\n\nexport { fetchTransferHandler };\n//# sourceMappingURL=fetch.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Cache the payload of a response body. It allows multiple calls to the body,\n * for example, when reading the body in both retry decider and error deserializer.\n * Caching body is allowed here because we call the body accessor(blob(), json(),\n * etc.) when body is small or streaming implementation is not available(RN).\n *\n * @internal\n */\nconst withMemoization = (payloadAccessor) => {\n let cached;\n return () => {\n if (!cached) {\n // Explicitly not awaiting. Intermediate await would add overhead and\n // introduce a possible race in the event that this wrapper is called\n // again before the first `payloadAccessor` call resolves.\n cached = payloadAccessor();\n }\n return cached;\n };\n};\n\nexport { withMemoization };\n//# sourceMappingURL=memoization.mjs.map\n","import '../../../utils/getClientInfo/getClientInfo.mjs';\nimport { jitteredBackoff as jitteredBackoff$1 } from '../../../utils/retry/jitteredBackoff.mjs';\nimport '../../../utils/retry/retry.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// TODO: [v6] The separate retry utility is used by Data packages now and will replaced by retry middleware.\nconst DEFAULT_MAX_DELAY_MS = 5 * 60 * 1000;\nconst jitteredBackoff = attempt => {\n const delayFunction = jitteredBackoff$1(DEFAULT_MAX_DELAY_MS);\n const delay = delayFunction(attempt);\n // The delayFunction returns false when the delay is greater than the max delay(5 mins).\n // In this case, the retry middleware will delay 5 mins instead, as a ceiling of the delay.\n return delay === false ? DEFAULT_MAX_DELAY_MS : delay;\n};\n\nexport { jitteredBackoff };\n//# sourceMappingURL=jitteredBackoff.mjs.map\n","import { MAX_DELAY_MS } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @private\n * Internal use of Amplify only\n */\nfunction jitteredBackoff(maxDelayMs = MAX_DELAY_MS) {\n const BASE_TIME_MS = 100;\n const JITTER_FACTOR = 100;\n return attempt => {\n const delay = 2 ** attempt * BASE_TIME_MS + JITTER_FACTOR * Math.random();\n return delay > maxDelayMs ? false : delay;\n };\n}\n\nexport { jitteredBackoff };\n//# sourceMappingURL=jitteredBackoff.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst MAX_DELAY_MS = 5 * 60 * 1000;\n\nexport { MAX_DELAY_MS };\n//# sourceMappingURL=constants.mjs.map\n","import { AmplifyErrorCode } from '../../../types/errors.mjs';\nimport { isClockSkewError } from './isClockSkewError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Get retry decider function\n * @param errorParser Function to load JavaScript error from HTTP response\n */\nconst getRetryDecider = (errorParser) => async (response, error) => {\n const parsedError = error ??\n (await errorParser(response)) ??\n undefined;\n const errorCode = parsedError?.code || parsedError?.name;\n const statusCode = response?.statusCode;\n const isRetryable = isConnectionError(error) ||\n isThrottlingError(statusCode, errorCode) ||\n isClockSkewError(errorCode) ||\n isServerSideError(statusCode, errorCode);\n return {\n retryable: isRetryable,\n };\n};\n// reference: https://github.com/aws/aws-sdk-js-v3/blob/ab0e7be36e7e7f8a0c04834357aaad643c7912c3/packages/service-error-classification/src/constants.ts#L22-L37\nconst THROTTLING_ERROR_CODES = [\n 'BandwidthLimitExceeded',\n 'EC2ThrottledException',\n 'LimitExceededException',\n 'PriorRequestNotComplete',\n 'ProvisionedThroughputExceededException',\n 'RequestLimitExceeded',\n 'RequestThrottled',\n 'RequestThrottledException',\n 'SlowDown',\n 'ThrottledException',\n 'Throttling',\n 'ThrottlingException',\n 'TooManyRequestsException',\n];\nconst TIMEOUT_ERROR_CODES = [\n 'TimeoutError',\n 'RequestTimeout',\n 'RequestTimeoutException',\n];\nconst isThrottlingError = (statusCode, errorCode) => statusCode === 429 ||\n (!!errorCode && THROTTLING_ERROR_CODES.includes(errorCode));\nconst isConnectionError = (error) => [\n AmplifyErrorCode.NetworkError,\n // TODO(vNext): unify the error code `ERR_NETWORK` used by the Storage XHR handler\n 'ERR_NETWORK',\n].includes(error?.name);\nconst isServerSideError = (statusCode, errorCode) => (!!statusCode && [500, 502, 503, 504].includes(statusCode)) ||\n (!!errorCode && TIMEOUT_ERROR_CODES.includes(errorCode));\n\nexport { getRetryDecider };\n//# sourceMappingURL=defaultRetryDecider.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// via https://github.com/aws/aws-sdk-js-v3/blob/ab0e7be36e7e7f8a0c04834357aaad643c7912c3/packages/service-error-classification/src/constants.ts#L8\nconst CLOCK_SKEW_ERROR_CODES = [\n 'AuthFailure',\n 'InvalidSignatureException',\n 'RequestExpired',\n 'RequestInTheFuture',\n 'RequestTimeTooSkewed',\n 'SignatureDoesNotMatch',\n 'BadRequestException', // API Gateway\n];\n/**\n * Given an error code, returns true if it is related to a clock skew error.\n *\n * @param errorCode String representation of some error.\n * @returns True if given error is present in `CLOCK_SKEW_ERROR_CODES`, false otherwise.\n *\n * @internal\n */\nconst isClockSkewError = (errorCode) => !!errorCode && CLOCK_SKEW_ERROR_CODES.includes(errorCode);\n\nexport { isClockSkewError };\n//# sourceMappingURL=isClockSkewError.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst AmplifyUrl = URL;\nconst AmplifyUrlSearchParams = URLSearchParams;\n\nexport { AmplifyUrl, AmplifyUrlSearchParams };\n//# sourceMappingURL=index.mjs.map\n","import '../../types/errors.mjs';\nimport '../../errors/errorHelpers.mjs';\nimport '../../utils/getClientInfo/getClientInfo.mjs';\nimport '../../utils/retry/retry.mjs';\nimport '@aws-crypto/sha256-js';\nimport '@smithy/util-hex-encoding';\nimport { parseMetadata } from '../../clients/serde/responseInfo.mjs';\nimport { parseJsonError, parseJsonBody } from '../../clients/serde/json.mjs';\nimport { composeServiceApi } from '../../clients/internal/composeServiceApi.mjs';\nimport { defaultConfig, cognitoIdentityTransferHandler, buildHttpRpcRequest, getSharedHeaders } from './base.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst getCredentialsForIdentitySerializer = (input, endpoint) => {\n const headers = getSharedHeaders('GetCredentialsForIdentity');\n const body = JSON.stringify(input);\n return buildHttpRpcRequest(endpoint, headers, body);\n};\nconst getCredentialsForIdentityDeserializer = async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n throw error;\n }\n else {\n const body = await parseJsonBody(response);\n return {\n IdentityId: body.IdentityId,\n Credentials: deserializeCredentials(body.Credentials),\n $metadata: parseMetadata(response),\n };\n }\n};\nconst deserializeCredentials = ({ AccessKeyId, SecretKey, SessionToken, Expiration, } = {}) => {\n return {\n AccessKeyId,\n SecretKey,\n SessionToken,\n Expiration: Expiration && new Date(Expiration * 1000),\n };\n};\n/**\n * @internal\n */\nconst getCredentialsForIdentity = composeServiceApi(cognitoIdentityTransferHandler, getCredentialsForIdentitySerializer, getCredentialsForIdentityDeserializer, defaultConfig);\n\nexport { getCredentialsForIdentity };\n//# sourceMappingURL=getCredentialsForIdentity.mjs.map\n","import { DefaultStorage } from './DefaultStorage.mjs';\nimport { InMemoryStorage } from './InMemoryStorage.mjs';\nimport { KeyValueStorage } from './KeyValueStorage.mjs';\nimport { SessionStorage } from './SessionStorage.mjs';\nexport { CookieStorage } from './CookieStorage.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst defaultStorage = new DefaultStorage();\nconst sessionStorage = new SessionStorage();\nconst sharedInMemoryStorage = new KeyValueStorage(new InMemoryStorage());\n\nexport { defaultStorage, sessionStorage, sharedInMemoryStorage };\n//# sourceMappingURL=index.mjs.map\n","import { KeyValueStorage } from './KeyValueStorage.mjs';\nimport { getLocalStorageWithFallback } from './utils.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nclass DefaultStorage extends KeyValueStorage {\n constructor() {\n super(getLocalStorageWithFallback());\n }\n}\n\nexport { DefaultStorage };\n//# sourceMappingURL=DefaultStorage.mjs.map\n","import { PlatformNotSupportedError } from '../errors/PlatformNotSupportedError.mjs';\nimport '../errors/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nclass KeyValueStorage {\n constructor(storage) {\n this.storage = storage;\n }\n /**\n * This is used to set a specific item in storage\n * @param {string} key - the key for the item\n * @param {object} value - the value\n * @returns {string} value that was set\n */\n async setItem(key, value) {\n if (!this.storage)\n throw new PlatformNotSupportedError();\n this.storage.setItem(key, value);\n }\n /**\n * This is used to get a specific key from storage\n * @param {string} key - the key for the item\n * This is used to clear the storage\n * @returns {string} the data item\n */\n async getItem(key) {\n if (!this.storage)\n throw new PlatformNotSupportedError();\n return this.storage.getItem(key);\n }\n /**\n * This is used to remove an item from storage\n * @param {string} key - the key being set\n * @returns {string} value - value that was deleted\n */\n async removeItem(key) {\n if (!this.storage)\n throw new PlatformNotSupportedError();\n this.storage.removeItem(key);\n }\n /**\n * This is used to clear the storage\n * @returns {string} nothing\n */\n async clear() {\n if (!this.storage)\n throw new PlatformNotSupportedError();\n this.storage.clear();\n }\n}\n\nexport { KeyValueStorage };\n//# sourceMappingURL=KeyValueStorage.mjs.map\n","import { AmplifyErrorCode } from '../types/errors.mjs';\nimport { AmplifyError } from './AmplifyError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass PlatformNotSupportedError extends AmplifyError {\n constructor() {\n super({\n name: AmplifyErrorCode.PlatformNotSupported,\n message: 'Function not supported on current platform',\n });\n }\n}\n\nexport { PlatformNotSupportedError };\n//# sourceMappingURL=PlatformNotSupportedError.mjs.map\n","import { ConsoleLogger } from '../Logger/ConsoleLogger.mjs';\nimport { InMemoryStorage } from './InMemoryStorage.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n * @returns Either a reference to window.localStorage or an in-memory storage as fallback\n */\nconst logger = new ConsoleLogger('CoreStorageUtils');\nconst getLocalStorageWithFallback = () => {\n try {\n // Attempt to use localStorage directly\n if (typeof window !== 'undefined' && window.localStorage) {\n return window.localStorage;\n }\n }\n catch (e) {\n // Handle any errors related to localStorage access\n logger.info('localStorage not found. InMemoryStorage is used as a fallback.');\n }\n // Return in-memory storage as a fallback if localStorage is not accessible\n return new InMemoryStorage();\n};\n/**\n * @internal\n * @returns Either a reference to window.sessionStorage or an in-memory storage as fallback\n */\nconst getSessionStorageWithFallback = () => {\n try {\n // Attempt to use sessionStorage directly\n if (typeof window !== 'undefined' && window.sessionStorage) {\n // Verify we can actually use it by testing access\n window.sessionStorage.getItem('test');\n return window.sessionStorage;\n }\n throw new Error('sessionStorage is not defined');\n }\n catch (e) {\n // Handle any errors related to sessionStorage access\n logger.info('sessionStorage not found. InMemoryStorage is used as a fallback.');\n return new InMemoryStorage();\n }\n};\n\nexport { getLocalStorageWithFallback, getSessionStorageWithFallback };\n//# sourceMappingURL=utils.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nclass InMemoryStorage {\n constructor() {\n this.storage = new Map();\n }\n get length() {\n return this.storage.size;\n }\n key(index) {\n if (index > this.length - 1) {\n return null;\n }\n return Array.from(this.storage.keys())[index];\n }\n setItem(key, value) {\n this.storage.set(key, value);\n }\n getItem(key) {\n return this.storage.get(key) ?? null;\n }\n removeItem(key) {\n this.storage.delete(key);\n }\n clear() {\n this.storage.clear();\n }\n}\n\nexport { InMemoryStorage };\n//# sourceMappingURL=InMemoryStorage.mjs.map\n","import { KeyValueStorage } from './KeyValueStorage.mjs';\nimport { getSessionStorageWithFallback } from './utils.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nclass SessionStorage extends KeyValueStorage {\n constructor() {\n super(getSessionStorageWithFallback());\n }\n}\n\nexport { SessionStorage };\n//# sourceMappingURL=SessionStorage.mjs.map\n","import JsCookie from 'js-cookie';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass CookieStorage {\n constructor(data = {}) {\n const { path, domain, expires, sameSite, secure } = data;\n this.domain = domain;\n this.path = path || '/';\n this.expires = Object.prototype.hasOwnProperty.call(data, 'expires')\n ? expires\n : 365;\n this.secure = Object.prototype.hasOwnProperty.call(data, 'secure')\n ? secure\n : true;\n if (Object.prototype.hasOwnProperty.call(data, 'sameSite')) {\n if (!sameSite || !['strict', 'lax', 'none'].includes(sameSite)) {\n throw new Error('The sameSite value of cookieStorage must be \"lax\", \"strict\" or \"none\".');\n }\n if (sameSite === 'none' && !this.secure) {\n throw new Error('sameSite = None requires the Secure attribute in latest browser versions.');\n }\n this.sameSite = sameSite;\n }\n }\n async setItem(key, value) {\n JsCookie.set(key, value, this.getData());\n }\n async getItem(key) {\n const item = JsCookie.get(key);\n return item ?? null;\n }\n async removeItem(key) {\n JsCookie.remove(key, this.getData());\n }\n async clear() {\n const cookie = JsCookie.get();\n const promises = Object.keys(cookie).map(key => this.removeItem(key));\n await Promise.all(promises);\n }\n getData() {\n return {\n path: this.path,\n expires: this.expires,\n domain: this.domain,\n secure: this.secure,\n ...(this.sameSite && { sameSite: this.sameSite }),\n };\n }\n}\n\nexport { CookieStorage };\n//# sourceMappingURL=CookieStorage.mjs.map\n","/*! js-cookie v3.0.5 | MIT */\n;\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, (function () {\n var current = global.Cookies;\n var exports = global.Cookies = factory();\n exports.noConflict = function () { global.Cookies = current; return exports; };\n })());\n})(this, (function () { 'use strict';\n\n /* eslint-disable no-var */\n function assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n }\n /* eslint-enable no-var */\n\n /* eslint-disable no-var */\n var defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n };\n /* eslint-enable no-var */\n\n /* eslint-disable no-var */\n\n function init (converter, defaultAttributes) {\n function set (name, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n name = encodeURIComponent(name)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n name + '=' + converter.write(value, name) + stringifiedAttributes)\n }\n\n function get (name) {\n if (typeof document === 'undefined' || (arguments.length && !name)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var found = decodeURIComponent(parts[0]);\n jar[found] = converter.read(value, found);\n\n if (name === found) {\n break\n }\n } catch (e) {}\n }\n\n return name ? jar[name] : jar\n }\n\n return Object.create(\n {\n set,\n get,\n remove: function (name, attributes) {\n set(\n name,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n }\n\n var api = init(defaultConverter, { path: '/' });\n /* eslint-enable no-var */\n\n return api;\n\n}));\n","import { StorageCache } from './StorageCache.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst Cache = new StorageCache();\n\nexport { Cache };\n//# sourceMappingURL=index.mjs.map\n","import { ConsoleLogger } from '../Logger/ConsoleLogger.mjs';\nimport { KeyValueStorage } from '../storage/KeyValueStorage.mjs';\nimport { getLocalStorageWithFallback } from '../storage/utils.mjs';\nimport { defaultConfig } from './constants.mjs';\nimport { StorageCacheCommon } from './StorageCacheCommon.mjs';\nimport { getCurrentSizeKey, getCurrentTime } from './utils/cacheHelpers.mjs';\nimport './utils/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('StorageCache');\n/**\n * Customized storage based on the SessionStorage or LocalStorage with LRU implemented\n */\nclass StorageCache extends StorageCacheCommon {\n /**\n * initialize the cache\n * @param config - the configuration of the cache\n */\n constructor(config) {\n const storage = getLocalStorageWithFallback();\n super({ config, keyValueStorage: new KeyValueStorage(storage) });\n this.storage = storage;\n this.getItem = this.getItem.bind(this);\n this.setItem = this.setItem.bind(this);\n this.removeItem = this.removeItem.bind(this);\n }\n async getAllCacheKeys(options) {\n const { omitSizeKey } = options ?? {};\n const keys = [];\n for (let i = 0; i < this.storage.length; i++) {\n const key = this.storage.key(i);\n if (omitSizeKey && key === getCurrentSizeKey(this.config.keyPrefix)) {\n continue;\n }\n if (key?.startsWith(this.config.keyPrefix)) {\n keys.push(key.substring(this.config.keyPrefix.length));\n }\n }\n return keys;\n }\n /**\n * Return a new instance of cache with customized configuration.\n * @param {Object} config - the customized configuration\n * @return {Object} - the new instance of Cache\n */\n createInstance(config) {\n if (!config.keyPrefix || config.keyPrefix === defaultConfig.keyPrefix) {\n logger.error('invalid keyPrefix, setting keyPrefix with timeStamp');\n config.keyPrefix = getCurrentTime.toString();\n }\n return new StorageCache(config);\n }\n}\n\nexport { StorageCache };\n//# sourceMappingURL=StorageCache.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Default cache config\n */\nconst defaultConfig = {\n keyPrefix: 'aws-amplify-cache',\n capacityInBytes: 1048576,\n itemMaxSize: 210000,\n defaultTTL: 259200000,\n defaultPriority: 5,\n warningThreshold: 0.8,\n};\nconst currentSizeKey = 'CurSize';\n\nexport { currentSizeKey, defaultConfig };\n//# sourceMappingURL=constants.mjs.map\n","import { ConsoleLogger } from '../Logger/ConsoleLogger.mjs';\nimport { defaultConfig, currentSizeKey } from './constants.mjs';\nimport { getCurrentSizeKey, getCurrentTime, getByteLength } from './utils/cacheHelpers.mjs';\nimport { assert, CacheErrorCode } from './utils/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('StorageCache');\n/**\n * Initialization of the cache\n *\n */\nclass StorageCacheCommon {\n /**\n * Initialize the cache\n *\n * @param config - Custom configuration for this instance.\n */\n constructor({ config, keyValueStorage, }) {\n this.config = {\n ...defaultConfig,\n ...config,\n };\n this.keyValueStorage = keyValueStorage;\n this.sanitizeConfig();\n }\n getModuleName() {\n return 'Cache';\n }\n /**\n * Set custom configuration for the cache instance.\n *\n * @param config - customized configuration (without keyPrefix, which can't be changed)\n *\n * @return - the current configuration\n */\n configure(config) {\n if (config) {\n if (config.keyPrefix) {\n logger.warn('keyPrefix can not be re-configured on an existing Cache instance.');\n }\n this.config = {\n ...this.config,\n ...config,\n };\n }\n this.sanitizeConfig();\n return this.config;\n }\n /**\n * return the current size of the cache\n * @return {Promise}\n */\n async getCurrentCacheSize() {\n let size = await this.getStorage().getItem(getCurrentSizeKey(this.config.keyPrefix));\n if (!size) {\n await this.getStorage().setItem(getCurrentSizeKey(this.config.keyPrefix), '0');\n size = '0';\n }\n return Number(size);\n }\n /**\n * Set item into cache. You can put number, string, boolean or object.\n * The cache will first check whether has the same key.\n * If it has, it will delete the old item and then put the new item in\n * The cache will pop out items if it is full\n * You can specify the cache item options. The cache will abort and output a warning:\n * If the key is invalid\n * If the size of the item exceeds itemMaxSize.\n * If the value is undefined\n * If incorrect cache item configuration\n * If error happened with browser storage\n *\n * @param {String} key - the key of the item\n * @param {Object} value - the value of the item\n * @param {Object} [options] - optional, the specified meta-data\n *\n * @return {Promise}\n */\n async setItem(key, value, options) {\n logger.debug(`Set item: key is ${key}, value is ${value} with options: ${options}`);\n if (!key || key === currentSizeKey) {\n logger.warn(`Invalid key: should not be empty or reserved key: '${currentSizeKey}'`);\n return;\n }\n if (typeof value === 'undefined') {\n logger.warn(`The value of item should not be undefined!`);\n return;\n }\n const cacheItemOptions = {\n priority: options?.priority !== undefined\n ? options.priority\n : this.config.defaultPriority,\n expires: options?.expires !== undefined\n ? options.expires\n : this.config.defaultTTL + getCurrentTime(),\n };\n if (cacheItemOptions.priority < 1 || cacheItemOptions.priority > 5) {\n logger.warn(`Invalid parameter: priority due to out or range. It should be within 1 and 5.`);\n return;\n }\n const prefixedKey = `${this.config.keyPrefix}${key}`;\n const item = this.fillCacheItem(prefixedKey, value, cacheItemOptions);\n // check whether this item is too big;\n if (item.byteSize > this.config.itemMaxSize) {\n logger.warn(`Item with key: ${key} you are trying to put into is too big!`);\n return;\n }\n try {\n // first look into the storage, if it exists, delete it.\n const val = await this.getStorage().getItem(prefixedKey);\n if (val) {\n await this.removeCacheItem(prefixedKey, JSON.parse(val).byteSize);\n }\n // check whether the cache is full\n if (await this.isCacheFull(item.byteSize)) {\n const validKeys = await this.clearInvalidAndGetRemainingKeys();\n if (await this.isCacheFull(item.byteSize)) {\n const sizeToPop = await this.sizeToPop(item.byteSize);\n await this.popOutItems(validKeys, sizeToPop);\n }\n }\n // put item in the cache\n return this.setCacheItem(prefixedKey, item);\n }\n catch (e) {\n logger.warn(`setItem failed! ${e}`);\n }\n }\n /**\n * Get item from cache. It will return null if item doesn’t exist or it has been expired.\n * If you specified callback function in the options,\n * then the function will be executed if no such item in the cache\n * and finally put the return value into cache.\n * Please make sure the callback function will return the value you want to put into the cache.\n * The cache will abort output a warning:\n * If the key is invalid\n * If error happened with AsyncStorage\n *\n * @param {String} key - the key of the item\n * @param {Object} [options] - the options of callback function\n *\n * @return {Promise} - return a promise resolves to be the value of the item\n */\n async getItem(key, options) {\n logger.debug(`Get item: key is ${key} with options ${options}`);\n let cached;\n if (!key || key === currentSizeKey) {\n logger.warn(`Invalid key: should not be empty or reserved key: '${currentSizeKey}'`);\n return null;\n }\n const prefixedKey = `${this.config.keyPrefix}${key}`;\n try {\n cached = await this.getStorage().getItem(prefixedKey);\n if (cached != null) {\n if (await this.isExpired(prefixedKey)) {\n // if expired, remove that item and return null\n await this.removeCacheItem(prefixedKey, JSON.parse(cached).byteSize);\n }\n else {\n // if not expired, update its visitedTime and return the value\n const item = await this.updateVisitedTime(JSON.parse(cached), prefixedKey);\n return item.data;\n }\n }\n if (options?.callback) {\n const val = options.callback();\n if (val !== null) {\n await this.setItem(key, val, options);\n }\n return val;\n }\n return null;\n }\n catch (e) {\n logger.warn(`getItem failed! ${e}`);\n return null;\n }\n }\n /**\n * remove item from the cache\n * The cache will abort output a warning:\n * If error happened with AsyncStorage\n * @param {String} key - the key of the item\n * @return {Promise}\n */\n async removeItem(key) {\n logger.debug(`Remove item: key is ${key}`);\n if (!key || key === currentSizeKey) {\n logger.warn(`Invalid key: should not be empty or reserved key: '${currentSizeKey}'`);\n return;\n }\n const prefixedKey = `${this.config.keyPrefix}${key}`;\n try {\n const val = await this.getStorage().getItem(prefixedKey);\n if (val) {\n await this.removeCacheItem(prefixedKey, JSON.parse(val).byteSize);\n }\n }\n catch (e) {\n logger.warn(`removeItem failed! ${e}`);\n }\n }\n /**\n * Return all the keys owned by this cache.\n * Will return an empty array if error occurred.\n *\n * @return {Promise}\n */\n async getAllKeys() {\n try {\n return await this.getAllCacheKeys();\n }\n catch (e) {\n logger.warn(`getAllkeys failed! ${e}`);\n return [];\n }\n }\n getStorage() {\n return this.keyValueStorage;\n }\n /**\n * check whether item is expired\n *\n * @param key - the key of the item\n *\n * @return true if the item is expired.\n */\n async isExpired(key) {\n const text = await this.getStorage().getItem(key);\n assert(text !== null, CacheErrorCode.NoCacheItem, `Key: ${key}`);\n const item = JSON.parse(text);\n if (getCurrentTime() >= item.expires) {\n return true;\n }\n return false;\n }\n /**\n * delete item from cache\n *\n * @param prefixedKey - the key of the item\n * @param size - optional, the byte size of the item\n */\n async removeCacheItem(prefixedKey, size) {\n const item = await this.getStorage().getItem(prefixedKey);\n assert(item !== null, CacheErrorCode.NoCacheItem, `Key: ${prefixedKey}`);\n const itemSize = size ?? JSON.parse(item).byteSize;\n // first try to update the current size of the cache\n await this.decreaseCurrentSizeInBytes(itemSize);\n // try to remove the item from cache\n try {\n await this.getStorage().removeItem(prefixedKey);\n }\n catch (removeItemError) {\n // if some error happened, we need to rollback the current size\n await this.increaseCurrentSizeInBytes(itemSize);\n logger.error(`Failed to remove item: ${removeItemError}`);\n }\n }\n /**\n * produce a JSON object with meta-data and data value\n * @param value - the value of the item\n * @param options - optional, the specified meta-data\n *\n * @return - the item which has the meta-data and the value\n */\n fillCacheItem(key, value, options) {\n const item = {\n key,\n data: value,\n timestamp: getCurrentTime(),\n visitedTime: getCurrentTime(),\n priority: options.priority ?? 0,\n expires: options.expires ?? 0,\n type: typeof value,\n byteSize: 0,\n };\n // calculate byte size\n item.byteSize = getByteLength(JSON.stringify(item));\n // re-calculate using cache item with updated byteSize property\n item.byteSize = getByteLength(JSON.stringify(item));\n return item;\n }\n sanitizeConfig() {\n if (this.config.itemMaxSize > this.config.capacityInBytes) {\n logger.error('Invalid parameter: itemMaxSize. It should be smaller than capacityInBytes. Setting back to default.');\n this.config.itemMaxSize = defaultConfig.itemMaxSize;\n }\n if (this.config.defaultPriority > 5 || this.config.defaultPriority < 1) {\n logger.error('Invalid parameter: defaultPriority. It should be between 1 and 5. Setting back to default.');\n this.config.defaultPriority = defaultConfig.defaultPriority;\n }\n if (Number(this.config.warningThreshold) > 1 ||\n Number(this.config.warningThreshold) < 0) {\n logger.error('Invalid parameter: warningThreshold. It should be between 0 and 1. Setting back to default.');\n this.config.warningThreshold = defaultConfig.warningThreshold;\n }\n // Set 5MB limit\n const cacheLimit = 5 * 1024 * 1024;\n if (this.config.capacityInBytes > cacheLimit) {\n logger.error('Cache Capacity should be less than 5MB. Setting back to default. Setting back to default.');\n this.config.capacityInBytes = defaultConfig.capacityInBytes;\n }\n }\n /**\n * increase current size of the cache\n *\n * @param amount - the amount of the cache szie which need to be increased\n */\n async increaseCurrentSizeInBytes(amount) {\n const size = await this.getCurrentCacheSize();\n await this.getStorage().setItem(getCurrentSizeKey(this.config.keyPrefix), (size + amount).toString());\n }\n /**\n * decrease current size of the cache\n *\n * @param amount - the amount of the cache size which needs to be decreased\n */\n async decreaseCurrentSizeInBytes(amount) {\n const size = await this.getCurrentCacheSize();\n await this.getStorage().setItem(getCurrentSizeKey(this.config.keyPrefix), (size - amount).toString());\n }\n /**\n * update the visited time if item has been visited\n *\n * @param item - the item which need to be updated\n * @param prefixedKey - the key of the item\n *\n * @return the updated item\n */\n async updateVisitedTime(item, prefixedKey) {\n item.visitedTime = getCurrentTime();\n await this.getStorage().setItem(prefixedKey, JSON.stringify(item));\n return item;\n }\n /**\n * put item into cache\n *\n * @param prefixedKey - the key of the item\n * @param itemData - the value of the item\n * @param itemSizeInBytes - the byte size of the item\n */\n async setCacheItem(prefixedKey, item) {\n // first try to update the current size of the cache.\n await this.increaseCurrentSizeInBytes(item.byteSize);\n // try to add the item into cache\n try {\n await this.getStorage().setItem(prefixedKey, JSON.stringify(item));\n }\n catch (setItemErr) {\n // if some error happened, we need to rollback the current size\n await this.decreaseCurrentSizeInBytes(item.byteSize);\n logger.error(`Failed to set item ${setItemErr}`);\n }\n }\n /**\n * total space needed when poping out items\n *\n * @param itemSize\n *\n * @return total space needed\n */\n async sizeToPop(itemSize) {\n const cur = await this.getCurrentCacheSize();\n const spaceItemNeed = cur + itemSize - this.config.capacityInBytes;\n const cacheThresholdSpace = (1 - this.config.warningThreshold) * this.config.capacityInBytes;\n return spaceItemNeed > cacheThresholdSpace\n ? spaceItemNeed\n : cacheThresholdSpace;\n }\n /**\n * see whether cache is full\n *\n * @param itemSize\n *\n * @return true if cache is full\n */\n async isCacheFull(itemSize) {\n const cur = await this.getCurrentCacheSize();\n return itemSize + cur > this.config.capacityInBytes;\n }\n /**\n * get all the items we have, sort them by their priority,\n * if priority is same, sort them by their last visited time\n * pop out items from the low priority (5 is the lowest)\n * @private\n * @param keys - all the keys in this cache\n * @param sizeToPop - the total size of the items which needed to be poped out\n */\n async popOutItems(keys, sizeToPop) {\n const items = [];\n let remainedSize = sizeToPop;\n for (const key of keys) {\n const val = await this.getStorage().getItem(key);\n if (val != null) {\n const item = JSON.parse(val);\n items.push(item);\n }\n }\n // first compare priority\n // then compare visited time\n items.sort((a, b) => {\n if (a.priority > b.priority) {\n return -1;\n }\n else if (a.priority < b.priority) {\n return 1;\n }\n else {\n if (a.visitedTime < b.visitedTime) {\n return -1;\n }\n else\n return 1;\n }\n });\n for (const item of items) {\n // pop out items until we have enough room for new item\n await this.removeCacheItem(item.key, item.byteSize);\n remainedSize -= item.byteSize;\n if (remainedSize <= 0) {\n return;\n }\n }\n }\n /**\n * Scan the storage and combine the following operations for efficiency\n * 1. Clear out all expired keys owned by this cache, not including the size key.\n * 2. Return the remaining keys.\n *\n * @return The remaining valid keys\n */\n async clearInvalidAndGetRemainingKeys() {\n const remainingKeys = [];\n const keys = await this.getAllCacheKeys({\n omitSizeKey: true,\n });\n for (const key of keys) {\n if (await this.isExpired(key)) {\n await this.removeCacheItem(key);\n }\n else {\n remainingKeys.push(key);\n }\n }\n return remainingKeys;\n }\n /**\n * clear the entire cache\n * The cache will abort and output a warning if error occurs\n * @return {Promise}\n */\n async clear() {\n logger.debug(`Clear Cache`);\n try {\n const keys = await this.getAllKeys();\n for (const key of keys) {\n const prefixedKey = `${this.config.keyPrefix}${key}`;\n await this.getStorage().removeItem(prefixedKey);\n }\n }\n catch (e) {\n logger.warn(`clear failed! ${e}`);\n }\n }\n}\n\nexport { StorageCacheCommon };\n//# sourceMappingURL=StorageCacheCommon.mjs.map\n","import { currentSizeKey } from '../constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * return the byte size of the string\n * @param str\n */\nfunction getByteLength(str) {\n let ret = 0;\n ret = str.length;\n for (let i = str.length; i >= 0; i -= 1) {\n const charCode = str.charCodeAt(i);\n if (charCode > 0x7f && charCode <= 0x7ff) {\n ret += 1;\n }\n else if (charCode > 0x7ff && charCode <= 0xffff) {\n ret += 2;\n }\n // trail surrogate\n if (charCode >= 0xdc00 && charCode <= 0xdfff) {\n i -= 1;\n }\n }\n return ret;\n}\n/**\n * get current time\n */\nfunction getCurrentTime() {\n const currentTime = new Date();\n return currentTime.getTime();\n}\n/**\n * check if passed value is an integer\n */\nfunction isInteger(value) {\n if (Number.isInteger) {\n return Number.isInteger(value);\n }\n return (typeof value === 'number' && isFinite(value) && Math.floor(value) === value);\n}\nconst getCurrentSizeKey = (keyPrefix) => `${keyPrefix}${currentSizeKey}`;\n\nexport { getByteLength, getCurrentSizeKey, getCurrentTime, isInteger };\n//# sourceMappingURL=cacheHelpers.mjs.map\n","import { createAssertionFunction } from '../../errors/createAssertionFunction.mjs';\nimport '../../types/errors.mjs';\nimport '../../errors/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar CacheErrorCode;\n(function (CacheErrorCode) {\n CacheErrorCode[\"NoCacheItem\"] = \"NoCacheItem\";\n CacheErrorCode[\"NullNextNode\"] = \"NullNextNode\";\n CacheErrorCode[\"NullPreviousNode\"] = \"NullPreviousNode\";\n})(CacheErrorCode || (CacheErrorCode = {}));\nconst cacheErrorMap = {\n [CacheErrorCode.NoCacheItem]: {\n message: 'Item not found in the cache storage.',\n },\n [CacheErrorCode.NullNextNode]: {\n message: 'Next node is null.',\n },\n [CacheErrorCode.NullPreviousNode]: {\n message: 'Previous node is null.',\n },\n};\nconst assert = createAssertionFunction(cacheErrorMap);\n\nexport { CacheErrorCode, assert };\n//# sourceMappingURL=errorHelpers.mjs.map\n","import { ConsoleLogger } from '../Logger/ConsoleLogger.mjs';\nimport { I18n as I18n$1 } from './I18n.mjs';\nimport { assert, I18nErrorCode } from './errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('I18n');\nlet _config = { language: null };\nlet _i18n = null;\n/**\n * Export I18n APIs\n */\nclass I18n {\n /**\n * @static\n * @method\n * Configure I18n part\n * @param {Object} config - Configuration of the I18n\n */\n static configure(config) {\n logger.debug('configure I18n');\n if (!config) {\n return _config;\n }\n _config = Object.assign({}, _config, config.I18n || config);\n I18n.createInstance();\n return _config;\n }\n static getModuleName() {\n return 'I18n';\n }\n /**\n * @static\n * @method\n * Create an instance of I18n for the library\n */\n static createInstance() {\n logger.debug('create I18n instance');\n if (_i18n) {\n return;\n }\n _i18n = new I18n$1();\n }\n /**\n * @static @method\n * Explicitly setting language\n * @param {String} lang\n */\n static setLanguage(lang) {\n I18n.checkConfig();\n assert(!!_i18n, I18nErrorCode.NotConfigured);\n _i18n.setLanguage(lang);\n }\n /**\n * @static @method\n * Get value\n * @param {String} key\n * @param {String} defVal - Default value\n */\n static get(key, defVal) {\n if (!I18n.checkConfig()) {\n return typeof defVal === 'undefined' ? key : defVal;\n }\n assert(!!_i18n, I18nErrorCode.NotConfigured);\n return _i18n.get(key, defVal);\n }\n /**\n * @static\n * @method\n * Add vocabularies for one language\n * @param {String} language - Language of the dictionary\n * @param {Object} vocabularies - Object that has key-value as dictionary entry\n */\n static putVocabulariesForLanguage(language, vocabularies) {\n I18n.checkConfig();\n assert(!!_i18n, I18nErrorCode.NotConfigured);\n _i18n.putVocabulariesForLanguage(language, vocabularies);\n }\n /**\n * @static\n * @method\n * Add vocabularies for one language\n * @param {Object} vocabularies - Object that has language as key,\n * vocabularies of each language as value\n */\n static putVocabularies(vocabularies) {\n I18n.checkConfig();\n assert(!!_i18n, I18nErrorCode.NotConfigured);\n _i18n.putVocabularies(vocabularies);\n }\n static checkConfig() {\n if (!_i18n) {\n I18n.createInstance();\n }\n return true;\n }\n}\n// Create an instance of I18n in the static class\nI18n.createInstance();\n\nexport { I18n };\n//# sourceMappingURL=index.mjs.map\n","import { ConsoleLogger } from '../Logger/ConsoleLogger.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('I18n');\n/**\n * Language translation utility.\n */\nlet I18n$1 = class I18n {\n constructor() {\n /**\n * @private\n */\n this._options = null;\n /**\n * @private\n */\n this._lang = null;\n /**\n * @private\n */\n this._dict = {};\n }\n /**\n * Sets the default language from the configuration when required.\n */\n setDefaultLanguage() {\n // Default to window language if not set in instance\n if (!this._lang &&\n typeof window !== 'undefined' &&\n window &&\n window.navigator) {\n this._lang = window.navigator.language;\n }\n logger.debug(this._lang);\n }\n /**\n * @method\n * Explicitly setting language\n * @param {String} lang\n */\n setLanguage(lang) {\n this._lang = lang;\n }\n /**\n * @method\n * Get value\n * @param {String} key\n * @param {String} defVal - Default value\n */\n get(key, defVal = undefined) {\n this.setDefaultLanguage();\n if (!this._lang) {\n return typeof defVal !== 'undefined' ? defVal : key;\n }\n const lang = this._lang;\n let val = this.getByLanguage(key, lang);\n if (val) {\n return val;\n }\n if (lang.indexOf('-') > 0) {\n val = this.getByLanguage(key, lang.split('-')[0]);\n }\n if (val) {\n return val;\n }\n return typeof defVal !== 'undefined' ? defVal : key;\n }\n /**\n * @method\n * Get value according to specified language\n * @param {String} key\n * @param {String} language - Specified langurage to be used\n * @param {String} defVal - Default value\n */\n getByLanguage(key, language, defVal = null) {\n if (!language) {\n return defVal;\n }\n const langDict = this._dict[language];\n if (!langDict) {\n return defVal;\n }\n return langDict[key];\n }\n /**\n * @method\n * Add vocabularies for one language\n * @param {String} language - Language of the dictionary\n * @param {Object} vocabularies - Object that has key-value as dictionary entry\n */\n putVocabulariesForLanguage(language, vocabularies) {\n let langDict = this._dict[language];\n if (!langDict) {\n langDict = this._dict[language] = {};\n }\n this._dict[language] = { ...langDict, ...vocabularies };\n }\n /**\n * @method\n * Add vocabularies for one language\n * @param {Object} vocabularies - Object that has language as key,\n * vocabularies of each language as value\n */\n putVocabularies(vocabularies) {\n Object.keys(vocabularies).forEach(key => {\n this.putVocabulariesForLanguage(key, vocabularies[key]);\n });\n }\n};\n\nexport { I18n$1 as I18n };\n//# sourceMappingURL=I18n.mjs.map\n","import { createAssertionFunction } from '../errors/createAssertionFunction.mjs';\nimport '../types/errors.mjs';\nimport '../errors/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar I18nErrorCode;\n(function (I18nErrorCode) {\n I18nErrorCode[\"NotConfigured\"] = \"NotConfigured\";\n})(I18nErrorCode || (I18nErrorCode = {}));\nconst i18nErrorMap = {\n [I18nErrorCode.NotConfigured]: {\n message: 'i18n is not configured.',\n },\n};\nconst assert = createAssertionFunction(i18nErrorMap);\n\nexport { I18nErrorCode, assert };\n//# sourceMappingURL=errorHelpers.mjs.map\n","import { ConsoleLogger } from '../Logger/ConsoleLogger.mjs';\nimport '../utils/getClientInfo/getClientInfo.mjs';\nimport { isBrowser } from '../utils/isBrowser.mjs';\nimport '../utils/retry/retry.mjs';\nimport { AmplifyError } from '../errors/AmplifyError.mjs';\nimport '../types/errors.mjs';\nimport '../errors/errorHelpers.mjs';\nimport '@aws-crypto/sha256-js';\nimport '@smithy/util-hex-encoding';\nimport '../awsClients/pinpoint/base.mjs';\nimport '../awsClients/pinpoint/errorHelpers.mjs';\nimport 'uuid';\nimport '../Cache/index.mjs';\nimport { record } from '../providers/pinpoint/apis/record.mjs';\nimport '../providers/pinpoint/utils/PinpointEventBuffer.mjs';\nimport '../providers/pinpoint/types/errors.mjs';\nimport { Amplify } from '../singleton/Amplify.mjs';\nimport { fetchAuthSession } from '../singleton/apis/fetchAuthSession.mjs';\nimport { assert, ServiceWorkerErrorCode } from './errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Provides a means to registering a service worker in the browser\n * and communicating with it via postMessage events.\n * https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/\n *\n * postMessage events are currently not supported in all browsers. See:\n * https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API\n *\n * At the minmum this class will register the service worker and listen\n * and attempt to dispatch messages on state change and record analytics\n * events based on the service worker lifecycle.\n */\nclass ServiceWorkerClass {\n constructor() {\n // The AWS Amplify logger\n this._logger = new ConsoleLogger('ServiceWorker');\n }\n /**\n * Get the currently active service worker\n */\n get serviceWorker() {\n assert(this._serviceWorker !== undefined, ServiceWorkerErrorCode.UndefinedInstance);\n return this._serviceWorker;\n }\n /**\n * Register the service-worker.js file in the browser\n * Make sure the service-worker.js is part of the build\n * for example with Angular, modify the angular-cli.json file\n * and add to \"assets\" array \"service-worker.js\"\n * @param {string} filePath Service worker file. Defaults to \"/service-worker.js\"\n * @param {string} scope The service worker scope. Defaults to \"/\"\n * - API Doc: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register\n * @returns {Promise}\n *\t- resolve(ServiceWorkerRegistration)\n *\t- reject(Error)\n **/\n register(filePath = '/service-worker.js', scope = '/') {\n this._logger.debug(`registering ${filePath}`);\n this._logger.debug(`registering service worker with scope ${scope}`);\n return new Promise((resolve, reject) => {\n if (navigator && 'serviceWorker' in navigator) {\n navigator.serviceWorker\n .register(filePath, {\n scope,\n })\n .then(registration => {\n if (registration.installing) {\n this._serviceWorker = registration.installing;\n }\n else if (registration.waiting) {\n this._serviceWorker = registration.waiting;\n }\n else if (registration.active) {\n this._serviceWorker = registration.active;\n }\n this._registration = registration;\n this._setupListeners();\n this._logger.debug(`Service Worker Registration Success: ${registration}`);\n resolve(registration);\n })\n .catch(error => {\n this._logger.debug(`Service Worker Registration Failed ${error}`);\n reject(new AmplifyError({\n name: ServiceWorkerErrorCode.Unavailable,\n message: 'Service Worker not available',\n underlyingError: error,\n }));\n });\n }\n else {\n reject(new AmplifyError({\n name: ServiceWorkerErrorCode.Unavailable,\n message: 'Service Worker not available',\n }));\n }\n });\n }\n /**\n * Enable web push notifications. If not subscribed, a new subscription will\n * be created and registered.\n * \tTest Push Server: https://web-push-codelab.glitch.me/\n * \tPush Server Libraries: https://github.com/web-push-libs/\n * \tAPI Doc: https://developers.google.com/web/fundamentals/codelabs/push-notifications/\n * @param publicKey\n * @returns {Promise}\n * \t- resolve(PushSubscription)\n * - reject(Error)\n */\n enablePush(publicKey) {\n assert(this._registration !== undefined, ServiceWorkerErrorCode.UndefinedRegistration);\n this._publicKey = publicKey;\n return new Promise((resolve, reject) => {\n if (isBrowser()) {\n assert(this._registration !== undefined, ServiceWorkerErrorCode.UndefinedRegistration);\n this._registration.pushManager.getSubscription().then(subscription => {\n if (subscription) {\n this._subscription = subscription;\n this._logger.debug(`User is subscribed to push: ${JSON.stringify(subscription)}`);\n resolve(subscription);\n }\n else {\n this._logger.debug(`User is NOT subscribed to push`);\n return this._registration.pushManager.subscribe({\n userVisibleOnly: true,\n applicationServerKey: this._urlB64ToUint8Array(publicKey),\n })\n .then(pushManagerSubscription => {\n this._subscription = pushManagerSubscription;\n this._logger.debug(`User subscribed: ${JSON.stringify(pushManagerSubscription)}`);\n resolve(pushManagerSubscription);\n })\n .catch(error => {\n this._logger.error(error);\n });\n }\n });\n }\n else {\n reject(new AmplifyError({\n name: ServiceWorkerErrorCode.Unavailable,\n message: 'Service Worker not available',\n }));\n }\n });\n }\n /**\n * Convert a base64 encoded string to a Uint8 array for the push server key\n * @param base64String\n */\n _urlB64ToUint8Array(base64String) {\n const padding = '='.repeat((4 - (base64String.length % 4)) % 4);\n const base64 = (base64String + padding)\n .replace(/-/g, '+')\n .replace(/_/g, '/');\n const rawData = window.atob(base64);\n const outputArray = new Uint8Array(rawData.length);\n for (let i = 0; i < rawData.length; ++i) {\n outputArray[i] = rawData.charCodeAt(i);\n }\n return outputArray;\n }\n /**\n * Send a message to the service worker. The service worker needs\n * to implement `self.addEventListener('message') to handle the\n * message. This ***currently*** does not work in Safari or IE.\n * @param {object | string} message An arbitrary JSON object or string message to send to the service worker\n *\t- see: https://developer.mozilla.org/en-US/docs/Web/API/Transferable\n * @returns {Promise}\n **/\n send(message) {\n if (this._serviceWorker) {\n this._serviceWorker.postMessage(typeof message === 'object' ? JSON.stringify(message) : message);\n }\n }\n /**\n * Listen for service worker state change and message events\n * https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/state\n **/\n _setupListeners() {\n this.serviceWorker.addEventListener('statechange', async () => {\n const currentState = this.serviceWorker.state;\n this._logger.debug(`ServiceWorker statechange: ${currentState}`);\n const { appId, region, bufferSize, flushInterval, flushSize, resendLimit, } = Amplify.getConfig().Analytics?.Pinpoint ?? {};\n const { credentials } = await fetchAuthSession();\n if (appId && region && credentials) {\n // Pinpoint is configured, record an event\n record({\n appId,\n region,\n category: 'Core',\n credentials,\n bufferSize,\n flushInterval,\n flushSize,\n resendLimit,\n event: {\n name: 'ServiceWorker',\n attributes: {\n state: currentState,\n },\n },\n });\n }\n });\n this.serviceWorker.addEventListener('message', event => {\n this._logger.debug(`ServiceWorker message event: ${event}`);\n });\n }\n}\n\nexport { ServiceWorkerClass };\n//# sourceMappingURL=ServiceWorker.mjs.map\n","import { getDnsSuffix } from '../../clients/endpoints/getDnsSuffix.mjs';\nimport { jitteredBackoff } from '../../clients/middleware/retry/jitteredBackoff.mjs';\nimport { getRetryDecider } from '../../clients/middleware/retry/defaultRetryDecider.mjs';\nimport { parseJsonError } from '../../clients/serde/json.mjs';\nimport { getAmplifyUserAgent } from '../../Platform/index.mjs';\nimport { AmplifyUrl } from '../../utils/amplifyUrl/index.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * The service name used to sign requests if the API requires authentication.\n */\nconst SERVICE_NAME = 'mobiletargeting';\n/**\n * The endpoint resolver function that returns the endpoint URL for a given region.\n */\nconst endpointResolver = ({ region }) => ({\n url: new AmplifyUrl(`https://pinpoint.${region}.${getDnsSuffix(region)}`),\n});\n/**\n * @internal\n */\nconst defaultConfig = {\n service: SERVICE_NAME,\n endpointResolver,\n retryDecider: getRetryDecider(parseJsonError),\n computeDelay: jitteredBackoff,\n userAgentValue: getAmplifyUserAgent(),\n};\n/**\n * @internal\n */\nconst getSharedHeaders = () => ({\n 'content-type': 'application/json',\n});\n\nexport { defaultConfig, getSharedHeaders };\n//# sourceMappingURL=base.mjs.map\n","import { createAssertionFunction } from '../../errors/createAssertionFunction.mjs';\nimport '../../types/errors.mjs';\nimport '../../errors/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar PinpointValidationErrorCode;\n(function (PinpointValidationErrorCode) {\n PinpointValidationErrorCode[\"NoAppId\"] = \"NoAppId\";\n})(PinpointValidationErrorCode || (PinpointValidationErrorCode = {}));\nconst pinpointValidationErrorMap = {\n [PinpointValidationErrorCode.NoAppId]: {\n message: 'Missing application id.',\n },\n};\nconst assert = createAssertionFunction(pinpointValidationErrorMap);\n\nexport { PinpointValidationErrorCode, assert };\n//# sourceMappingURL=errorHelpers.mjs.map\n","import { amplifyUuid } from '../../../utils/amplifyUuid/index.mjs';\nimport '../../../Cache/index.mjs';\nimport { resolveEndpointId } from '../utils/resolveEndpointId.mjs';\nimport '../../../utils/sessionListener/index.mjs';\nimport { BUFFER_SIZE, FLUSH_INTERVAL, FLUSH_SIZE, RESEND_LIMIT } from '../utils/constants.mjs';\nimport { getEventBuffer } from '../utils/getEventBuffer.mjs';\nimport { SESSION_STOP_EVENT, SESSION_START_EVENT } from '../../../utils/sessionListener/constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nlet session;\n/**\n * @internal\n */\nconst record = async ({ appId, category, channelType, credentials, event, identityId, region, userAgentValue, bufferSize, flushInterval, flushSize, resendLimit, }) => {\n let eventSession = session;\n const currentTime = new Date();\n const timestampISOString = currentTime.toISOString();\n const eventId = amplifyUuid();\n // Prepare event buffer if required\n const buffer = getEventBuffer({\n appId,\n region,\n credentials,\n bufferSize: bufferSize ?? BUFFER_SIZE,\n flushInterval: flushInterval ?? FLUSH_INTERVAL,\n flushSize: flushSize ?? FLUSH_SIZE,\n resendLimit: resendLimit ?? RESEND_LIMIT,\n identityId,\n userAgentValue,\n });\n const endpointId = await resolveEndpointId({\n appId,\n category,\n channelType,\n credentials,\n identityId,\n region,\n userAgentValue,\n });\n // Generate session if required\n if (!eventSession || event.name === SESSION_START_EVENT) {\n const sessionId = amplifyUuid();\n session = {\n Id: sessionId,\n StartTimestamp: timestampISOString,\n };\n eventSession = session;\n }\n // Terminate session when required\n if (session && event.name === SESSION_STOP_EVENT) {\n eventSession = {\n ...session,\n StopTimestamp: timestampISOString,\n Duration: currentTime.getTime() - new Date(session.StartTimestamp).getTime(),\n };\n session = undefined;\n }\n // Push event to buffer\n buffer.push({\n eventId,\n endpointId,\n event,\n session: eventSession,\n timestamp: timestampISOString,\n resendLimit: resendLimit ?? RESEND_LIMIT,\n });\n};\n\nexport { record };\n//# sourceMappingURL=record.mjs.map\n","import { v4 } from 'uuid';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst amplifyUuid = v4;\n\nexport { amplifyUuid };\n//# sourceMappingURL=index.mjs.map\n","import { AmplifyErrorCode } from '../../../types/errors.mjs';\nimport { assert } from '../../../errors/errorHelpers.mjs';\nimport { updateEndpoint } from '../apis/updateEndpoint.mjs';\nimport { getEndpointId } from './getEndpointId.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Resolves an endpoint id from cache or prepare via updateEndpoint if one does not already exist,\n * which will generate and cache an endpoint id between calls.\n *\n * @internal\n */\nconst resolveEndpointId = async ({ address, appId, category, channelType, credentials, identityId, region, userAgentValue, }) => {\n let endpointId = await getEndpointId(appId, category);\n if (!endpointId) {\n await updateEndpoint({\n address,\n appId,\n category,\n channelType,\n credentials,\n identityId,\n region,\n userAgentValue,\n });\n endpointId = await getEndpointId(appId, category);\n }\n assert(!!endpointId, AmplifyErrorCode.NoEndpointId);\n return endpointId;\n};\n\nexport { resolveEndpointId };\n//# sourceMappingURL=resolveEndpointId.mjs.map\n","import { getClientInfo } from '../../../utils/getClientInfo/getClientInfo.mjs';\nimport '../../../utils/retry/retry.mjs';\nimport '../../../types/errors.mjs';\nimport '@aws-crypto/sha256-js';\nimport '@smithy/util-hex-encoding';\nimport '../../../errors/errorHelpers.mjs';\nimport '../../../awsClients/pinpoint/base.mjs';\nimport '../../../awsClients/pinpoint/errorHelpers.mjs';\nimport { updateEndpoint as updateEndpoint$1 } from '../../../awsClients/pinpoint/updateEndpoint.mjs';\nimport { amplifyUuid } from '../../../utils/amplifyUuid/index.mjs';\nimport { cacheEndpointId } from '../utils/cacheEndpointId.mjs';\nimport { createEndpointId, clearCreatedEndpointId } from '../utils/createEndpointId.mjs';\nimport { getEndpointId } from '../utils/getEndpointId.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nconst updateEndpoint = async ({ address, appId, category, channelType, credentials, identityId, optOut, region, userAttributes, userId, userProfile, userAgentValue, }) => {\n const endpointId = await getEndpointId(appId, category);\n // only generate a new endpoint id if one was not found in cache\n const createdEndpointId = !endpointId\n ? createEndpointId(appId, category)\n : undefined;\n const { customProperties, demographic, email, location, metrics, name, plan, } = userProfile ?? {};\n // only automatically populate the endpoint with client info and identity id upon endpoint creation to\n // avoid overwriting the endpoint with these values every time the endpoint is updated\n const demographicsFromClientInfo = {};\n const resolvedUserId = createdEndpointId ? (userId ?? identityId) : userId;\n if (createdEndpointId) {\n const clientInfo = getClientInfo();\n demographicsFromClientInfo.appVersion = clientInfo.appVersion;\n demographicsFromClientInfo.make = clientInfo.make;\n demographicsFromClientInfo.model = clientInfo.model;\n demographicsFromClientInfo.modelVersion = clientInfo.version;\n demographicsFromClientInfo.platform = clientInfo.platform;\n }\n const mergedDemographic = {\n ...demographicsFromClientInfo,\n ...demographic,\n };\n const attributes = {\n ...(email && { email: [email] }),\n ...(name && { name: [name] }),\n ...(plan && { plan: [plan] }),\n ...customProperties,\n };\n const shouldAddDemographics = createdEndpointId || demographic;\n const shouldAddAttributes = email || customProperties || name || plan;\n const shouldAddUser = resolvedUserId || userAttributes;\n const input = {\n ApplicationId: appId,\n EndpointId: endpointId ?? createdEndpointId,\n EndpointRequest: {\n RequestId: amplifyUuid(),\n EffectiveDate: new Date().toISOString(),\n ChannelType: channelType,\n Address: address,\n ...(shouldAddAttributes && { Attributes: attributes }),\n ...(shouldAddDemographics && {\n Demographic: {\n AppVersion: mergedDemographic.appVersion,\n Locale: mergedDemographic.locale,\n Make: mergedDemographic.make,\n Model: mergedDemographic.model,\n ModelVersion: mergedDemographic.modelVersion,\n Platform: mergedDemographic.platform,\n PlatformVersion: mergedDemographic.platformVersion,\n Timezone: mergedDemographic.timezone,\n },\n }),\n ...(location && {\n Location: {\n City: location.city,\n Country: location.country,\n Latitude: location.latitude,\n Longitude: location.longitude,\n PostalCode: location.postalCode,\n Region: location.region,\n },\n }),\n Metrics: metrics,\n OptOut: optOut,\n ...(shouldAddUser && {\n User: {\n UserId: resolvedUserId,\n UserAttributes: userAttributes,\n },\n }),\n },\n };\n try {\n await updateEndpoint$1({ credentials, region, userAgentValue }, input);\n // if we had to create an endpoint id, we need to now cache it\n if (createdEndpointId) {\n await cacheEndpointId(appId, category, createdEndpointId);\n }\n }\n finally {\n // at this point, we completely reset the behavior so even if the update was unsuccessful\n // we can just start over with a newly created endpoint id\n if (createdEndpointId) {\n clearCreatedEndpointId(appId, category);\n }\n }\n};\n\nexport { updateEndpoint };\n//# sourceMappingURL=updateEndpoint.mjs.map\n","import { authenticatedHandler } from '../../clients/handlers/authenticated.mjs';\nimport { composeServiceApi } from '../../clients/internal/composeServiceApi.mjs';\nimport { extendedEncodeURIComponent } from '../../clients/middleware/signing/utils/extendedEncodeURIComponent.mjs';\nimport { parseMetadata } from '../../clients/serde/responseInfo.mjs';\nimport { parseJsonError, parseJsonBody } from '../../clients/serde/json.mjs';\nimport { AmplifyUrl } from '../../utils/amplifyUrl/index.mjs';\nimport { defaultConfig, getSharedHeaders } from './base.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst updateEndpointSerializer = ({ ApplicationId = '', EndpointId = '', EndpointRequest }, endpoint) => {\n const headers = getSharedHeaders();\n const url = new AmplifyUrl(endpoint.url);\n url.pathname = `v1/apps/${extendedEncodeURIComponent(ApplicationId)}/endpoints/${extendedEncodeURIComponent(EndpointId)}`;\n const body = JSON.stringify(EndpointRequest);\n return { method: 'PUT', headers, url, body };\n};\nconst updateEndpointDeserializer = async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n throw error;\n }\n else {\n const { Message, RequestID } = await parseJsonBody(response);\n return {\n MessageBody: {\n Message,\n RequestID,\n },\n $metadata: parseMetadata(response),\n };\n }\n};\n/**\n * @internal\n */\nconst updateEndpoint = composeServiceApi(authenticatedHandler, updateEndpointSerializer, updateEndpointDeserializer, defaultConfig);\n\nexport { updateEndpoint };\n//# sourceMappingURL=updateEndpoint.mjs.map\n","import { retryMiddlewareFactory } from '../middleware/retry/middleware.mjs';\nimport '../../utils/getClientInfo/getClientInfo.mjs';\nimport '../../utils/retry/retry.mjs';\nimport '../../types/errors.mjs';\nimport { signingMiddlewareFactory } from '../middleware/signing/middleware.mjs';\nimport { userAgentMiddlewareFactory } from '../middleware/userAgent/middleware.mjs';\nimport { composeTransferHandler } from '../internal/composeTransferHandler.mjs';\nimport { fetchTransferHandler } from './fetch.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst authenticatedHandler = composeTransferHandler(fetchTransferHandler, [\n userAgentMiddlewareFactory,\n retryMiddlewareFactory,\n signingMiddlewareFactory,\n]);\n\nexport { authenticatedHandler };\n//# sourceMappingURL=authenticated.mjs.map\n","import { signRequest } from './signer/signatureV4/signRequest.mjs';\nimport '@aws-crypto/sha256-js';\nimport '@smithy/util-hex-encoding';\nimport { getSkewCorrectedDate } from './utils/getSkewCorrectedDate.mjs';\nimport { getUpdatedSystemClockOffset } from './utils/getUpdatedSystemClockOffset.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Middleware that SigV4 signs request with AWS credentials, and correct system clock offset.\n * This middleware is expected to be placed after retry middleware.\n */\nconst signingMiddlewareFactory = ({ credentials, region, service, uriEscapePath = true, }) => {\n let currentSystemClockOffset;\n return (next, context) => async function signingMiddleware(request) {\n currentSystemClockOffset = currentSystemClockOffset ?? 0;\n const signRequestOptions = {\n credentials: typeof credentials === 'function'\n ? await credentials({\n forceRefresh: !!context?.isCredentialsExpired,\n })\n : credentials,\n signingDate: getSkewCorrectedDate(currentSystemClockOffset),\n signingRegion: region,\n signingService: service,\n uriEscapePath,\n };\n const signedRequest = await signRequest(request, signRequestOptions);\n const response = await next(signedRequest);\n // Update system clock offset if response contains date header, regardless of the status code.\n // non-2xx response will still be returned from next handler instead of thrown, because it's\n // only thrown by the retry middleware.\n const dateString = getDateHeader(response);\n if (dateString) {\n currentSystemClockOffset = getUpdatedSystemClockOffset(Date.parse(dateString), currentSystemClockOffset);\n }\n return response;\n };\n};\nconst getDateHeader = ({ headers } = {}) => headers?.date ?? headers?.Date ?? headers?.['x-amz-date'];\n\nexport { signingMiddlewareFactory };\n//# sourceMappingURL=middleware.mjs.map\n","import { getSignedHeaders } from './utils/getSignedHeaders.mjs';\nimport { getSigningValues } from './utils/getSigningValues.mjs';\nimport { HOST_HEADER, AMZ_DATE_HEADER, TOKEN_HEADER, AUTH_HEADER, SHA256_ALGORITHM_IDENTIFIER } from './constants.mjs';\nimport { getSignature } from './utils/getSignature.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Given a `HttpRequest`, returns a Signature Version 4 signed `HttpRequest`.\n *\n * @param request `HttpRequest` to be signed.\n * @param signRequestOptions `SignRequestOptions` object containing values used to construct the signature.\n * @returns A `HttpRequest` with authentication headers which can grant temporary access to AWS resources.\n */\nconst signRequest = (request, options) => {\n const signingValues = getSigningValues(options);\n const { accessKeyId, credentialScope, longDate, sessionToken } = signingValues;\n // create the request to sign\n const headers = { ...request.headers };\n headers[HOST_HEADER] = request.url.host;\n headers[AMZ_DATE_HEADER] = longDate;\n if (sessionToken) {\n headers[TOKEN_HEADER] = sessionToken;\n }\n const requestToSign = { ...request, headers };\n // calculate and add the signature to the request\n const signature = getSignature(requestToSign, signingValues);\n const credentialEntry = `Credential=${accessKeyId}/${credentialScope}`;\n const signedHeadersEntry = `SignedHeaders=${getSignedHeaders(headers)}`;\n const signatureEntry = `Signature=${signature}`;\n headers[AUTH_HEADER] =\n `${SHA256_ALGORITHM_IDENTIFIER} ${credentialEntry}, ${signedHeadersEntry}, ${signatureEntry}`;\n return requestToSign;\n};\n\nexport { signRequest };\n//# sourceMappingURL=signRequest.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Returns signed headers.\n *\n * @param headers `headers` from the request.\n * @returns List of headers included in canonical headers, separated by semicolons (;). This indicates which headers\n * are part of the signing process. Header names must use lowercase characters and must appear in alphabetical order.\n *\n * @internal\n */\nconst getSignedHeaders = (headers) => Object.keys(headers)\n .map(key => key.toLowerCase())\n .sort()\n .join(';');\n\nexport { getSignedHeaders };\n//# sourceMappingURL=getSignedHeaders.mjs.map\n","import { getCredentialScope } from './getCredentialScope.mjs';\nimport { getFormattedDates } from './getFormattedDates.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Extracts common values used for signing both requests and urls.\n *\n * @param options `SignRequestOptions` object containing values used to construct the signature.\n * @returns Common `SigningValues` used for signing.\n *\n * @internal\n */\nconst getSigningValues = ({ credentials, signingDate = new Date(), signingRegion, signingService, uriEscapePath = true, }) => {\n // get properties from credentials\n const { accessKeyId, secretAccessKey, sessionToken } = credentials;\n // get formatted dates for signing\n const { longDate, shortDate } = getFormattedDates(signingDate);\n // copy header and set signing properties\n const credentialScope = getCredentialScope(shortDate, signingRegion, signingService);\n return {\n accessKeyId,\n credentialScope,\n longDate,\n secretAccessKey,\n sessionToken,\n shortDate,\n signingRegion,\n signingService,\n uriEscapePath,\n };\n};\n\nexport { getSigningValues };\n//# sourceMappingURL=getSigningValues.mjs.map\n","import { KEY_TYPE_IDENTIFIER } from '../constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Returns the credential scope which restricts the resulting signature to the specified region and service.\n *\n * @param date Current date in the format 'YYYYMMDD'.\n * @param region AWS region in which the service resides.\n * @param service Service to which the signed request is being sent.\n *\n * @returns A string representing the credential scope with format 'YYYYMMDD/region/service/aws4_request'.\n *\n * @internal\n */\nconst getCredentialScope = (date, region, service) => `${date}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`;\n\nexport { getCredentialScope };\n//# sourceMappingURL=getCredentialScope.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// query params\nconst ALGORITHM_QUERY_PARAM = 'X-Amz-Algorithm';\nconst AMZ_DATE_QUERY_PARAM = 'X-Amz-Date';\nconst CREDENTIAL_QUERY_PARAM = 'X-Amz-Credential';\nconst EXPIRES_QUERY_PARAM = 'X-Amz-Expires';\nconst REGION_SET_PARAM = 'X-Amz-Region-Set';\nconst SIGNATURE_QUERY_PARAM = 'X-Amz-Signature';\nconst SIGNED_HEADERS_QUERY_PARAM = 'X-Amz-SignedHeaders';\nconst TOKEN_QUERY_PARAM = 'X-Amz-Security-Token';\n// headers\nconst AUTH_HEADER = 'authorization';\nconst HOST_HEADER = 'host';\nconst AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase();\nconst TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase();\n// identifiers\nconst KEY_TYPE_IDENTIFIER = 'aws4_request';\nconst SHA256_ALGORITHM_IDENTIFIER = 'AWS4-HMAC-SHA256';\nconst SIGNATURE_IDENTIFIER = 'AWS4';\n// preset values\nconst EMPTY_HASH = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855';\nconst UNSIGNED_PAYLOAD = 'UNSIGNED-PAYLOAD';\n\nexport { ALGORITHM_QUERY_PARAM, AMZ_DATE_HEADER, AMZ_DATE_QUERY_PARAM, AUTH_HEADER, CREDENTIAL_QUERY_PARAM, EMPTY_HASH, EXPIRES_QUERY_PARAM, HOST_HEADER, KEY_TYPE_IDENTIFIER, REGION_SET_PARAM, SHA256_ALGORITHM_IDENTIFIER, SIGNATURE_IDENTIFIER, SIGNATURE_QUERY_PARAM, SIGNED_HEADERS_QUERY_PARAM, TOKEN_HEADER, TOKEN_QUERY_PARAM, UNSIGNED_PAYLOAD };\n//# sourceMappingURL=constants.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Returns expected date strings to be used in signing.\n *\n * @param date JavaScript `Date` object.\n * @returns `FormattedDates` object containing the following:\n * - longDate: A date string in 'YYYYMMDDThhmmssZ' format\n * - shortDate: A date string in 'YYYYMMDD' format\n *\n * @internal\n */\nconst getFormattedDates = (date) => {\n const longDate = date.toISOString().replace(/[:-]|\\.\\d{3}/g, '');\n return {\n longDate,\n shortDate: longDate.slice(0, 8),\n };\n};\n\nexport { getFormattedDates };\n//# sourceMappingURL=getFormattedDates.mjs.map\n","import { getHashedDataAsHex } from './dataHashHelpers.mjs';\nimport { getCanonicalRequest } from './getCanonicalRequest.mjs';\nimport { getSigningKey } from './getSigningKey.mjs';\nimport { getStringToSign } from './getStringToSign.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Calculates and returns an AWS API Signature.\n * https://docs.aws.amazon.com/IAM/latest/UserGuide/create-signed-request.html\n *\n * @param request `HttpRequest` to be signed.\n * @param signRequestOptions `SignRequestOptions` object containing values used to construct the signature.\n * @returns AWS API Signature to sign a request or url with.\n *\n * @internal\n */\nconst getSignature = (request, { credentialScope, longDate, secretAccessKey, shortDate, signingRegion, signingService, uriEscapePath, }) => {\n // step 1: create a canonical request\n const canonicalRequest = getCanonicalRequest(request, uriEscapePath);\n // step 2: create a hash of the canonical request\n const hashedRequest = getHashedDataAsHex(null, canonicalRequest);\n // step 3: create a string to sign\n const stringToSign = getStringToSign(longDate, credentialScope, hashedRequest);\n // step 4: calculate the signature\n const signature = getHashedDataAsHex(getSigningKey(secretAccessKey, shortDate, signingRegion, signingService), stringToSign);\n return signature;\n};\n\nexport { getSignature };\n//# sourceMappingURL=getSignature.mjs.map\n","import { Sha256 } from '@aws-crypto/sha256-js';\nimport { toHex } from '@smithy/util-hex-encoding';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// TODO: V6 update to different crypto dependency?\n/**\n * Returns the hashed data a `Uint8Array`.\n *\n * @param key `SourceData` to be used as hashing key.\n * @param data Hashable `SourceData`.\n * @returns `Uint8Array` created from the data as input to a hash function.\n */\nconst getHashedData = (key, data) => {\n const sha256 = new Sha256(key ?? undefined);\n sha256.update(data);\n // TODO: V6 flip to async digest\n const hashedData = sha256.digestSync();\n return hashedData;\n};\n/**\n * Returns the hashed data as a hex string.\n *\n * @param key `SourceData` to be used as hashing key.\n * @param data Hashable `SourceData`.\n * @returns String using lowercase hexadecimal characters created from the data as input to a hash function.\n *\n * @internal\n */\nconst getHashedDataAsHex = (key, data) => {\n const hashedData = getHashedData(key, data);\n return toHex(hashedData);\n};\n\nexport { getHashedData, getHashedDataAsHex };\n//# sourceMappingURL=dataHashHelpers.mjs.map\n","import { getCanonicalHeaders } from './getCanonicalHeaders.mjs';\nimport { getCanonicalQueryString } from './getCanonicalQueryString.mjs';\nimport { getCanonicalUri } from './getCanonicalUri.mjs';\nimport { getHashedPayload } from './getHashedPayload.mjs';\nimport { getSignedHeaders } from './getSignedHeaders.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Returns a canonical request.\n *\n * @param request `HttpRequest` from which to create the canonical request from.\n * @param uriEscapePath Whether to uri encode the path as part of canonical uri. It's used for S3 only where the\n * pathname is already uri encoded, and the signing process is not expected to uri encode it again. Defaults to true.\n * @returns String created by by concatenating the following strings, separated by newline characters:\n * - HTTPMethod\n * - CanonicalUri\n * - CanonicalQueryString\n * - CanonicalHeaders\n * - SignedHeaders\n * - HashedPayload\n *\n * @internal\n */\nconst getCanonicalRequest = ({ body, headers, method, url }, uriEscapePath = true) => [\n method,\n getCanonicalUri(url.pathname, uriEscapePath),\n getCanonicalQueryString(url.searchParams),\n getCanonicalHeaders(headers),\n getSignedHeaders(headers),\n getHashedPayload(body),\n].join('\\n');\n\nexport { getCanonicalRequest };\n//# sourceMappingURL=getCanonicalRequest.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Returns canonical headers.\n *\n * @param headers Headers from the request.\n * @returns Request headers that will be signed, and their values, separated by newline characters. Header names must\n * use lowercase characters, must appear in alphabetical order, and must be followed by a colon (:). For the values,\n * trim any leading or trailing spaces, convert sequential spaces to a single space, and separate the values\n * for a multi-value header using commas.\n *\n * @internal\n */\nconst getCanonicalHeaders = (headers) => Object.entries(headers)\n .map(([key, value]) => ({\n key: key.toLowerCase(),\n value: value?.trim().replace(/\\s+/g, ' ') ?? '',\n}))\n .sort((a, b) => (a.key < b.key ? -1 : 1))\n .map(entry => `${entry.key}:${entry.value}\\n`)\n .join('');\n\nexport { getCanonicalHeaders };\n//# sourceMappingURL=getCanonicalHeaders.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Returns a canonical query string.\n *\n * @param searchParams `searchParams` from the request url.\n * @returns URL-encoded query string parameters, separated by ampersands (&). Percent-encode reserved characters,\n * including the space character. Encode names and values separately. If there are empty parameters, append the equals\n * sign to the parameter name before encoding. After encoding, sort the parameters alphabetically by key name. If there\n * is no query string, use an empty string (\"\").\n *\n * @internal\n */\nconst getCanonicalQueryString = (searchParams) => Array.from(searchParams)\n .sort(([keyA, valA], [keyB, valB]) => {\n if (keyA === keyB) {\n return valA < valB ? -1 : 1;\n }\n return keyA < keyB ? -1 : 1;\n})\n .map(([key, val]) => `${escapeUri(key)}=${escapeUri(val)}`)\n .join('&');\nconst escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode);\nconst hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`;\n\nexport { getCanonicalQueryString };\n//# sourceMappingURL=getCanonicalQueryString.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Returns a canonical uri.\n *\n * @param pathname `pathname` from request url.\n * @param uriEscapePath Whether to uri encode the path as part of canonical uri. It's used for S3 only where the\n * pathname is already uri encoded, and the signing process is not expected to uri encode it again. Defaults to true.\n * @returns URI-encoded version of the absolute path component URL (everything between the host and the question mark\n * character (?) that starts the query string parameters). If the absolute path is empty, a forward slash character (/).\n *\n * @internal\n */\nconst getCanonicalUri = (pathname, uriEscapePath = true) => pathname\n ? uriEscapePath\n ? encodeURIComponent(pathname).replace(/%2F/g, '/')\n : pathname\n : '/';\n\nexport { getCanonicalUri };\n//# sourceMappingURL=getCanonicalUri.mjs.map\n","import { EMPTY_HASH, UNSIGNED_PAYLOAD } from '../constants.mjs';\nimport { getHashedDataAsHex } from './dataHashHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Returns the hashed payload.\n *\n * @param body `body` (payload) from the request.\n * @returns String created using the payload in the body of the HTTP request as input to a hash function. This string\n * uses lowercase hexadecimal characters. If the payload is empty, return precalculated result of an empty hash.\n *\n * @internal\n */\nconst getHashedPayload = (body) => {\n // return precalculated empty hash if body is undefined or null\n if (body == null) {\n return EMPTY_HASH;\n }\n if (isSourceData(body)) {\n const hashedData = getHashedDataAsHex(null, body);\n return hashedData;\n }\n // Defined body is not signable. Return unsigned payload which may or may not be accepted by the service.\n return UNSIGNED_PAYLOAD;\n};\nconst isSourceData = (body) => typeof body === 'string' || ArrayBuffer.isView(body) || isArrayBuffer(body);\nconst isArrayBuffer = (arg) => (typeof ArrayBuffer === 'function' && arg instanceof ArrayBuffer) ||\n Object.prototype.toString.call(arg) === '[object ArrayBuffer]';\n\nexport { getHashedPayload };\n//# sourceMappingURL=getHashedPayload.mjs.map\n","import { KEY_TYPE_IDENTIFIER, SIGNATURE_IDENTIFIER } from '../constants.mjs';\nimport { getHashedData } from './dataHashHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Returns a signing key to be used for signing requests.\n *\n * @param secretAccessKey AWS secret access key from credentials.\n * @param date Current date in the format 'YYYYMMDD'.\n * @param region AWS region in which the service resides.\n * @param service Service to which the signed request is being sent.\n *\n * @returns `Uint8Array` calculated from its composite parts.\n *\n * @internal\n */\nconst getSigningKey = (secretAccessKey, date, region, service) => {\n const key = `${SIGNATURE_IDENTIFIER}${secretAccessKey}`;\n const dateKey = getHashedData(key, date);\n const regionKey = getHashedData(dateKey, region);\n const serviceKey = getHashedData(regionKey, service);\n const signingKey = getHashedData(serviceKey, KEY_TYPE_IDENTIFIER);\n return signingKey;\n};\n\nexport { getSigningKey };\n//# sourceMappingURL=getSigningKey.mjs.map\n","import { SHA256_ALGORITHM_IDENTIFIER } from '../constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Returns a string to be signed.\n *\n * @param date Current date in the format 'YYYYMMDDThhmmssZ'.\n * @param credentialScope String representing the credential scope with format 'YYYYMMDD/region/service/aws4_request'.\n * @param hashedRequest Hashed canonical request.\n *\n * @returns A string created by by concatenating the following strings, separated by newline characters:\n * - Algorithm\n * - RequestDateTime\n * - CredentialScope\n * - HashedCanonicalRequest\n *\n * @internal\n */\nconst getStringToSign = (date, credentialScope, hashedRequest) => [SHA256_ALGORITHM_IDENTIFIER, date, credentialScope, hashedRequest].join('\\n');\n\nexport { getStringToSign };\n//# sourceMappingURL=getStringToSign.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Returns a `Date` that is corrected for clock skew.\n *\n * @param systemClockOffset The offset of the system clock in milliseconds.\n *\n * @returns `Date` representing the current time adjusted by the system clock offset.\n *\n * @internal\n */\nconst getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset);\n\nexport { getSkewCorrectedDate };\n//# sourceMappingURL=getSkewCorrectedDate.mjs.map\n","import { isClockSkewed } from './isClockSkewed.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Returns the difference between clock time and the current system time if clock is skewed.\n *\n * @param clockTimeInMilliseconds Clock time in milliseconds.\n * @param currentSystemClockOffset Current system clock offset in milliseconds.\n *\n * @internal\n */\nconst getUpdatedSystemClockOffset = (clockTimeInMilliseconds, currentSystemClockOffset) => {\n if (isClockSkewed(clockTimeInMilliseconds, currentSystemClockOffset)) {\n return clockTimeInMilliseconds - Date.now();\n }\n return currentSystemClockOffset;\n};\n\nexport { getUpdatedSystemClockOffset };\n//# sourceMappingURL=getUpdatedSystemClockOffset.mjs.map\n","import { getSkewCorrectedDate } from './getSkewCorrectedDate.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// 5 mins in milliseconds. Ref: https://github.com/aws/aws-sdk-js-v3/blob/6c0f44fab30a1bb2134af47362a31332abc3666b/packages/middleware-signing/src/utils/isClockSkewed.ts#L10\nconst SKEW_WINDOW = 5 * 60 * 1000;\n/**\n * Checks if the provided date is within the skew window of 5 minutes.\n *\n * @param clockTimeInMilliseconds Time to check for skew in milliseconds.\n * @param clockOffsetInMilliseconds Offset to check clock against in milliseconds.\n *\n * @returns True if skewed. False otherwise.\n *\n * @internal\n */\nconst isClockSkewed = (clockTimeInMilliseconds, clockOffsetInMilliseconds) => Math.abs(getSkewCorrectedDate(clockOffsetInMilliseconds).getTime() -\n clockTimeInMilliseconds) >= SKEW_WINDOW;\n\nexport { isClockSkewed };\n//# sourceMappingURL=isClockSkewed.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Wraps encodeURIComponent to encode additional characters to fully adhere to RFC 3986.\n * @see https://github.com/aws/aws-sdk-js-v3/blob/86b432c464150069678b25ff88d57c2ca26e75a2/packages/smithy-client/src/extended-encode-uri-component.ts#L7\n *\n * @param uri URI string to encode\n * @returns RFC 3986 encoded string\n *\n * @internal\n */\nconst extendedEncodeURIComponent = (uri) => {\n // Match characters normally not encoded by `encodeURIComponent`\n const extendedCharacters = /[!'()*]/g;\n return encodeURIComponent(uri).replace(extendedCharacters, hexEncode);\n};\nconst hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`;\n\nexport { extendedEncodeURIComponent };\n//# sourceMappingURL=extendedEncodeURIComponent.mjs.map\n","import { Cache } from '../../../Cache/index.mjs';\nimport { getCacheKey } from './getCacheKey.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Writes an endpoint id to a long-lived cache.\n *\n * @internal\n */\nconst cacheEndpointId = async (appId, category, endpointId) => {\n const cacheKey = getCacheKey(appId, category);\n // Set a longer TTL to avoid endpoint id being deleted after the default TTL (3 days)\n // Also set its priority to the highest to reduce its chance of being deleted when cache is full\n const ttl = 1000 * 60 * 60 * 24 * 365 * 100; // 100 years\n const expiration = new Date().getTime() + ttl;\n return Cache.setItem(cacheKey, endpointId, {\n expires: expiration,\n priority: 1,\n });\n};\n\nexport { cacheEndpointId };\n//# sourceMappingURL=cacheEndpointId.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst PROVIDER_NAME = 'pinpoint';\n/**\n * Returns a unique cache key for a particular category/appId combination.\n *\n * @internal\n */\nconst getCacheKey = (appId, category) => `${category}:${PROVIDER_NAME}:${appId}`;\n\nexport { getCacheKey };\n//# sourceMappingURL=getCacheKey.mjs.map\n","import { amplifyUuid } from '../../../utils/amplifyUuid/index.mjs';\nimport { getCacheKey } from './getCacheKey.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createdEndpointIds = {};\n/**\n * Creates an endpoint id and guarantees multiple creations for a category returns the same uuid.\n *\n * @internal\n */\nconst createEndpointId = (appId, category) => {\n const cacheKey = getCacheKey(appId, category);\n if (!createdEndpointIds[cacheKey]) {\n createdEndpointIds[cacheKey] = amplifyUuid();\n }\n return createdEndpointIds[cacheKey];\n};\n/**\n * Clears a created endpoint id for a category.\n *\n * @internal\n */\nconst clearCreatedEndpointId = (appId, category) => {\n const cacheKey = getCacheKey(appId, category);\n delete createdEndpointIds[cacheKey];\n};\n\nexport { clearCreatedEndpointId, createEndpointId };\n//# sourceMappingURL=createEndpointId.mjs.map\n","import { Cache } from '../../../Cache/index.mjs';\nimport { getCacheKey } from './getCacheKey.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Returns an endpoint id from cache or `undefined` if not found.\n *\n * @internal\n */\nconst getEndpointId = async (appId, category) => {\n const cacheKey = getCacheKey(appId, category);\n const cachedEndpointId = await Cache.getItem(cacheKey);\n return cachedEndpointId ?? undefined;\n};\n\nexport { getEndpointId };\n//# sourceMappingURL=getEndpointId.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Default buffer constants\nconst BUFFER_SIZE = 1000;\nconst FLUSH_SIZE = 100;\nconst FLUSH_INTERVAL = 5 * 1000; // 5s\nconst RESEND_LIMIT = 5;\n\nexport { BUFFER_SIZE, FLUSH_INTERVAL, FLUSH_SIZE, RESEND_LIMIT };\n//# sourceMappingURL=constants.mjs.map\n","import { PinpointEventBuffer } from './PinpointEventBuffer.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Map of buffers by region -> appId\nconst eventBufferMap = {};\n/**\n * Returns a PinpointEventBuffer instance for the specified region & app ID, creating one if it does not yet exist.\n *\n * @internal\n */\nconst getEventBuffer = ({ appId, region, credentials, bufferSize, flushInterval, flushSize, resendLimit, identityId, userAgentValue, }) => {\n if (eventBufferMap[region]?.[appId]) {\n const buffer = eventBufferMap[region][appId];\n /*\n If the identity has changed flush out the buffer and create a new instance. The old instance will be garbage\n collected.\n */\n if (buffer.identityHasChanged(identityId)) {\n buffer.flush();\n }\n else {\n return buffer;\n }\n }\n const buffer = new PinpointEventBuffer({\n appId,\n bufferSize,\n credentials,\n flushInterval,\n flushSize,\n identityId,\n region,\n resendLimit,\n userAgentValue,\n });\n if (!eventBufferMap[region]) {\n eventBufferMap[region] = {};\n }\n eventBufferMap[region][appId] = buffer;\n return buffer;\n};\n\nexport { getEventBuffer };\n//# sourceMappingURL=getEventBuffer.mjs.map\n","import { ConsoleLogger } from '../../../Logger/ConsoleLogger.mjs';\nimport '../../../utils/getClientInfo/getClientInfo.mjs';\nimport '../../../utils/retry/retry.mjs';\nimport '../../../types/errors.mjs';\nimport '@aws-crypto/sha256-js';\nimport '@smithy/util-hex-encoding';\nimport '../../../errors/errorHelpers.mjs';\nimport '../../../awsClients/pinpoint/base.mjs';\nimport { putEvents } from '../../../awsClients/pinpoint/putEvents.mjs';\nimport { isAppInForeground } from './isAppInForeground.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('PinpointEventBuffer');\nconst RETRYABLE_CODES = [429, 500];\nconst ACCEPTED_CODES = [202];\nclass PinpointEventBuffer {\n constructor(config) {\n this._interval = undefined;\n this._pause = false;\n this._flush = false;\n this._buffer = [];\n this._config = config;\n this._sendBatch = this._sendBatch.bind(this);\n this._startLoop();\n }\n push(event) {\n if (this._buffer.length >= this._config.bufferSize) {\n logger.debug('Exceeded Pinpoint event buffer limits, event dropped.', {\n eventId: event.eventId,\n });\n return;\n }\n this._buffer.push({ [event.eventId]: event });\n }\n pause() {\n this._pause = true;\n }\n resume() {\n this._pause = false;\n }\n flush() {\n this._flush = true;\n }\n identityHasChanged(identityId) {\n return this._config.identityId !== identityId;\n }\n flushAll() {\n this._putEvents(this._buffer.splice(0, this._buffer.length));\n }\n _startLoop() {\n if (this._interval) {\n clearInterval(this._interval);\n }\n const { flushInterval } = this._config;\n this._interval = setInterval(this._sendBatch, flushInterval);\n }\n _sendBatch() {\n const bufferLength = this._buffer.length;\n if (this._flush && !bufferLength && this._interval) {\n clearInterval(this._interval);\n }\n if (this._pause || !bufferLength || !isAppInForeground()) {\n return;\n }\n const { flushSize } = this._config;\n const batchSize = Math.min(flushSize, bufferLength);\n const bufferSubset = this._buffer.splice(0, batchSize);\n this._putEvents(bufferSubset);\n }\n async _putEvents(buffer) {\n const eventMap = this._bufferToMap(buffer);\n const batchEventParams = this._generateBatchEventParams(eventMap);\n try {\n const { credentials, region, userAgentValue } = this._config;\n const data = await putEvents({\n credentials,\n region,\n userAgentValue,\n }, batchEventParams);\n this._processPutEventsSuccessResponse(data, eventMap);\n }\n catch (err) {\n this._handlePutEventsFailure(err, eventMap);\n }\n }\n _generateBatchEventParams(eventMap) {\n const batchItem = {};\n Object.values(eventMap).forEach(item => {\n const { event, timestamp, endpointId, eventId, session } = item;\n const { name, attributes, metrics } = event;\n batchItem[endpointId] = {\n Endpoint: {\n ...batchItem[endpointId]?.Endpoint,\n },\n Events: {\n ...batchItem[endpointId]?.Events,\n [eventId]: {\n EventType: name,\n Timestamp: new Date(timestamp).toISOString(),\n Attributes: attributes,\n Metrics: metrics,\n Session: session,\n },\n },\n };\n });\n return {\n ApplicationId: this._config.appId,\n EventsRequest: {\n BatchItem: batchItem,\n },\n };\n }\n _handlePutEventsFailure(err, eventMap) {\n logger.debug('putEvents call to Pinpoint failed.', err);\n const statusCode = err.$metadata && err.$metadata.httpStatusCode;\n if (RETRYABLE_CODES.includes(statusCode)) {\n const retryableEvents = Object.values(eventMap);\n this._retry(retryableEvents);\n }\n }\n _processPutEventsSuccessResponse(data, eventMap) {\n const { Results = {} } = data.EventsResponse ?? {};\n const retryableEvents = [];\n Object.entries(Results).forEach(([_, endpointValues]) => {\n const responses = endpointValues.EventsItemResponse ?? {};\n Object.entries(responses).forEach(([eventId, eventValues]) => {\n const eventObject = eventMap[eventId];\n if (!eventObject) {\n return;\n }\n const { StatusCode, Message } = eventValues ?? {};\n if (StatusCode && ACCEPTED_CODES.includes(StatusCode)) {\n return;\n }\n if (StatusCode && RETRYABLE_CODES.includes(StatusCode)) {\n retryableEvents.push(eventObject);\n return;\n }\n const { name } = eventObject.event;\n logger.warn('Pinpoint event failed to send.', {\n eventId,\n name,\n message: Message,\n });\n });\n });\n if (retryableEvents.length) {\n this._retry(retryableEvents);\n }\n }\n _retry(retryableEvents) {\n // retryable events that haven't reached the resendLimit\n const eligibleEvents = [];\n retryableEvents.forEach((bufferedEvent) => {\n const { eventId } = bufferedEvent;\n const { name } = bufferedEvent.event;\n if (bufferedEvent.resendLimit-- > 0) {\n logger.debug('Resending event.', {\n eventId,\n name,\n remainingAttempts: bufferedEvent.resendLimit,\n });\n eligibleEvents.push({ [eventId]: bufferedEvent });\n return;\n }\n logger.debug('No retry attempts remaining for event.', {\n eventId,\n name,\n });\n });\n // add the events to the front of the buffer\n this._buffer.unshift(...eligibleEvents);\n }\n _bufferToMap(buffer) {\n return buffer.reduce((acc, curVal) => {\n const [[key, value]] = Object.entries(curVal);\n acc[key] = value;\n return acc;\n }, {});\n }\n}\n\nexport { PinpointEventBuffer };\n//# sourceMappingURL=PinpointEventBuffer.mjs.map\n","import { authenticatedHandler } from '../../clients/handlers/authenticated.mjs';\nimport { composeServiceApi } from '../../clients/internal/composeServiceApi.mjs';\nimport { extendedEncodeURIComponent } from '../../clients/middleware/signing/utils/extendedEncodeURIComponent.mjs';\nimport { parseMetadata } from '../../clients/serde/responseInfo.mjs';\nimport { parseJsonError, parseJsonBody } from '../../clients/serde/json.mjs';\nimport { AmplifyUrl } from '../../utils/amplifyUrl/index.mjs';\nimport { defaultConfig, getSharedHeaders } from './base.mjs';\nimport { assert, PinpointValidationErrorCode } from './errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst putEventsSerializer = ({ ApplicationId, EventsRequest }, endpoint) => {\n assert(!!ApplicationId, PinpointValidationErrorCode.NoAppId);\n const headers = getSharedHeaders();\n const url = new AmplifyUrl(endpoint.url);\n url.pathname = `v1/apps/${extendedEncodeURIComponent(ApplicationId)}/events`;\n const body = JSON.stringify(EventsRequest ?? {});\n return { method: 'POST', headers, url, body };\n};\nconst putEventsDeserializer = async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n throw error;\n }\n else {\n const { Results } = await parseJsonBody(response);\n return {\n EventsResponse: { Results },\n $metadata: parseMetadata(response),\n };\n }\n};\n/**\n * @internal\n */\nconst putEvents = composeServiceApi(authenticatedHandler, putEventsSerializer, putEventsDeserializer, defaultConfig);\n\nexport { putEvents };\n//# sourceMappingURL=putEvents.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst isAppInForeground = () => true;\n\nexport { isAppInForeground };\n//# sourceMappingURL=isAppInForeground.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar UpdateEndpointException;\n(function (UpdateEndpointException) {\n UpdateEndpointException[\"BadRequestException\"] = \"BadRequestException\";\n UpdateEndpointException[\"ForbiddenException\"] = \"ForbiddenException\";\n UpdateEndpointException[\"InternalServerErrorException\"] = \"InternalServerErrorException\";\n UpdateEndpointException[\"MethodNotAllowedException\"] = \"MethodNotAllowedException\";\n UpdateEndpointException[\"NotFoundException\"] = \"NotFoundException\";\n UpdateEndpointException[\"PayloadTooLargeException\"] = \"PayloadTooLargeException\";\n UpdateEndpointException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n})(UpdateEndpointException || (UpdateEndpointException = {}));\n\nexport { UpdateEndpointException };\n//# sourceMappingURL=errors.mjs.map\n","import { createAssertionFunction } from '../errors/createAssertionFunction.mjs';\nimport '../types/errors.mjs';\nimport '../errors/errorHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar ServiceWorkerErrorCode;\n(function (ServiceWorkerErrorCode) {\n ServiceWorkerErrorCode[\"UndefinedInstance\"] = \"UndefinedInstance\";\n ServiceWorkerErrorCode[\"UndefinedRegistration\"] = \"UndefinedRegistration\";\n ServiceWorkerErrorCode[\"Unavailable\"] = \"Unavailable\";\n})(ServiceWorkerErrorCode || (ServiceWorkerErrorCode = {}));\nconst serviceWorkerErrorMap = {\n [ServiceWorkerErrorCode.UndefinedInstance]: {\n message: 'Service Worker instance is undefined.',\n },\n [ServiceWorkerErrorCode.UndefinedRegistration]: {\n message: 'Service Worker registration is undefined.',\n },\n [ServiceWorkerErrorCode.Unavailable]: {\n message: 'Service Worker not available.',\n },\n};\nconst assert = createAssertionFunction(serviceWorkerErrorMap);\n\nexport { ServiceWorkerErrorCode, assert };\n//# sourceMappingURL=errorHelpers.mjs.map\n","export { generateRandomString } from './utils/generateRandomString.mjs';\nexport { getClientInfo } from './utils/getClientInfo/getClientInfo.mjs';\nexport { isBrowser } from './utils/isBrowser.mjs';\nexport { isWebWorker } from './utils/isWebWorker.mjs';\nexport { NonRetryableError } from './utils/retry/NonRetryableError.mjs';\nexport { isNonRetryableError } from './utils/retry/isNonRetryableError.mjs';\nexport { jitteredBackoff } from './utils/retry/jitteredBackoff.mjs';\nexport { jitteredExponentialRetry } from './utils/retry/jitteredExponentialRetry.mjs';\nexport { retry } from './utils/retry/retry.mjs';\nexport { urlSafeDecode } from './utils/urlSafeDecode.mjs';\nexport { urlSafeEncode } from './utils/urlSafeEncode.mjs';\nexport { deDupeAsyncFunction } from './utils/deDupeAsyncFunction.mjs';\nexport { parseAWSExports } from './parseAWSExports.mjs';\nexport { isAmplifyOutputs, parseAmplifyOutputs } from './parseAmplifyOutputs.mjs';\nexport { ADD_OAUTH_LISTENER } from './singleton/constants.mjs';\nexport { amplifyUuid } from './utils/amplifyUuid/index.mjs';\nexport { AmplifyUrl, AmplifyUrlSearchParams } from './utils/amplifyUrl/index.mjs';\nexport { parseAmplifyConfig } from './utils/parseAmplifyConfig.mjs';\nexport { getDeviceName } from './utils/deviceName/getDeviceName.mjs';\nexport { assertIdentityPoolIdConfig, assertOAuthConfig, assertTokenProviderConfig, decodeJWT } from './singleton/Auth/utils/index.mjs';\nexport { isTokenExpired } from './singleton/Auth/index.mjs';\nexport { Signer } from './Signer/Signer.mjs';\nexport { haveCredentialsChanged } from './utils/haveCredentialsChanged.mjs';\nexport { Platform, getAmplifyUserAgent, getAmplifyUserAgentObject } from './Platform/index.mjs';\nexport { AiAction, AnalyticsAction, ApiAction, AuthAction, Category, DataStoreAction, Framework, GeoAction, InAppMessagingAction, InteractionsAction, PredictionsAction, PubSubAction, PushNotificationAction, StorageAction } from './Platform/types.mjs';\nexport { setCustomUserAgent } from './Platform/customUserAgent.mjs';\nexport { AmplifyError } from './errors/AmplifyError.mjs';\nexport { ApiError } from './errors/APIError.mjs';\nexport { createAssertionFunction } from './errors/createAssertionFunction.mjs';\nexport { PlatformNotSupportedError } from './errors/PlatformNotSupportedError.mjs';\nimport './errors/errorHelpers.mjs';\nexport { AmplifyErrorCode } from './types/errors.mjs';\nexport { BackgroundProcessManager } from './BackgroundProcessManager/BackgroundProcessManager.mjs';\nexport { Mutex } from './Mutex/Mutex.mjs';\nexport { Reachability } from './Reachability/Reachability.mjs';\nexport { USER_AGENT_HEADER } from './constants.mjs';\nexport { fetchAuthSession } from './singleton/apis/internal/fetchAuthSession.mjs';\nexport { AMPLIFY_SYMBOL, HubInternal } from './Hub/index.mjs';\nexport { base64Decoder } from './utils/convert/base64/base64Decoder.mjs';\nexport { base64Encoder } from './utils/convert/base64/base64Encoder.mjs';\nexport { getCrypto } from './utils/globalHelpers/index.mjs';\nexport { cryptoSecureRandomInt } from './utils/cryptoSecureRandomInt.mjs';\nexport { WordArray } from './utils/WordArray.mjs';\nexport { sessionListener } from './utils/sessionListener/index.mjs';\nexport { SESSION_START_EVENT, SESSION_STOP_EVENT } from './utils/sessionListener/constants.mjs';\n//# sourceMappingURL=libraryUtils.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst generateRandomString = (length) => {\n const STATE_CHARSET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n let result = '';\n for (let i = 0; i < length; i++) {\n result += STATE_CHARSET.charAt(Math.floor(Math.random() * STATE_CHARSET.length));\n }\n return result;\n};\n\nexport { generateRandomString };\n//# sourceMappingURL=generateRandomString.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass NonRetryableError extends Error {\n constructor() {\n super(...arguments);\n this.nonRetryable = true;\n }\n}\n\nexport { NonRetryableError };\n//# sourceMappingURL=NonRetryableError.mjs.map\n","import { MAX_DELAY_MS } from './constants.mjs';\nimport { jitteredBackoff } from './jitteredBackoff.mjs';\nimport { retry } from './retry.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @private\n * Internal use of Amplify only\n */\nconst jitteredExponentialRetry = (functionToRetry, args, maxDelayMs = MAX_DELAY_MS, onTerminate) => retry(functionToRetry, args, jitteredBackoff(maxDelayMs), onTerminate);\n\nexport { jitteredExponentialRetry };\n//# sourceMappingURL=jitteredExponentialRetry.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction urlSafeDecode(hex) {\n const matchArr = hex.match(/.{2}/g) || [];\n return matchArr.map(char => String.fromCharCode(parseInt(char, 16))).join('');\n}\n\nexport { urlSafeDecode };\n//# sourceMappingURL=urlSafeDecode.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction urlSafeEncode(str) {\n return str\n .split('')\n .map(char => char.charCodeAt(0).toString(16).padStart(2, '0'))\n .join('');\n}\n\nexport { urlSafeEncode };\n//# sourceMappingURL=urlSafeEncode.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * returns in-flight promise if there is one\n *\n * @param asyncFunction - asyncFunction to be deduped.\n * @returns - the return type of the callback\n */\nconst deDupeAsyncFunction = (asyncFunction) => {\n let inflightPromise;\n return async (...args) => {\n if (inflightPromise)\n return inflightPromise;\n inflightPromise = new Promise((resolve, reject) => {\n asyncFunction(...args)\n .then(result => {\n resolve(result);\n })\n .catch(error => {\n reject(error);\n })\n .finally(() => {\n inflightPromise = undefined;\n });\n });\n return inflightPromise;\n };\n};\n\nexport { deDupeAsyncFunction };\n//# sourceMappingURL=deDupeAsyncFunction.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Retrieves the device name using the User-Agent Client Hints API if available,\n * falling back to the traditional userAgent string if not.\n *\n * @returns {Promise} A promise that resolves with a string representing the device name.\n *\n * Example Output:\n * navigator.userAgentData:\n * 'macOS 14.2.1 arm macOS Not A(Brand/99.0.0.0;Google Chrome/121.0.6167.160;Chromium/121.0.6167.160'\n * navigator.userAgent:\n * 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/115.0'\n */\nconst getDeviceName = async () => {\n const { userAgentData } = navigator;\n if (!userAgentData)\n return navigator.userAgent;\n const { platform = '', platformVersion = '', model = '', architecture = '', fullVersionList = [], } = await userAgentData.getHighEntropyValues([\n 'platform',\n 'platformVersion',\n 'architecture',\n 'model',\n 'fullVersionList',\n ]);\n const versionList = fullVersionList\n .map((v) => `${v.brand}/${v.version}`)\n .join(';');\n const deviceName = [\n platform,\n platformVersion,\n architecture,\n model,\n platform,\n versionList,\n ]\n .filter(value => value)\n .join(' ');\n return deviceName;\n};\n\nexport { getDeviceName };\n//# sourceMappingURL=getDeviceName.mjs.map\n","import { signRequest } from '../clients/middleware/signing/signer/signatureV4/signRequest.mjs';\nimport { presignUrl } from '../clients/middleware/signing/signer/signatureV4/presignUrl.mjs';\nimport { TOKEN_QUERY_PARAM } from '../clients/middleware/signing/signer/signatureV4/constants.mjs';\nimport '@aws-crypto/sha256-js';\nimport '@smithy/util-hex-encoding';\nimport { AmplifyUrl } from '../utils/amplifyUrl/index.mjs';\nimport { DateUtils } from './DateUtils.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst IOT_SERVICE_NAME = 'iotdevicegateway';\n// Best practice regex to parse the service and region from an AWS endpoint\nconst AWS_ENDPOINT_REGEX = /([^.]+)\\.(?:([^.]*)\\.)?amazonaws\\.com(.cn)?$/;\n/**\n * This class is intended to be deprecated and replaced by `signRequest` and `presignUrl` functions from\n * `clients/middleware/signing/signer/signatureV4`.\n *\n * TODO: refactor the logics here into `signRequest` and `presignUrl` functions and remove this class.\n *\n * @internal\n * @deprecated\n */\nclass Signer {\n /**\n * Sign a HTTP request, add 'Authorization' header to request param\n * @method sign\n * @memberof Signer\n * @static\n *\n * @param {object} request - HTTP request object\n
\n    request: {\n        method: GET | POST | PUT ...\n        url: ...,\n        headers: {\n            header1: ...\n        },\n        data: data\n    }\n    
\n * @param {object} access_info - AWS access credential info\n
\n    access_info: {\n        access_key: ...,\n        secret_key: ...,\n        session_token: ...\n    }\n    
\n * @param {object} [service_info] - AWS service type and region, optional,\n * if not provided then parse out from url\n
\n    service_info: {\n        service: ...,\n        region: ...\n    }\n    
\n *\n * @returns {object} Signed HTTP request\n */\n static sign(request, accessInfo, serviceInfo) {\n request.headers = request.headers || {};\n if (request.body && !request.data) {\n throw new Error('The attribute \"body\" was found on the request object. Please use the attribute \"data\" instead.');\n }\n const requestToSign = {\n ...request,\n body: request.data,\n url: new AmplifyUrl(request.url),\n };\n const options = getOptions(requestToSign, accessInfo, serviceInfo);\n const signedRequest = signRequest(requestToSign, options);\n // Prior to using `signRequest`, Signer accepted urls as strings and outputted urls as string. Coerce the property\n // back to a string so as not to disrupt consumers of Signer.\n signedRequest.url = signedRequest.url.toString();\n // HTTP headers should be case insensitive but, to maintain parity with the previous Signer implementation and\n // limit the impact of this implementation swap, replace lowercased headers with title cased ones.\n signedRequest.headers.Authorization = signedRequest.headers.authorization;\n signedRequest.headers['X-Amz-Security-Token'] =\n signedRequest.headers['x-amz-security-token'];\n delete signedRequest.headers.authorization;\n delete signedRequest.headers['x-amz-security-token'];\n return signedRequest;\n }\n static signUrl(urlOrRequest, accessInfo, serviceInfo, expiration) {\n const urlToSign = typeof urlOrRequest === 'object' ? urlOrRequest.url : urlOrRequest;\n const method = typeof urlOrRequest === 'object' ? urlOrRequest.method : 'GET';\n const body = typeof urlOrRequest === 'object' ? urlOrRequest.body : undefined;\n const presignable = {\n body,\n method,\n url: new AmplifyUrl(urlToSign),\n };\n const options = getOptions(presignable, accessInfo, serviceInfo, expiration);\n const signedUrl = presignUrl(presignable, options);\n if (accessInfo.session_token &&\n !sessionTokenRequiredInSigning(options.signingService)) {\n signedUrl.searchParams.append(TOKEN_QUERY_PARAM, accessInfo.session_token);\n }\n return signedUrl.toString();\n }\n}\nconst getOptions = (request, accessInfo, serviceInfo, expiration) => {\n const { access_key, secret_key, session_token } = accessInfo ?? {};\n const { region: urlRegion, service: urlService } = parseServiceInfo(request.url);\n const { region = urlRegion, service = urlService } = serviceInfo ?? {};\n const credentials = {\n accessKeyId: access_key,\n secretAccessKey: secret_key,\n ...(sessionTokenRequiredInSigning(service)\n ? { sessionToken: session_token }\n : {}),\n };\n return {\n credentials,\n signingDate: DateUtils.getDateWithClockOffset(),\n signingRegion: region,\n signingService: service,\n ...(expiration && { expiration }),\n };\n};\nconst parseServiceInfo = (url) => {\n const { host } = url;\n const matched = host.match(AWS_ENDPOINT_REGEX) ?? [];\n let parsed = matched.slice(1, 3);\n if (parsed[1] === 'es') {\n // Elastic Search\n parsed = parsed.reverse();\n }\n return {\n service: parsed[0],\n region: parsed[1],\n };\n};\n// IoT service does not allow the session token in the canonical request\n// https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html\nconst sessionTokenRequiredInSigning = (service) => service !== IOT_SERVICE_NAME;\n\nexport { Signer };\n//# sourceMappingURL=Signer.mjs.map\n","import { AmplifyUrl } from '../../../../../utils/amplifyUrl/index.mjs';\nimport { ALGORITHM_QUERY_PARAM, SHA256_ALGORITHM_IDENTIFIER, CREDENTIAL_QUERY_PARAM, AMZ_DATE_QUERY_PARAM, SIGNED_HEADERS_QUERY_PARAM, HOST_HEADER, EXPIRES_QUERY_PARAM, TOKEN_QUERY_PARAM, SIGNATURE_QUERY_PARAM } from './constants.mjs';\nimport { getSigningValues } from './utils/getSigningValues.mjs';\nimport { getSignature } from './utils/getSignature.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Given a `Presignable` object, returns a Signature Version 4 presigned `URL` object.\n *\n * @param presignable `Presignable` object containing at least a url to be presigned with authentication query params.\n * @param presignUrlOptions `PresignUrlOptions` object containing values used to construct the signature.\n * @returns A `URL` with authentication query params which can grant temporary access to AWS resources.\n */\nconst presignUrl = ({ body, method = 'GET', url }, { expiration, ...options }) => {\n const signingValues = getSigningValues(options);\n const { accessKeyId, credentialScope, longDate, sessionToken } = signingValues;\n // create the request to sign\n const presignedUrl = new AmplifyUrl(url);\n Object.entries({\n [ALGORITHM_QUERY_PARAM]: SHA256_ALGORITHM_IDENTIFIER,\n [CREDENTIAL_QUERY_PARAM]: `${accessKeyId}/${credentialScope}`,\n [AMZ_DATE_QUERY_PARAM]: longDate,\n [SIGNED_HEADERS_QUERY_PARAM]: HOST_HEADER,\n ...(expiration && { [EXPIRES_QUERY_PARAM]: expiration.toString() }),\n ...(sessionToken && { [TOKEN_QUERY_PARAM]: sessionToken }),\n }).forEach(([key, value]) => {\n presignedUrl.searchParams.append(key, value);\n });\n const requestToSign = {\n body,\n headers: { [HOST_HEADER]: url.host },\n method,\n url: presignedUrl,\n };\n // calculate and add the signature to the url\n const signature = getSignature(requestToSign, signingValues);\n presignedUrl.searchParams.append(SIGNATURE_QUERY_PARAM, signature);\n return presignedUrl;\n};\n\nexport { presignUrl };\n//# sourceMappingURL=presignUrl.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Date & time utility functions to abstract the `aws-sdk` away from users.\n * (v2 => v3 modularization is a breaking change)\n *\n * @see https://github.com/aws/aws-sdk-js/blob/6edf586dcc1de7fe8fbfbbd9a0d2b1847921e6e1/lib/util.js#L262\n */\nconst FIVE_MINUTES_IN_MS = 1000 * 60 * 5;\n/**\n * This utility is intended to be deprecated and replaced by `signRequest` and `presignUrl` functions from\n * `clients/middleware/signing/signer/signatureV4`.\n *\n * TODO: refactor the logics here into `signRequest` and `presignUrl` functions and remove this class.\n *\n * @internal\n * @deprecated\n */\nconst DateUtils = {\n /**\n * Milliseconds to offset the date to compensate for clock skew between device & services\n */\n clockOffset: 0,\n getDateWithClockOffset() {\n if (DateUtils.clockOffset) {\n return new Date(new Date().getTime() + DateUtils.clockOffset);\n }\n else {\n return new Date();\n }\n },\n /**\n * @returns {number} Clock offset in milliseconds\n */\n getClockOffset() {\n return DateUtils.clockOffset;\n },\n getHeaderStringFromDate(date = DateUtils.getDateWithClockOffset()) {\n return date.toISOString().replace(/[:-]|\\.\\d{3}/g, '');\n },\n getDateFromHeaderString(header) {\n const [, year, month, day, hour, minute, second] = header.match(/^(\\d{4})(\\d{2})(\\d{2})T(\\d{2})(\\d{2})(\\d{2}).+/);\n return new Date(Date.UTC(Number(year), Number(month) - 1, Number(day), Number(hour), Number(minute), Number(second)));\n },\n isClockSkewed(serverDate) {\n // API gateway permits client calls that are off by no more than ±5 minutes\n return (Math.abs(serverDate.getTime() - DateUtils.getDateWithClockOffset().getTime()) >= FIVE_MINUTES_IN_MS);\n },\n isClockSkewError(error) {\n if (!error.response || !error.response.headers) {\n return false;\n }\n const { headers } = error.response;\n return Boolean(['BadRequestException', 'InvalidSignatureException'].includes(headers['x-amzn-errortype']) &&\n (headers.date || headers.Date));\n },\n /**\n * @param {number} offset Clock offset in milliseconds\n */\n setClockOffset(offset) {\n DateUtils.clockOffset = offset;\n },\n};\n\nexport { DateUtils };\n//# sourceMappingURL=DateUtils.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Utility for determining if credentials have changed.\n *\n * @internal\n */\nconst haveCredentialsChanged = (cachedCredentials, credentials) => {\n return (cachedCredentials.accessKeyId !== credentials.accessKeyId ||\n cachedCredentials.sessionToken !== credentials.sessionToken ||\n cachedCredentials.secretAccessKey !== credentials.secretAccessKey);\n};\n\nexport { haveCredentialsChanged };\n//# sourceMappingURL=haveCredentialsChanged.mjs.map\n","import { AmplifyError } from './AmplifyError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Error class for errors that associated with unsuccessful HTTP responses.\n * It's throw by API category REST API handlers and GraphQL query handlers for now.\n */\nclass ApiError extends AmplifyError {\n /**\n * The unwrapped HTTP response causing the given API error.\n */\n get response() {\n return this._response\n ? replicateApiErrorResponse(this._response)\n : undefined;\n }\n constructor(params) {\n super(params);\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = ApiError;\n Object.setPrototypeOf(this, ApiError.prototype);\n if (params.response) {\n this._response = params.response;\n }\n }\n}\nconst replicateApiErrorResponse = (response) => ({\n ...response,\n headers: { ...response.headers },\n});\n\nexport { ApiError };\n//# sourceMappingURL=APIError.mjs.map\n","import { BackgroundManagerNotOpenError } from './BackgroundManagerNotOpenError.mjs';\nimport { BackgroundProcessManagerState } from './types.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @private For internal Amplify use.\n *\n * Creates a new scope for promises, observables, and other types of work or\n * processes that may be running in the background. This manager provides\n * an singular entrypoint to request termination and await completion.\n *\n * As work completes on its own prior to close, the manager removes them\n * from the registry to avoid holding references to completed jobs.\n */\nclass BackgroundProcessManager {\n constructor() {\n /**\n * A string indicating whether the manager is accepting new work (\"Open\"),\n * waiting for work to complete (\"Closing\"), or fully done with all\n * submitted work and *not* accepting new jobs (\"Closed\").\n */\n this._state = BackgroundProcessManagerState.Open;\n /**\n * The list of outstanding jobs we'll need to wait for upon `close()`\n */\n this.jobs = new Set();\n }\n add(jobOrDescription, optionalDescription) {\n let job;\n let description;\n if (typeof jobOrDescription === 'string') {\n job = undefined;\n description = jobOrDescription;\n }\n else {\n job = jobOrDescription;\n description = optionalDescription;\n }\n const error = this.closedFailure(description);\n if (error)\n return error;\n if (job === undefined) {\n return this.addHook(description);\n }\n else if (typeof job === 'function') {\n return this.addFunction(job, description);\n }\n else if (job instanceof BackgroundProcessManager) {\n this.addManager(job, description);\n }\n else {\n throw new Error('If `job` is provided, it must be an Observable, Function, or BackgroundProcessManager.');\n }\n }\n /**\n * Adds a **cleaner** function that doesn't immediately get executed.\n * Instead, the caller gets a **terminate** function back. The *cleaner* is\n * invoked only once the mananger *closes* or the returned **terminate**\n * function is called.\n *\n * @param clean The cleanup function.\n * @param description Optional description to help identify pending jobs.\n * @returns A terminate function.\n */\n addCleaner(clean, description) {\n const { resolve, onTerminate } = this.addHook(description);\n const proxy = async () => {\n await clean();\n resolve();\n };\n onTerminate.then(proxy);\n return proxy;\n }\n addFunction(job, description) {\n // the function we call when we want to try to terminate this job.\n let terminate;\n // the promise the job can opt into listening to for termination.\n const onTerminate = new Promise(resolve => {\n terminate = resolve;\n });\n // finally! start the job.\n const jobResult = job(onTerminate);\n // depending on what the job gives back, register the result\n // so we can monitor for completion.\n if (typeof jobResult?.then === 'function') {\n this.registerPromise(jobResult, terminate, description);\n }\n // At the end of the day, or you know, method call, it doesn't matter\n // what the return value is at all; we just pass it through to the\n // caller.\n return jobResult;\n }\n addManager(manager, description) {\n this.addCleaner(async () => manager.close(), description);\n }\n /**\n * Creates and registers a fabricated job for processes that need to operate\n * with callbacks/hooks. The returned `resolve` and `reject`\n * functions can be used to signal the job is done successfully or not.\n * The returned `onTerminate` is a promise that will resolve when the\n * manager is requesting the termination of the job.\n *\n * @param description Optional description to help identify pending jobs.\n * @returns `{ resolve, reject, onTerminate }`\n */\n addHook(description) {\n // the resolve/reject functions we'll provide to the caller to signal\n // the state of the job.\n let promiseResolve;\n let promiseReject;\n // the underlying promise we'll use to manage it, pretty much like\n // any other promise.\n const promise = new Promise((resolve, reject) => {\n promiseResolve = resolve;\n promiseReject = reject;\n });\n // the function we call when we want to try to terminate this job.\n let terminate;\n // the promise the job can opt into listening to for termination.\n const onTerminate = new Promise(resolve => {\n terminate = resolve;\n });\n this.registerPromise(promise, terminate, description);\n return {\n resolve: promiseResolve,\n reject: promiseReject,\n onTerminate,\n };\n }\n /**\n * Adds a Promise based job to the list of jobs for monitoring and listens\n * for either a success or failure, upon which the job is considered \"done\"\n * and removed from the registry.\n *\n * @param promise A promise that is on its way to being returned to a\n * caller, which needs to be tracked as a background job.\n * @param terminate The termination function to register, which can be\n * invoked to request the job stop.\n * @param description Optional description to help identify pending jobs.\n */\n registerPromise(promise, terminate, description) {\n const jobEntry = { promise, terminate, description };\n this.jobs.add(jobEntry);\n // in all of my testing, it is safe to multi-subscribe to a promise.\n // so, rather than create another layer of promising, we're just going\n // to hook into the promise we already have, and when it's done\n // (successfully or not), we no longer need to wait for it upon close.\n //\n // sorry this is a bit hand-wavy:\n //\n // i believe we use `.then` and `.catch` instead of `.finally` because\n // `.finally` is invoked in a different order in the sequence, and this\n // breaks assumptions throughout and causes failures.\n promise\n .then(() => {\n this.jobs.delete(jobEntry);\n })\n .catch(() => {\n this.jobs.delete(jobEntry);\n });\n }\n /**\n * The number of jobs being waited on.\n *\n * We don't use this for anything. It's just informational for the caller,\n * and can be used in logging and testing.\n *\n * @returns the number of jobs.\n */\n get length() {\n return this.jobs.size;\n }\n /**\n * The execution state of the manager. One of:\n *\n * 1. \"Open\" -> Accepting new jobs\n * 1. \"Closing\" -> Not accepting new work. Waiting for jobs to complete.\n * 1. \"Closed\" -> Not accepting new work. All submitted jobs are complete.\n */\n get state() {\n return this._state;\n }\n /**\n * The registered `description` of all still-pending jobs.\n *\n * @returns descriptions as an array.\n */\n get pending() {\n return Array.from(this.jobs).map(job => job.description);\n }\n /**\n * Whether the manager is accepting new jobs.\n */\n get isOpen() {\n return this._state === BackgroundProcessManagerState.Open;\n }\n /**\n * Whether the manager is rejecting new work, but still waiting for\n * submitted work to complete.\n */\n get isClosing() {\n return this._state === BackgroundProcessManagerState.Closing;\n }\n /**\n * Whether the manager is rejecting work and done waiting for submitted\n * work to complete.\n */\n get isClosed() {\n return this._state === BackgroundProcessManagerState.Closed;\n }\n closedFailure(description) {\n if (!this.isOpen) {\n return Promise.reject(new BackgroundManagerNotOpenError([\n `The manager is ${this.state}.`,\n `You tried to add \"${description}\".`,\n `Pending jobs: [\\n${this.pending\n .map(t => ' ' + t)\n .join(',\\n')}\\n]`,\n ].join('\\n')));\n }\n }\n /**\n * Signals jobs to stop (for those that accept interruptions) and waits\n * for confirmation that jobs have stopped.\n *\n * This immediately puts the manager into a closing state and just begins\n * to reject new work. After all work in the manager is complete, the\n * manager goes into a `Completed` state and `close()` returns.\n *\n * This call is idempotent.\n *\n * If the manager is already closing or closed, `finalCleaup` is not executed.\n *\n * @param onClosed\n * @returns The settled results of each still-running job's promise. If the\n * manager is already closed, this will contain the results as of when the\n * manager's `close()` was called in an `Open` state.\n */\n async close() {\n if (this.isOpen) {\n this._state = BackgroundProcessManagerState.Closing;\n for (const job of Array.from(this.jobs)) {\n try {\n job.terminate();\n }\n catch (error) {\n // Due to potential races with a job's natural completion, it's\n // reasonable to expect the termination call to fail. Hence,\n // not logging as an error.\n console.warn(`Failed to send termination signal to job. Error: ${error.message}`, job);\n }\n }\n // Use `allSettled()` because we want to wait for all to finish. We do\n // not want to stop waiting if there is a failure.\n this._closingPromise = Promise.allSettled(Array.from(this.jobs).map(j => j.promise));\n await this._closingPromise;\n this._state = BackgroundProcessManagerState.Closed;\n }\n return this._closingPromise;\n }\n /**\n * Signals the manager to start accepting work (again) and returns once\n * the manager is ready to do so.\n *\n * If the state is already `Open`, this call is a no-op.\n *\n * If the state is `Closed`, this call simply updates state and returns.\n *\n * If the state is `Closing`, this call waits for completion before it\n * updates the state and returns.\n */\n async open() {\n if (this.isClosing) {\n await this.close();\n }\n this._state = BackgroundProcessManagerState.Open;\n }\n}\n\nexport { BackgroundProcessManager };\n//# sourceMappingURL=BackgroundProcessManager.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass BackgroundManagerNotOpenError extends Error {\n constructor(message) {\n super(`BackgroundManagerNotOpenError: ${message}`);\n }\n}\n\nexport { BackgroundManagerNotOpenError };\n//# sourceMappingURL=BackgroundManagerNotOpenError.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/*!\n * The MIT License (MIT)\n *\n * Copyright (c) 2016 Christian Speckner \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\n * all 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\n * THE SOFTWARE.\n */\nclass Mutex {\n constructor() {\n this._queue = [];\n this._pending = false;\n }\n isLocked() {\n return this._pending;\n }\n acquire() {\n const ticket = new Promise(resolve => this._queue.push(resolve));\n if (!this._pending) {\n this._dispatchNext();\n }\n return ticket;\n }\n runExclusive(callback) {\n return this.acquire().then(release => {\n let result;\n try {\n result = callback();\n }\n catch (e) {\n release();\n throw e;\n }\n return Promise.resolve(result).then((x) => {\n release();\n return x;\n }, e => {\n release();\n throw e;\n });\n });\n }\n _dispatchNext() {\n if (this._queue.length > 0) {\n this._pending = true;\n this._queue.shift()(this._dispatchNext.bind(this));\n }\n else {\n this._pending = false;\n }\n }\n}\n\nexport { Mutex };\n//# sourceMappingURL=Mutex.mjs.map\n","import { getBtoa } from '../../globalHelpers/index.mjs';\nimport { bytesToString } from './bytesToString.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst base64Encoder = {\n /**\n * Convert input to base64-encoded string\n * @param input - string to convert to base64\n * @param options - encoding options that can optionally produce a base64url string\n * @returns base64-encoded string\n */\n convert(input, options = {\n urlSafe: false,\n skipPadding: false,\n }) {\n const inputStr = typeof input === 'string' ? input : bytesToString(input);\n let encodedStr = getBtoa()(inputStr);\n // urlSafe char replacement and skipPadding options conform to the base64url spec\n // https://datatracker.ietf.org/doc/html/rfc4648#section-5\n if (options.urlSafe) {\n encodedStr = encodedStr.replace(/\\+/g, '-').replace(/\\//g, '_');\n }\n if (options.skipPadding) {\n encodedStr = encodedStr.replace(/=/g, '');\n }\n return encodedStr;\n },\n};\n\nexport { base64Encoder };\n//# sourceMappingURL=base64Encoder.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction bytesToString(input) {\n return Array.from(input, byte => String.fromCodePoint(byte)).join('');\n}\n\nexport { bytesToString };\n//# sourceMappingURL=bytesToString.mjs.map\n","import { getCrypto } from './globalHelpers/index.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/*\n * Cryptographically secure pseudorandom number generator\n * As Math.random() is cryptographically not safe to use\n */\nfunction cryptoSecureRandomInt() {\n const crypto = getCrypto();\n const randomResult = crypto.getRandomValues(new Uint32Array(1))[0];\n return randomResult;\n}\n\nexport { cryptoSecureRandomInt };\n//# sourceMappingURL=cryptoSecureRandomInt.mjs.map\n","import { cryptoSecureRandomInt } from './cryptoSecureRandomInt.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Hex encoding strategy.\n * Converts a word array to a hex string.\n * @param {WordArray} wordArray The word array.\n * @return {string} The hex string.\n * @static\n */\nfunction hexStringify(wordArray) {\n // Shortcuts\n const { words } = wordArray;\n const { sigBytes } = wordArray;\n // Convert\n const hexChars = [];\n for (let i = 0; i < sigBytes; i++) {\n const bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n hexChars.push((bite >>> 4).toString(16));\n hexChars.push((bite & 0x0f).toString(16));\n }\n return hexChars.join('');\n}\nclass WordArray {\n constructor(words, sigBytes) {\n this.words = [];\n let Words = words;\n Words = this.words = Words || [];\n if (sigBytes !== undefined) {\n this.sigBytes = sigBytes;\n }\n else {\n this.sigBytes = Words.length * 4;\n }\n }\n random(nBytes) {\n const words = [];\n for (let i = 0; i < nBytes; i += 4) {\n words.push(cryptoSecureRandomInt());\n }\n return new WordArray(words, nBytes);\n }\n toString() {\n return hexStringify(this);\n }\n}\n\nexport { WordArray };\n//# sourceMappingURL=WordArray.mjs.map\n","export { signUp } from './apis/signUp.mjs';\nexport { resetPassword } from './apis/resetPassword.mjs';\nexport { confirmResetPassword } from './apis/confirmResetPassword.mjs';\nexport { signIn } from './apis/signIn.mjs';\nexport { resendSignUpCode } from './apis/resendSignUpCode.mjs';\nexport { confirmSignUp } from './apis/confirmSignUp.mjs';\nexport { confirmSignIn } from './apis/confirmSignIn.mjs';\nexport { updateMFAPreference } from './apis/updateMFAPreference.mjs';\nexport { fetchMFAPreference } from './apis/fetchMFAPreference.mjs';\nexport { verifyTOTPSetup } from './apis/verifyTOTPSetup.mjs';\nexport { updatePassword } from './apis/updatePassword.mjs';\nexport { setUpTOTP } from './apis/setUpTOTP.mjs';\nexport { updateUserAttributes } from './apis/updateUserAttributes.mjs';\nexport { updateUserAttribute } from './apis/updateUserAttribute.mjs';\nexport { getCurrentUser } from './apis/getCurrentUser.mjs';\nexport { confirmUserAttribute } from './apis/confirmUserAttribute.mjs';\nexport { signInWithRedirect } from './apis/signInWithRedirect.mjs';\nexport { fetchUserAttributes } from './apis/fetchUserAttributes.mjs';\nexport { signOut } from './apis/signOut.mjs';\nexport { sendUserAttributeVerificationCode } from './apis/sendUserAttributeVerificationCode.mjs';\nexport { deleteUserAttributes } from './apis/deleteUserAttributes.mjs';\nexport { deleteUser } from './apis/deleteUser.mjs';\nexport { rememberDevice } from './apis/rememberDevice.mjs';\nexport { forgetDevice } from './apis/forgetDevice.mjs';\nexport { fetchDevices } from './apis/fetchDevices.mjs';\nexport { autoSignIn } from './apis/autoSignIn.mjs';\nexport { cognitoCredentialsProvider } from './credentialsProvider/index.mjs';\nexport { refreshAuthTokens, refreshAuthTokensWithoutDedupe } from './utils/refreshAuthTokens.mjs';\nexport { DefaultTokenStore } from './tokenProvider/TokenStore.mjs';\nexport { TokenOrchestrator } from './tokenProvider/TokenOrchestrator.mjs';\nexport { cognitoUserPoolsTokenProvider } from './tokenProvider/tokenProvider.mjs';\nexport { CognitoAWSCredentialsAndIdentityIdProvider } from './credentialsProvider/credentialsProvider.mjs';\nexport { DefaultIdentityIdStore } from './credentialsProvider/IdentityIdStore.mjs';\n//# sourceMappingURL=index.mjs.map\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { toAttributeType } from '../utils/apiHelpers.mjs';\nimport { autoSignInUserConfirmed, autoSignInWhenUserIsConfirmedWithLink, handleCodeAutoSignIn } from '../utils/signUpHelpers.mjs';\nimport { getUserContextData } from '../utils/userContextData.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport { createSignUpClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createSignUpClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { autoSignInStore } from '../../../client/utils/store/autoSignInStore.mjs';\nimport '../../../client/utils/store/signInStore.mjs';\nimport { setAutoSignIn } from './autoSignIn.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Creates a user\n *\n * @param input - The SignUpInput object\n * @returns SignUpOutput\n * @throws service: {@link SignUpException } - Cognito service errors thrown during the sign-up process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown either username or password\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function signUp(input) {\n const { username, password, options } = input;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n const signUpVerificationMethod = authConfig?.signUpVerificationMethod ?? 'code';\n const { clientMetadata, validationData, autoSignIn } = input.options ?? {};\n assertTokenProviderConfig(authConfig);\n assertValidationError(!!username, AuthValidationErrorCode.EmptySignUpUsername);\n const signInServiceOptions = typeof autoSignIn !== 'boolean' ? autoSignIn : undefined;\n const signInInput = {\n username,\n options: signInServiceOptions,\n };\n // if the authFlowType is 'CUSTOM_WITHOUT_SRP' then we don't include the password\n if (signInServiceOptions?.authFlowType !== 'CUSTOM_WITHOUT_SRP') {\n signInInput.password = password;\n }\n const { userPoolId, userPoolClientId, userPoolEndpoint } = authConfig;\n const signUpClient = createSignUpClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const signUpClientInput = {\n Username: username,\n Password: undefined,\n UserAttributes: options?.userAttributes && toAttributeType(options?.userAttributes),\n ClientMetadata: clientMetadata,\n ValidationData: validationData && toAttributeType(validationData),\n ClientId: userPoolClientId,\n UserContextData: getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n }),\n };\n if (password) {\n signUpClientInput.Password = password;\n }\n const { UserSub: userId, CodeDeliveryDetails: cdd, UserConfirmed: userConfirmed, Session: session, } = await signUpClient({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignUp),\n }, signUpClientInput);\n if (signInServiceOptions || autoSignIn === true) {\n autoSignInStore.dispatch({ type: 'START' });\n autoSignInStore.dispatch({ type: 'SET_USERNAME', value: username });\n autoSignInStore.dispatch({ type: 'SET_SESSION', value: session });\n }\n const codeDeliveryDetails = {\n destination: cdd?.Destination,\n deliveryMedium: cdd?.DeliveryMedium,\n attributeName: cdd?.AttributeName,\n };\n const isSignUpComplete = !!userConfirmed;\n const isAutoSignInStarted = autoSignInStore.getState().active;\n // Sign Up Complete\n // No Confirm Sign In Step Required\n if (isSignUpComplete) {\n if (isAutoSignInStarted) {\n setAutoSignIn(autoSignInUserConfirmed(signInInput));\n return {\n isSignUpComplete: true,\n nextStep: {\n signUpStep: 'COMPLETE_AUTO_SIGN_IN',\n },\n userId,\n };\n }\n return {\n isSignUpComplete: true,\n nextStep: {\n signUpStep: 'DONE',\n },\n userId,\n };\n }\n // Sign Up Not Complete\n // Confirm Sign Up Step Required\n if (isAutoSignInStarted) {\n // Confirmation Via Link Occurs In Separate Context\n // AutoSignIn Fn Will Initiate Polling Once Executed\n if (signUpVerificationMethod === 'link') {\n setAutoSignIn(autoSignInWhenUserIsConfirmedWithLink(signInInput));\n return {\n isSignUpComplete: false,\n nextStep: {\n signUpStep: 'COMPLETE_AUTO_SIGN_IN',\n codeDeliveryDetails,\n },\n userId,\n };\n }\n // Confirmation Via Code Occurs In Same Context\n // AutoSignIn Next Step Will Be Returned From Confirm Sign Up\n handleCodeAutoSignIn(signInInput);\n }\n return {\n isSignUpComplete: false,\n nextStep: {\n signUpStep: 'CONFIRM_SIGN_UP',\n codeDeliveryDetails,\n },\n userId,\n };\n}\n\nexport { signUp };\n//# sourceMappingURL=signUp.mjs.map\n","import { validationErrorMap } from '../../common/AuthErrorStrings.mjs';\nimport { AuthError } from '../AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction assertValidationError(assertion, name) {\n const { message, recoverySuggestion } = validationErrorMap[name];\n if (!assertion) {\n throw new AuthError({ name, message, recoverySuggestion });\n }\n}\n\nexport { assertValidationError };\n//# sourceMappingURL=assertValidationError.mjs.map\n","import { AuthValidationErrorCode } from '../errors/types/validation.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst validationErrorMap = {\n [AuthValidationErrorCode.EmptyChallengeResponse]: {\n message: 'challengeResponse is required to confirmSignIn',\n },\n [AuthValidationErrorCode.EmptyConfirmResetPasswordUsername]: {\n message: 'username is required to confirmResetPassword',\n },\n [AuthValidationErrorCode.EmptyConfirmSignUpCode]: {\n message: 'code is required to confirmSignUp',\n },\n [AuthValidationErrorCode.EmptyConfirmSignUpUsername]: {\n message: 'username is required to confirmSignUp',\n },\n [AuthValidationErrorCode.EmptyConfirmResetPasswordConfirmationCode]: {\n message: 'confirmationCode is required to confirmResetPassword',\n },\n [AuthValidationErrorCode.EmptyConfirmResetPasswordNewPassword]: {\n message: 'newPassword is required to confirmResetPassword',\n },\n [AuthValidationErrorCode.EmptyResendSignUpCodeUsername]: {\n message: 'username is required to confirmSignUp',\n },\n [AuthValidationErrorCode.EmptyResetPasswordUsername]: {\n message: 'username is required to resetPassword',\n },\n [AuthValidationErrorCode.EmptySignInPassword]: {\n message: 'password is required to signIn',\n },\n [AuthValidationErrorCode.EmptySignInUsername]: {\n message: 'username is required to signIn',\n },\n [AuthValidationErrorCode.EmptySignUpPassword]: {\n message: 'password is required to signUp',\n },\n [AuthValidationErrorCode.EmptySignUpUsername]: {\n message: 'username is required to signUp',\n },\n [AuthValidationErrorCode.CustomAuthSignInPassword]: {\n message: 'A password is not needed when signing in with CUSTOM_WITHOUT_SRP',\n recoverySuggestion: 'Do not include a password in your signIn call.',\n },\n [AuthValidationErrorCode.IncorrectMFAMethod]: {\n message: 'Incorrect MFA method was chosen. It should be either SMS, TOTP, or EMAIL',\n recoverySuggestion: 'Try to pass SMS, TOTP, or EMAIL as the challengeResponse',\n },\n [AuthValidationErrorCode.EmptyVerifyTOTPSetupCode]: {\n message: 'code is required to verifyTotpSetup',\n },\n [AuthValidationErrorCode.EmptyUpdatePassword]: {\n message: 'oldPassword and newPassword are required to changePassword',\n },\n [AuthValidationErrorCode.EmptyConfirmUserAttributeCode]: {\n message: 'confirmation code is required to confirmUserAttribute',\n },\n};\n// TODO: delete this code when the Auth class is removed.\nvar AuthErrorStrings;\n(function (AuthErrorStrings) {\n AuthErrorStrings[\"DEFAULT_MSG\"] = \"Authentication Error\";\n AuthErrorStrings[\"EMPTY_EMAIL\"] = \"Email cannot be empty\";\n AuthErrorStrings[\"EMPTY_PHONE\"] = \"Phone number cannot be empty\";\n AuthErrorStrings[\"EMPTY_USERNAME\"] = \"Username cannot be empty\";\n AuthErrorStrings[\"INVALID_USERNAME\"] = \"The username should either be a string or one of the sign in types\";\n AuthErrorStrings[\"EMPTY_PASSWORD\"] = \"Password cannot be empty\";\n AuthErrorStrings[\"EMPTY_CODE\"] = \"Confirmation code cannot be empty\";\n AuthErrorStrings[\"SIGN_UP_ERROR\"] = \"Error creating account\";\n AuthErrorStrings[\"NO_MFA\"] = \"No valid MFA method provided\";\n AuthErrorStrings[\"INVALID_MFA\"] = \"Invalid MFA type\";\n AuthErrorStrings[\"EMPTY_CHALLENGE\"] = \"Challenge response cannot be empty\";\n AuthErrorStrings[\"NO_USER_SESSION\"] = \"Failed to get the session because the user is empty\";\n AuthErrorStrings[\"NETWORK_ERROR\"] = \"Network Error\";\n AuthErrorStrings[\"DEVICE_CONFIG\"] = \"Device tracking has not been configured in this User Pool\";\n AuthErrorStrings[\"AUTOSIGNIN_ERROR\"] = \"Please use your credentials to sign in\";\n AuthErrorStrings[\"OAUTH_ERROR\"] = \"Couldn't finish OAuth flow, check your User Pool HostedUI settings\";\n})(AuthErrorStrings || (AuthErrorStrings = {}));\nvar AuthErrorCodes;\n(function (AuthErrorCodes) {\n AuthErrorCodes[\"SignInException\"] = \"SignInException\";\n AuthErrorCodes[\"OAuthSignInError\"] = \"OAuthSignInException\";\n})(AuthErrorCodes || (AuthErrorCodes = {}));\n\nexport { AuthErrorCodes, AuthErrorStrings, validationErrorMap };\n//# sourceMappingURL=AuthErrorStrings.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar AuthValidationErrorCode;\n(function (AuthValidationErrorCode) {\n AuthValidationErrorCode[\"EmptySignInUsername\"] = \"EmptySignInUsername\";\n AuthValidationErrorCode[\"EmptySignInPassword\"] = \"EmptySignInPassword\";\n AuthValidationErrorCode[\"CustomAuthSignInPassword\"] = \"CustomAuthSignInPassword\";\n AuthValidationErrorCode[\"EmptySignUpUsername\"] = \"EmptySignUpUsername\";\n AuthValidationErrorCode[\"EmptySignUpPassword\"] = \"EmptySignUpPassword\";\n AuthValidationErrorCode[\"EmptyConfirmSignUpUsername\"] = \"EmptyConfirmSignUpUsername\";\n AuthValidationErrorCode[\"EmptyConfirmSignUpCode\"] = \"EmptyConfirmSignUpCode\";\n AuthValidationErrorCode[\"EmptyResendSignUpCodeUsername\"] = \"EmptyresendSignUpCodeUsername\";\n AuthValidationErrorCode[\"EmptyChallengeResponse\"] = \"EmptyChallengeResponse\";\n AuthValidationErrorCode[\"EmptyConfirmResetPasswordUsername\"] = \"EmptyConfirmResetPasswordUsername\";\n AuthValidationErrorCode[\"EmptyConfirmResetPasswordNewPassword\"] = \"EmptyConfirmResetPasswordNewPassword\";\n AuthValidationErrorCode[\"EmptyConfirmResetPasswordConfirmationCode\"] = \"EmptyConfirmResetPasswordConfirmationCode\";\n AuthValidationErrorCode[\"EmptyResetPasswordUsername\"] = \"EmptyResetPasswordUsername\";\n AuthValidationErrorCode[\"EmptyVerifyTOTPSetupCode\"] = \"EmptyVerifyTOTPSetupCode\";\n AuthValidationErrorCode[\"EmptyConfirmUserAttributeCode\"] = \"EmptyConfirmUserAttributeCode\";\n AuthValidationErrorCode[\"IncorrectMFAMethod\"] = \"IncorrectMFAMethod\";\n AuthValidationErrorCode[\"EmptyUpdatePassword\"] = \"EmptyUpdatePassword\";\n})(AuthValidationErrorCode || (AuthValidationErrorCode = {}));\n\nexport { AuthValidationErrorCode };\n//# sourceMappingURL=validation.mjs.map\n","import { AmplifyError } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass AuthError extends AmplifyError {\n constructor(params) {\n super(params);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = AuthError;\n Object.setPrototypeOf(this, AuthError.prototype);\n }\n}\n\nexport { AuthError };\n//# sourceMappingURL=AuthError.mjs.map\n","import { AuthError } from '../../errors/AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction getRegionFromUserPoolId(userPoolId) {\n const region = userPoolId?.split('_')[0];\n if (!userPoolId ||\n userPoolId.indexOf('_') < 0 ||\n !region ||\n typeof region !== 'string')\n throw new AuthError({\n name: 'InvalidUserPoolId',\n message: 'Invalid user pool id provided.',\n });\n return region;\n}\nfunction getRegionFromIdentityPoolId(identityPoolId) {\n if (!identityPoolId || !identityPoolId.includes(':')) {\n throw new AuthError({\n name: 'InvalidIdentityPoolIdException',\n message: 'Invalid identity pool id provided.',\n recoverySuggestion: 'Make sure a valid identityPoolId is given in the config.',\n });\n }\n return identityPoolId.split(':')[0];\n}\n\nexport { getRegionFromIdentityPoolId, getRegionFromUserPoolId };\n//# sourceMappingURL=regionParsers.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Transforms a user attributes object into an array of AttributeType objects.\n * @param attributes user attributes to be mapped to AttributeType objects.\n * @returns an array of AttributeType objects.\n */\nfunction toAttributeType(attributes) {\n return Object.entries(attributes).map(([key, value]) => ({\n Name: key,\n Value: value,\n }));\n}\n/**\n * Transforms an array of AttributeType objects into a user attributes object.\n *\n * @param attributes - an array of AttributeType objects.\n * @returns AuthUserAttributes object.\n */\nfunction toAuthUserAttribute(attributes) {\n const userAttributes = {};\n attributes?.forEach(attribute => {\n if (attribute.Name)\n userAttributes[attribute.Name] = attribute.Value;\n });\n return userAttributes;\n}\n\nexport { toAttributeType, toAuthUserAttribute };\n//# sourceMappingURL=apiHelpers.mjs.map\n","import { HubInternal } from '@aws-amplify/core/internals/utils';\nimport { signIn } from '../apis/signIn.mjs';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { setAutoSignIn, resetAutoSignIn } from '../apis/autoSignIn.mjs';\nimport { AUTO_SIGN_IN_EXCEPTION } from '../../../errors/constants.mjs';\nimport { signInWithUserAuth } from '../apis/signInWithUserAuth.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst MAX_AUTOSIGNIN_POLLING_MS = 3 * 60 * 1000;\nfunction handleCodeAutoSignIn(signInInput) {\n const stopHubListener = HubInternal.listen('auth-internal', async ({ payload }) => {\n switch (payload.event) {\n case 'confirmSignUp': {\n const response = payload.data;\n if (response?.isSignUpComplete) {\n HubInternal.dispatch('auth-internal', {\n event: 'autoSignIn',\n });\n setAutoSignIn(autoSignInWithCode(signInInput));\n stopHubListener();\n }\n }\n }\n });\n // This will stop the listener if confirmSignUp is not resolved.\n const timeOutId = setTimeout(() => {\n stopHubListener();\n clearTimeout(timeOutId);\n resetAutoSignIn();\n }, MAX_AUTOSIGNIN_POLLING_MS);\n}\nfunction debounce(fun, delay) {\n let timer;\n return (args) => {\n if (!timer) {\n fun(...args);\n }\n clearTimeout(timer);\n timer = setTimeout(() => {\n timer = undefined;\n }, delay);\n };\n}\nfunction handleAutoSignInWithLink(signInInput, resolve, reject) {\n const start = Date.now();\n const autoSignInPollingIntervalId = setInterval(async () => {\n const elapsedTime = Date.now() - start;\n const maxTime = MAX_AUTOSIGNIN_POLLING_MS;\n if (elapsedTime > maxTime) {\n clearInterval(autoSignInPollingIntervalId);\n reject(new AuthError({\n name: AUTO_SIGN_IN_EXCEPTION,\n message: 'The account was not confirmed on time.',\n recoverySuggestion: 'Try to verify your account by clicking the link sent your email or phone and then login manually.',\n }));\n resetAutoSignIn();\n }\n else {\n try {\n const signInOutput = await signIn(signInInput);\n if (signInOutput.nextStep.signInStep !== 'CONFIRM_SIGN_UP') {\n resolve(signInOutput);\n clearInterval(autoSignInPollingIntervalId);\n resetAutoSignIn();\n }\n }\n catch (error) {\n clearInterval(autoSignInPollingIntervalId);\n reject(error);\n resetAutoSignIn();\n }\n }\n }, 5000);\n}\nconst debouncedAutoSignInWithLink = debounce(handleAutoSignInWithLink, 300);\nconst debouncedAutoSignWithCodeOrUserConfirmed = debounce(handleAutoSignInWithCodeOrUserConfirmed, 300);\nfunction autoSignInWhenUserIsConfirmedWithLink(signInInput) {\n return async () => {\n return new Promise((resolve, reject) => {\n debouncedAutoSignInWithLink([signInInput, resolve, reject]);\n });\n };\n}\nasync function handleAutoSignInWithCodeOrUserConfirmed(signInInput, resolve, reject) {\n try {\n const output = signInInput?.options?.authFlowType === 'USER_AUTH'\n ? await signInWithUserAuth(signInInput)\n : await signIn(signInInput);\n resolve(output);\n resetAutoSignIn();\n }\n catch (error) {\n reject(error);\n resetAutoSignIn();\n }\n}\nfunction autoSignInWithCode(signInInput) {\n return async () => {\n return new Promise((resolve, reject) => {\n debouncedAutoSignWithCodeOrUserConfirmed([signInInput, resolve, reject]);\n });\n };\n}\nconst autoSignInUserConfirmed = autoSignInWithCode;\n\nexport { autoSignInUserConfirmed, autoSignInWhenUserIsConfirmedWithLink, handleCodeAutoSignIn };\n//# sourceMappingURL=signUpHelpers.mjs.map\n","import { assertUserNotAuthenticated } from '../utils/signInHelpers.mjs';\nimport { signInWithCustomAuth } from './signInWithCustomAuth.mjs';\nimport { signInWithCustomSRPAuth } from './signInWithCustomSRPAuth.mjs';\nimport { signInWithSRP } from './signInWithSRP.mjs';\nimport { signInWithUserPassword } from './signInWithUserPassword.mjs';\nimport { signInWithUserAuth } from './signInWithUserAuth.mjs';\nimport { resetAutoSignIn } from './autoSignIn.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Signs a user in\n *\n * @param input - The SignInInput object\n * @returns SignInOutput\n * @throws service: {@link InitiateAuthException }, {@link RespondToAuthChallengeException }\n * - Cognito service errors thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function signIn(input) {\n // Here we want to reset the store but not reassign the callback.\n // The callback is reset when the underlying promise resolves or rejects.\n // With the advent of session based sign in, this guarantees that the signIn API initiates a new auth flow,\n // regardless of whether it is called for a user currently engaged in an active auto sign in session.\n resetAutoSignIn(false);\n const authFlowType = input.options?.authFlowType;\n await assertUserNotAuthenticated();\n switch (authFlowType) {\n case 'USER_SRP_AUTH':\n return signInWithSRP(input);\n case 'USER_PASSWORD_AUTH':\n return signInWithUserPassword(input);\n case 'CUSTOM_WITHOUT_SRP':\n return signInWithCustomAuth(input);\n case 'CUSTOM_WITH_SRP':\n return signInWithCustomSRPAuth(input);\n case 'USER_AUTH':\n return signInWithUserAuth(input);\n default:\n return signInWithSRP(input);\n }\n}\n\nexport { signIn };\n//# sourceMappingURL=signIn.mjs.map\n","import { Amplify } from '@aws-amplify/core';\nimport { AuthAction, assertTokenProviderConfig, AmplifyUrl, base64Encoder, getDeviceName } from '@aws-amplify/core/internals/utils';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { InitiateAuthException } from '../types/errors.mjs';\nimport { AuthErrorCodes } from '../../../common/AuthErrorStrings.mjs';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { USER_ALREADY_AUTHENTICATED_EXCEPTION } from '../../../errors/constants.mjs';\nimport { getCurrentUser } from '../apis/getCurrentUser.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport { createInitiateAuthClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createInitiateAuthClient.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport { createRespondToAuthChallengeClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createRespondToAuthChallengeClient.mjs';\nimport { createVerifySoftwareTokenClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createVerifySoftwareTokenClient.mjs';\nimport { createAssociateSoftwareTokenClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createAssociateSoftwareTokenClient.mjs';\nimport { createConfirmDeviceClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createConfirmDeviceClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { handleWebAuthnSignInResult } from '../../../client/flows/userAuth/handleWebAuthnSignInResult.mjs';\nimport { handlePasswordSRP } from '../../../client/flows/shared/handlePasswordSRP.mjs';\nimport { initiateSelectedChallenge } from '../../../client/flows/userAuth/handleSelectChallenge.mjs';\nimport { handleSelectChallengeWithPassword } from '../../../client/flows/userAuth/handleSelectChallengeWithPassword.mjs';\nimport { handleSelectChallengeWithPasswordSRP } from '../../../client/flows/userAuth/handleSelectChallengeWithPasswordSRP.mjs';\nimport '../../../client/utils/store/autoSignInStore.mjs';\nimport { signInStore } from '../../../client/utils/store/signInStore.mjs';\nimport { assertDeviceMetadata } from './types.mjs';\nimport { getAuthenticationHelper } from './srp/getAuthenticationHelper.mjs';\nimport { getBytesFromHex } from './srp/getBytesFromHex.mjs';\nimport { getNowString } from './srp/getNowString.mjs';\nimport { getSignatureString } from './srp/getSignatureString.mjs';\nimport BigInteger from './srp/BigInteger/BigInteger.mjs';\nimport { getUserContextData } from './userContextData.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst USER_ATTRIBUTES = 'userAttributes.';\nasync function handleCustomChallenge({ challengeResponse, clientMetadata, session, username, config, tokenOrchestrator, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const challengeResponses = {\n USERNAME: username,\n ANSWER: challengeResponse,\n };\n const deviceMetadata = await tokenOrchestrator?.getDeviceMetadata(username);\n if (deviceMetadata && deviceMetadata.deviceKey) {\n challengeResponses.DEVICE_KEY = deviceMetadata.deviceKey;\n }\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n ChallengeName: 'CUSTOM_CHALLENGE',\n ChallengeResponses: challengeResponses,\n Session: session,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, jsonReq);\n if (response.ChallengeName === 'DEVICE_SRP_AUTH') {\n return handleDeviceSRPAuth({\n username,\n config,\n clientMetadata,\n session: response.Session,\n tokenOrchestrator,\n });\n }\n return response;\n}\nasync function handleMFASetupChallenge({ challengeResponse, username, clientMetadata, session, deviceName, config, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n if (challengeResponse === 'EMAIL') {\n return {\n ChallengeName: 'MFA_SETUP',\n Session: session,\n ChallengeParameters: {\n MFAS_CAN_SETUP: '[\"EMAIL_OTP\"]',\n },\n $metadata: {},\n };\n }\n if (challengeResponse === 'TOTP') {\n return {\n ChallengeName: 'MFA_SETUP',\n Session: session,\n ChallengeParameters: {\n MFAS_CAN_SETUP: '[\"SOFTWARE_TOKEN_MFA\"]',\n },\n $metadata: {},\n };\n }\n const challengeResponses = {\n USERNAME: username,\n };\n const isTOTPCode = /^\\d+$/.test(challengeResponse);\n if (isTOTPCode) {\n const verifySoftwareToken = createVerifySoftwareTokenClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { Session } = await verifySoftwareToken({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, {\n UserCode: challengeResponse,\n Session: session,\n FriendlyDeviceName: deviceName,\n });\n signInStore.dispatch({\n type: 'SET_SIGN_IN_SESSION',\n value: Session,\n });\n const jsonReq = {\n ChallengeName: 'MFA_SETUP',\n ChallengeResponses: challengeResponses,\n Session,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n return respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, jsonReq);\n }\n const isEmail = challengeResponse.includes('@');\n if (isEmail) {\n challengeResponses.EMAIL = challengeResponse;\n const jsonReq = {\n ChallengeName: 'MFA_SETUP',\n ChallengeResponses: challengeResponses,\n Session: session,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n return respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, jsonReq);\n }\n throw new AuthError({\n name: AuthErrorCodes.SignInException,\n message: `Cannot proceed with MFA setup using challengeResponse: ${challengeResponse}`,\n recoverySuggestion: 'Try passing \"EMAIL\", \"TOTP\", a valid email, or OTP code as the challengeResponse.',\n });\n}\nasync function handleSelectMFATypeChallenge({ challengeResponse, username, clientMetadata, session, config, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n assertValidationError(challengeResponse === 'TOTP' ||\n challengeResponse === 'SMS' ||\n challengeResponse === 'EMAIL', AuthValidationErrorCode.IncorrectMFAMethod);\n const challengeResponses = {\n USERNAME: username,\n ANSWER: mapMfaType(challengeResponse),\n };\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n ChallengeName: 'SELECT_MFA_TYPE',\n ChallengeResponses: challengeResponses,\n Session: session,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n return respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, jsonReq);\n}\nasync function handleCompleteNewPasswordChallenge({ challengeResponse, clientMetadata, session, username, requiredAttributes, config, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const challengeResponses = {\n ...createAttributes(requiredAttributes),\n NEW_PASSWORD: challengeResponse,\n USERNAME: username,\n };\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n ChallengeName: 'NEW_PASSWORD_REQUIRED',\n ChallengeResponses: challengeResponses,\n ClientMetadata: clientMetadata,\n Session: session,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n return respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, jsonReq);\n}\nasync function handleUserPasswordAuthFlow(username, password, clientMetadata, config, tokenOrchestrator) {\n const { userPoolClientId, userPoolId, userPoolEndpoint } = config;\n const authParameters = {\n USERNAME: username,\n PASSWORD: password,\n };\n const deviceMetadata = await tokenOrchestrator.getDeviceMetadata(username);\n if (deviceMetadata && deviceMetadata.deviceKey) {\n authParameters.DEVICE_KEY = deviceMetadata.deviceKey;\n }\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n AuthFlow: 'USER_PASSWORD_AUTH',\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const initiateAuth = createInitiateAuthClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await initiateAuth({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignIn),\n }, jsonReq);\n const activeUsername = response.ChallengeParameters?.USERNAME ??\n response.ChallengeParameters?.USER_ID_FOR_SRP ??\n username;\n setActiveSignInUsername(activeUsername);\n if (response.ChallengeName === 'DEVICE_SRP_AUTH')\n return handleDeviceSRPAuth({\n username: activeUsername,\n config,\n clientMetadata,\n session: response.Session,\n tokenOrchestrator,\n });\n return response;\n}\nasync function handleUserSRPAuthFlow(username, password, clientMetadata, config, tokenOrchestrator) {\n return handlePasswordSRP({\n username,\n password,\n clientMetadata,\n config,\n tokenOrchestrator,\n authFlow: 'USER_SRP_AUTH',\n });\n}\nasync function handleCustomAuthFlowWithoutSRP(username, clientMetadata, config, tokenOrchestrator) {\n const { userPoolClientId, userPoolId, userPoolEndpoint } = config;\n const authParameters = {\n USERNAME: username,\n };\n const deviceMetadata = await tokenOrchestrator.getDeviceMetadata(username);\n if (deviceMetadata && deviceMetadata.deviceKey) {\n authParameters.DEVICE_KEY = deviceMetadata.deviceKey;\n }\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n AuthFlow: 'CUSTOM_AUTH',\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const initiateAuth = createInitiateAuthClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await initiateAuth({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignIn),\n }, jsonReq);\n const activeUsername = response.ChallengeParameters?.USERNAME ?? username;\n setActiveSignInUsername(activeUsername);\n if (response.ChallengeName === 'DEVICE_SRP_AUTH')\n return handleDeviceSRPAuth({\n username: activeUsername,\n config,\n clientMetadata,\n session: response.Session,\n tokenOrchestrator,\n });\n return response;\n}\nasync function handleCustomSRPAuthFlow(username, password, clientMetadata, config, tokenOrchestrator) {\n assertTokenProviderConfig(config);\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const userPoolName = userPoolId?.split('_')[1] || '';\n const authenticationHelper = await getAuthenticationHelper(userPoolName);\n const authParameters = {\n USERNAME: username,\n SRP_A: authenticationHelper.A.toString(16),\n CHALLENGE_NAME: 'SRP_A',\n };\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n AuthFlow: 'CUSTOM_AUTH',\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const initiateAuth = createInitiateAuthClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { ChallengeParameters: challengeParameters, Session: session } = await initiateAuth({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignIn),\n }, jsonReq);\n const activeUsername = challengeParameters?.USERNAME ?? username;\n setActiveSignInUsername(activeUsername);\n return retryOnResourceNotFoundException(handlePasswordVerifierChallenge, [\n password,\n challengeParameters,\n clientMetadata,\n session,\n authenticationHelper,\n config,\n tokenOrchestrator,\n ], activeUsername, tokenOrchestrator);\n}\nasync function handleDeviceSRPAuth({ username, config, clientMetadata, session, tokenOrchestrator, }) {\n const { userPoolId, userPoolEndpoint } = config;\n const clientId = config.userPoolClientId;\n const deviceMetadata = await tokenOrchestrator?.getDeviceMetadata(username);\n assertDeviceMetadata(deviceMetadata);\n const authenticationHelper = await getAuthenticationHelper(deviceMetadata.deviceGroupKey);\n const challengeResponses = {\n USERNAME: username,\n SRP_A: authenticationHelper.A.toString(16),\n DEVICE_KEY: deviceMetadata.deviceKey,\n };\n const jsonReqResponseChallenge = {\n ChallengeName: 'DEVICE_SRP_AUTH',\n ClientId: clientId,\n ChallengeResponses: challengeResponses,\n ClientMetadata: clientMetadata,\n Session: session,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { ChallengeParameters: respondedChallengeParameters, Session } = await respondToAuthChallenge({ region: getRegionFromUserPoolId(userPoolId) }, jsonReqResponseChallenge);\n return handleDevicePasswordVerifier(username, respondedChallengeParameters, clientMetadata, Session, authenticationHelper, config, tokenOrchestrator);\n}\nasync function handleDevicePasswordVerifier(username, challengeParameters, clientMetadata, session, authenticationHelper, { userPoolId, userPoolClientId, userPoolEndpoint }, tokenOrchestrator) {\n const deviceMetadata = await tokenOrchestrator?.getDeviceMetadata(username);\n assertDeviceMetadata(deviceMetadata);\n const serverBValue = new BigInteger(challengeParameters?.SRP_B, 16);\n const salt = new BigInteger(challengeParameters?.SALT, 16);\n const { deviceKey } = deviceMetadata;\n const { deviceGroupKey } = deviceMetadata;\n const hkdf = await authenticationHelper.getPasswordAuthenticationKey({\n username: deviceMetadata.deviceKey,\n password: deviceMetadata.randomPassword,\n serverBValue,\n salt,\n });\n const dateNow = getNowString();\n const challengeResponses = {\n USERNAME: challengeParameters?.USERNAME ?? username,\n PASSWORD_CLAIM_SECRET_BLOCK: challengeParameters?.SECRET_BLOCK,\n TIMESTAMP: dateNow,\n PASSWORD_CLAIM_SIGNATURE: getSignatureString({\n username: deviceKey,\n userPoolName: deviceGroupKey,\n challengeParameters,\n dateNow,\n hkdf,\n }),\n DEVICE_KEY: deviceKey,\n };\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReqResponseChallenge = {\n ChallengeName: 'DEVICE_PASSWORD_VERIFIER',\n ClientId: userPoolClientId,\n ChallengeResponses: challengeResponses,\n Session: session,\n ClientMetadata: clientMetadata,\n UserContextData,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n return respondToAuthChallenge({ region: getRegionFromUserPoolId(userPoolId) }, jsonReqResponseChallenge);\n}\nasync function handlePasswordVerifierChallenge(password, challengeParameters, clientMetadata, session, authenticationHelper, config, tokenOrchestrator) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const userPoolName = userPoolId?.split('_')[1] || '';\n const serverBValue = new BigInteger(challengeParameters?.SRP_B, 16);\n const salt = new BigInteger(challengeParameters?.SALT, 16);\n const username = challengeParameters?.USER_ID_FOR_SRP;\n if (!username)\n throw new AuthError({\n name: 'EmptyUserIdForSRPException',\n message: 'USER_ID_FOR_SRP was not found in challengeParameters',\n });\n const hkdf = await authenticationHelper.getPasswordAuthenticationKey({\n username,\n password,\n serverBValue,\n salt,\n });\n const dateNow = getNowString();\n const challengeResponses = {\n USERNAME: username,\n PASSWORD_CLAIM_SECRET_BLOCK: challengeParameters?.SECRET_BLOCK,\n TIMESTAMP: dateNow,\n PASSWORD_CLAIM_SIGNATURE: getSignatureString({\n username,\n userPoolName,\n challengeParameters,\n dateNow,\n hkdf,\n }),\n };\n const deviceMetadata = await tokenOrchestrator.getDeviceMetadata(username);\n if (deviceMetadata && deviceMetadata.deviceKey) {\n challengeResponses.DEVICE_KEY = deviceMetadata.deviceKey;\n }\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReqResponseChallenge = {\n ChallengeName: 'PASSWORD_VERIFIER',\n ChallengeResponses: challengeResponses,\n ClientMetadata: clientMetadata,\n Session: session,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await respondToAuthChallenge({ region: getRegionFromUserPoolId(userPoolId) }, jsonReqResponseChallenge);\n if (response.ChallengeName === 'DEVICE_SRP_AUTH')\n return handleDeviceSRPAuth({\n username,\n config,\n clientMetadata,\n session: response.Session,\n tokenOrchestrator,\n });\n return response;\n}\nasync function getSignInResult(params) {\n const { challengeName, challengeParameters, availableChallenges } = params;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n switch (challengeName) {\n case 'CUSTOM_CHALLENGE':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE',\n additionalInfo: challengeParameters,\n },\n };\n case 'MFA_SETUP': {\n const { signInSession, username } = signInStore.getState();\n const mfaSetupTypes = getMFATypes(parseMFATypes(challengeParameters.MFAS_CAN_SETUP)) || [];\n const allowedMfaSetupTypes = getAllowedMfaSetupTypes(mfaSetupTypes);\n const isTotpMfaSetupAvailable = allowedMfaSetupTypes.includes('TOTP');\n const isEmailMfaSetupAvailable = allowedMfaSetupTypes.includes('EMAIL');\n if (isTotpMfaSetupAvailable && isEmailMfaSetupAvailable) {\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION',\n allowedMFATypes: allowedMfaSetupTypes,\n },\n };\n }\n if (isEmailMfaSetupAvailable) {\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONTINUE_SIGN_IN_WITH_EMAIL_SETUP',\n },\n };\n }\n if (isTotpMfaSetupAvailable) {\n const associateSoftwareToken = createAssociateSoftwareTokenClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: authConfig.userPoolEndpoint,\n }),\n });\n const { Session, SecretCode: secretCode } = await associateSoftwareToken({ region: getRegionFromUserPoolId(authConfig.userPoolId) }, {\n Session: signInSession,\n });\n signInStore.dispatch({\n type: 'SET_SIGN_IN_SESSION',\n value: Session,\n });\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONTINUE_SIGN_IN_WITH_TOTP_SETUP',\n totpSetupDetails: getTOTPSetupDetails(secretCode, username),\n },\n };\n }\n throw new AuthError({\n name: AuthErrorCodes.SignInException,\n message: `Cannot initiate MFA setup from available types: ${mfaSetupTypes}`,\n });\n }\n case 'NEW_PASSWORD_REQUIRED':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED',\n missingAttributes: parseAttributes(challengeParameters.requiredAttributes),\n },\n };\n case 'SELECT_MFA_TYPE':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONTINUE_SIGN_IN_WITH_MFA_SELECTION',\n allowedMFATypes: getMFATypes(parseMFATypes(challengeParameters.MFAS_CAN_CHOOSE)),\n },\n };\n case 'SMS_OTP':\n case 'SMS_MFA':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_SMS_CODE',\n codeDeliveryDetails: {\n deliveryMedium: challengeParameters.CODE_DELIVERY_DELIVERY_MEDIUM,\n destination: challengeParameters.CODE_DELIVERY_DESTINATION,\n },\n },\n };\n case 'SOFTWARE_TOKEN_MFA':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_TOTP_CODE',\n },\n };\n case 'EMAIL_OTP':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_EMAIL_CODE',\n codeDeliveryDetails: {\n deliveryMedium: challengeParameters.CODE_DELIVERY_DELIVERY_MEDIUM,\n destination: challengeParameters.CODE_DELIVERY_DESTINATION,\n },\n },\n };\n case 'WEB_AUTHN':\n return handleWebAuthnSignInResult(challengeParameters);\n case 'PASSWORD':\n case 'PASSWORD_SRP':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONFIRM_SIGN_IN_WITH_PASSWORD',\n },\n };\n case 'SELECT_CHALLENGE':\n return {\n isSignedIn: false,\n nextStep: {\n signInStep: 'CONTINUE_SIGN_IN_WITH_FIRST_FACTOR_SELECTION',\n availableChallenges,\n },\n };\n }\n // TODO: remove this error message for production apps\n throw new AuthError({\n name: AuthErrorCodes.SignInException,\n message: 'An error occurred during the sign in process. ' +\n `${challengeName} challengeName returned by the underlying service was not addressed.`,\n });\n}\nfunction getTOTPSetupDetails(secretCode, username) {\n return {\n sharedSecret: secretCode,\n getSetupUri: (appName, accountName) => {\n const totpUri = `otpauth://totp/${appName}:${accountName ?? username}?secret=${secretCode}&issuer=${appName}`;\n return new AmplifyUrl(totpUri);\n },\n };\n}\nfunction getSignInResultFromError(errorName) {\n if (errorName === InitiateAuthException.PasswordResetRequiredException) {\n return {\n isSignedIn: false,\n nextStep: { signInStep: 'RESET_PASSWORD' },\n };\n }\n else if (errorName === InitiateAuthException.UserNotConfirmedException) {\n return {\n isSignedIn: false,\n nextStep: { signInStep: 'CONFIRM_SIGN_UP' },\n };\n }\n}\nfunction parseAttributes(attributes) {\n if (!attributes)\n return [];\n const parsedAttributes = JSON.parse(attributes).map(att => att.includes(USER_ATTRIBUTES) ? att.replace(USER_ATTRIBUTES, '') : att);\n return parsedAttributes;\n}\nfunction createAttributes(attributes) {\n if (!attributes)\n return {};\n const newAttributes = {};\n Object.entries(attributes).forEach(([key, value]) => {\n if (value)\n newAttributes[`${USER_ATTRIBUTES}${key}`] = value;\n });\n return newAttributes;\n}\nasync function handleChallengeName(username, challengeName, session, challengeResponse, config, tokenOrchestrator, clientMetadata, options) {\n const userAttributes = options?.userAttributes;\n const deviceName = options?.friendlyDeviceName;\n switch (challengeName) {\n case 'WEB_AUTHN':\n case 'SELECT_CHALLENGE':\n if (challengeResponse === 'PASSWORD_SRP' ||\n challengeResponse === 'PASSWORD') {\n return {\n ChallengeName: challengeResponse,\n Session: session,\n $metadata: {},\n };\n }\n return initiateSelectedChallenge({\n username,\n session,\n selectedChallenge: challengeResponse,\n config,\n clientMetadata,\n });\n case 'SELECT_MFA_TYPE':\n return handleSelectMFATypeChallenge({\n challengeResponse,\n clientMetadata,\n session,\n username,\n config,\n });\n case 'MFA_SETUP':\n return handleMFASetupChallenge({\n challengeResponse,\n clientMetadata,\n session,\n username,\n deviceName,\n config,\n });\n case 'NEW_PASSWORD_REQUIRED':\n return handleCompleteNewPasswordChallenge({\n challengeResponse,\n clientMetadata,\n session,\n username,\n requiredAttributes: userAttributes,\n config,\n });\n case 'CUSTOM_CHALLENGE':\n return retryOnResourceNotFoundException(handleCustomChallenge, [\n {\n challengeResponse,\n clientMetadata,\n session,\n username,\n config,\n tokenOrchestrator,\n },\n ], username, tokenOrchestrator);\n case 'SMS_MFA':\n case 'SOFTWARE_TOKEN_MFA':\n case 'SMS_OTP':\n case 'EMAIL_OTP':\n return handleMFAChallenge({\n challengeName,\n challengeResponse,\n clientMetadata,\n session,\n username,\n config,\n });\n case 'PASSWORD':\n return handleSelectChallengeWithPassword(username, challengeResponse, clientMetadata, config, session);\n case 'PASSWORD_SRP':\n return handleSelectChallengeWithPasswordSRP(username, challengeResponse, // This is the actual password\n clientMetadata, config, session, tokenOrchestrator);\n }\n // TODO: remove this error message for production apps\n throw new AuthError({\n name: AuthErrorCodes.SignInException,\n message: `An error occurred during the sign in process.\n\t\t${challengeName} challengeName returned by the underlying service was not addressed.`,\n });\n}\nfunction mapMfaType(mfa) {\n let mfaType = 'SMS_MFA';\n if (mfa === 'TOTP')\n mfaType = 'SOFTWARE_TOKEN_MFA';\n if (mfa === 'EMAIL')\n mfaType = 'EMAIL_OTP';\n return mfaType;\n}\nfunction getMFAType(type) {\n if (type === 'SMS_MFA')\n return 'SMS';\n if (type === 'SOFTWARE_TOKEN_MFA')\n return 'TOTP';\n if (type === 'EMAIL_OTP')\n return 'EMAIL';\n // TODO: log warning for unknown MFA type\n}\nfunction getMFATypes(types) {\n if (!types)\n return undefined;\n return types.map(getMFAType).filter(Boolean);\n}\nfunction parseMFATypes(mfa) {\n if (!mfa)\n return [];\n return JSON.parse(mfa);\n}\nfunction getAllowedMfaSetupTypes(availableMfaSetupTypes) {\n return availableMfaSetupTypes.filter(authMfaType => authMfaType === 'EMAIL' || authMfaType === 'TOTP');\n}\nasync function assertUserNotAuthenticated() {\n let authUser;\n try {\n authUser = await getCurrentUser();\n }\n catch (error) { }\n if (authUser && authUser.userId && authUser.username) {\n throw new AuthError({\n name: USER_ALREADY_AUTHENTICATED_EXCEPTION,\n message: 'There is already a signed in user.',\n recoverySuggestion: 'Call signOut before calling signIn again.',\n });\n }\n}\n/**\n * This function is used to kick off the device management flow.\n *\n * If an error is thrown while generating a hash device or calling the `ConfirmDevice`\n * client, then this API will ignore the error and return undefined. Otherwise the authentication\n * flow will not complete and the user won't be able to be signed in.\n *\n * @returns DeviceMetadata | undefined\n */\nasync function getNewDeviceMetadata({ userPoolId, userPoolEndpoint, newDeviceMetadata, accessToken, }) {\n if (!newDeviceMetadata)\n return undefined;\n const userPoolName = userPoolId.split('_')[1] || '';\n const authenticationHelper = await getAuthenticationHelper(userPoolName);\n const deviceKey = newDeviceMetadata?.DeviceKey;\n const deviceGroupKey = newDeviceMetadata?.DeviceGroupKey;\n try {\n await authenticationHelper.generateHashDevice(deviceGroupKey ?? '', deviceKey ?? '');\n }\n catch (errGenHash) {\n // TODO: log error here\n return undefined;\n }\n const deviceSecretVerifierConfig = {\n Salt: base64Encoder.convert(getBytesFromHex(authenticationHelper.getSaltToHashDevices())),\n PasswordVerifier: base64Encoder.convert(getBytesFromHex(authenticationHelper.getVerifierDevices())),\n };\n const randomPassword = authenticationHelper.getRandomPassword();\n try {\n const confirmDevice = createConfirmDeviceClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await confirmDevice({ region: getRegionFromUserPoolId(userPoolId) }, {\n AccessToken: accessToken,\n DeviceName: await getDeviceName(),\n DeviceKey: newDeviceMetadata?.DeviceKey,\n DeviceSecretVerifierConfig: deviceSecretVerifierConfig,\n });\n return {\n deviceKey,\n deviceGroupKey,\n randomPassword,\n };\n }\n catch (error) {\n // TODO: log error here\n return undefined;\n }\n}\n/**\n * It will retry the function if the error is a `ResourceNotFoundException` and\n * will clean the device keys stored in the storage mechanism.\n *\n */\nasync function retryOnResourceNotFoundException(func, args, username, tokenOrchestrator) {\n try {\n return await func(...args);\n }\n catch (error) {\n if (error instanceof AuthError &&\n error.name === 'ResourceNotFoundException' &&\n error.message.includes('Device does not exist.')) {\n await tokenOrchestrator.clearDeviceMetadata(username);\n return func(...args);\n }\n throw error;\n }\n}\nfunction setActiveSignInUsername(username) {\n const { dispatch } = signInStore;\n dispatch({ type: 'SET_USERNAME', value: username });\n}\nfunction getActiveSignInUsername(username) {\n const state = signInStore.getState();\n return state.username ?? username;\n}\nasync function handleMFAChallenge({ challengeName, challengeResponse, clientMetadata, session, username, config, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const challengeResponses = {\n USERNAME: username,\n };\n if (challengeName === 'EMAIL_OTP') {\n challengeResponses.EMAIL_OTP_CODE = challengeResponse;\n }\n if (challengeName === 'SMS_MFA') {\n challengeResponses.SMS_MFA_CODE = challengeResponse;\n }\n if (challengeName === 'SMS_OTP') {\n challengeResponses.SMS_OTP_CODE = challengeResponse;\n }\n if (challengeName === 'SOFTWARE_TOKEN_MFA') {\n challengeResponses.SOFTWARE_TOKEN_MFA_CODE = challengeResponse;\n }\n const userContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n ChallengeName: challengeName,\n ChallengeResponses: challengeResponses,\n Session: session,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData: userContextData,\n };\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n return respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, jsonReq);\n}\n\nexport { assertUserNotAuthenticated, createAttributes, getActiveSignInUsername, getAllowedMfaSetupTypes, getMFAType, getMFATypes, getNewDeviceMetadata, getSignInResult, getSignInResultFromError, getTOTPSetupDetails, handleChallengeName, handleCompleteNewPasswordChallenge, handleCustomAuthFlowWithoutSRP, handleCustomChallenge, handleCustomSRPAuthFlow, handleMFAChallenge, handleMFASetupChallenge, handlePasswordVerifierChallenge, handleSelectMFATypeChallenge, handleUserPasswordAuthFlow, handleUserSRPAuthFlow, mapMfaType, parseAttributes, parseMFATypes, retryOnResourceNotFoundException, setActiveSignInUsername };\n//# sourceMappingURL=signInHelpers.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar AssociateSoftwareTokenException;\n(function (AssociateSoftwareTokenException) {\n AssociateSoftwareTokenException[\"ConcurrentModificationException\"] = \"ConcurrentModificationException\";\n AssociateSoftwareTokenException[\"ForbiddenException\"] = \"ForbiddenException\";\n AssociateSoftwareTokenException[\"InternalErrorException\"] = \"InternalErrorException\";\n AssociateSoftwareTokenException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n AssociateSoftwareTokenException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n AssociateSoftwareTokenException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n AssociateSoftwareTokenException[\"SoftwareTokenMFANotFoundException\"] = \"SoftwareTokenMFANotFoundException\";\n})(AssociateSoftwareTokenException || (AssociateSoftwareTokenException = {}));\nvar ChangePasswordException;\n(function (ChangePasswordException) {\n ChangePasswordException[\"ForbiddenException\"] = \"ForbiddenException\";\n ChangePasswordException[\"InternalErrorException\"] = \"InternalErrorException\";\n ChangePasswordException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ChangePasswordException[\"InvalidPasswordException\"] = \"InvalidPasswordException\";\n ChangePasswordException[\"LimitExceededException\"] = \"LimitExceededException\";\n ChangePasswordException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ChangePasswordException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n ChangePasswordException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ChangePasswordException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ChangePasswordException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n ChangePasswordException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ChangePasswordException || (ChangePasswordException = {}));\nvar ConfirmDeviceException;\n(function (ConfirmDeviceException) {\n ConfirmDeviceException[\"ForbiddenException\"] = \"ForbiddenException\";\n ConfirmDeviceException[\"InternalErrorException\"] = \"InternalErrorException\";\n ConfirmDeviceException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n ConfirmDeviceException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ConfirmDeviceException[\"InvalidPasswordException\"] = \"InvalidPasswordException\";\n ConfirmDeviceException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n ConfirmDeviceException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ConfirmDeviceException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n ConfirmDeviceException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ConfirmDeviceException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ConfirmDeviceException[\"UsernameExistsException\"] = \"UsernameExistsException\";\n ConfirmDeviceException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n ConfirmDeviceException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ConfirmDeviceException || (ConfirmDeviceException = {}));\nvar ConfirmForgotPasswordException;\n(function (ConfirmForgotPasswordException) {\n ConfirmForgotPasswordException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n ConfirmForgotPasswordException[\"ExpiredCodeException\"] = \"ExpiredCodeException\";\n ConfirmForgotPasswordException[\"ForbiddenException\"] = \"ForbiddenException\";\n ConfirmForgotPasswordException[\"InternalErrorException\"] = \"InternalErrorException\";\n ConfirmForgotPasswordException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n ConfirmForgotPasswordException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ConfirmForgotPasswordException[\"InvalidPasswordException\"] = \"InvalidPasswordException\";\n ConfirmForgotPasswordException[\"LimitExceededException\"] = \"LimitExceededException\";\n ConfirmForgotPasswordException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ConfirmForgotPasswordException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ConfirmForgotPasswordException[\"TooManyFailedAttemptsException\"] = \"TooManyFailedAttemptsException\";\n ConfirmForgotPasswordException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ConfirmForgotPasswordException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n ConfirmForgotPasswordException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n ConfirmForgotPasswordException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n ConfirmForgotPasswordException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ConfirmForgotPasswordException || (ConfirmForgotPasswordException = {}));\nvar ConfirmSignUpException;\n(function (ConfirmSignUpException) {\n ConfirmSignUpException[\"AliasExistsException\"] = \"AliasExistsException\";\n ConfirmSignUpException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n ConfirmSignUpException[\"ExpiredCodeException\"] = \"ExpiredCodeException\";\n ConfirmSignUpException[\"ForbiddenException\"] = \"ForbiddenException\";\n ConfirmSignUpException[\"InternalErrorException\"] = \"InternalErrorException\";\n ConfirmSignUpException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n ConfirmSignUpException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ConfirmSignUpException[\"LimitExceededException\"] = \"LimitExceededException\";\n ConfirmSignUpException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ConfirmSignUpException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ConfirmSignUpException[\"TooManyFailedAttemptsException\"] = \"TooManyFailedAttemptsException\";\n ConfirmSignUpException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ConfirmSignUpException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n ConfirmSignUpException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n ConfirmSignUpException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ConfirmSignUpException || (ConfirmSignUpException = {}));\nvar DeleteUserAttributesException;\n(function (DeleteUserAttributesException) {\n DeleteUserAttributesException[\"ForbiddenException\"] = \"ForbiddenException\";\n DeleteUserAttributesException[\"InternalErrorException\"] = \"InternalErrorException\";\n DeleteUserAttributesException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n DeleteUserAttributesException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n DeleteUserAttributesException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n DeleteUserAttributesException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n DeleteUserAttributesException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n DeleteUserAttributesException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n DeleteUserAttributesException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(DeleteUserAttributesException || (DeleteUserAttributesException = {}));\nvar DeleteUserException;\n(function (DeleteUserException) {\n DeleteUserException[\"ForbiddenException\"] = \"ForbiddenException\";\n DeleteUserException[\"InternalErrorException\"] = \"InternalErrorException\";\n DeleteUserException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n DeleteUserException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n DeleteUserException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n DeleteUserException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n DeleteUserException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n DeleteUserException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n DeleteUserException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(DeleteUserException || (DeleteUserException = {}));\nvar ForgetDeviceException;\n(function (ForgetDeviceException) {\n ForgetDeviceException[\"ForbiddenException\"] = \"ForbiddenException\";\n ForgetDeviceException[\"InternalErrorException\"] = \"InternalErrorException\";\n ForgetDeviceException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ForgetDeviceException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n ForgetDeviceException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ForgetDeviceException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n ForgetDeviceException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ForgetDeviceException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ForgetDeviceException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n ForgetDeviceException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ForgetDeviceException || (ForgetDeviceException = {}));\nvar ForgotPasswordException;\n(function (ForgotPasswordException) {\n ForgotPasswordException[\"CodeDeliveryFailureException\"] = \"CodeDeliveryFailureException\";\n ForgotPasswordException[\"ForbiddenException\"] = \"ForbiddenException\";\n ForgotPasswordException[\"InternalErrorException\"] = \"InternalErrorException\";\n ForgotPasswordException[\"InvalidEmailRoleAccessPolicyException\"] = \"InvalidEmailRoleAccessPolicyException\";\n ForgotPasswordException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n ForgotPasswordException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ForgotPasswordException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n ForgotPasswordException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n ForgotPasswordException[\"LimitExceededException\"] = \"LimitExceededException\";\n ForgotPasswordException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ForgotPasswordException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ForgotPasswordException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ForgotPasswordException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n ForgotPasswordException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n ForgotPasswordException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ForgotPasswordException || (ForgotPasswordException = {}));\nvar GetUserException;\n(function (GetUserException) {\n GetUserException[\"ForbiddenException\"] = \"ForbiddenException\";\n GetUserException[\"InternalErrorException\"] = \"InternalErrorException\";\n GetUserException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n GetUserException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n GetUserException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n GetUserException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n GetUserException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n GetUserException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n GetUserException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(GetUserException || (GetUserException = {}));\nvar GetIdException;\n(function (GetIdException) {\n GetIdException[\"ExternalServiceException\"] = \"ExternalServiceException\";\n GetIdException[\"InternalErrorException\"] = \"InternalErrorException\";\n GetIdException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n GetIdException[\"LimitExceededException\"] = \"LimitExceededException\";\n GetIdException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n GetIdException[\"ResourceConflictException\"] = \"ResourceConflictException\";\n GetIdException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n GetIdException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n})(GetIdException || (GetIdException = {}));\nvar GetCredentialsForIdentityException;\n(function (GetCredentialsForIdentityException) {\n GetCredentialsForIdentityException[\"ExternalServiceException\"] = \"ExternalServiceException\";\n GetCredentialsForIdentityException[\"InternalErrorException\"] = \"InternalErrorException\";\n GetCredentialsForIdentityException[\"InvalidIdentityPoolConfigurationException\"] = \"InvalidIdentityPoolConfigurationException\";\n GetCredentialsForIdentityException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n GetCredentialsForIdentityException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n GetCredentialsForIdentityException[\"ResourceConflictException\"] = \"ResourceConflictException\";\n GetCredentialsForIdentityException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n GetCredentialsForIdentityException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n})(GetCredentialsForIdentityException || (GetCredentialsForIdentityException = {}));\nvar GetUserAttributeVerificationException;\n(function (GetUserAttributeVerificationException) {\n GetUserAttributeVerificationException[\"CodeDeliveryFailureException\"] = \"CodeDeliveryFailureException\";\n GetUserAttributeVerificationException[\"ForbiddenException\"] = \"ForbiddenException\";\n GetUserAttributeVerificationException[\"InternalErrorException\"] = \"InternalErrorException\";\n GetUserAttributeVerificationException[\"InvalidEmailRoleAccessPolicyException\"] = \"InvalidEmailRoleAccessPolicyException\";\n GetUserAttributeVerificationException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n GetUserAttributeVerificationException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n GetUserAttributeVerificationException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n GetUserAttributeVerificationException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n GetUserAttributeVerificationException[\"LimitExceededException\"] = \"LimitExceededException\";\n GetUserAttributeVerificationException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n GetUserAttributeVerificationException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n GetUserAttributeVerificationException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n GetUserAttributeVerificationException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n GetUserAttributeVerificationException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n GetUserAttributeVerificationException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n GetUserAttributeVerificationException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n GetUserAttributeVerificationException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(GetUserAttributeVerificationException || (GetUserAttributeVerificationException = {}));\nvar GlobalSignOutException;\n(function (GlobalSignOutException) {\n GlobalSignOutException[\"ForbiddenException\"] = \"ForbiddenException\";\n GlobalSignOutException[\"InternalErrorException\"] = \"InternalErrorException\";\n GlobalSignOutException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n GlobalSignOutException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n GlobalSignOutException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n GlobalSignOutException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n GlobalSignOutException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n GlobalSignOutException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n})(GlobalSignOutException || (GlobalSignOutException = {}));\nvar InitiateAuthException;\n(function (InitiateAuthException) {\n InitiateAuthException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n InitiateAuthException[\"ForbiddenException\"] = \"ForbiddenException\";\n InitiateAuthException[\"InternalErrorException\"] = \"InternalErrorException\";\n InitiateAuthException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n InitiateAuthException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n InitiateAuthException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n InitiateAuthException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n InitiateAuthException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n InitiateAuthException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n InitiateAuthException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n InitiateAuthException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n InitiateAuthException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n InitiateAuthException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n InitiateAuthException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n InitiateAuthException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(InitiateAuthException || (InitiateAuthException = {}));\nvar ResendConfirmationException;\n(function (ResendConfirmationException) {\n ResendConfirmationException[\"CodeDeliveryFailureException\"] = \"CodeDeliveryFailureException\";\n ResendConfirmationException[\"ForbiddenException\"] = \"ForbiddenException\";\n ResendConfirmationException[\"InternalErrorException\"] = \"InternalErrorException\";\n ResendConfirmationException[\"InvalidEmailRoleAccessPolicyException\"] = \"InvalidEmailRoleAccessPolicyException\";\n ResendConfirmationException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n ResendConfirmationException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ResendConfirmationException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n ResendConfirmationException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n ResendConfirmationException[\"LimitExceededException\"] = \"LimitExceededException\";\n ResendConfirmationException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ResendConfirmationException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ResendConfirmationException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ResendConfirmationException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n ResendConfirmationException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n ResendConfirmationException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ResendConfirmationException || (ResendConfirmationException = {}));\nvar RespondToAuthChallengeException;\n(function (RespondToAuthChallengeException) {\n RespondToAuthChallengeException[\"AliasExistsException\"] = \"AliasExistsException\";\n RespondToAuthChallengeException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n RespondToAuthChallengeException[\"ExpiredCodeException\"] = \"ExpiredCodeException\";\n RespondToAuthChallengeException[\"ForbiddenException\"] = \"ForbiddenException\";\n RespondToAuthChallengeException[\"InternalErrorException\"] = \"InternalErrorException\";\n RespondToAuthChallengeException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n RespondToAuthChallengeException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n RespondToAuthChallengeException[\"InvalidPasswordException\"] = \"InvalidPasswordException\";\n RespondToAuthChallengeException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n RespondToAuthChallengeException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n RespondToAuthChallengeException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n RespondToAuthChallengeException[\"MFAMethodNotFoundException\"] = \"MFAMethodNotFoundException\";\n RespondToAuthChallengeException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n RespondToAuthChallengeException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n RespondToAuthChallengeException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n RespondToAuthChallengeException[\"SoftwareTokenMFANotFoundException\"] = \"SoftwareTokenMFANotFoundException\";\n RespondToAuthChallengeException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n RespondToAuthChallengeException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n RespondToAuthChallengeException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n RespondToAuthChallengeException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n RespondToAuthChallengeException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(RespondToAuthChallengeException || (RespondToAuthChallengeException = {}));\nvar SetUserMFAPreferenceException;\n(function (SetUserMFAPreferenceException) {\n SetUserMFAPreferenceException[\"ForbiddenException\"] = \"ForbiddenException\";\n SetUserMFAPreferenceException[\"InternalErrorException\"] = \"InternalErrorException\";\n SetUserMFAPreferenceException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n SetUserMFAPreferenceException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n SetUserMFAPreferenceException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n SetUserMFAPreferenceException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n SetUserMFAPreferenceException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n SetUserMFAPreferenceException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(SetUserMFAPreferenceException || (SetUserMFAPreferenceException = {}));\nvar SignUpException;\n(function (SignUpException) {\n SignUpException[\"CodeDeliveryFailureException\"] = \"CodeDeliveryFailureException\";\n SignUpException[\"InternalErrorException\"] = \"InternalErrorException\";\n SignUpException[\"InvalidEmailRoleAccessPolicyException\"] = \"InvalidEmailRoleAccessPolicyException\";\n SignUpException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n SignUpException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n SignUpException[\"InvalidPasswordException\"] = \"InvalidPasswordException\";\n SignUpException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n SignUpException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n SignUpException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n SignUpException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n SignUpException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n SignUpException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n SignUpException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n SignUpException[\"UsernameExistsException\"] = \"UsernameExistsException\";\n})(SignUpException || (SignUpException = {}));\nvar UpdateUserAttributesException;\n(function (UpdateUserAttributesException) {\n UpdateUserAttributesException[\"AliasExistsException\"] = \"AliasExistsException\";\n UpdateUserAttributesException[\"CodeDeliveryFailureException\"] = \"CodeDeliveryFailureException\";\n UpdateUserAttributesException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n UpdateUserAttributesException[\"ExpiredCodeException\"] = \"ExpiredCodeException\";\n UpdateUserAttributesException[\"ForbiddenException\"] = \"ForbiddenException\";\n UpdateUserAttributesException[\"InternalErrorException\"] = \"InternalErrorException\";\n UpdateUserAttributesException[\"InvalidEmailRoleAccessPolicyException\"] = \"InvalidEmailRoleAccessPolicyException\";\n UpdateUserAttributesException[\"InvalidLambdaResponseException\"] = \"InvalidLambdaResponseException\";\n UpdateUserAttributesException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n UpdateUserAttributesException[\"InvalidSmsRoleAccessPolicyException\"] = \"InvalidSmsRoleAccessPolicyException\";\n UpdateUserAttributesException[\"InvalidSmsRoleTrustRelationshipException\"] = \"InvalidSmsRoleTrustRelationshipException\";\n UpdateUserAttributesException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n UpdateUserAttributesException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n UpdateUserAttributesException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n UpdateUserAttributesException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n UpdateUserAttributesException[\"UnexpectedLambdaException\"] = \"UnexpectedLambdaException\";\n UpdateUserAttributesException[\"UserLambdaValidationException\"] = \"UserLambdaValidationException\";\n UpdateUserAttributesException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n UpdateUserAttributesException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(UpdateUserAttributesException || (UpdateUserAttributesException = {}));\nvar VerifySoftwareTokenException;\n(function (VerifySoftwareTokenException) {\n VerifySoftwareTokenException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n VerifySoftwareTokenException[\"EnableSoftwareTokenMFAException\"] = \"EnableSoftwareTokenMFAException\";\n VerifySoftwareTokenException[\"ForbiddenException\"] = \"ForbiddenException\";\n VerifySoftwareTokenException[\"InternalErrorException\"] = \"InternalErrorException\";\n VerifySoftwareTokenException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n VerifySoftwareTokenException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n VerifySoftwareTokenException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n VerifySoftwareTokenException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n VerifySoftwareTokenException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n VerifySoftwareTokenException[\"SoftwareTokenMFANotFoundException\"] = \"SoftwareTokenMFANotFoundException\";\n VerifySoftwareTokenException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n VerifySoftwareTokenException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n VerifySoftwareTokenException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(VerifySoftwareTokenException || (VerifySoftwareTokenException = {}));\nvar VerifyUserAttributeException;\n(function (VerifyUserAttributeException) {\n VerifyUserAttributeException[\"AliasExistsException\"] = \"AliasExistsException\";\n VerifyUserAttributeException[\"CodeMismatchException\"] = \"CodeMismatchException\";\n VerifyUserAttributeException[\"ExpiredCodeException\"] = \"ExpiredCodeException\";\n VerifyUserAttributeException[\"ForbiddenException\"] = \"ForbiddenException\";\n VerifyUserAttributeException[\"InternalErrorException\"] = \"InternalErrorException\";\n VerifyUserAttributeException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n VerifyUserAttributeException[\"LimitExceededException\"] = \"LimitExceededException\";\n VerifyUserAttributeException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n VerifyUserAttributeException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n VerifyUserAttributeException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n VerifyUserAttributeException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n VerifyUserAttributeException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n VerifyUserAttributeException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(VerifyUserAttributeException || (VerifyUserAttributeException = {}));\nvar UpdateDeviceStatusException;\n(function (UpdateDeviceStatusException) {\n UpdateDeviceStatusException[\"ForbiddenException\"] = \"ForbiddenException\";\n UpdateDeviceStatusException[\"InternalErrorException\"] = \"InternalErrorException\";\n UpdateDeviceStatusException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n UpdateDeviceStatusException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n UpdateDeviceStatusException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n UpdateDeviceStatusException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n UpdateDeviceStatusException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n UpdateDeviceStatusException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n UpdateDeviceStatusException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n UpdateDeviceStatusException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(UpdateDeviceStatusException || (UpdateDeviceStatusException = {}));\nvar ListDevicesException;\n(function (ListDevicesException) {\n ListDevicesException[\"ForbiddenException\"] = \"ForbiddenException\";\n ListDevicesException[\"InternalErrorException\"] = \"InternalErrorException\";\n ListDevicesException[\"InvalidParameterException\"] = \"InvalidParameterException\";\n ListDevicesException[\"InvalidUserPoolConfigurationException\"] = \"InvalidUserPoolConfigurationException\";\n ListDevicesException[\"NotAuthorizedException\"] = \"NotAuthorizedException\";\n ListDevicesException[\"PasswordResetRequiredException\"] = \"PasswordResetRequiredException\";\n ListDevicesException[\"ResourceNotFoundException\"] = \"ResourceNotFoundException\";\n ListDevicesException[\"TooManyRequestsException\"] = \"TooManyRequestsException\";\n ListDevicesException[\"UserNotConfirmedException\"] = \"UserNotConfirmedException\";\n ListDevicesException[\"UserNotFoundException\"] = \"UserNotFoundException\";\n})(ListDevicesException || (ListDevicesException = {}));\nconst SETUP_TOTP_EXCEPTION = 'SetUpTOTPException';\n\nexport { AssociateSoftwareTokenException, ChangePasswordException, ConfirmDeviceException, ConfirmForgotPasswordException, ConfirmSignUpException, DeleteUserAttributesException, DeleteUserException, ForgetDeviceException, ForgotPasswordException, GetCredentialsForIdentityException, GetIdException, GetUserAttributeVerificationException, GetUserException, GlobalSignOutException, InitiateAuthException, ListDevicesException, ResendConfirmationException, RespondToAuthChallengeException, SETUP_TOTP_EXCEPTION, SetUserMFAPreferenceException, SignUpException, UpdateDeviceStatusException, UpdateUserAttributesException, VerifySoftwareTokenException, VerifyUserAttributeException };\n//# sourceMappingURL=errors.mjs.map\n","import { AuthError } from './AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst USER_UNAUTHENTICATED_EXCEPTION = 'UserUnAuthenticatedException';\nconst USER_ALREADY_AUTHENTICATED_EXCEPTION = 'UserAlreadyAuthenticatedException';\nconst DEVICE_METADATA_NOT_FOUND_EXCEPTION = 'DeviceMetadataNotFoundException';\nconst AUTO_SIGN_IN_EXCEPTION = 'AutoSignInException';\nconst INVALID_REDIRECT_EXCEPTION = 'InvalidRedirectException';\nconst INVALID_APP_SCHEME_EXCEPTION = 'InvalidAppSchemeException';\nconst INVALID_PREFERRED_REDIRECT_EXCEPTION = 'InvalidPreferredRedirectUrlException';\nconst invalidRedirectException = new AuthError({\n name: INVALID_REDIRECT_EXCEPTION,\n message: 'signInRedirect or signOutRedirect had an invalid format or was not found.',\n recoverySuggestion: 'Please make sure the signIn/Out redirect in your oauth config is valid.',\n});\nconst invalidAppSchemeException = new AuthError({\n name: INVALID_APP_SCHEME_EXCEPTION,\n message: 'A valid non-http app scheme was not found in the config.',\n recoverySuggestion: 'Please make sure a valid custom app scheme is present in the config.',\n});\nconst invalidPreferredRedirectUrlException = new AuthError({\n name: INVALID_PREFERRED_REDIRECT_EXCEPTION,\n message: 'The given preferredRedirectUrl does not match any items in the redirectSignOutUrls array from the config.',\n recoverySuggestion: 'Please make sure a matching preferredRedirectUrl is provided.',\n});\nconst INVALID_ORIGIN_EXCEPTION = 'InvalidOriginException';\nconst invalidOriginException = new AuthError({\n name: INVALID_ORIGIN_EXCEPTION,\n message: 'redirect is coming from a different origin. The oauth flow needs to be initiated from the same origin',\n recoverySuggestion: 'Please call signInWithRedirect from the same origin.',\n});\nconst OAUTH_SIGNOUT_EXCEPTION = 'OAuthSignOutException';\nconst TOKEN_REFRESH_EXCEPTION = 'TokenRefreshException';\nconst UNEXPECTED_SIGN_IN_INTERRUPTION_EXCEPTION = 'UnexpectedSignInInterruptionException';\n\nexport { AUTO_SIGN_IN_EXCEPTION, DEVICE_METADATA_NOT_FOUND_EXCEPTION, INVALID_APP_SCHEME_EXCEPTION, INVALID_ORIGIN_EXCEPTION, INVALID_PREFERRED_REDIRECT_EXCEPTION, INVALID_REDIRECT_EXCEPTION, OAUTH_SIGNOUT_EXCEPTION, TOKEN_REFRESH_EXCEPTION, UNEXPECTED_SIGN_IN_INTERRUPTION_EXCEPTION, USER_ALREADY_AUTHENTICATED_EXCEPTION, USER_UNAUTHENTICATED_EXCEPTION, invalidAppSchemeException, invalidOriginException, invalidPreferredRedirectUrlException, invalidRedirectException };\n//# sourceMappingURL=constants.mjs.map\n","import { Amplify } from '@aws-amplify/core';\nimport { getCurrentUser as getCurrentUser$1 } from './internal/getCurrentUser.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Gets the current user from the idToken.\n *\n * @param input - The GetCurrentUserInput object.\n * @returns GetCurrentUserOutput\n * @throws - {@link InitiateAuthException} - Thrown when the service fails to refresh the tokens.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nconst getCurrentUser = async () => {\n return getCurrentUser$1(Amplify);\n};\n\nexport { getCurrentUser };\n//# sourceMappingURL=getCurrentUser.mjs.map\n","import { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { assertAuthTokens } from '../../utils/types.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst getCurrentUser = async (amplify) => {\n const authConfig = amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const tokens = await amplify.Auth.getTokens({ forceRefresh: false });\n assertAuthTokens(tokens);\n const { 'cognito:username': username, sub } = tokens.idToken?.payload ?? {};\n const authUser = {\n username: username,\n userId: sub,\n };\n const signInDetails = getSignInDetailsFromTokens(tokens);\n if (signInDetails) {\n authUser.signInDetails = signInDetails;\n }\n return authUser;\n};\nfunction getSignInDetailsFromTokens(tokens) {\n return tokens?.signInDetails;\n}\n\nexport { getCurrentUser };\n//# sourceMappingURL=getCurrentUser.mjs.map\n","import { AuthError } from '../../../errors/AuthError.mjs';\nimport { TOKEN_REFRESH_EXCEPTION, USER_UNAUTHENTICATED_EXCEPTION, DEVICE_METADATA_NOT_FOUND_EXCEPTION } from '../../../errors/constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction isTypeUserPoolConfig(authConfig) {\n if (authConfig &&\n authConfig.Cognito.userPoolId &&\n authConfig.Cognito.userPoolClientId) {\n return true;\n }\n return false;\n}\nfunction assertAuthTokens(tokens) {\n if (!tokens || !tokens.accessToken) {\n throw new AuthError({\n name: USER_UNAUTHENTICATED_EXCEPTION,\n message: 'User needs to be authenticated to call this API.',\n recoverySuggestion: 'Sign in before calling this API again.',\n });\n }\n}\nfunction assertIdTokenInAuthTokens(tokens) {\n if (!tokens || !tokens.idToken) {\n throw new AuthError({\n name: USER_UNAUTHENTICATED_EXCEPTION,\n message: 'User needs to be authenticated to call this API.',\n recoverySuggestion: 'Sign in before calling this API again.',\n });\n }\n}\nconst oAuthTokenRefreshException = new AuthError({\n name: TOKEN_REFRESH_EXCEPTION,\n message: `Token refresh is not supported when authenticated with the 'implicit grant' (token) oauth flow. \n\tPlease change your oauth configuration to use 'code grant' flow.`,\n recoverySuggestion: `Please logout and change your Amplify configuration to use \"code grant\" flow. \n\tE.g { responseType: 'code' }`,\n});\nconst tokenRefreshException = new AuthError({\n name: USER_UNAUTHENTICATED_EXCEPTION,\n message: 'User needs to be authenticated to call this API.',\n recoverySuggestion: 'Sign in before calling this API again.',\n});\nfunction assertAuthTokensWithRefreshToken(tokens) {\n if (isAuthenticatedWithImplicitOauthFlow(tokens)) {\n throw oAuthTokenRefreshException;\n }\n if (!isAuthenticatedWithRefreshToken(tokens)) {\n throw tokenRefreshException;\n }\n}\nfunction assertDeviceMetadata(deviceMetadata) {\n if (!deviceMetadata ||\n !deviceMetadata.deviceKey ||\n !deviceMetadata.deviceGroupKey ||\n !deviceMetadata.randomPassword) {\n throw new AuthError({\n name: DEVICE_METADATA_NOT_FOUND_EXCEPTION,\n message: 'Either deviceKey, deviceGroupKey or secretPassword were not found during the sign-in process.',\n recoverySuggestion: 'Make sure to not clear storage after calling the signIn API.',\n });\n }\n}\nconst OAuthStorageKeys = {\n inflightOAuth: 'inflightOAuth',\n oauthSignIn: 'oauthSignIn',\n oauthPKCE: 'oauthPKCE',\n oauthState: 'oauthState',\n};\nfunction isAuthenticated(tokens) {\n return tokens?.accessToken || tokens?.idToken;\n}\nfunction isAuthenticatedWithRefreshToken(tokens) {\n return isAuthenticated(tokens) && tokens?.refreshToken;\n}\nfunction isAuthenticatedWithImplicitOauthFlow(tokens) {\n return isAuthenticated(tokens) && !tokens?.refreshToken;\n}\n\nexport { OAuthStorageKeys, assertAuthTokens, assertAuthTokensWithRefreshToken, assertDeviceMetadata, assertIdTokenInAuthTokens, isTypeUserPoolConfig, oAuthTokenRefreshException, tokenRefreshException };\n//# sourceMappingURL=types.mjs.map\n","import { getAmplifyUserAgent, Category } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst getAuthUserAgentValue = (action, customUserAgentDetails) => getAmplifyUserAgent({\n category: Category.Auth,\n action,\n ...customUserAgentDetails,\n});\n\nexport { getAuthUserAgentValue };\n//# sourceMappingURL=getAuthUserAgentValue.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createInitiateAuthClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('InitiateAuth'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createInitiateAuthClient };\n//# sourceMappingURL=createInitiateAuthClient.mjs.map\n","export { composeServiceApi } from './composeServiceApi.mjs';\nexport { composeTransferHandler } from './composeTransferHandler.mjs';\n//# sourceMappingURL=index.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createUserPoolSerializer = (operation) => (input, endpoint) => {\n const headers = getSharedHeaders(operation);\n const body = JSON.stringify(input);\n return buildHttpRpcRequest(endpoint, headers, body);\n};\nconst getSharedHeaders = (operation) => ({\n 'content-type': 'application/x-amz-json-1.1',\n 'x-amz-target': `AWSCognitoIdentityProviderService.${operation}`,\n});\nconst buildHttpRpcRequest = ({ url }, headers, body) => ({\n headers,\n url,\n body,\n method: 'POST',\n});\n\nexport { createUserPoolSerializer };\n//# sourceMappingURL=createUserPoolSerializer.mjs.map\n","import { parseJsonError, parseJsonBody } from '@aws-amplify/core/internals/aws-client-utils';\nimport { assertServiceError } from '../../../../../../errors/utils/assertServiceError.mjs';\nimport { AuthError } from '../../../../../../errors/AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createUserPoolDeserializer = () => async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n assertServiceError(error);\n throw new AuthError({ name: error.name, message: error.message });\n }\n return parseJsonBody(response);\n};\n\nexport { createUserPoolDeserializer };\n//# sourceMappingURL=createUserPoolDeserializer.mjs.map\n","export { getDnsSuffix } from './endpoints/getDnsSuffix.mjs';\nexport { fetchTransferHandler } from './handlers/fetch.mjs';\nexport { unauthenticatedHandler } from './handlers/unauthenticated.mjs';\nexport { authenticatedHandler } from './handlers/authenticated.mjs';\nexport { signRequest } from './middleware/signing/signer/signatureV4/signRequest.mjs';\nexport { presignUrl } from './middleware/signing/signer/signatureV4/presignUrl.mjs';\nexport { EMPTY_HASH as EMPTY_SHA256_HASH } from './middleware/signing/signer/signatureV4/constants.mjs';\nexport { getHashedPayload } from './middleware/signing/signer/signatureV4/utils/getHashedPayload.mjs';\nexport { extendedEncodeURIComponent } from './middleware/signing/utils/extendedEncodeURIComponent.mjs';\nexport { signingMiddlewareFactory } from './middleware/signing/middleware.mjs';\nexport { retryMiddlewareFactory } from './middleware/retry/middleware.mjs';\nexport { jitteredBackoff } from './middleware/retry/jitteredBackoff.mjs';\nexport { getRetryDecider } from './middleware/retry/defaultRetryDecider.mjs';\nexport { userAgentMiddlewareFactory } from './middleware/userAgent/middleware.mjs';\nexport { parseMetadata } from './serde/responseInfo.mjs';\nexport { parseJsonBody, parseJsonError } from './serde/json.mjs';\nexport { withMemoization } from './utils/memoization.mjs';\n//# sourceMappingURL=index.mjs.map\n","import { AmplifyErrorCode } from '@aws-amplify/core/internals/utils';\nimport { AuthError } from '../AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction assertServiceError(error) {\n if (!error ||\n error.name === 'Error' ||\n error instanceof TypeError) {\n throw new AuthError({\n name: AmplifyErrorCode.Unknown,\n message: 'An unknown error has occurred.',\n underlyingError: error,\n });\n }\n}\n\nexport { assertServiceError };\n//# sourceMappingURL=assertServiceError.mjs.map\n","import { composeTransferHandler } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { unauthenticatedHandler } from '@aws-amplify/core/internals/aws-client-utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * A Cognito Identity-specific middleware that disables caching for all requests.\n */\nconst disableCacheMiddlewareFactory = () => (next, _) => async function disableCacheMiddleware(request) {\n request.headers['cache-control'] = 'no-store';\n return next(request);\n};\n/**\n * A Cognito Identity-specific transfer handler that does NOT sign requests, and\n * disables caching.\n *\n * @internal\n */\nconst cognitoUserPoolTransferHandler = composeTransferHandler(unauthenticatedHandler, [disableCacheMiddlewareFactory]);\n\nexport { cognitoUserPoolTransferHandler };\n//# sourceMappingURL=cognitoUserPoolTransferHandler.mjs.map\n","import { getRetryDecider, parseJsonError, jitteredBackoff } from '@aws-amplify/core/internals/aws-client-utils';\nimport { getAmplifyUserAgent } from '@aws-amplify/core/internals/utils';\nimport { COGNITO_IDP_SERVICE_NAME } from '../../../constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst DEFAULT_SERVICE_CLIENT_API_CONFIG = {\n service: COGNITO_IDP_SERVICE_NAME,\n retryDecider: getRetryDecider(parseJsonError),\n computeDelay: jitteredBackoff,\n userAgentValue: getAmplifyUserAgent(),\n cache: 'no-store',\n};\n\nexport { DEFAULT_SERVICE_CLIENT_API_CONFIG };\n//# sourceMappingURL=constants.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * The service name used to sign requests if the API requires authentication.\n */\nconst COGNITO_IDP_SERVICE_NAME = 'cognito-idp';\n\nexport { COGNITO_IDP_SERVICE_NAME };\n//# sourceMappingURL=constants.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createRespondToAuthChallengeClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('RespondToAuthChallenge'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createRespondToAuthChallengeClient };\n//# sourceMappingURL=createRespondToAuthChallengeClient.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createVerifySoftwareTokenClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('VerifySoftwareToken'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createVerifySoftwareTokenClient };\n//# sourceMappingURL=createVerifySoftwareTokenClient.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createAssociateSoftwareTokenClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('AssociateSoftwareToken'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createAssociateSoftwareTokenClient };\n//# sourceMappingURL=createAssociateSoftwareTokenClient.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createConfirmDeviceClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('ConfirmDevice'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createConfirmDeviceClient };\n//# sourceMappingURL=createConfirmDeviceClient.mjs.map\n","import { AmplifyUrl } from '@aws-amplify/core/internals/utils';\nimport { cognitoUserPoolEndpointResolver } from '../../../foundation/cognitoUserPoolEndpointResolver.mjs';\n\nconst createCognitoUserPoolEndpointResolver = ({ endpointOverride }) => (input) => {\n if (endpointOverride) {\n return { url: new AmplifyUrl(endpointOverride) };\n }\n return cognitoUserPoolEndpointResolver(input);\n};\n\nexport { createCognitoUserPoolEndpointResolver };\n//# sourceMappingURL=createCognitoUserPoolEndpointResolver.mjs.map\n","import { getDnsSuffix } from '@aws-amplify/core/internals/aws-client-utils';\nimport { AmplifyUrl } from '@aws-amplify/core/internals/utils';\nimport { COGNITO_IDP_SERVICE_NAME } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst cognitoUserPoolEndpointResolver = ({ region, }) => ({\n url: new AmplifyUrl(`https://${COGNITO_IDP_SERVICE_NAME}.${region}.${getDnsSuffix(region)}`),\n});\n\nexport { cognitoUserPoolEndpointResolver };\n//# sourceMappingURL=cognitoUserPoolEndpointResolver.mjs.map\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { AuthErrorCodes } from '../../../common/AuthErrorStrings.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../../../providers/cognito/types/errors.mjs';\nimport { createRespondToAuthChallengeClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createRespondToAuthChallengeClient.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../../../providers/cognito/factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { cacheCognitoTokens } from '../../../providers/cognito/tokenProvider/cacheTokens.mjs';\nimport { dispatchSignedInHubEvent } from '../../../providers/cognito/utils/dispatchSignedInHubEvent.mjs';\nimport { getNewDeviceMetadata, getSignInResult } from '../../../providers/cognito/utils/signInHelpers.mjs';\nimport '../../utils/store/autoSignInStore.mjs';\nimport { signInStore, setActiveSignInState, cleanActiveSignInState } from '../../utils/store/signInStore.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport { assertPasskeyError, PasskeyErrorCode } from '../../utils/passkey/errors.mjs';\nimport { getPasskey } from '../../utils/passkey/getPasskey.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nasync function handleWebAuthnSignInResult(challengeParameters) {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { username, signInSession, signInDetails, challengeName } = signInStore.getState();\n if (challengeName !== 'WEB_AUTHN' || !username) {\n throw new AuthError({\n name: AuthErrorCodes.SignInException,\n message: 'Unable to proceed due to invalid sign in state.',\n });\n }\n const { CREDENTIAL_REQUEST_OPTIONS: credentialRequestOptions } = challengeParameters;\n assertPasskeyError(!!credentialRequestOptions, PasskeyErrorCode.InvalidPasskeyAuthenticationOptions);\n const cred = await getPasskey(JSON.parse(credentialRequestOptions));\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: authConfig.userPoolEndpoint,\n }),\n });\n const { ChallengeName: nextChallengeName, ChallengeParameters: nextChallengeParameters, AuthenticationResult: authenticationResult, Session: nextSession, } = await respondToAuthChallenge({\n region: getRegionFromUserPoolId(authConfig.userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, {\n ChallengeName: 'WEB_AUTHN',\n ChallengeResponses: {\n USERNAME: username,\n CREDENTIAL: JSON.stringify(cred),\n },\n ClientId: authConfig.userPoolClientId,\n Session: signInSession,\n });\n setActiveSignInState({\n signInSession: nextSession,\n username,\n challengeName: nextChallengeName,\n signInDetails,\n });\n if (authenticationResult) {\n await cacheCognitoTokens({\n ...authenticationResult,\n username,\n NewDeviceMetadata: await getNewDeviceMetadata({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: authenticationResult.NewDeviceMetadata,\n accessToken: authenticationResult.AccessToken,\n }),\n signInDetails,\n });\n cleanActiveSignInState();\n await dispatchSignedInHubEvent();\n return {\n isSignedIn: true,\n nextStep: { signInStep: 'DONE' },\n };\n }\n if (nextChallengeName === 'WEB_AUTHN') {\n throw new AuthError({\n name: AuthErrorCodes.SignInException,\n message: 'Sequential WEB_AUTHN challenges returned from underlying service cannot be handled.',\n });\n }\n return getSignInResult({\n challengeName: nextChallengeName,\n challengeParameters: nextChallengeParameters,\n });\n}\n\nexport { handleWebAuthnSignInResult };\n//# sourceMappingURL=handleWebAuthnSignInResult.mjs.map\n","import { decodeJWT, AmplifyError } from '@aws-amplify/core/internals/utils';\nimport { tokenOrchestrator } from './tokenProvider.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nasync function cacheCognitoTokens(AuthenticationResult) {\n if (AuthenticationResult.AccessToken) {\n const accessToken = decodeJWT(AuthenticationResult.AccessToken);\n const accessTokenIssuedAtInMillis = (accessToken.payload.iat || 0) * 1000;\n const currentTime = new Date().getTime();\n const clockDrift = accessTokenIssuedAtInMillis > 0\n ? accessTokenIssuedAtInMillis - currentTime\n : 0;\n let idToken;\n let refreshToken;\n let deviceMetadata;\n if (AuthenticationResult.RefreshToken) {\n refreshToken = AuthenticationResult.RefreshToken;\n }\n if (AuthenticationResult.IdToken) {\n idToken = decodeJWT(AuthenticationResult.IdToken);\n }\n if (AuthenticationResult?.NewDeviceMetadata) {\n deviceMetadata = AuthenticationResult.NewDeviceMetadata;\n }\n const tokens = {\n accessToken,\n idToken,\n refreshToken,\n clockDrift,\n deviceMetadata,\n username: AuthenticationResult.username,\n };\n if (AuthenticationResult?.signInDetails) {\n tokens.signInDetails = AuthenticationResult.signInDetails;\n }\n await tokenOrchestrator.setTokens({\n tokens,\n });\n }\n else {\n // This would be a service error\n throw new AmplifyError({\n message: 'Invalid tokens',\n name: 'InvalidTokens',\n recoverySuggestion: 'Check Cognito UserPool settings',\n });\n }\n}\n\nexport { cacheCognitoTokens };\n//# sourceMappingURL=cacheTokens.mjs.map\n","import { CognitoUserPoolsTokenProvider } from './CognitoUserPoolsTokenProvider.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * The default provider for the JWT access token and ID token issued from the configured Cognito user pool. It manages\n * the refresh and storage of the tokens. It stores the tokens in `window.localStorage` if available, and falls back to\n * in-memory storage if not.\n */\nconst cognitoUserPoolsTokenProvider = new CognitoUserPoolsTokenProvider();\nconst { tokenOrchestrator } = cognitoUserPoolsTokenProvider;\n\nexport { cognitoUserPoolsTokenProvider, tokenOrchestrator };\n//# sourceMappingURL=tokenProvider.mjs.map\n","import { defaultStorage } from '@aws-amplify/core';\nimport { refreshAuthTokens } from '../utils/refreshAuthTokens.mjs';\nimport { DefaultTokenStore } from './TokenStore.mjs';\nimport { TokenOrchestrator } from './TokenOrchestrator.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass CognitoUserPoolsTokenProvider {\n constructor() {\n this.authTokenStore = new DefaultTokenStore();\n this.authTokenStore.setKeyValueStorage(defaultStorage);\n this.tokenOrchestrator = new TokenOrchestrator();\n this.tokenOrchestrator.setAuthTokenStore(this.authTokenStore);\n this.tokenOrchestrator.setTokenRefresher(refreshAuthTokens);\n }\n getTokens({ forceRefresh } = { forceRefresh: false }) {\n return this.tokenOrchestrator.getTokens({ forceRefresh });\n }\n setKeyValueStorage(keyValueStorage) {\n this.authTokenStore.setKeyValueStorage(keyValueStorage);\n }\n setAuthConfig(authConfig) {\n this.authTokenStore.setAuthConfig(authConfig);\n this.tokenOrchestrator.setAuthConfig(authConfig);\n }\n}\n\nexport { CognitoUserPoolsTokenProvider };\n//# sourceMappingURL=CognitoUserPoolsTokenProvider.mjs.map\n","import { deDupeAsyncFunction, assertTokenProviderConfig, decodeJWT } from '@aws-amplify/core/internals/utils';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { assertAuthTokensWithRefreshToken } from './types.mjs';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { createInitiateAuthClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createInitiateAuthClient.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../types/errors.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { getUserContextData } from './userContextData.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst refreshAuthTokensFunction = async ({ tokens, authConfig, username, }) => {\n assertTokenProviderConfig(authConfig?.Cognito);\n const { userPoolId, userPoolClientId, userPoolEndpoint } = authConfig.Cognito;\n const region = getRegionFromUserPoolId(userPoolId);\n assertAuthTokensWithRefreshToken(tokens);\n const refreshTokenString = tokens.refreshToken;\n const AuthParameters = {\n REFRESH_TOKEN: refreshTokenString,\n };\n if (tokens.deviceMetadata?.deviceKey) {\n AuthParameters.DEVICE_KEY = tokens.deviceMetadata.deviceKey;\n }\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const initiateAuth = createInitiateAuthClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { AuthenticationResult } = await initiateAuth({ region }, {\n ClientId: userPoolClientId,\n AuthFlow: 'REFRESH_TOKEN_AUTH',\n AuthParameters,\n UserContextData,\n });\n const accessToken = decodeJWT(AuthenticationResult?.AccessToken ?? '');\n const idToken = AuthenticationResult?.IdToken\n ? decodeJWT(AuthenticationResult.IdToken)\n : undefined;\n const { iat } = accessToken.payload;\n // This should never happen. If it does, it's a bug from the service.\n if (!iat) {\n throw new AuthError({\n name: 'iatNotFoundException',\n message: 'iat not found in access token',\n });\n }\n const clockDrift = iat * 1000 - new Date().getTime();\n return {\n accessToken,\n idToken,\n clockDrift,\n refreshToken: refreshTokenString,\n username,\n };\n};\nconst refreshAuthTokens = deDupeAsyncFunction(refreshAuthTokensFunction);\nconst refreshAuthTokensWithoutDedupe = refreshAuthTokensFunction;\n\nexport { refreshAuthTokens, refreshAuthTokensWithoutDedupe };\n//# sourceMappingURL=refreshAuthTokens.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction getUserContextData({ username, userPoolId, userPoolClientId, }) {\n if (typeof window === 'undefined') {\n return undefined;\n }\n const amazonCognitoAdvancedSecurityData = window\n .AmazonCognitoAdvancedSecurityData;\n if (typeof amazonCognitoAdvancedSecurityData === 'undefined') {\n return undefined;\n }\n const advancedSecurityData = amazonCognitoAdvancedSecurityData.getData(username, userPoolId, userPoolClientId);\n if (advancedSecurityData) {\n const userContextData = {\n EncodedData: advancedSecurityData,\n };\n return userContextData;\n }\n return {};\n}\n\nexport { getUserContextData };\n//# sourceMappingURL=userContextData.mjs.map\n","import { decodeJWT, assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { AuthTokenStorageKeys } from './types.mjs';\nimport { assert, TokenProviderErrorCode } from './errorHelpers.mjs';\n\nclass DefaultTokenStore {\n constructor() {\n this.name = 'CognitoIdentityServiceProvider'; // To be backwards compatible with V5, no migration needed\n }\n getKeyValueStorage() {\n if (!this.keyValueStorage) {\n throw new AuthError({\n name: 'KeyValueStorageNotFoundException',\n message: 'KeyValueStorage was not found in TokenStore',\n });\n }\n return this.keyValueStorage;\n }\n setKeyValueStorage(keyValueStorage) {\n this.keyValueStorage = keyValueStorage;\n }\n setAuthConfig(authConfig) {\n this.authConfig = authConfig;\n }\n async loadTokens() {\n // TODO(v6): migration logic should be here\n // Reading V5 tokens old format\n try {\n const authKeys = await this.getAuthKeys();\n const accessTokenString = await this.getKeyValueStorage().getItem(authKeys.accessToken);\n if (!accessTokenString) {\n throw new AuthError({\n name: 'NoSessionFoundException',\n message: 'Auth session was not found. Make sure to call signIn.',\n });\n }\n const accessToken = decodeJWT(accessTokenString);\n const itString = await this.getKeyValueStorage().getItem(authKeys.idToken);\n const idToken = itString ? decodeJWT(itString) : undefined;\n const refreshToken = (await this.getKeyValueStorage().getItem(authKeys.refreshToken)) ??\n undefined;\n const clockDriftString = (await this.getKeyValueStorage().getItem(authKeys.clockDrift)) ?? '0';\n const clockDrift = Number.parseInt(clockDriftString);\n const signInDetails = await this.getKeyValueStorage().getItem(authKeys.signInDetails);\n const tokens = {\n accessToken,\n idToken,\n refreshToken,\n deviceMetadata: (await this.getDeviceMetadata()) ?? undefined,\n clockDrift,\n username: await this.getLastAuthUser(),\n };\n if (signInDetails) {\n tokens.signInDetails = JSON.parse(signInDetails);\n }\n return tokens;\n }\n catch (err) {\n return null;\n }\n }\n async storeTokens(tokens) {\n assert(tokens !== undefined, TokenProviderErrorCode.InvalidAuthTokens);\n await this.clearTokens();\n const lastAuthUser = tokens.username;\n await this.getKeyValueStorage().setItem(this.getLastAuthUserKey(), lastAuthUser);\n const authKeys = await this.getAuthKeys();\n await this.getKeyValueStorage().setItem(authKeys.accessToken, tokens.accessToken.toString());\n if (tokens.idToken) {\n await this.getKeyValueStorage().setItem(authKeys.idToken, tokens.idToken.toString());\n }\n if (tokens.refreshToken) {\n await this.getKeyValueStorage().setItem(authKeys.refreshToken, tokens.refreshToken);\n }\n if (tokens.deviceMetadata) {\n if (tokens.deviceMetadata.deviceKey) {\n await this.getKeyValueStorage().setItem(authKeys.deviceKey, tokens.deviceMetadata.deviceKey);\n }\n if (tokens.deviceMetadata.deviceGroupKey) {\n await this.getKeyValueStorage().setItem(authKeys.deviceGroupKey, tokens.deviceMetadata.deviceGroupKey);\n }\n await this.getKeyValueStorage().setItem(authKeys.randomPasswordKey, tokens.deviceMetadata.randomPassword);\n }\n if (tokens.signInDetails) {\n await this.getKeyValueStorage().setItem(authKeys.signInDetails, JSON.stringify(tokens.signInDetails));\n }\n await this.getKeyValueStorage().setItem(authKeys.clockDrift, `${tokens.clockDrift}`);\n }\n async clearTokens() {\n const authKeys = await this.getAuthKeys();\n // Not calling clear because it can remove data that is not managed by AuthTokenStore\n await Promise.all([\n this.getKeyValueStorage().removeItem(authKeys.accessToken),\n this.getKeyValueStorage().removeItem(authKeys.idToken),\n this.getKeyValueStorage().removeItem(authKeys.clockDrift),\n this.getKeyValueStorage().removeItem(authKeys.refreshToken),\n this.getKeyValueStorage().removeItem(authKeys.signInDetails),\n this.getKeyValueStorage().removeItem(this.getLastAuthUserKey()),\n this.getKeyValueStorage().removeItem(authKeys.oauthMetadata),\n ]);\n }\n async getDeviceMetadata(username) {\n const authKeys = await this.getAuthKeys(username);\n const deviceKey = await this.getKeyValueStorage().getItem(authKeys.deviceKey);\n const deviceGroupKey = await this.getKeyValueStorage().getItem(authKeys.deviceGroupKey);\n const randomPassword = await this.getKeyValueStorage().getItem(authKeys.randomPasswordKey);\n return randomPassword && deviceGroupKey && deviceKey\n ? {\n deviceKey,\n deviceGroupKey,\n randomPassword,\n }\n : null;\n }\n async clearDeviceMetadata(username) {\n const authKeys = await this.getAuthKeys(username);\n await Promise.all([\n this.getKeyValueStorage().removeItem(authKeys.deviceKey),\n this.getKeyValueStorage().removeItem(authKeys.deviceGroupKey),\n this.getKeyValueStorage().removeItem(authKeys.randomPasswordKey),\n ]);\n }\n async getAuthKeys(username) {\n assertTokenProviderConfig(this.authConfig?.Cognito);\n const lastAuthUser = username ?? (await this.getLastAuthUser());\n return createKeysForAuthStorage(this.name, `${this.authConfig.Cognito.userPoolClientId}.${lastAuthUser}`);\n }\n getLastAuthUserKey() {\n assertTokenProviderConfig(this.authConfig?.Cognito);\n const identifier = this.authConfig.Cognito.userPoolClientId;\n return `${this.name}.${identifier}.LastAuthUser`;\n }\n async getLastAuthUser() {\n const lastAuthUser = (await this.getKeyValueStorage().getItem(this.getLastAuthUserKey())) ??\n 'username';\n return lastAuthUser;\n }\n async setOAuthMetadata(metadata) {\n const { oauthMetadata: oauthMetadataKey } = await this.getAuthKeys();\n await this.getKeyValueStorage().setItem(oauthMetadataKey, JSON.stringify(metadata));\n }\n async getOAuthMetadata() {\n const { oauthMetadata: oauthMetadataKey } = await this.getAuthKeys();\n const oauthMetadata = await this.getKeyValueStorage().getItem(oauthMetadataKey);\n return oauthMetadata && JSON.parse(oauthMetadata);\n }\n}\nconst createKeysForAuthStorage = (provider, identifier) => {\n return getAuthStorageKeys(AuthTokenStorageKeys)(`${provider}`, identifier);\n};\nfunction getAuthStorageKeys(authKeys) {\n const keys = Object.values({ ...authKeys });\n return (prefix, identifier) => keys.reduce((acc, authKey) => ({\n ...acc,\n [authKey]: `${prefix}.${identifier}.${authKey}`,\n }), {});\n}\n\nexport { DefaultTokenStore, createKeysForAuthStorage, getAuthStorageKeys };\n//# sourceMappingURL=TokenStore.mjs.map\n","const AuthTokenStorageKeys = {\n accessToken: 'accessToken',\n idToken: 'idToken',\n oidcProvider: 'oidcProvider',\n clockDrift: 'clockDrift',\n refreshToken: 'refreshToken',\n deviceKey: 'deviceKey',\n randomPasswordKey: 'randomPasswordKey',\n deviceGroupKey: 'deviceGroupKey',\n signInDetails: 'signInDetails',\n oauthMetadata: 'oauthMetadata',\n};\n\nexport { AuthTokenStorageKeys };\n//# sourceMappingURL=types.mjs.map\n","import { createAssertionFunction } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar TokenProviderErrorCode;\n(function (TokenProviderErrorCode) {\n TokenProviderErrorCode[\"InvalidAuthTokens\"] = \"InvalidAuthTokens\";\n})(TokenProviderErrorCode || (TokenProviderErrorCode = {}));\nconst tokenValidationErrorMap = {\n [TokenProviderErrorCode.InvalidAuthTokens]: {\n message: 'Invalid tokens.',\n recoverySuggestion: 'Make sure the tokens are valid.',\n },\n};\nconst assert = createAssertionFunction(tokenValidationErrorMap);\n\nexport { TokenProviderErrorCode, assert };\n//# sourceMappingURL=errorHelpers.mjs.map\n","import { Hub } from '@aws-amplify/core';\nimport { isBrowser, assertTokenProviderConfig, isTokenExpired, AMPLIFY_SYMBOL, AmplifyErrorCode } from '@aws-amplify/core/internals/utils';\nimport { assertServiceError } from '../../../errors/utils/assertServiceError.mjs';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { oAuthStore } from '../utils/oauth/oAuthStore.mjs';\nimport { addInflightPromise } from '../utils/oauth/inflightPromise.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass TokenOrchestrator {\n constructor() {\n this.waitForInflightOAuth = isBrowser()\n ? async () => {\n if (!(await oAuthStore.loadOAuthInFlight())) {\n return;\n }\n if (this.inflightPromise) {\n return this.inflightPromise;\n }\n // when there is valid oauth config and there is an inflight oauth flow, try\n // to block async calls that require fetching tokens before the oauth flow completes\n // e.g. getCurrentUser, fetchAuthSession etc.\n this.inflightPromise = new Promise((resolve, _reject) => {\n addInflightPromise(resolve);\n });\n return this.inflightPromise;\n }\n : async () => {\n // no-op for non-browser environments\n };\n }\n setAuthConfig(authConfig) {\n oAuthStore.setAuthConfig(authConfig.Cognito);\n this.authConfig = authConfig;\n }\n setTokenRefresher(tokenRefresher) {\n this.tokenRefresher = tokenRefresher;\n }\n setAuthTokenStore(tokenStore) {\n this.tokenStore = tokenStore;\n }\n getTokenStore() {\n if (!this.tokenStore) {\n throw new AuthError({\n name: 'EmptyTokenStoreException',\n message: 'TokenStore not set',\n });\n }\n return this.tokenStore;\n }\n getTokenRefresher() {\n if (!this.tokenRefresher) {\n throw new AuthError({\n name: 'EmptyTokenRefresherException',\n message: 'TokenRefresher not set',\n });\n }\n return this.tokenRefresher;\n }\n async getTokens(options) {\n let tokens;\n try {\n assertTokenProviderConfig(this.authConfig?.Cognito);\n }\n catch (_err) {\n // Token provider not configured\n return null;\n }\n await this.waitForInflightOAuth();\n this.inflightPromise = undefined;\n tokens = await this.getTokenStore().loadTokens();\n const username = await this.getTokenStore().getLastAuthUser();\n if (tokens === null) {\n return null;\n }\n const idTokenExpired = !!tokens?.idToken &&\n isTokenExpired({\n expiresAt: (tokens.idToken?.payload?.exp ?? 0) * 1000,\n clockDrift: tokens.clockDrift ?? 0,\n });\n const accessTokenExpired = isTokenExpired({\n expiresAt: (tokens.accessToken?.payload?.exp ?? 0) * 1000,\n clockDrift: tokens.clockDrift ?? 0,\n });\n if (options?.forceRefresh || idTokenExpired || accessTokenExpired) {\n tokens = await this.refreshTokens({\n tokens,\n username,\n });\n if (tokens === null) {\n return null;\n }\n }\n return {\n accessToken: tokens?.accessToken,\n idToken: tokens?.idToken,\n signInDetails: tokens?.signInDetails,\n };\n }\n async refreshTokens({ tokens, username, }) {\n try {\n const { signInDetails } = tokens;\n const newTokens = await this.getTokenRefresher()({\n tokens,\n authConfig: this.authConfig,\n username,\n });\n newTokens.signInDetails = signInDetails;\n await this.setTokens({ tokens: newTokens });\n Hub.dispatch('auth', { event: 'tokenRefresh' }, 'Auth', AMPLIFY_SYMBOL);\n return newTokens;\n }\n catch (err) {\n return this.handleErrors(err);\n }\n }\n handleErrors(err) {\n assertServiceError(err);\n if (err.name !== AmplifyErrorCode.NetworkError) {\n // TODO(v6): Check errors on client\n this.clearTokens();\n }\n Hub.dispatch('auth', {\n event: 'tokenRefresh_failure',\n data: { error: err },\n }, 'Auth', AMPLIFY_SYMBOL);\n if (err.name.startsWith('NotAuthorizedException')) {\n return null;\n }\n throw err;\n }\n async setTokens({ tokens }) {\n return this.getTokenStore().storeTokens(tokens);\n }\n async clearTokens() {\n return this.getTokenStore().clearTokens();\n }\n getDeviceMetadata(username) {\n return this.getTokenStore().getDeviceMetadata(username);\n }\n clearDeviceMetadata(username) {\n return this.getTokenStore().clearDeviceMetadata(username);\n }\n setOAuthMetadata(metadata) {\n return this.getTokenStore().setOAuthMetadata(metadata);\n }\n getOAuthMetadata() {\n return this.getTokenStore().getOAuthMetadata();\n }\n}\n\nexport { TokenOrchestrator };\n//# sourceMappingURL=TokenOrchestrator.mjs.map\n","import { defaultStorage } from '@aws-amplify/core';\nimport { DefaultOAuthStore } from '../signInWithRedirectStore.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst oAuthStore = new DefaultOAuthStore(defaultStorage);\n\nexport { oAuthStore };\n//# sourceMappingURL=oAuthStore.mjs.map\n","import { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { getAuthStorageKeys } from '../tokenProvider/TokenStore.mjs';\nimport { OAuthStorageKeys } from './types.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst V5_HOSTED_UI_KEY = 'amplify-signin-with-hostedUI';\nconst name = 'CognitoIdentityServiceProvider';\nclass DefaultOAuthStore {\n constructor(keyValueStorage) {\n this.keyValueStorage = keyValueStorage;\n }\n async clearOAuthInflightData() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n await Promise.all([\n this.keyValueStorage.removeItem(authKeys.inflightOAuth),\n this.keyValueStorage.removeItem(authKeys.oauthPKCE),\n this.keyValueStorage.removeItem(authKeys.oauthState),\n ]);\n }\n async clearOAuthData() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n await this.clearOAuthInflightData();\n await this.keyValueStorage.removeItem(V5_HOSTED_UI_KEY); // remove in case a customer migrated an App from v5 to v6\n return this.keyValueStorage.removeItem(authKeys.oauthSignIn);\n }\n loadOAuthState() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n return this.keyValueStorage.getItem(authKeys.oauthState);\n }\n storeOAuthState(state) {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n return this.keyValueStorage.setItem(authKeys.oauthState, state);\n }\n loadPKCE() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n return this.keyValueStorage.getItem(authKeys.oauthPKCE);\n }\n storePKCE(pkce) {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n return this.keyValueStorage.setItem(authKeys.oauthPKCE, pkce);\n }\n setAuthConfig(authConfigParam) {\n this.cognitoConfig = authConfigParam;\n }\n async loadOAuthInFlight() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n return ((await this.keyValueStorage.getItem(authKeys.inflightOAuth)) === 'true');\n }\n async storeOAuthInFlight(inflight) {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n await this.keyValueStorage.setItem(authKeys.inflightOAuth, `${inflight}`);\n }\n async loadOAuthSignIn() {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n const isLegacyHostedUISignIn = await this.keyValueStorage.getItem(V5_HOSTED_UI_KEY);\n const [isOAuthSignIn, preferPrivateSession] = (await this.keyValueStorage.getItem(authKeys.oauthSignIn))?.split(',') ??\n [];\n return {\n isOAuthSignIn: isOAuthSignIn === 'true' || isLegacyHostedUISignIn === 'true',\n preferPrivateSession: preferPrivateSession === 'true',\n };\n }\n async storeOAuthSignIn(oauthSignIn, preferPrivateSession = false) {\n assertTokenProviderConfig(this.cognitoConfig);\n const authKeys = createKeysForAuthStorage(name, this.cognitoConfig.userPoolClientId);\n await this.keyValueStorage.setItem(authKeys.oauthSignIn, `${oauthSignIn},${preferPrivateSession}`);\n }\n}\nconst createKeysForAuthStorage = (provider, identifier) => {\n return getAuthStorageKeys(OAuthStorageKeys)(provider, identifier);\n};\n\nexport { DefaultOAuthStore };\n//# sourceMappingURL=signInWithRedirectStore.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst inflightPromises = [];\nconst addInflightPromise = (resolver) => {\n inflightPromises.push(resolver);\n};\nconst resolveAndClearInflightPromises = () => {\n while (inflightPromises.length) {\n inflightPromises.pop()?.();\n }\n};\n\nexport { addInflightPromise, resolveAndClearInflightPromises };\n//# sourceMappingURL=inflightPromise.mjs.map\n","import { Hub } from '@aws-amplify/core';\nimport { AMPLIFY_SYMBOL } from '@aws-amplify/core/internals/utils';\nimport { getCurrentUser } from '../apis/getCurrentUser.mjs';\nimport { USER_UNAUTHENTICATED_EXCEPTION, UNEXPECTED_SIGN_IN_INTERRUPTION_EXCEPTION } from '../../../errors/constants.mjs';\nimport { AuthError } from '../../../errors/AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst ERROR_MESSAGE = 'Unable to get user session following successful sign-in.';\nconst dispatchSignedInHubEvent = async () => {\n try {\n Hub.dispatch('auth', {\n event: 'signedIn',\n data: await getCurrentUser(),\n }, 'Auth', AMPLIFY_SYMBOL);\n }\n catch (error) {\n if (error.name === USER_UNAUTHENTICATED_EXCEPTION) {\n throw new AuthError({\n name: UNEXPECTED_SIGN_IN_INTERRUPTION_EXCEPTION,\n message: ERROR_MESSAGE,\n recoverySuggestion: 'This most likely is due to auth tokens not being persisted. If you are using cookie store, please ensure cookies can be correctly set from your server.',\n });\n }\n throw error;\n }\n};\n\nexport { ERROR_MESSAGE, dispatchSignedInHubEvent };\n//# sourceMappingURL=dispatchSignedInHubEvent.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction defaultState() {\n return {\n active: false,\n };\n}\nconst autoSignInReducer = (state, action) => {\n switch (action.type) {\n case 'SET_USERNAME':\n return {\n ...state,\n username: action.value,\n };\n case 'SET_SESSION':\n return {\n ...state,\n session: action.value,\n };\n case 'START':\n return {\n ...state,\n active: true,\n };\n case 'RESET':\n return defaultState();\n default:\n return state;\n }\n};\nconst createAutoSignInStore = (reducer) => {\n let currentState = reducer(defaultState(), { type: 'RESET' });\n return {\n getState: () => currentState,\n dispatch: action => {\n currentState = reducer(currentState, action);\n },\n };\n};\nconst autoSignInStore = createAutoSignInStore(autoSignInReducer);\n\nexport { autoSignInStore };\n//# sourceMappingURL=autoSignInStore.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst signInReducer = (state, action) => {\n switch (action.type) {\n case 'SET_SIGN_IN_SESSION':\n return {\n ...state,\n signInSession: action.value,\n };\n case 'SET_SIGN_IN_STATE':\n return {\n ...action.value,\n };\n case 'SET_CHALLENGE_NAME':\n return {\n ...state,\n challengeName: action.value,\n };\n case 'SET_USERNAME':\n return {\n ...state,\n username: action.value,\n };\n case 'SET_INITIAL_STATE':\n return defaultState();\n default:\n return state;\n }\n};\nfunction defaultState() {\n return {\n username: undefined,\n challengeName: undefined,\n signInSession: undefined,\n };\n}\nconst createStore = reducer => {\n let currentState = reducer(defaultState(), { type: 'SET_INITIAL_STATE' });\n return {\n getState: () => currentState,\n dispatch: action => {\n currentState = reducer(currentState, action);\n },\n };\n};\nconst signInStore = createStore(signInReducer);\nfunction setActiveSignInState(state) {\n signInStore.dispatch({\n type: 'SET_SIGN_IN_STATE',\n value: state,\n });\n}\nfunction cleanActiveSignInState() {\n signInStore.dispatch({ type: 'SET_INITIAL_STATE' });\n}\n\nexport { cleanActiveSignInState, setActiveSignInState, signInStore };\n//# sourceMappingURL=signInStore.mjs.map\n","import { createAssertionFunction, AmplifyError, AmplifyErrorCode } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass PasskeyError extends AmplifyError {\n constructor(params) {\n super(params);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = PasskeyError;\n Object.setPrototypeOf(this, PasskeyError.prototype);\n }\n}\nvar PasskeyErrorCode;\n(function (PasskeyErrorCode) {\n // not supported\n PasskeyErrorCode[\"PasskeyNotSupported\"] = \"PasskeyNotSupported\";\n // duplicate passkey\n PasskeyErrorCode[\"PasskeyAlreadyExists\"] = \"PasskeyAlreadyExists\";\n // misconfigurations\n PasskeyErrorCode[\"InvalidPasskeyRegistrationOptions\"] = \"InvalidPasskeyRegistrationOptions\";\n PasskeyErrorCode[\"InvalidPasskeyAuthenticationOptions\"] = \"InvalidPasskeyAuthenticationOptions\";\n PasskeyErrorCode[\"RelyingPartyMismatch\"] = \"RelyingPartyMismatch\";\n // failed credential creation / retrieval\n PasskeyErrorCode[\"PasskeyRegistrationFailed\"] = \"PasskeyRegistrationFailed\";\n PasskeyErrorCode[\"PasskeyRetrievalFailed\"] = \"PasskeyRetrievalFailed\";\n // cancel / aborts\n PasskeyErrorCode[\"PasskeyRegistrationCanceled\"] = \"PasskeyRegistrationCanceled\";\n PasskeyErrorCode[\"PasskeyAuthenticationCanceled\"] = \"PasskeyAuthenticationCanceled\";\n PasskeyErrorCode[\"PasskeyOperationAborted\"] = \"PasskeyOperationAborted\";\n})(PasskeyErrorCode || (PasskeyErrorCode = {}));\nconst notSupportedRecoverySuggestion = 'Passkeys may not be supported on this device. Ensure your application is running in a secure context (HTTPS) and Web Authentication API is supported.';\nconst abortOrCancelRecoverySuggestion = 'User may have canceled the ceremony or another interruption has occurred. Check underlying error for details.';\nconst misconfigurationRecoverySuggestion = 'Ensure your user pool is configured to support the WEB_AUTHN as an authentication factor.';\nconst passkeyErrorMap = {\n [PasskeyErrorCode.PasskeyNotSupported]: {\n message: 'Passkeys may not be supported on this device.',\n recoverySuggestion: notSupportedRecoverySuggestion,\n },\n [PasskeyErrorCode.InvalidPasskeyRegistrationOptions]: {\n message: 'Invalid passkey registration options.',\n recoverySuggestion: misconfigurationRecoverySuggestion,\n },\n [PasskeyErrorCode.InvalidPasskeyAuthenticationOptions]: {\n message: 'Invalid passkey authentication options.',\n recoverySuggestion: misconfigurationRecoverySuggestion,\n },\n [PasskeyErrorCode.PasskeyRegistrationFailed]: {\n message: 'Device failed to create passkey.',\n recoverySuggestion: notSupportedRecoverySuggestion,\n },\n [PasskeyErrorCode.PasskeyRetrievalFailed]: {\n message: 'Device failed to retrieve passkey.',\n recoverySuggestion: 'Passkeys may not be available on this device. Try an alternative authentication factor like PASSWORD, EMAIL_OTP, or SMS_OTP.',\n },\n [PasskeyErrorCode.PasskeyAlreadyExists]: {\n message: 'Passkey already exists in authenticator.',\n recoverySuggestion: 'Proceed with existing passkey or try again after deleting the credential.',\n },\n [PasskeyErrorCode.PasskeyRegistrationCanceled]: {\n message: 'Passkey registration ceremony has been canceled.',\n recoverySuggestion: abortOrCancelRecoverySuggestion,\n },\n [PasskeyErrorCode.PasskeyAuthenticationCanceled]: {\n message: 'Passkey authentication ceremony has been canceled.',\n recoverySuggestion: abortOrCancelRecoverySuggestion,\n },\n [PasskeyErrorCode.PasskeyOperationAborted]: {\n message: 'Passkey operation has been aborted.',\n recoverySuggestion: abortOrCancelRecoverySuggestion,\n },\n [PasskeyErrorCode.RelyingPartyMismatch]: {\n message: 'Relying party does not match current domain.',\n recoverySuggestion: 'Ensure relying party identifier matches current domain.',\n },\n};\nconst assertPasskeyError = createAssertionFunction(passkeyErrorMap, PasskeyError);\n/**\n * Handle Passkey Authentication Errors\n * https://w3c.github.io/webauthn/#sctn-get-request-exceptions\n *\n * @param err unknown\n * @returns PasskeyError\n */\nconst handlePasskeyAuthenticationError = (err) => {\n if (err instanceof PasskeyError) {\n return err;\n }\n if (err instanceof Error) {\n if (err.name === 'NotAllowedError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.PasskeyAuthenticationCanceled];\n return new PasskeyError({\n name: PasskeyErrorCode.PasskeyAuthenticationCanceled,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n }\n return handlePasskeyError(err);\n};\n/**\n * Handle Passkey Registration Errors\n * https://w3c.github.io/webauthn/#sctn-create-request-exceptions\n *\n * @param err unknown\n * @returns PasskeyError\n */\nconst handlePasskeyRegistrationError = (err) => {\n if (err instanceof PasskeyError) {\n return err;\n }\n if (err instanceof Error) {\n // Duplicate Passkey\n if (err.name === 'InvalidStateError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.PasskeyAlreadyExists];\n return new PasskeyError({\n name: PasskeyErrorCode.PasskeyAlreadyExists,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n // User Cancels Ceremony / Generic Catch All\n if (err.name === 'NotAllowedError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.PasskeyRegistrationCanceled];\n return new PasskeyError({\n name: PasskeyErrorCode.PasskeyRegistrationCanceled,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n }\n return handlePasskeyError(err);\n};\n/**\n * Handles Overlapping Passkey Errors Between Registration & Authentication\n * https://w3c.github.io/webauthn/#sctn-create-request-exceptions\n * https://w3c.github.io/webauthn/#sctn-get-request-exceptions\n *\n * @param err unknown\n * @returns PasskeyError\n */\nconst handlePasskeyError = (err) => {\n if (err instanceof Error) {\n // Passkey Operation Aborted\n if (err.name === 'AbortError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.PasskeyOperationAborted];\n return new PasskeyError({\n name: PasskeyErrorCode.PasskeyOperationAborted,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n // Relying Party / Domain Mismatch\n if (err.name === 'SecurityError') {\n const { message, recoverySuggestion } = passkeyErrorMap[PasskeyErrorCode.RelyingPartyMismatch];\n return new PasskeyError({\n name: PasskeyErrorCode.RelyingPartyMismatch,\n message,\n recoverySuggestion,\n underlyingError: err,\n });\n }\n }\n return new PasskeyError({\n name: AmplifyErrorCode.Unknown,\n message: 'An unknown error has occurred.',\n underlyingError: err,\n });\n};\n\nexport { PasskeyError, PasskeyErrorCode, assertPasskeyError, handlePasskeyAuthenticationError, handlePasskeyRegistrationError };\n//# sourceMappingURL=errors.mjs.map\n","import { assertPasskeyError, PasskeyErrorCode, handlePasskeyAuthenticationError } from './errors.mjs';\nimport { getIsPasskeySupported } from './getIsPasskeySupported.mjs';\nimport { deserializeJsonToPkcGetOptions, serializePkcWithAssertionToJson } from './serde.mjs';\nimport { assertCredentialIsPkcWithAuthenticatorAssertionResponse } from './types/index.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst getPasskey = async (input) => {\n try {\n const isPasskeySupported = getIsPasskeySupported();\n assertPasskeyError(isPasskeySupported, PasskeyErrorCode.PasskeyNotSupported);\n const passkeyGetOptions = deserializeJsonToPkcGetOptions(input);\n const credential = await navigator.credentials.get({\n publicKey: passkeyGetOptions,\n });\n assertCredentialIsPkcWithAuthenticatorAssertionResponse(credential);\n return serializePkcWithAssertionToJson(credential);\n }\n catch (err) {\n throw handlePasskeyAuthenticationError(err);\n }\n};\n\nexport { getPasskey };\n//# sourceMappingURL=getPasskey.mjs.map\n","import { isBrowser } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Determines if passkey is supported in current context\n * Will return false if executed in non-secure context\n * @returns boolean\n */\nconst getIsPasskeySupported = () => {\n return (isBrowser() &&\n window.isSecureContext &&\n 'credentials' in navigator &&\n typeof window.PublicKeyCredential === 'function');\n};\n\nexport { getIsPasskeySupported };\n//# sourceMappingURL=getIsPasskeySupported.mjs.map\n","import { convertArrayBufferToBase64Url } from '../../../foundation/convert/base64url/convertArrayBufferToBase64Url.mjs';\nimport { convertBase64UrlToArrayBuffer } from '../../../foundation/convert/base64url/convertBase64UrlToArrayBuffer.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Deserializes Public Key Credential Creation Options JSON\n * @param input PasskeyCreateOptionsJson\n * @returns PublicKeyCredentialCreationOptions\n */\nconst deserializeJsonToPkcCreationOptions = (input) => {\n const userIdBuffer = convertBase64UrlToArrayBuffer(input.user.id);\n const challengeBuffer = convertBase64UrlToArrayBuffer(input.challenge);\n const excludeCredentialsWithBuffer = (input.excludeCredentials || []).map(excludeCred => ({\n ...excludeCred,\n id: convertBase64UrlToArrayBuffer(excludeCred.id),\n }));\n return {\n ...input,\n excludeCredentials: excludeCredentialsWithBuffer,\n challenge: challengeBuffer,\n user: {\n ...input.user,\n id: userIdBuffer,\n },\n };\n};\n/**\n * Serializes a Public Key Credential With Attestation to JSON\n * @param input PasskeyCreateResult\n * @returns PasskeyCreateResultJson\n */\nconst serializePkcWithAttestationToJson = (input) => {\n const response = {\n clientDataJSON: convertArrayBufferToBase64Url(input.response.clientDataJSON),\n attestationObject: convertArrayBufferToBase64Url(input.response.attestationObject),\n transports: input.response.getTransports(),\n publicKeyAlgorithm: input.response.getPublicKeyAlgorithm(),\n authenticatorData: convertArrayBufferToBase64Url(input.response.getAuthenticatorData()),\n };\n const publicKey = input.response.getPublicKey();\n if (publicKey) {\n response.publicKey = convertArrayBufferToBase64Url(publicKey);\n }\n const resultJson = {\n type: input.type,\n id: input.id,\n rawId: convertArrayBufferToBase64Url(input.rawId),\n clientExtensionResults: input.getClientExtensionResults(),\n response,\n };\n if (input.authenticatorAttachment) {\n resultJson.authenticatorAttachment = input.authenticatorAttachment;\n }\n return resultJson;\n};\n/**\n * Deserializes Public Key Credential Get Options JSON\n * @param input PasskeyGetOptionsJson\n * @returns PublicKeyCredentialRequestOptions\n */\nconst deserializeJsonToPkcGetOptions = (input) => {\n const challengeBuffer = convertBase64UrlToArrayBuffer(input.challenge);\n const allowedCredentialsWithBuffer = (input.allowCredentials || []).map(allowedCred => ({\n ...allowedCred,\n id: convertBase64UrlToArrayBuffer(allowedCred.id),\n }));\n return {\n ...input,\n challenge: challengeBuffer,\n allowCredentials: allowedCredentialsWithBuffer,\n };\n};\n/**\n * Serializes a Public Key Credential With Attestation to JSON\n * @param input PasskeyGetResult\n * @returns PasskeyGetResultJson\n */\nconst serializePkcWithAssertionToJson = (input) => {\n const response = {\n clientDataJSON: convertArrayBufferToBase64Url(input.response.clientDataJSON),\n authenticatorData: convertArrayBufferToBase64Url(input.response.authenticatorData),\n signature: convertArrayBufferToBase64Url(input.response.signature),\n };\n if (input.response.userHandle) {\n response.userHandle = convertArrayBufferToBase64Url(input.response.userHandle);\n }\n const resultJson = {\n id: input.id,\n rawId: convertArrayBufferToBase64Url(input.rawId),\n type: input.type,\n clientExtensionResults: input.getClientExtensionResults(),\n response,\n };\n if (input.authenticatorAttachment) {\n resultJson.authenticatorAttachment = input.authenticatorAttachment;\n }\n return resultJson;\n};\n\nexport { deserializeJsonToPkcCreationOptions, deserializeJsonToPkcGetOptions, serializePkcWithAssertionToJson, serializePkcWithAttestationToJson };\n//# sourceMappingURL=serde.mjs.map\n","import { base64Encoder } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// https://datatracker.ietf.org/doc/html/rfc4648#page-7\n/**\n * Converts an ArrayBuffer to a base64url encoded string\n * @param buffer - the ArrayBuffer instance of a Uint8Array\n * @returns string - a base64url encoded string\n */\nconst convertArrayBufferToBase64Url = (buffer) => {\n return base64Encoder.convert(new Uint8Array(buffer), {\n urlSafe: true,\n skipPadding: true,\n });\n};\n\nexport { convertArrayBufferToBase64Url };\n//# sourceMappingURL=convertArrayBufferToBase64Url.mjs.map\n","import { base64Decoder } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Converts a base64url encoded string to an ArrayBuffer\n * @param base64url - a base64url encoded string\n * @returns ArrayBuffer\n */\nconst convertBase64UrlToArrayBuffer = (base64url) => {\n return Uint8Array.from(base64Decoder.convert(base64url, { urlSafe: true }), x => x.charCodeAt(0)).buffer;\n};\n\nexport { convertBase64UrlToArrayBuffer };\n//# sourceMappingURL=convertBase64UrlToArrayBuffer.mjs.map\n","import { assertPasskeyError, PasskeyErrorCode } from '../errors.mjs';\nexport { assertValidCredentialCreationOptions } from './shared.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction assertCredentialIsPkcWithAuthenticatorAttestationResponse(credential) {\n assertPasskeyError(credential &&\n credential instanceof PublicKeyCredential &&\n credential.response instanceof AuthenticatorAttestationResponse, PasskeyErrorCode.PasskeyRegistrationFailed);\n}\nfunction assertCredentialIsPkcWithAuthenticatorAssertionResponse(credential) {\n assertPasskeyError(credential &&\n credential instanceof PublicKeyCredential &&\n credential.response instanceof AuthenticatorAssertionResponse, PasskeyErrorCode.PasskeyRetrievalFailed);\n}\n\nexport { assertCredentialIsPkcWithAuthenticatorAssertionResponse, assertCredentialIsPkcWithAuthenticatorAttestationResponse };\n//# sourceMappingURL=index.mjs.map\n","import { assertPasskeyError, PasskeyErrorCode } from '../errors.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction assertValidCredentialCreationOptions(credentialCreationOptions) {\n assertPasskeyError([\n !!credentialCreationOptions,\n !!credentialCreationOptions?.challenge,\n !!credentialCreationOptions?.user,\n !!credentialCreationOptions?.rp,\n !!credentialCreationOptions?.pubKeyCredParams,\n ].every(Boolean), PasskeyErrorCode.InvalidPasskeyRegistrationOptions);\n}\n\nexport { assertValidCredentialCreationOptions };\n//# sourceMappingURL=shared.mjs.map\n","import { AuthAction } from '@aws-amplify/core/internals/utils';\nimport { getUserContextData } from '../../../providers/cognito/utils/userContextData.mjs';\nimport { getAuthenticationHelper } from '../../../providers/cognito/utils/srp/getAuthenticationHelper.mjs';\nimport '../../../providers/cognito/utils/srp/constants.mjs';\nimport '@aws-crypto/sha256-js';\nimport { setActiveSignInUsername, retryOnResourceNotFoundException, handlePasswordVerifierChallenge } from '../../../providers/cognito/utils/signInHelpers.mjs';\nimport { createInitiateAuthClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createInitiateAuthClient.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../../../providers/cognito/types/errors.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../../../providers/cognito/factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Handles the Password SRP (Secure Remote Password) authentication flow.\n * This function can be used with both USER_SRP_AUTH and USER_AUTH flows.\n *\n * @param {Object} params - The parameters for the Password SRP authentication\n * @param {string} params.username - The username for authentication\n * @param {string} params.password - The user's password\n * @param {ClientMetadata} [params.clientMetadata] - Optional metadata to be sent with auth requests\n * @param {CognitoUserPoolConfig} params.config - Cognito User Pool configuration\n * @param {AuthTokenOrchestrator} params.tokenOrchestrator - Token orchestrator for managing auth tokens\n * @param {AuthFlowType} params.authFlow - The type of authentication flow ('USER_SRP_AUTH' or 'USER_AUTH')\n * @param {AuthFactorType} [params.preferredChallenge] - Optional preferred challenge type when using USER_AUTH flow\n *\n * @returns {Promise} The authentication response\n */\nasync function handlePasswordSRP({ username, password, clientMetadata, config, tokenOrchestrator, authFlow, preferredChallenge, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const userPoolName = userPoolId?.split('_')[1] || '';\n const authenticationHelper = await getAuthenticationHelper(userPoolName);\n const authParameters = {\n USERNAME: username,\n SRP_A: authenticationHelper.A.toString(16),\n };\n if (authFlow === 'USER_AUTH' && preferredChallenge) {\n authParameters.PREFERRED_CHALLENGE = preferredChallenge;\n }\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const jsonReq = {\n AuthFlow: authFlow,\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n const initiateAuth = createInitiateAuthClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const resp = await initiateAuth({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignIn),\n }, jsonReq);\n const { ChallengeParameters: challengeParameters, Session: session } = resp;\n const activeUsername = challengeParameters?.USERNAME ?? username;\n setActiveSignInUsername(activeUsername);\n if (resp.ChallengeName === 'PASSWORD_VERIFIER') {\n return retryOnResourceNotFoundException(handlePasswordVerifierChallenge, [\n password,\n challengeParameters,\n clientMetadata,\n session,\n authenticationHelper,\n config,\n tokenOrchestrator,\n ], activeUsername, tokenOrchestrator);\n }\n return resp;\n}\n\nexport { handlePasswordSRP };\n//# sourceMappingURL=handlePasswordSRP.mjs.map\n","import AuthenticationHelper from './AuthenticationHelper/AuthenticationHelper.mjs';\nimport BigInteger from './BigInteger/BigInteger.mjs';\nimport { calculateA } from './calculate/calculateA.mjs';\nimport { INIT_N } from './constants.mjs';\nimport '@aws-crypto/sha256-js';\nimport { getHexFromBytes } from './getHexFromBytes.mjs';\nimport { getRandomBytes } from './getRandomBytes.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Returns a new {@link AuthenticationHelper} instance with randomly generated BigInteger seed\n *\n * @param userPoolName Cognito user pool name.\n * @returns An {@link AuthenticationHelper} instance.\n *\n * @internal\n */\nconst getAuthenticationHelper = async (userPoolName) => {\n const N = new BigInteger(INIT_N, 16);\n const g = new BigInteger('2', 16);\n const a = generateRandomBigInteger();\n const A = await calculateA({ a, g, N });\n return new AuthenticationHelper({ userPoolName, a, g, A, N });\n};\n/**\n * Generates a random BigInteger.\n *\n * @returns {BigInteger} a random value.\n */\nconst generateRandomBigInteger = () => {\n // This will be interpreted as a postive 128-bit integer\n const hexRandom = getHexFromBytes(getRandomBytes(128));\n // There is no need to do randomBigInt.mod(this.N - 1) as N (3072-bit) is > 128 bytes (1024-bit)\n return new BigInteger(hexRandom, 16);\n};\n\nexport { getAuthenticationHelper };\n//# sourceMappingURL=getAuthenticationHelper.mjs.map\n","import { AuthError } from '../../../../../errors/AuthError.mjs';\nimport { textEncoder } from '../../textEncoder/index.mjs';\nimport BigInteger from '../BigInteger/BigInteger.mjs';\nimport { calculateS } from '../calculate/calculateS.mjs';\nimport { calculateU } from '../calculate/calculateU.mjs';\nimport { getBytesFromHex } from '../getBytesFromHex.mjs';\nimport { getHashFromData } from '../getHashFromData.mjs';\nimport { getHashFromHex } from '../getHashFromHex.mjs';\nimport { getHexFromBytes } from '../getHexFromBytes.mjs';\nimport { getHkdfKey } from '../getHkdfKey.mjs';\nimport { getPaddedHex } from '../getPaddedHex.mjs';\nimport { getRandomBytes } from '../getRandomBytes.mjs';\nimport { getRandomString } from '../getRandomString.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/** @class */\nclass AuthenticationHelper {\n constructor({ userPoolName, a, g, A, N, }) {\n this.encoder = textEncoder;\n this.userPoolName = userPoolName;\n this.a = a;\n this.g = g;\n this.A = A;\n this.N = N;\n this.k = new BigInteger(getHashFromHex(`${getPaddedHex(N)}${getPaddedHex(g)}`), 16);\n }\n /**\n * @returns {string} Generated random value included in password hash.\n */\n getRandomPassword() {\n if (!this.randomPassword) {\n throw new AuthError({\n name: 'EmptyBigIntegerRandomPassword',\n message: 'random password is empty',\n });\n }\n return this.randomPassword;\n }\n /**\n * @returns {string} Generated random value included in devices hash.\n */\n getSaltToHashDevices() {\n if (!this.saltToHashDevices) {\n throw new AuthError({\n name: 'EmptyBigIntegersaltToHashDevices',\n message: 'saltToHashDevices is empty',\n });\n }\n return this.saltToHashDevices;\n }\n /**\n * @returns {string} Value used to verify devices.\n */\n getVerifierDevices() {\n if (!this.verifierDevices) {\n throw new AuthError({\n name: 'EmptyBigIntegerVerifierDevices',\n message: 'verifyDevices is empty',\n });\n }\n return this.verifierDevices;\n }\n /**\n * Generate salts and compute verifier.\n *\n * @param {string} deviceGroupKey Devices to generate verifier for.\n * @param {string} username User to generate verifier for.\n *\n * @returns {Promise}\n */\n async generateHashDevice(deviceGroupKey, username) {\n this.randomPassword = getRandomString();\n const combinedString = `${deviceGroupKey}${username}:${this.randomPassword}`;\n const hashedString = getHashFromData(combinedString);\n const hexRandom = getHexFromBytes(getRandomBytes(16));\n // The random hex will be unambiguously represented as a postive integer\n this.saltToHashDevices = getPaddedHex(new BigInteger(hexRandom, 16));\n return new Promise((resolve, reject) => {\n this.g.modPow(new BigInteger(getHashFromHex(this.saltToHashDevices + hashedString), 16), this.N, (err, result) => {\n if (err) {\n reject(err);\n return;\n }\n this.verifierDevices = getPaddedHex(result);\n resolve();\n });\n });\n }\n /**\n * Calculates the final HKDF key based on computed S value, computed U value and the key\n *\n * @param {String} username Username.\n * @param {String} password Password.\n * @param {AuthBigInteger} B Server B value.\n * @param {AuthBigInteger} salt Generated salt.\n */\n async getPasswordAuthenticationKey({ username, password, serverBValue, salt, }) {\n if (serverBValue.mod(this.N).equals(BigInteger.ZERO)) {\n throw new Error('B cannot be zero.');\n }\n const U = calculateU({\n A: this.A,\n B: serverBValue,\n });\n const usernamePassword = `${this.userPoolName}${username}:${password}`;\n const usernamePasswordHash = getHashFromData(usernamePassword);\n const x = new BigInteger(getHashFromHex(getPaddedHex(salt) + usernamePasswordHash), 16);\n const S = await calculateS({\n a: this.a,\n g: this.g,\n k: this.k,\n x,\n B: serverBValue,\n N: this.N,\n U,\n });\n const context = this.encoder.convert('Caldera Derived Key');\n const spacer = this.encoder.convert(String.fromCharCode(1));\n const info = new Uint8Array(context.byteLength + spacer.byteLength);\n info.set(context, 0);\n info.set(spacer, context.byteLength);\n const hkdfKey = getHkdfKey(getBytesFromHex(getPaddedHex(S)), getBytesFromHex(getPaddedHex(U)), info);\n return hkdfKey;\n }\n}\n\nexport { AuthenticationHelper as default };\n//# sourceMappingURL=AuthenticationHelper.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst textEncoder = {\n convert(input) {\n return new TextEncoder().encode(input);\n },\n};\n\nexport { textEncoder };\n//# sourceMappingURL=index.mjs.map\n","/* eslint-disable */\n// @ts-nocheck -> BigInteger is already a vended utility\n// A small implementation of BigInteger based on http://www-cs-students.stanford.edu/~tjw/jsbn/\n//\n// All public methods have been removed except the following:\n// new BigInteger(a, b) (only radix 2, 4, 8, 16 and 32 supported)\n// toString (only radix 2, 4, 8, 16 and 32 supported)\n// negate\n// abs\n// compareTo\n// bitLength\n// mod\n// equals\n// add\n// subtract\n// multiply\n// divide\n// modPow\n/*\n * Copyright (c) 2003-2005 Tom Wu\n * All Rights Reserved.\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS-IS\" AND WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY\n * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.\n *\n * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,\n * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER\n * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF\n * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT\n * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n *\n * In addition, the following condition applies:\n *\n * All redistributions must retain an intact copy of this copyright notice\n * and disclaimer.\n */\n// (public) Constructor\nfunction BigInteger(a, b) {\n if (a != null)\n this.fromString(a, b);\n}\n// return new, unset BigInteger\nfunction nbi() {\n return new BigInteger(null, null);\n}\n// Bits per digit\nlet dbits;\n// JavaScript engine analysis\nconst canary = 0xdeadbeefcafe;\nconst j_lm = (canary & 0xffffff) === 0xefcafe;\n// am: Compute w_j += (x*this_i), propagate carries,\n// c is initial carry, returns final carry.\n// c < 3*dvalue, x < 2*dvalue, this_i < dvalue\n// We need to select the fastest one that works in this environment.\n// am1: use a single mult and divide to get the high bits,\n// max digit bits should be 26 because\n// max internal value = 2*dvalue^2-2*dvalue (< 2^53)\nfunction am1(i, x, w, j, c, n) {\n while (--n >= 0) {\n const v = x * this[i++] + w[j] + c;\n c = Math.floor(v / 0x4000000);\n w[j++] = v & 0x3ffffff;\n }\n return c;\n}\n// am2 avoids a big mult-and-extract completely.\n// Max digit bits should be <= 30 because we do bitwise ops\n// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\nfunction am2(i, x, w, j, c, n) {\n const xl = x & 0x7fff;\n const xh = x >> 15;\n while (--n >= 0) {\n let l = this[i] & 0x7fff;\n const h = this[i++] >> 15;\n const m = xh * l + h * xl;\n l = xl * l + ((m & 0x7fff) << 15) + w[j] + (c & 0x3fffffff);\n c = (l >>> 30) + (m >>> 15) + xh * h + (c >>> 30);\n w[j++] = l & 0x3fffffff;\n }\n return c;\n}\n// Alternately, set max digit bits to 28 since some\n// browsers slow down when dealing with 32-bit numbers.\nfunction am3(i, x, w, j, c, n) {\n const xl = x & 0x3fff;\n const xh = x >> 14;\n while (--n >= 0) {\n let l = this[i] & 0x3fff;\n const h = this[i++] >> 14;\n const m = xh * l + h * xl;\n l = xl * l + ((m & 0x3fff) << 14) + w[j] + c;\n c = (l >> 28) + (m >> 14) + xh * h;\n w[j++] = l & 0xfffffff;\n }\n return c;\n}\nconst inBrowser = typeof navigator !== 'undefined';\nif (inBrowser && j_lm && navigator.appName === 'Microsoft Internet Explorer') {\n BigInteger.prototype.am = am2;\n dbits = 30;\n}\nelse if (inBrowser && j_lm && navigator.appName !== 'Netscape') {\n BigInteger.prototype.am = am1;\n dbits = 26;\n}\nelse {\n // Mozilla/Netscape seems to prefer am3\n BigInteger.prototype.am = am3;\n dbits = 28;\n}\nBigInteger.prototype.DB = dbits;\nBigInteger.prototype.DM = (1 << dbits) - 1;\nBigInteger.prototype.DV = 1 << dbits;\nconst BI_FP = 52;\nBigInteger.prototype.FV = Math.pow(2, BI_FP);\nBigInteger.prototype.F1 = BI_FP - dbits;\nBigInteger.prototype.F2 = 2 * dbits - BI_FP;\n// Digit conversions\nconst BI_RM = '0123456789abcdefghijklmnopqrstuvwxyz';\nconst BI_RC = [];\nlet rr, vv;\nrr = '0'.charCodeAt(0);\nfor (vv = 0; vv <= 9; ++vv)\n BI_RC[rr++] = vv;\nrr = 'a'.charCodeAt(0);\nfor (vv = 10; vv < 36; ++vv)\n BI_RC[rr++] = vv;\nrr = 'A'.charCodeAt(0);\nfor (vv = 10; vv < 36; ++vv)\n BI_RC[rr++] = vv;\nfunction int2char(n) {\n return BI_RM.charAt(n);\n}\nfunction intAt(s, i) {\n const c = BI_RC[s.charCodeAt(i)];\n return c == null ? -1 : c;\n}\n// (protected) copy this to r\nfunction bnpCopyTo(r) {\n for (let i = this.t - 1; i >= 0; --i)\n r[i] = this[i];\n r.t = this.t;\n r.s = this.s;\n}\n// (protected) set from integer value x, -DV <= x < DV\nfunction bnpFromInt(x) {\n this.t = 1;\n this.s = x < 0 ? -1 : 0;\n if (x > 0)\n this[0] = x;\n else if (x < -1)\n this[0] = x + this.DV;\n else\n this.t = 0;\n}\n// return bigint initialized to value\nfunction nbv(i) {\n const r = nbi();\n r.fromInt(i);\n return r;\n}\n// (protected) set from string and radix\nfunction bnpFromString(s, b) {\n let k;\n if (b === 16)\n k = 4;\n else if (b === 8)\n k = 3;\n else if (b === 2)\n k = 1;\n else if (b === 32)\n k = 5;\n else if (b === 4)\n k = 2;\n else\n throw new Error('Only radix 2, 4, 8, 16, 32 are supported');\n this.t = 0;\n this.s = 0;\n let i = s.length;\n let mi = false;\n let sh = 0;\n while (--i >= 0) {\n const x = intAt(s, i);\n if (x < 0) {\n if (s.charAt(i) === '-')\n mi = true;\n continue;\n }\n mi = false;\n if (sh === 0)\n this[this.t++] = x;\n else if (sh + k > this.DB) {\n this[this.t - 1] |= (x & ((1 << (this.DB - sh)) - 1)) << sh;\n this[this.t++] = x >> (this.DB - sh);\n }\n else\n this[this.t - 1] |= x << sh;\n sh += k;\n if (sh >= this.DB)\n sh -= this.DB;\n }\n this.clamp();\n if (mi)\n BigInteger.ZERO.subTo(this, this);\n}\n// (protected) clamp off excess high words\nfunction bnpClamp() {\n const c = this.s & this.DM;\n while (this.t > 0 && this[this.t - 1] == c)\n --this.t;\n}\n// (public) return string representation in given radix\nfunction bnToString(b) {\n if (this.s < 0)\n return '-' + this.negate().toString(b);\n let k;\n if (b == 16)\n k = 4;\n else if (b === 8)\n k = 3;\n else if (b === 2)\n k = 1;\n else if (b === 32)\n k = 5;\n else if (b === 4)\n k = 2;\n else\n throw new Error('Only radix 2, 4, 8, 16, 32 are supported');\n const km = (1 << k) - 1;\n let d;\n let m = false;\n let r = '';\n let i = this.t;\n let p = this.DB - ((i * this.DB) % k);\n if (i-- > 0) {\n if (p < this.DB && (d = this[i] >> p) > 0) {\n m = true;\n r = int2char(d);\n }\n while (i >= 0) {\n if (p < k) {\n d = (this[i] & ((1 << p) - 1)) << (k - p);\n d |= this[--i] >> (p += this.DB - k);\n }\n else {\n d = (this[i] >> (p -= k)) & km;\n if (p <= 0) {\n p += this.DB;\n --i;\n }\n }\n if (d > 0)\n m = true;\n if (m)\n r += int2char(d);\n }\n }\n return m ? r : '0';\n}\n// (public) -this\nfunction bnNegate() {\n const r = nbi();\n BigInteger.ZERO.subTo(this, r);\n return r;\n}\n// (public) |this|\nfunction bnAbs() {\n return this.s < 0 ? this.negate() : this;\n}\n// (public) return + if this > a, - if this < a, 0 if equal\nfunction bnCompareTo(a) {\n let r = this.s - a.s;\n if (r != 0)\n return r;\n let i = this.t;\n r = i - a.t;\n if (r != 0)\n return this.s < 0 ? -r : r;\n while (--i >= 0)\n if ((r = this[i] - a[i]) != 0)\n return r;\n return 0;\n}\n// returns bit length of the integer x\nfunction nbits(x) {\n let r = 1;\n let t;\n if ((t = x >>> 16) !== 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) !== 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) !== 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) !== 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) !== 0) {\n x = t;\n r += 1;\n }\n return r;\n}\n// (public) return the number of bits in \"this\"\nfunction bnBitLength() {\n if (this.t <= 0)\n return 0;\n return this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ (this.s & this.DM));\n}\n// (protected) r = this << n*DB\nfunction bnpDLShiftTo(n, r) {\n let i;\n for (i = this.t - 1; i >= 0; --i)\n r[i + n] = this[i];\n for (i = n - 1; i >= 0; --i)\n r[i] = 0;\n r.t = this.t + n;\n r.s = this.s;\n}\n// (protected) r = this >> n*DB\nfunction bnpDRShiftTo(n, r) {\n for (let i = n; i < this.t; ++i)\n r[i - n] = this[i];\n r.t = Math.max(this.t - n, 0);\n r.s = this.s;\n}\n// (protected) r = this << n\nfunction bnpLShiftTo(n, r) {\n const bs = n % this.DB;\n const cbs = this.DB - bs;\n const bm = (1 << cbs) - 1;\n const ds = Math.floor(n / this.DB);\n let c = (this.s << bs) & this.DM;\n let i;\n for (i = this.t - 1; i >= 0; --i) {\n r[i + ds + 1] = (this[i] >> cbs) | c;\n c = (this[i] & bm) << bs;\n }\n for (i = ds - 1; i >= 0; --i)\n r[i] = 0;\n r[ds] = c;\n r.t = this.t + ds + 1;\n r.s = this.s;\n r.clamp();\n}\n// (protected) r = this >> n\nfunction bnpRShiftTo(n, r) {\n r.s = this.s;\n const ds = Math.floor(n / this.DB);\n if (ds >= this.t) {\n r.t = 0;\n return;\n }\n const bs = n % this.DB;\n const cbs = this.DB - bs;\n const bm = (1 << bs) - 1;\n r[0] = this[ds] >> bs;\n for (let i = ds + 1; i < this.t; ++i) {\n r[i - ds - 1] |= (this[i] & bm) << cbs;\n r[i - ds] = this[i] >> bs;\n }\n if (bs > 0)\n r[this.t - ds - 1] |= (this.s & bm) << cbs;\n r.t = this.t - ds;\n r.clamp();\n}\n// (protected) r = this - a\nfunction bnpSubTo(a, r) {\n let i = 0;\n let c = 0;\n const m = Math.min(a.t, this.t);\n while (i < m) {\n c += this[i] - a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n if (a.t < this.t) {\n c -= a.s;\n while (i < this.t) {\n c += this[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while (i < a.t) {\n c -= a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c -= a.s;\n }\n r.s = c < 0 ? -1 : 0;\n if (c < -1)\n r[i++] = this.DV + c;\n else if (c > 0)\n r[i++] = c;\n r.t = i;\n r.clamp();\n}\n// (protected) r = this * a, r != this,a (HAC 14.12)\n// \"this\" should be the larger one if appropriate.\nfunction bnpMultiplyTo(a, r) {\n const x = this.abs();\n const y = a.abs();\n let i = x.t;\n r.t = i + y.t;\n while (--i >= 0)\n r[i] = 0;\n for (i = 0; i < y.t; ++i)\n r[i + x.t] = x.am(0, y[i], r, i, 0, x.t);\n r.s = 0;\n r.clamp();\n if (this.s !== a.s)\n BigInteger.ZERO.subTo(r, r);\n}\n// (protected) r = this^2, r != this (HAC 14.16)\nfunction bnpSquareTo(r) {\n const x = this.abs();\n let i = (r.t = 2 * x.t);\n while (--i >= 0)\n r[i] = 0;\n for (i = 0; i < x.t - 1; ++i) {\n const c = x.am(i, x[i], r, 2 * i, 0, 1);\n if ((r[i + x.t] += x.am(i + 1, 2 * x[i], r, 2 * i + 1, c, x.t - i - 1)) >=\n x.DV) {\n r[i + x.t] -= x.DV;\n r[i + x.t + 1] = 1;\n }\n }\n if (r.t > 0)\n r[r.t - 1] += x.am(i, x[i], r, 2 * i, 0, 1);\n r.s = 0;\n r.clamp();\n}\n// (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)\n// r != q, this != m. q or r may be null.\nfunction bnpDivRemTo(m, q, r) {\n const pm = m.abs();\n if (pm.t <= 0)\n return;\n const pt = this.abs();\n if (pt.t < pm.t) {\n if (q != null)\n q.fromInt(0);\n if (r != null)\n this.copyTo(r);\n return;\n }\n if (r === null)\n r = nbi();\n const y = nbi();\n const ts = this.s;\n const ms = m.s;\n const nsh = this.DB - nbits(pm[pm.t - 1]);\n // normalize modulus\n if (nsh > 0) {\n pm.lShiftTo(nsh, y);\n pt.lShiftTo(nsh, r);\n }\n else {\n pm.copyTo(y);\n pt.copyTo(r);\n }\n const ys = y.t;\n const y0 = y[ys - 1];\n if (y0 === 0)\n return;\n const yt = y0 * (1 << this.F1) + (ys > 1 ? y[ys - 2] >> this.F2 : 0);\n const d1 = this.FV / yt;\n const d2 = (1 << this.F1) / yt;\n const e = 1 << this.F2;\n let i = r.t;\n let j = i - ys;\n const t = q === null ? nbi() : q;\n y.dlShiftTo(j, t);\n if (r.compareTo(t) >= 0) {\n r[r.t++] = 1;\n r.subTo(t, r);\n }\n BigInteger.ONE.dlShiftTo(ys, t);\n t.subTo(y, y);\n // \"negative\" y so we can replace sub with am later\n while (y.t < ys)\n y[y.t++] = 0;\n while (--j >= 0) {\n // Estimate quotient digit\n let qd = r[--i] === y0 ? this.DM : Math.floor(r[i] * d1 + (r[i - 1] + e) * d2);\n if ((r[i] += y.am(0, qd, r, j, 0, ys)) < qd) {\n // Try it out\n y.dlShiftTo(j, t);\n r.subTo(t, r);\n while (r[i] < --qd)\n r.subTo(t, r);\n }\n }\n if (q !== null) {\n r.drShiftTo(ys, q);\n if (ts !== ms)\n BigInteger.ZERO.subTo(q, q);\n }\n r.t = ys;\n r.clamp();\n if (nsh > 0)\n r.rShiftTo(nsh, r);\n // Denormalize remainder\n if (ts < 0)\n BigInteger.ZERO.subTo(r, r);\n}\n// (public) this mod a\nfunction bnMod(a) {\n const r = nbi();\n this.abs().divRemTo(a, null, r);\n if (this.s < 0 && r.compareTo(BigInteger.ZERO) > 0)\n a.subTo(r, r);\n return r;\n}\n// (protected) return \"-1/this % 2^DB\"; useful for Mont. reduction\n// justification:\n// xy == 1 (mod m)\n// xy = 1+km\n// xy(2-xy) = (1+km)(1-km)\n// x[y(2-xy)] = 1-k^2m^2\n// x[y(2-xy)] == 1 (mod m^2)\n// if y is 1/x mod m, then y(2-xy) is 1/x mod m^2\n// should reduce x and y(2-xy) by m^2 at each step to keep size bounded.\n// JS multiply \"overflows\" differently from C/C++, so care is needed here.\nfunction bnpInvDigit() {\n if (this.t < 1)\n return 0;\n const x = this[0];\n if ((x & 1) === 0)\n return 0;\n let y = x & 3;\n // y == 1/x mod 2^2\n y = (y * (2 - (x & 0xf) * y)) & 0xf;\n // y == 1/x mod 2^4\n y = (y * (2 - (x & 0xff) * y)) & 0xff;\n // y == 1/x mod 2^8\n y = (y * (2 - (((x & 0xffff) * y) & 0xffff))) & 0xffff;\n // y == 1/x mod 2^16\n // last step - calculate inverse mod DV directly;\n // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints\n y = (y * (2 - ((x * y) % this.DV))) % this.DV;\n // y == 1/x mod 2^dbits\n // we really want the negative inverse, and -DV < y < DV\n return y > 0 ? this.DV - y : -y;\n}\nfunction bnEquals(a) {\n return this.compareTo(a) === 0;\n}\n// (protected) r = this + a\nfunction bnpAddTo(a, r) {\n let i = 0;\n let c = 0;\n const m = Math.min(a.t, this.t);\n while (i < m) {\n c += this[i] + a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n if (a.t < this.t) {\n c += a.s;\n while (i < this.t) {\n c += this[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while (i < a.t) {\n c += a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += a.s;\n }\n r.s = c < 0 ? -1 : 0;\n if (c > 0)\n r[i++] = c;\n else if (c < -1)\n r[i++] = this.DV + c;\n r.t = i;\n r.clamp();\n}\n// (public) this + a\nfunction bnAdd(a) {\n const r = nbi();\n this.addTo(a, r);\n return r;\n}\n// (public) this - a\nfunction bnSubtract(a) {\n const r = nbi();\n this.subTo(a, r);\n return r;\n}\n// (public) this * a\nfunction bnMultiply(a) {\n const r = nbi();\n this.multiplyTo(a, r);\n return r;\n}\n// (public) this / a\nfunction bnDivide(a) {\n const r = nbi();\n this.divRemTo(a, r, null);\n return r;\n}\n// Montgomery reduction\nfunction Montgomery(m) {\n this.m = m;\n this.mp = m.invDigit();\n this.mpl = this.mp & 0x7fff;\n this.mph = this.mp >> 15;\n this.um = (1 << (m.DB - 15)) - 1;\n this.mt2 = 2 * m.t;\n}\n// xR mod m\nfunction montConvert(x) {\n const r = nbi();\n x.abs().dlShiftTo(this.m.t, r);\n r.divRemTo(this.m, null, r);\n if (x.s < 0 && r.compareTo(BigInteger.ZERO) > 0)\n this.m.subTo(r, r);\n return r;\n}\n// x/R mod m\nfunction montRevert(x) {\n const r = nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n}\n// x = x/R mod m (HAC 14.32)\nfunction montReduce(x) {\n while (x.t <= this.mt2)\n // pad x so am has enough room later\n x[x.t++] = 0;\n for (let i = 0; i < this.m.t; ++i) {\n // faster way of calculating u0 = x[i]*mp mod DV\n let j = x[i] & 0x7fff;\n const u0 = (j * this.mpl +\n (((j * this.mph + (x[i] >> 15) * this.mpl) & this.um) << 15)) &\n x.DM;\n // use am to combine the multiply-shift-add into one call\n j = i + this.m.t;\n x[j] += this.m.am(0, u0, x, i, 0, this.m.t);\n // propagate carry\n while (x[j] >= x.DV) {\n x[j] -= x.DV;\n x[++j]++;\n }\n }\n x.clamp();\n x.drShiftTo(this.m.t, x);\n if (x.compareTo(this.m) >= 0)\n x.subTo(this.m, x);\n}\n// r = \"x^2/R mod m\"; x != r\nfunction montSqrTo(x, r) {\n x.squareTo(r);\n this.reduce(r);\n}\n// r = \"xy/R mod m\"; x,y != r\nfunction montMulTo(x, y, r) {\n x.multiplyTo(y, r);\n this.reduce(r);\n}\nMontgomery.prototype.convert = montConvert;\nMontgomery.prototype.revert = montRevert;\nMontgomery.prototype.reduce = montReduce;\nMontgomery.prototype.mulTo = montMulTo;\nMontgomery.prototype.sqrTo = montSqrTo;\n// (public) this^e % m (HAC 14.85)\nfunction bnModPow(e, m, callback) {\n let i = e.bitLength();\n let k;\n let r = nbv(1);\n const z = new Montgomery(m);\n if (i <= 0)\n return r;\n else if (i < 18)\n k = 1;\n else if (i < 48)\n k = 3;\n else if (i < 144)\n k = 4;\n else if (i < 768)\n k = 5;\n else\n k = 6;\n // precomputation\n const g = [];\n let n = 3;\n const k1 = k - 1;\n const km = (1 << k) - 1;\n g[1] = z.convert(this);\n if (k > 1) {\n const g2 = nbi();\n z.sqrTo(g[1], g2);\n while (n <= km) {\n g[n] = nbi();\n z.mulTo(g2, g[n - 2], g[n]);\n n += 2;\n }\n }\n let j = e.t - 1;\n let w;\n let is1 = true;\n let r2 = nbi();\n let t;\n i = nbits(e[j]) - 1;\n while (j >= 0) {\n if (i >= k1)\n w = (e[j] >> (i - k1)) & km;\n else {\n w = (e[j] & ((1 << (i + 1)) - 1)) << (k1 - i);\n if (j > 0)\n w |= e[j - 1] >> (this.DB + i - k1);\n }\n n = k;\n while ((w & 1) === 0) {\n w >>= 1;\n --n;\n }\n if ((i -= n) < 0) {\n i += this.DB;\n --j;\n }\n if (is1) {\n // ret == 1, don't bother squaring or multiplying it\n g[w].copyTo(r);\n is1 = false;\n }\n else {\n while (n > 1) {\n z.sqrTo(r, r2);\n z.sqrTo(r2, r);\n n -= 2;\n }\n if (n > 0)\n z.sqrTo(r, r2);\n else {\n t = r;\n r = r2;\n r2 = t;\n }\n z.mulTo(r2, g[w], r);\n }\n while (j >= 0 && (e[j] & (1 << i)) === 0) {\n z.sqrTo(r, r2);\n t = r;\n r = r2;\n r2 = t;\n if (--i < 0) {\n i = this.DB - 1;\n --j;\n }\n }\n }\n const result = z.revert(r);\n callback(null, result);\n return result;\n}\n// protected\nBigInteger.prototype.copyTo = bnpCopyTo;\nBigInteger.prototype.fromInt = bnpFromInt;\nBigInteger.prototype.fromString = bnpFromString;\nBigInteger.prototype.clamp = bnpClamp;\nBigInteger.prototype.dlShiftTo = bnpDLShiftTo;\nBigInteger.prototype.drShiftTo = bnpDRShiftTo;\nBigInteger.prototype.lShiftTo = bnpLShiftTo;\nBigInteger.prototype.rShiftTo = bnpRShiftTo;\nBigInteger.prototype.subTo = bnpSubTo;\nBigInteger.prototype.multiplyTo = bnpMultiplyTo;\nBigInteger.prototype.squareTo = bnpSquareTo;\nBigInteger.prototype.divRemTo = bnpDivRemTo;\nBigInteger.prototype.invDigit = bnpInvDigit;\nBigInteger.prototype.addTo = bnpAddTo;\n// public\nBigInteger.prototype.toString = bnToString;\nBigInteger.prototype.negate = bnNegate;\nBigInteger.prototype.abs = bnAbs;\nBigInteger.prototype.compareTo = bnCompareTo;\nBigInteger.prototype.bitLength = bnBitLength;\nBigInteger.prototype.mod = bnMod;\nBigInteger.prototype.equals = bnEquals;\nBigInteger.prototype.add = bnAdd;\nBigInteger.prototype.subtract = bnSubtract;\nBigInteger.prototype.multiply = bnMultiply;\nBigInteger.prototype.divide = bnDivide;\nBigInteger.prototype.modPow = bnModPow;\n// \"constants\"\nBigInteger.ZERO = nbv(0);\nBigInteger.ONE = nbv(1);\n\nexport { BigInteger as default };\n//# sourceMappingURL=BigInteger.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nconst calculateS = async ({ a, g, k, x, B, N, U, }) => {\n return new Promise((resolve, reject) => {\n g.modPow(x, N, (outerErr, outerResult) => {\n if (outerErr) {\n reject(outerErr);\n return;\n }\n B.subtract(k.multiply(outerResult)).modPow(a.add(U.multiply(x)), N, (innerErr, innerResult) => {\n if (innerErr) {\n reject(innerErr);\n return;\n }\n resolve(innerResult.mod(N));\n });\n });\n });\n};\n\nexport { calculateS };\n//# sourceMappingURL=calculateS.mjs.map\n","import BigInteger from '../BigInteger/BigInteger.mjs';\nimport { getHashFromHex } from '../getHashFromHex.mjs';\nimport { getPaddedHex } from '../getPaddedHex.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nconst calculateU = ({ A, B, }) => {\n const U = new BigInteger(getHashFromHex(getPaddedHex(A) + getPaddedHex(B)), 16);\n if (U.equals(BigInteger.ZERO)) {\n throw new Error('U cannot be zero.');\n }\n return U;\n};\n\nexport { calculateU };\n//# sourceMappingURL=calculateU.mjs.map\n","import { getBytesFromHex } from './getBytesFromHex.mjs';\nimport { getHashFromData } from './getHashFromData.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Calculate a hash from a hex string\n * @param {string} hexStr Value to hash.\n * @returns {string} Hex-encoded hash.\n * @private\n */\nconst getHashFromHex = (hexStr) => getHashFromData(getBytesFromHex(hexStr));\n\nexport { getHashFromHex };\n//# sourceMappingURL=getHashFromHex.mjs.map\n","import { HEX_TO_SHORT } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Converts a hexadecimal encoded string to a Uint8Array of bytes.\n *\n * @param encoded The hexadecimal encoded string\n */\nconst getBytesFromHex = (encoded) => {\n if (encoded.length % 2 !== 0) {\n throw new Error('Hex encoded strings must have an even number length');\n }\n const out = new Uint8Array(encoded.length / 2);\n for (let i = 0; i < encoded.length; i += 2) {\n const encodedByte = encoded.slice(i, i + 2).toLowerCase();\n if (encodedByte in HEX_TO_SHORT) {\n out[i / 2] = HEX_TO_SHORT[encodedByte];\n }\n else {\n throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);\n }\n }\n return out;\n};\n\nexport { getBytesFromHex };\n//# sourceMappingURL=getBytesFromHex.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst INIT_N = 'FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD1' +\n '29024E088A67CC74020BBEA63B139B22514A08798E3404DD' +\n 'EF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245' +\n 'E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7ED' +\n 'EE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3D' +\n 'C2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F' +\n '83655D23DCA3AD961C62F356208552BB9ED529077096966D' +\n '670C354E4ABC9804F1746C08CA18217C32905E462E36CE3B' +\n 'E39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9' +\n 'DE2BCBF6955817183995497CEA956AE515D2261898FA0510' +\n '15728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64' +\n 'ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7' +\n 'ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6B' +\n 'F12FFA06D98A0864D87602733EC86A64521F2B18177B200C' +\n 'BBE117577A615D6C770988C0BAD946E208E24FA074E5AB31' +\n '43DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF';\nconst SHORT_TO_HEX = {};\nconst HEX_TO_SHORT = {};\nfor (let i = 0; i < 256; i++) {\n let encodedByte = i.toString(16).toLowerCase();\n if (encodedByte.length === 1) {\n encodedByte = `0${encodedByte}`;\n }\n SHORT_TO_HEX[i] = encodedByte;\n HEX_TO_SHORT[encodedByte] = i;\n}\n\nexport { HEX_TO_SHORT, INIT_N, SHORT_TO_HEX };\n//# sourceMappingURL=constants.mjs.map\n","import { Sha256 } from '@aws-crypto/sha256-js';\nimport { getHexFromBytes } from './getHexFromBytes.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Calculate a hash from a `SourceData`\n * @param {SourceData} data Value to hash.\n * @returns {string} Hex-encoded hash.\n * @private\n */\nconst getHashFromData = (data) => {\n const sha256 = new Sha256();\n sha256.update(data);\n const hashedData = sha256.digestSync();\n const hashHexFromUint8 = getHexFromBytes(hashedData);\n return new Array(64 - hashHexFromUint8.length).join('0') + hashHexFromUint8;\n};\n\nexport { getHashFromData };\n//# sourceMappingURL=getHashFromData.mjs.map\n","import { SHORT_TO_HEX } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Converts a Uint8Array of binary data to a hexadecimal encoded string.\n *\n * @param bytes The binary data to encode\n */\nconst getHexFromBytes = (bytes) => {\n let out = '';\n for (let i = 0; i < bytes.byteLength; i++) {\n out += SHORT_TO_HEX[bytes[i]];\n }\n return out;\n};\n\nexport { getHexFromBytes };\n//# sourceMappingURL=getHexFromBytes.mjs.map\n","import BigInteger from './BigInteger/BigInteger.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Tests if a hex string has it most significant bit set (case-insensitive regex)\n */\nconst HEX_MSB_REGEX = /^[89a-f]/i;\n/**\n * Returns an unambiguous, even-length hex string of the two's complement encoding of an integer.\n *\n * It is compatible with the hex encoding of Java's BigInteger's toByteArray(), wich returns a\n * byte array containing the two's-complement representation of a BigInteger. The array contains\n * the minimum number of bytes required to represent the BigInteger, including at least one sign bit.\n *\n * Examples showing how ambiguity is avoided by left padding with:\n * \t\"00\" (for positive values where the most-significant-bit is set)\n * \"FF\" (for negative values where the most-significant-bit is set)\n *\n * padHex(bigInteger.fromInt(-236)) === \"FF14\"\n * padHex(bigInteger.fromInt(20)) === \"14\"\n *\n * padHex(bigInteger.fromInt(-200)) === \"FF38\"\n * padHex(bigInteger.fromInt(56)) === \"38\"\n *\n * padHex(bigInteger.fromInt(-20)) === \"EC\"\n * padHex(bigInteger.fromInt(236)) === \"00EC\"\n *\n * padHex(bigInteger.fromInt(-56)) === \"C8\"\n * padHex(bigInteger.fromInt(200)) === \"00C8\"\n *\n * @param {AuthBigInteger} bigInt Number to encode.\n * @returns {String} even-length hex string of the two's complement encoding.\n */\nconst getPaddedHex = (bigInt) => {\n if (!(bigInt instanceof BigInteger)) {\n throw new Error('Not a BigInteger');\n }\n const isNegative = bigInt.compareTo(BigInteger.ZERO) < 0;\n /* Get a hex string for abs(bigInt) */\n let hexStr = bigInt.abs().toString(16);\n /* Pad hex to even length if needed */\n hexStr = hexStr.length % 2 !== 0 ? `0${hexStr}` : hexStr;\n /* Prepend \"00\" if the most significant bit is set */\n hexStr = HEX_MSB_REGEX.test(hexStr) ? `00${hexStr}` : hexStr;\n if (isNegative) {\n /* Flip the bits of the representation */\n const invertedNibbles = hexStr\n .split('')\n .map((x) => {\n const invertedNibble = ~parseInt(x, 16) & 0xf;\n return '0123456789ABCDEF'.charAt(invertedNibble);\n })\n .join('');\n /* After flipping the bits, add one to get the 2's complement representation */\n const flippedBitsBI = new BigInteger(invertedNibbles, 16).add(BigInteger.ONE);\n hexStr = flippedBitsBI.toString(16);\n /*\n For hex strings starting with 'FF8', 'FF' can be dropped, e.g. 0xFFFF80=0xFF80=0x80=-128\n\n Any sequence of '1' bits on the left can always be substituted with a single '1' bit\n without changing the represented value.\n\n This only happens in the case when the input is 80...00\n */\n if (hexStr.toUpperCase().startsWith('FF8')) {\n hexStr = hexStr.substring(2);\n }\n }\n return hexStr;\n};\n\nexport { getPaddedHex };\n//# sourceMappingURL=getPaddedHex.mjs.map\n","import { Sha256 } from '@aws-crypto/sha256-js';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Standard HKDF algorithm.\n *\n * @param {Uint8Array} ikm Input key material.\n * @param {Uint8Array} salt Salt value.\n * @param {Uint8Array} info Context and application specific info.\n *\n * @returns {Uint8Array} Strong key material.\n *\n * @internal\n */\nconst getHkdfKey = (ikm, salt, info) => {\n const awsCryptoHash = new Sha256(salt);\n awsCryptoHash.update(ikm);\n const resultFromAWSCryptoPrk = awsCryptoHash.digestSync();\n const awsCryptoHashHmac = new Sha256(resultFromAWSCryptoPrk);\n awsCryptoHashHmac.update(info);\n const resultFromAWSCryptoHmac = awsCryptoHashHmac.digestSync();\n const hashHexFromAWSCrypto = resultFromAWSCryptoHmac;\n return hashHexFromAWSCrypto.slice(0, 16);\n};\n\nexport { getHkdfKey };\n//# sourceMappingURL=getHkdfKey.mjs.map\n","import { WordArray } from '@aws-amplify/core/internals/utils';\nimport { getBytesFromHex } from './getBytesFromHex.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Returns a Uint8Array with a sequence of random nBytes\n *\n * @param {number} nBytes\n * @returns {Uint8Array} fixed-length sequence of random bytes\n */\nconst getRandomBytes = (nBytes) => {\n const str = new WordArray().random(nBytes).toString();\n return getBytesFromHex(str);\n};\n\nexport { getRandomBytes };\n//# sourceMappingURL=getRandomBytes.mjs.map\n","import { base64Encoder } from '@aws-amplify/core/internals/utils';\nimport { getRandomBytes } from './getRandomBytes.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Helper function to generate a random string\n * @returns {string} a random value.\n *\n * @internal\n */\nconst getRandomString = () => base64Encoder.convert(getRandomBytes(40));\n\nexport { getRandomString };\n//# sourceMappingURL=getRandomString.mjs.map\n","import BigInteger from '../BigInteger/BigInteger.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nconst calculateA = async ({ a, g, N, }) => {\n return new Promise((resolve, reject) => {\n g.modPow(a, N, (err, A) => {\n if (err) {\n reject(err);\n return;\n }\n if (A.mod(N).equals(BigInteger.ZERO)) {\n reject(new Error('Illegal parameter. A mod N cannot be 0.'));\n return;\n }\n resolve(A);\n });\n });\n};\n\nexport { calculateA };\n//# sourceMappingURL=calculateA.mjs.map\n","import { AuthAction } from '@aws-amplify/core/internals/utils';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../../../providers/cognito/types/errors.mjs';\nimport { createRespondToAuthChallengeClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createRespondToAuthChallengeClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../../../providers/cognito/factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Handles the SELECT_CHALLENGE response for authentication.\n * Initiates the selected authentication challenge based on user choice.\n *\n * @param {Object} params - The parameters for handling the selected challenge\n * @param {string} params.username - The username for authentication\n * @param {string} params.session - The current authentication session token\n * @param {string} params.selectedChallenge - The challenge type selected by the user\n * @param {CognitoUserPoolConfig} params.config - Cognito User Pool configuration\n * @param {ClientMetadata} [params.clientMetadata] - Optional metadata to be sent with auth requests\n *\n * @returns {Promise} The challenge response\n */\nasync function initiateSelectedChallenge({ username, session, selectedChallenge, config, clientMetadata, }) {\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: config.userPoolEndpoint,\n }),\n });\n return respondToAuthChallenge({\n region: getRegionFromUserPoolId(config.userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, {\n ChallengeName: 'SELECT_CHALLENGE',\n ChallengeResponses: {\n USERNAME: username,\n ANSWER: selectedChallenge,\n },\n ClientId: config.userPoolClientId,\n Session: session,\n ClientMetadata: clientMetadata,\n });\n}\n\nexport { initiateSelectedChallenge };\n//# sourceMappingURL=handleSelectChallenge.mjs.map\n","import { AuthAction } from '@aws-amplify/core/internals/utils';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../../../providers/cognito/types/errors.mjs';\nimport { createRespondToAuthChallengeClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createRespondToAuthChallengeClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../../../providers/cognito/factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport { getUserContextData } from '../../../providers/cognito/utils/userContextData.mjs';\nimport { setActiveSignInUsername } from '../../../providers/cognito/utils/signInHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Handles the SELECT_CHALLENGE response specifically for Password authentication.\n * This function combines the SELECT_CHALLENGE flow with standard password authentication.\n *\n * @param {string} username - The username for authentication\n * @param {string} password - The user's password\n * @param {ClientMetadata} [clientMetadata] - Optional metadata to be sent with auth requests\n * @param {CognitoUserPoolConfig} config - Cognito User Pool configuration\n * @param {string} session - The current authentication session token\n *\n * @returns {Promise} The challenge response\n */\nasync function handleSelectChallengeWithPassword(username, password, clientMetadata, config, session) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const authParameters = {\n ANSWER: 'PASSWORD',\n USERNAME: username,\n PASSWORD: password,\n };\n const userContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, {\n ChallengeName: 'SELECT_CHALLENGE',\n ChallengeResponses: authParameters,\n ClientId: userPoolClientId,\n ClientMetadata: clientMetadata,\n Session: session,\n UserContextData: userContextData,\n });\n const activeUsername = response.ChallengeParameters?.USERNAME ?? username;\n setActiveSignInUsername(activeUsername);\n return response;\n}\n\nexport { handleSelectChallengeWithPassword };\n//# sourceMappingURL=handleSelectChallengeWithPassword.mjs.map\n","import { AuthAction } from '@aws-amplify/core/internals/utils';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../../../providers/cognito/types/errors.mjs';\nimport { createRespondToAuthChallengeClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createRespondToAuthChallengeClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../../../providers/cognito/factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport { getAuthenticationHelper } from '../../../providers/cognito/utils/srp/getAuthenticationHelper.mjs';\nimport '../../../providers/cognito/utils/srp/constants.mjs';\nimport '@aws-crypto/sha256-js';\nimport { getUserContextData } from '../../../providers/cognito/utils/userContextData.mjs';\nimport { setActiveSignInUsername, retryOnResourceNotFoundException, handlePasswordVerifierChallenge } from '../../../providers/cognito/utils/signInHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Handles the SELECT_CHALLENGE response specifically for Password SRP authentication.\n * This function combines the SELECT_CHALLENGE flow with Password SRP protocol.\n *\n * @param {string} username - The username for authentication\n * @param {string} password - The user's password\n * @param {ClientMetadata} [clientMetadata] - Optional metadata to be sent with auth requests\n * @param {CognitoUserPoolConfig} config - Cognito User Pool configuration\n * @param {string} session - The current authentication session token\n * @param {AuthTokenOrchestrator} tokenOrchestrator - Token orchestrator for managing auth tokens\n *\n * @returns {Promise} The challenge response\n */\nasync function handleSelectChallengeWithPasswordSRP(username, password, clientMetadata, config, session, tokenOrchestrator) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const userPoolName = userPoolId.split('_')[1] || '';\n const authenticationHelper = await getAuthenticationHelper(userPoolName);\n const authParameters = {\n ANSWER: 'PASSWORD_SRP',\n USERNAME: username,\n SRP_A: authenticationHelper.A.toString(16),\n };\n const userContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const respondToAuthChallenge = createRespondToAuthChallengeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await respondToAuthChallenge({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignIn),\n }, {\n ChallengeName: 'SELECT_CHALLENGE',\n ChallengeResponses: authParameters,\n ClientId: userPoolClientId,\n ClientMetadata: clientMetadata,\n Session: session,\n UserContextData: userContextData,\n });\n const activeUsername = response.ChallengeParameters?.USERNAME ?? username;\n setActiveSignInUsername(activeUsername);\n if (response.ChallengeName === 'PASSWORD_VERIFIER') {\n return retryOnResourceNotFoundException(handlePasswordVerifierChallenge, [\n password,\n response.ChallengeParameters,\n clientMetadata,\n response.Session,\n authenticationHelper,\n config,\n tokenOrchestrator,\n ], activeUsername, tokenOrchestrator);\n }\n return response;\n}\n\nexport { handleSelectChallengeWithPasswordSRP };\n//# sourceMappingURL=handleSelectChallengeWithPasswordSRP.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst MONTH_NAMES = [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec',\n];\nconst WEEK_NAMES = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\nconst getNowString = () => {\n const now = new Date();\n const weekDay = WEEK_NAMES[now.getUTCDay()];\n const month = MONTH_NAMES[now.getUTCMonth()];\n const day = now.getUTCDate();\n let hours = now.getUTCHours();\n if (hours < 10) {\n hours = `0${hours}`;\n }\n let minutes = now.getUTCMinutes();\n if (minutes < 10) {\n minutes = `0${minutes}`;\n }\n let seconds = now.getUTCSeconds();\n if (seconds < 10) {\n seconds = `0${seconds}`;\n }\n const year = now.getUTCFullYear();\n // ddd MMM D HH:mm:ss UTC YYYY\n const dateNow = `${weekDay} ${month} ${day} ${hours}:${minutes}:${seconds} UTC ${year}`;\n return dateNow;\n};\n\nexport { getNowString };\n//# sourceMappingURL=getNowString.mjs.map\n","import { Sha256 } from '@aws-crypto/sha256-js';\nimport { base64Encoder, base64Decoder } from '@aws-amplify/core/internals/utils';\nimport { textEncoder } from '../textEncoder/index.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst getSignatureString = ({ userPoolName, username, challengeParameters, dateNow, hkdf, }) => {\n const bufUPIDaToB = textEncoder.convert(userPoolName);\n const bufUNaToB = textEncoder.convert(username);\n const bufSBaToB = urlB64ToUint8Array(challengeParameters.SECRET_BLOCK);\n const bufDNaToB = textEncoder.convert(dateNow);\n const bufConcat = new Uint8Array(bufUPIDaToB.byteLength +\n bufUNaToB.byteLength +\n bufSBaToB.byteLength +\n bufDNaToB.byteLength);\n bufConcat.set(bufUPIDaToB, 0);\n bufConcat.set(bufUNaToB, bufUPIDaToB.byteLength);\n bufConcat.set(bufSBaToB, bufUPIDaToB.byteLength + bufUNaToB.byteLength);\n bufConcat.set(bufDNaToB, bufUPIDaToB.byteLength + bufUNaToB.byteLength + bufSBaToB.byteLength);\n const awsCryptoHash = new Sha256(hkdf);\n awsCryptoHash.update(bufConcat);\n const resultFromAWSCrypto = awsCryptoHash.digestSync();\n const signatureString = base64Encoder.convert(resultFromAWSCrypto);\n return signatureString;\n};\nconst urlB64ToUint8Array = (base64String) => {\n const padding = '='.repeat((4 - (base64String.length % 4)) % 4);\n const base64 = (base64String + padding).replace(/-/g, '+').replace(/_/g, '/');\n const rawData = base64Decoder.convert(base64);\n const outputArray = new Uint8Array(rawData.length);\n for (let i = 0; i < rawData.length; ++i) {\n outputArray[i] = rawData.charCodeAt(i);\n }\n return outputArray;\n};\n\nexport { getSignatureString };\n//# sourceMappingURL=getSignatureString.mjs.map\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { assertServiceError } from '../../../errors/utils/assertServiceError.mjs';\nimport { retryOnResourceNotFoundException, handleCustomAuthFlowWithoutSRP, getActiveSignInUsername, getNewDeviceMetadata, getSignInResult, getSignInResultFromError } from '../utils/signInHelpers.mjs';\nimport '../../../client/utils/store/autoSignInStore.mjs';\nimport { setActiveSignInState, cleanActiveSignInState } from '../../../client/utils/store/signInStore.mjs';\nimport { cacheCognitoTokens } from '../tokenProvider/cacheTokens.mjs';\nimport '../utils/refreshAuthTokens.mjs';\nimport '../tokenProvider/errorHelpers.mjs';\nimport '../utils/types.mjs';\nimport { tokenOrchestrator } from '../tokenProvider/tokenProvider.mjs';\nimport { dispatchSignedInHubEvent } from '../utils/dispatchSignedInHubEvent.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Signs a user in using a custom authentication flow without password\n *\n * @param input - The SignInWithCustomAuthInput object\n * @returns AuthSignInResult\n * @throws service: {@link InitiateAuthException } - Cognito service errors thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password\n * are not defined.\n * @throws SignInWithCustomAuthOutput - Thrown when the token provider config is invalid.\n */\nasync function signInWithCustomAuth(input) {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { username, password, options } = input;\n const signInDetails = {\n loginId: username,\n authFlowType: 'CUSTOM_WITHOUT_SRP',\n };\n const metadata = options?.clientMetadata;\n assertValidationError(!!username, AuthValidationErrorCode.EmptySignInUsername);\n assertValidationError(!password, AuthValidationErrorCode.CustomAuthSignInPassword);\n try {\n const { ChallengeName: retriedChallengeName, ChallengeParameters: retiredChallengeParameters, AuthenticationResult, Session, } = await retryOnResourceNotFoundException(handleCustomAuthFlowWithoutSRP, [username, metadata, authConfig, tokenOrchestrator], username, tokenOrchestrator);\n const activeUsername = getActiveSignInUsername(username);\n // sets up local state used during the sign-in process\n setActiveSignInState({\n signInSession: Session,\n username: activeUsername,\n challengeName: retriedChallengeName,\n signInDetails,\n });\n if (AuthenticationResult) {\n await cacheCognitoTokens({\n username: activeUsername,\n ...AuthenticationResult,\n NewDeviceMetadata: await getNewDeviceMetadata({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: AuthenticationResult.NewDeviceMetadata,\n accessToken: AuthenticationResult.AccessToken,\n }),\n signInDetails,\n });\n cleanActiveSignInState();\n await dispatchSignedInHubEvent();\n return {\n isSignedIn: true,\n nextStep: { signInStep: 'DONE' },\n };\n }\n return getSignInResult({\n challengeName: retriedChallengeName,\n challengeParameters: retiredChallengeParameters,\n });\n }\n catch (error) {\n cleanActiveSignInState();\n assertServiceError(error);\n const result = getSignInResultFromError(error.name);\n if (result)\n return result;\n throw error;\n }\n}\n\nexport { signInWithCustomAuth };\n//# sourceMappingURL=signInWithCustomAuth.mjs.map\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { assertServiceError } from '../../../errors/utils/assertServiceError.mjs';\nimport { handleCustomSRPAuthFlow, getActiveSignInUsername, getNewDeviceMetadata, getSignInResult, getSignInResultFromError } from '../utils/signInHelpers.mjs';\nimport '../../../client/utils/store/autoSignInStore.mjs';\nimport { setActiveSignInState, cleanActiveSignInState } from '../../../client/utils/store/signInStore.mjs';\nimport { cacheCognitoTokens } from '../tokenProvider/cacheTokens.mjs';\nimport '../utils/refreshAuthTokens.mjs';\nimport '../tokenProvider/errorHelpers.mjs';\nimport '../utils/types.mjs';\nimport { tokenOrchestrator } from '../tokenProvider/tokenProvider.mjs';\nimport { dispatchSignedInHubEvent } from '../utils/dispatchSignedInHubEvent.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Signs a user in using a custom authentication flow with SRP\n *\n * @param input - The SignInWithCustomSRPAuthInput object\n * @returns SignInWithCustomSRPAuthOutput\n * @throws service: {@link InitiateAuthException }, {@link RespondToAuthChallengeException } - Cognito\n * service errors thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function signInWithCustomSRPAuth(input) {\n const { username, password, options } = input;\n const signInDetails = {\n loginId: username,\n authFlowType: 'CUSTOM_WITH_SRP',\n };\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const metadata = options?.clientMetadata;\n assertValidationError(!!username, AuthValidationErrorCode.EmptySignInUsername);\n assertValidationError(!!password, AuthValidationErrorCode.EmptySignInPassword);\n try {\n const { ChallengeName: handledChallengeName, ChallengeParameters: handledChallengeParameters, AuthenticationResult, Session, } = await handleCustomSRPAuthFlow(username, password, metadata, authConfig, tokenOrchestrator);\n const activeUsername = getActiveSignInUsername(username);\n // sets up local state used during the sign-in process\n setActiveSignInState({\n signInSession: Session,\n username: activeUsername,\n challengeName: handledChallengeName,\n signInDetails,\n });\n if (AuthenticationResult) {\n await cacheCognitoTokens({\n username: activeUsername,\n ...AuthenticationResult,\n NewDeviceMetadata: await getNewDeviceMetadata({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: AuthenticationResult.NewDeviceMetadata,\n accessToken: AuthenticationResult.AccessToken,\n }),\n signInDetails,\n });\n cleanActiveSignInState();\n await dispatchSignedInHubEvent();\n return {\n isSignedIn: true,\n nextStep: { signInStep: 'DONE' },\n };\n }\n return getSignInResult({\n challengeName: handledChallengeName,\n challengeParameters: handledChallengeParameters,\n });\n }\n catch (error) {\n cleanActiveSignInState();\n assertServiceError(error);\n const result = getSignInResultFromError(error.name);\n if (result)\n return result;\n throw error;\n }\n}\n\nexport { signInWithCustomSRPAuth };\n//# sourceMappingURL=signInWithCustomSRPAuth.mjs.map\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { assertServiceError } from '../../../errors/utils/assertServiceError.mjs';\nimport { handleUserSRPAuthFlow, getActiveSignInUsername, getNewDeviceMetadata, getSignInResult, getSignInResultFromError } from '../utils/signInHelpers.mjs';\nimport '../../../client/utils/store/autoSignInStore.mjs';\nimport { setActiveSignInState, cleanActiveSignInState } from '../../../client/utils/store/signInStore.mjs';\nimport { cacheCognitoTokens } from '../tokenProvider/cacheTokens.mjs';\nimport '../utils/refreshAuthTokens.mjs';\nimport '../tokenProvider/errorHelpers.mjs';\nimport '../utils/types.mjs';\nimport { tokenOrchestrator } from '../tokenProvider/tokenProvider.mjs';\nimport { dispatchSignedInHubEvent } from '../utils/dispatchSignedInHubEvent.mjs';\nimport { resetAutoSignIn } from './autoSignIn.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Signs a user in\n *\n * @param input - The SignInWithSRPInput object\n * @returns SignInWithSRPOutput\n * @throws service: {@link InitiateAuthException }, {@link RespondToAuthChallengeException } - Cognito service errors\n * thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function signInWithSRP(input) {\n const { username, password } = input;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n const signInDetails = {\n loginId: username,\n authFlowType: 'USER_SRP_AUTH',\n };\n assertTokenProviderConfig(authConfig);\n const clientMetaData = input.options?.clientMetadata;\n assertValidationError(!!username, AuthValidationErrorCode.EmptySignInUsername);\n assertValidationError(!!password, AuthValidationErrorCode.EmptySignInPassword);\n try {\n const { ChallengeName: handledChallengeName, ChallengeParameters: handledChallengeParameters, AuthenticationResult, Session, } = await handleUserSRPAuthFlow(username, password, clientMetaData, authConfig, tokenOrchestrator);\n const activeUsername = getActiveSignInUsername(username);\n // sets up local state used during the sign-in process\n setActiveSignInState({\n signInSession: Session,\n username: activeUsername,\n challengeName: handledChallengeName,\n signInDetails,\n });\n if (AuthenticationResult) {\n await cacheCognitoTokens({\n username: activeUsername,\n ...AuthenticationResult,\n NewDeviceMetadata: await getNewDeviceMetadata({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: AuthenticationResult.NewDeviceMetadata,\n accessToken: AuthenticationResult.AccessToken,\n }),\n signInDetails,\n });\n cleanActiveSignInState();\n await dispatchSignedInHubEvent();\n resetAutoSignIn();\n return {\n isSignedIn: true,\n nextStep: { signInStep: 'DONE' },\n };\n }\n return getSignInResult({\n challengeName: handledChallengeName,\n challengeParameters: handledChallengeParameters,\n });\n }\n catch (error) {\n cleanActiveSignInState();\n resetAutoSignIn();\n assertServiceError(error);\n const result = getSignInResultFromError(error.name);\n if (result)\n return result;\n throw error;\n }\n}\n\nexport { signInWithSRP };\n//# sourceMappingURL=signInWithSRP.mjs.map\n","import { autoSignInStore } from '../../../client/utils/store/autoSignInStore.mjs';\nimport '../../../client/utils/store/signInStore.mjs';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { AUTO_SIGN_IN_EXCEPTION } from '../../../errors/constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst initialAutoSignIn = async () => {\n throw new AuthError({\n name: AUTO_SIGN_IN_EXCEPTION,\n message: 'The autoSignIn flow has not started, or has been cancelled/completed.',\n recoverySuggestion: 'Please try to use the signIn API or log out before starting a new autoSignIn flow.',\n });\n};\n/**\n * Signs a user in automatically after finishing the sign-up process.\n *\n * This API will automatically sign a user in if the autoSignIn flow has been completed in the following cases:\n * - User confirmed their account with a verification code sent to their phone or email (default option).\n * - User confirmed their account with a verification link sent to their phone or email. In order to\n * enable this option you need to go to the Amazon Cognito [console](https://aws.amazon.com/pm/cognito),\n * look for your userpool, then go to the `Messaging` tab and enable `link` mode inside the `Verification message` option.\n * Finally you need to define the `signUpVerificationMethod` in your `Auth` config.\n *\n * @example\n * ```typescript\n * Amplify.configure({\n * Auth: {\n * Cognito: {\n * ...cognitoConfig,\n * signUpVerificationMethod: \"link\" // the default value is \"code\"\n * }\n *\t}});\n * ```\n *\n * @throws AutoSignInException - Thrown when the autoSignIn flow has not started, or has been cancelled/completed.\n * @returns The signInOutput.\n *\n * @example\n * ```typescript\n * // handleSignUp.ts\n * async function handleSignUp(\n * username:string,\n * password:string\n * ){\n * try {\n * const { nextStep } = await signUp({\n * username,\n * password,\n * options: {\n * userAttributes:{ email:'email@email.com'},\n * autoSignIn: true // This enables the auto sign-in flow.\n * },\n * });\n *\n * handleSignUpStep(nextStep);\n *\n * } catch (error) {\n * console.log(error);\n * }\n * }\n *\n * // handleConfirmSignUp.ts\n * async function handleConfirmSignUp(username:string, confirmationCode:string) {\n * try {\n * const { nextStep } = await confirmSignUp({\n * username,\n * confirmationCode,\n * });\n *\n * handleSignUpStep(nextStep);\n * } catch (error) {\n * console.log(error);\n * }\n * }\n *\n * // signUpUtils.ts\n * async function handleSignUpStep( step: SignUpOutput[\"nextStep\"]) {\n * switch (step.signUpStep) {\n * case \"CONFIRM_SIGN_UP\":\n *\n * // Redirect end-user to confirm-sign up screen.\n *\n * case \"COMPLETE_AUTO_SIGN_IN\":\n *\t const codeDeliveryDetails = step.codeDeliveryDetails;\n * if (codeDeliveryDetails) {\n * // Redirect user to confirm-sign-up with link screen.\n * }\n * const signInOutput = await autoSignIn();\n * // handle sign-in steps\n * }\n *\n * ```\n */\n// TODO(Eslint): can this be refactored not using `let` on exported member?\n// eslint-disable-next-line import/no-mutable-exports\nlet autoSignIn = initialAutoSignIn;\n/**\n * Sets the context of autoSignIn at run time.\n * @internal\n */\nfunction setAutoSignIn(callback) {\n autoSignIn = callback;\n}\n/**\n * Resets the context\n *\n * @internal\n */\nfunction resetAutoSignIn(resetCallback = true) {\n if (resetCallback) {\n autoSignIn = initialAutoSignIn;\n }\n autoSignInStore.dispatch({ type: 'RESET' });\n}\n\nexport { autoSignIn, resetAutoSignIn, setAutoSignIn };\n//# sourceMappingURL=autoSignIn.mjs.map\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { assertServiceError } from '../../../errors/utils/assertServiceError.mjs';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { retryOnResourceNotFoundException, handleUserPasswordAuthFlow, getActiveSignInUsername, getNewDeviceMetadata, getSignInResult, getSignInResultFromError } from '../utils/signInHelpers.mjs';\nimport '../../../client/utils/store/autoSignInStore.mjs';\nimport { setActiveSignInState, cleanActiveSignInState } from '../../../client/utils/store/signInStore.mjs';\nimport { cacheCognitoTokens } from '../tokenProvider/cacheTokens.mjs';\nimport '../utils/refreshAuthTokens.mjs';\nimport '../tokenProvider/errorHelpers.mjs';\nimport '../utils/types.mjs';\nimport { tokenOrchestrator } from '../tokenProvider/tokenProvider.mjs';\nimport { dispatchSignedInHubEvent } from '../utils/dispatchSignedInHubEvent.mjs';\nimport { resetAutoSignIn } from './autoSignIn.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Signs a user in using USER_PASSWORD_AUTH AuthFlowType\n *\n * @param input - The SignInWithUserPasswordInput object\n * @returns SignInWithUserPasswordOutput\n * @throws service: {@link InitiateAuthException } - Cognito service error thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function signInWithUserPassword(input) {\n const { username, password, options } = input;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n const signInDetails = {\n loginId: username,\n authFlowType: 'USER_PASSWORD_AUTH',\n };\n assertTokenProviderConfig(authConfig);\n const metadata = options?.clientMetadata;\n assertValidationError(!!username, AuthValidationErrorCode.EmptySignInUsername);\n assertValidationError(!!password, AuthValidationErrorCode.EmptySignInPassword);\n try {\n const { ChallengeName: retiredChallengeName, ChallengeParameters: retriedChallengeParameters, AuthenticationResult, Session, } = await retryOnResourceNotFoundException(handleUserPasswordAuthFlow, [username, password, metadata, authConfig, tokenOrchestrator], username, tokenOrchestrator);\n const activeUsername = getActiveSignInUsername(username);\n // sets up local state used during the sign-in process\n setActiveSignInState({\n signInSession: Session,\n username: activeUsername,\n challengeName: retiredChallengeName,\n signInDetails,\n });\n if (AuthenticationResult) {\n await cacheCognitoTokens({\n ...AuthenticationResult,\n username: activeUsername,\n NewDeviceMetadata: await getNewDeviceMetadata({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: AuthenticationResult.NewDeviceMetadata,\n accessToken: AuthenticationResult.AccessToken,\n }),\n signInDetails,\n });\n cleanActiveSignInState();\n await dispatchSignedInHubEvent();\n resetAutoSignIn();\n return {\n isSignedIn: true,\n nextStep: { signInStep: 'DONE' },\n };\n }\n return getSignInResult({\n challengeName: retiredChallengeName,\n challengeParameters: retriedChallengeParameters,\n });\n }\n catch (error) {\n cleanActiveSignInState();\n resetAutoSignIn();\n assertServiceError(error);\n const result = getSignInResultFromError(error.name);\n if (result)\n return result;\n throw error;\n }\n}\n\nexport { signInWithUserPassword };\n//# sourceMappingURL=signInWithUserPassword.mjs.map\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { assertServiceError } from '../../../errors/utils/assertServiceError.mjs';\nimport { getActiveSignInUsername, getNewDeviceMetadata, getSignInResult, getSignInResultFromError } from '../utils/signInHelpers.mjs';\nimport { autoSignInStore } from '../../../client/utils/store/autoSignInStore.mjs';\nimport { setActiveSignInState, cleanActiveSignInState } from '../../../client/utils/store/signInStore.mjs';\nimport { cacheCognitoTokens } from '../tokenProvider/cacheTokens.mjs';\nimport { dispatchSignedInHubEvent } from '../utils/dispatchSignedInHubEvent.mjs';\nimport '../utils/refreshAuthTokens.mjs';\nimport '../tokenProvider/errorHelpers.mjs';\nimport '../utils/types.mjs';\nimport { tokenOrchestrator } from '../tokenProvider/tokenProvider.mjs';\nimport { handleUserAuthFlow } from '../../../client/flows/userAuth/handleUserAuthFlow.mjs';\nimport { resetAutoSignIn } from './autoSignIn.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Signs a user in through a registered email or phone number without a password by by receiving and entering an OTP.\n *\n * @param input - The SignInWithUserAuthInput object\n * @returns SignInWithUserAuthOutput\n * @throws service: {@link InitiateAuthException }, {@link RespondToAuthChallengeException } - Cognito service errors\n * thrown during the sign-in process.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown when either username or password -- needs to change\n * are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function signInWithUserAuth(input) {\n const { username, password, options } = input;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n const signInDetails = {\n loginId: username,\n authFlowType: 'USER_AUTH',\n };\n assertTokenProviderConfig(authConfig);\n const clientMetaData = options?.clientMetadata;\n const preferredChallenge = options?.preferredChallenge;\n assertValidationError(!!username, AuthValidationErrorCode.EmptySignInUsername);\n try {\n const handleUserAuthFlowInput = {\n username,\n config: authConfig,\n tokenOrchestrator,\n clientMetadata: clientMetaData,\n preferredChallenge,\n password,\n };\n const autoSignInStoreState = autoSignInStore.getState();\n if (autoSignInStoreState.active &&\n autoSignInStoreState.username === username) {\n handleUserAuthFlowInput.session = autoSignInStoreState.session;\n }\n const response = await handleUserAuthFlow(handleUserAuthFlowInput);\n const activeUsername = getActiveSignInUsername(username);\n setActiveSignInState({\n signInSession: response.Session,\n username: activeUsername,\n challengeName: response.ChallengeName,\n signInDetails,\n });\n if (response.AuthenticationResult) {\n await cacheCognitoTokens({\n username: activeUsername,\n ...response.AuthenticationResult,\n NewDeviceMetadata: await getNewDeviceMetadata({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: response.AuthenticationResult.NewDeviceMetadata,\n accessToken: response.AuthenticationResult.AccessToken,\n }),\n signInDetails,\n });\n cleanActiveSignInState();\n await dispatchSignedInHubEvent();\n resetAutoSignIn();\n return {\n isSignedIn: true,\n nextStep: { signInStep: 'DONE' },\n };\n }\n return getSignInResult({\n challengeName: response.ChallengeName,\n challengeParameters: response.ChallengeParameters,\n availableChallenges: 'AvailableChallenges' in response\n ? response.AvailableChallenges\n : undefined,\n });\n }\n catch (error) {\n cleanActiveSignInState();\n resetAutoSignIn();\n assertServiceError(error);\n const result = getSignInResultFromError(error.name);\n if (result)\n return result;\n throw error;\n }\n}\n\nexport { signInWithUserAuth };\n//# sourceMappingURL=signInWithUserAuth.mjs.map\n","import { AuthAction } from '@aws-amplify/core/internals/utils';\nimport { getUserContextData } from '../../../providers/cognito/utils/userContextData.mjs';\nimport { createInitiateAuthClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createInitiateAuthClient.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport '../../../providers/cognito/types/errors.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../../../providers/cognito/factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport { handlePasswordSRP } from '../shared/handlePasswordSRP.mjs';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { setActiveSignInUsername } from '../../../providers/cognito/utils/signInHelpers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Handles user authentication flow with configurable challenge preferences.\n * Supports AuthFactorType challenges through the USER_AUTH flow.\n *\n * @param {HandleUserAuthFlowInput} params - Authentication flow parameters\n * @param {string} params.username - The username for authentication\n * @param {Record} [params.clientMetadata] - Optional metadata to pass to authentication service\n * @param {CognitoUserPoolConfig} params.config - Cognito User Pool configuration\n * @param {AuthTokenOrchestrator} params.tokenOrchestrator - Manages authentication tokens and device tracking\n * @param {AuthFactorType} [params.preferredChallenge] - Optional preferred authentication method\n * @param {string} [params.password] - Required when preferredChallenge is 'PASSWORD' or 'PASSWORD_SRP'\n *\n * @returns {Promise} The authentication response from Cognito\n */\nasync function handleUserAuthFlow({ username, clientMetadata, config, tokenOrchestrator, preferredChallenge, password, session, }) {\n const { userPoolId, userPoolClientId, userPoolEndpoint } = config;\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const authParameters = { USERNAME: username };\n if (preferredChallenge) {\n if (preferredChallenge === 'PASSWORD_SRP') {\n assertValidationError(!!password, AuthValidationErrorCode.EmptySignInPassword);\n return handlePasswordSRP({\n username,\n password,\n clientMetadata,\n config,\n tokenOrchestrator,\n authFlow: 'USER_AUTH',\n preferredChallenge,\n });\n }\n if (preferredChallenge === 'PASSWORD') {\n assertValidationError(!!password, AuthValidationErrorCode.EmptySignInPassword);\n authParameters.PASSWORD = password;\n }\n authParameters.PREFERRED_CHALLENGE = preferredChallenge;\n }\n const jsonReq = {\n AuthFlow: 'USER_AUTH',\n AuthParameters: authParameters,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n };\n if (session) {\n jsonReq.Session = session;\n }\n const initiateAuth = createInitiateAuthClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await initiateAuth({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignIn),\n }, jsonReq);\n // Set the active username immediately after successful authentication attempt\n // If a user starts a new sign-in while another sign-in is incomplete,\n // this ensures we're tracking the correct user for subsequent auth challenges.\n setActiveSignInUsername(username);\n return response;\n}\n\nexport { handleUserAuthFlow };\n//# sourceMappingURL=handleUserAuthFlow.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { parseJsonError, parseJsonBody } from '@aws-amplify/core/internals/aws-client-utils';\nimport { validationErrorMap } from '../../../../common/AuthErrorStrings.mjs';\nimport { AuthError } from '../../../../errors/AuthError.mjs';\nimport { AuthValidationErrorCode } from '../../../../errors/types/validation.mjs';\nimport { assertServiceError } from '../../../../errors/utils/assertServiceError.mjs';\nimport { SignUpException } from '../../../../providers/cognito/types/errors.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createSignUpClientDeserializer = () => async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n assertServiceError(error);\n if (\n // Missing Password Error\n // 1 validation error detected: Value at 'password'failed to satisfy constraint: Member must not be null\n error.name === SignUpException.InvalidParameterException &&\n /'password'/.test(error.message) &&\n /Member must not be null/.test(error.message)) {\n const name = AuthValidationErrorCode.EmptySignUpPassword;\n const { message, recoverySuggestion } = validationErrorMap[name];\n throw new AuthError({\n name,\n message,\n recoverySuggestion,\n });\n }\n throw new AuthError({ name: error.name, message: error.message });\n }\n return parseJsonBody(response);\n};\nconst createSignUpClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('SignUp'), createSignUpClientDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createSignUpClient, createSignUpClientDeserializer };\n//# sourceMappingURL=createSignUpClient.mjs.map\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport { getUserContextData } from '../utils/userContextData.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../types/errors.mjs';\nimport { createForgotPasswordClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createForgotPasswordClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Resets a user's password.\n *\n * @param input - The ResetPasswordInput object.\n * @returns ResetPasswordOutput\n * @throws -{@link ForgotPasswordException }\n * Thrown due to an invalid confirmation code or password.\n * @throws -{@link AuthValidationErrorCode }\n * Thrown due to an empty username.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n **/\nasync function resetPassword(input) {\n const { username } = input;\n assertValidationError(!!username, AuthValidationErrorCode.EmptyResetPasswordUsername);\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolClientId, userPoolId, userPoolEndpoint } = authConfig;\n const clientMetadata = input.options?.clientMetadata;\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const forgotPassword = createForgotPasswordClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const res = await forgotPassword({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ResetPassword),\n }, {\n Username: username,\n ClientMetadata: clientMetadata,\n ClientId: userPoolClientId,\n UserContextData,\n });\n const codeDeliveryDetails = res.CodeDeliveryDetails;\n return {\n isPasswordReset: false,\n nextStep: {\n resetPasswordStep: 'CONFIRM_RESET_PASSWORD_WITH_CODE',\n codeDeliveryDetails: {\n deliveryMedium: codeDeliveryDetails?.DeliveryMedium,\n destination: codeDeliveryDetails?.Destination,\n attributeName: codeDeliveryDetails?.AttributeName,\n },\n },\n };\n}\n\nexport { resetPassword };\n//# sourceMappingURL=resetPassword.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createForgotPasswordClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('ForgotPassword'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createForgotPasswordClient };\n//# sourceMappingURL=createForgotPasswordClient.mjs.map\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport { getUserContextData } from '../utils/userContextData.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../types/errors.mjs';\nimport { createConfirmForgotPasswordClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createConfirmForgotPasswordClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Confirms the new password and verification code to reset the password.\n *\n * @param input - The ConfirmResetPasswordInput object.\n * @throws -{@link ConfirmForgotPasswordException }\n * Thrown due to an invalid confirmation code or password.\n * @throws -{@link AuthValidationErrorCode }\n * Thrown due to an empty confirmation code, password or username.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function confirmResetPassword(input) {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolClientId, userPoolId, userPoolEndpoint } = authConfig;\n const { username, newPassword } = input;\n assertValidationError(!!username, AuthValidationErrorCode.EmptyConfirmResetPasswordUsername);\n assertValidationError(!!newPassword, AuthValidationErrorCode.EmptyConfirmResetPasswordNewPassword);\n const code = input.confirmationCode;\n assertValidationError(!!code, AuthValidationErrorCode.EmptyConfirmResetPasswordConfirmationCode);\n const metadata = input.options?.clientMetadata;\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const confirmForgotPassword = createConfirmForgotPasswordClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await confirmForgotPassword({\n region: getRegionFromUserPoolId(authConfig.userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmResetPassword),\n }, {\n Username: username,\n ConfirmationCode: code,\n Password: newPassword,\n ClientMetadata: metadata,\n ClientId: authConfig.userPoolClientId,\n UserContextData,\n });\n}\n\nexport { confirmResetPassword };\n//# sourceMappingURL=confirmResetPassword.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createConfirmForgotPasswordClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('ConfirmForgotPassword'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createConfirmForgotPasswordClient };\n//# sourceMappingURL=createConfirmForgotPasswordClient.mjs.map\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport { getUserContextData } from '../utils/userContextData.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../types/errors.mjs';\nimport { createResendConfirmationCodeClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createResendConfirmationCodeClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Resend the confirmation code while signing up\n *\n * @param input - The ResendSignUpCodeInput object\n * @returns ResendSignUpCodeOutput\n * @throws service: {@link ResendConfirmationException } - Cognito service errors thrown when resending the code.\n * @throws validation: {@link AuthValidationErrorCode } - Validation errors thrown either username are not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function resendSignUpCode(input) {\n const { username } = input;\n assertValidationError(!!username, AuthValidationErrorCode.EmptySignUpUsername);\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolClientId, userPoolId, userPoolEndpoint } = authConfig;\n const clientMetadata = input.options?.clientMetadata;\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const resendConfirmationCode = createResendConfirmationCodeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { CodeDeliveryDetails } = await resendConfirmationCode({\n region: getRegionFromUserPoolId(authConfig.userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ResendSignUpCode),\n }, {\n Username: username,\n ClientMetadata: clientMetadata,\n ClientId: authConfig.userPoolClientId,\n UserContextData,\n });\n const { DeliveryMedium, AttributeName, Destination } = {\n ...CodeDeliveryDetails,\n };\n return {\n destination: Destination,\n deliveryMedium: DeliveryMedium,\n attributeName: AttributeName\n ? AttributeName\n : undefined,\n };\n}\n\nexport { resendSignUpCode };\n//# sourceMappingURL=resendSignUpCode.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createResendConfirmationCodeClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('ResendConfirmationCode'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createResendConfirmationCodeClient };\n//# sourceMappingURL=createResendConfirmationCodeClient.mjs.map\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction, HubInternal } from '@aws-amplify/core/internals/utils';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport { getUserContextData } from '../utils/userContextData.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../types/errors.mjs';\nimport { createConfirmSignUpClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createConfirmSignUpClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { autoSignInStore } from '../../../client/utils/store/autoSignInStore.mjs';\nimport '../../../client/utils/store/signInStore.mjs';\nimport { resetAutoSignIn } from './autoSignIn.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Confirms a new user account.\n *\n * @param input - The ConfirmSignUpInput object.\n * @returns ConfirmSignUpOutput\n * @throws -{@link ConfirmSignUpException }\n * Thrown due to an invalid confirmation code.\n * @throws -{@link AuthValidationErrorCode }\n * Thrown due to an empty confirmation code\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function confirmSignUp(input) {\n const { username, confirmationCode, options } = input;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolId, userPoolClientId, userPoolEndpoint } = authConfig;\n const clientMetadata = options?.clientMetadata;\n assertValidationError(!!username, AuthValidationErrorCode.EmptyConfirmSignUpUsername);\n assertValidationError(!!confirmationCode, AuthValidationErrorCode.EmptyConfirmSignUpCode);\n const UserContextData = getUserContextData({\n username,\n userPoolId,\n userPoolClientId,\n });\n const confirmSignUpClient = createConfirmSignUpClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { Session: session } = await confirmSignUpClient({\n region: getRegionFromUserPoolId(authConfig.userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmSignUp),\n }, {\n Username: username,\n ConfirmationCode: confirmationCode,\n ClientMetadata: clientMetadata,\n ForceAliasCreation: options?.forceAliasCreation,\n ClientId: authConfig.userPoolClientId,\n UserContextData,\n });\n return new Promise((resolve, reject) => {\n try {\n const signUpOut = {\n isSignUpComplete: true,\n nextStep: {\n signUpStep: 'DONE',\n },\n };\n const autoSignInStoreState = autoSignInStore.getState();\n if (!autoSignInStoreState.active ||\n autoSignInStoreState.username !== username) {\n resolve(signUpOut);\n resetAutoSignIn();\n return;\n }\n autoSignInStore.dispatch({ type: 'SET_SESSION', value: session });\n const stopListener = HubInternal.listen('auth-internal', ({ payload }) => {\n switch (payload.event) {\n case 'autoSignIn':\n resolve({\n isSignUpComplete: true,\n nextStep: {\n signUpStep: 'COMPLETE_AUTO_SIGN_IN',\n },\n });\n stopListener();\n }\n });\n HubInternal.dispatch('auth-internal', {\n event: 'confirmSignUp',\n data: signUpOut,\n });\n }\n catch (error) {\n reject(error);\n }\n });\n}\n\nexport { confirmSignUp };\n//# sourceMappingURL=confirmSignUp.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createConfirmSignUpClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('ConfirmSignUp'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createConfirmSignUpClient };\n//# sourceMappingURL=createConfirmSignUpClient.mjs.map\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig } from '@aws-amplify/core/internals/utils';\nimport '../../../client/utils/store/autoSignInStore.mjs';\nimport { signInStore, setActiveSignInState, cleanActiveSignInState } from '../../../client/utils/store/signInStore.mjs';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { handleChallengeName, getNewDeviceMetadata, getSignInResult, getSignInResultFromError } from '../utils/signInHelpers.mjs';\nimport { assertServiceError } from '../../../errors/utils/assertServiceError.mjs';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { AuthErrorCodes } from '../../../common/AuthErrorStrings.mjs';\nimport { cacheCognitoTokens } from '../tokenProvider/cacheTokens.mjs';\nimport '../utils/refreshAuthTokens.mjs';\nimport '../tokenProvider/errorHelpers.mjs';\nimport '../utils/types.mjs';\nimport { tokenOrchestrator } from '../tokenProvider/tokenProvider.mjs';\nimport { dispatchSignedInHubEvent } from '../utils/dispatchSignedInHubEvent.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Continues or completes the sign in process when required by the initial call to `signIn`.\n *\n * @param input - The ConfirmSignInInput object\n * @returns ConfirmSignInOutput\n * @throws -{@link VerifySoftwareTokenException }:\n * Thrown due to an invalid MFA token.\n * @throws -{@link RespondToAuthChallengeException }:\n * Thrown due to an invalid auth challenge response.\n * @throws -{@link AssociateSoftwareTokenException}:\n * Thrown due to a service error during the MFA setup process.\n * @throws -{@link AuthValidationErrorCode }:\n * Thrown when `challengeResponse` is not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function confirmSignIn(input) {\n const { challengeResponse, options } = input;\n const { username, challengeName, signInSession, signInDetails } = signInStore.getState();\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const clientMetaData = options?.clientMetadata;\n assertValidationError(!!challengeResponse, AuthValidationErrorCode.EmptyChallengeResponse);\n if (!username || !challengeName || !signInSession)\n // TODO: remove this error message for production apps\n throw new AuthError({\n name: AuthErrorCodes.SignInException,\n message: `\n\t\t\tAn error occurred during the sign in process.\n\n\t\t\tThis most likely occurred due to:\n\t\t\t1. signIn was not called before confirmSignIn.\n\t\t\t2. signIn threw an exception.\n\t\t\t3. page was refreshed during the sign in flow.\n\t\t\t`,\n recoverySuggestion: 'Make sure a successful call to signIn is made before calling confirmSignIn' +\n 'and that the page is not refreshed until the sign in process is done.',\n });\n try {\n const { Session, ChallengeName: handledChallengeName, AuthenticationResult, ChallengeParameters: handledChallengeParameters, } = await handleChallengeName(username, challengeName, signInSession, challengeResponse, authConfig, tokenOrchestrator, clientMetaData, options);\n // sets up local state used during the sign-in process\n setActiveSignInState({\n signInSession: Session,\n username,\n challengeName: handledChallengeName,\n signInDetails,\n });\n if (AuthenticationResult) {\n await cacheCognitoTokens({\n username,\n ...AuthenticationResult,\n NewDeviceMetadata: await getNewDeviceMetadata({\n userPoolId: authConfig.userPoolId,\n userPoolEndpoint: authConfig.userPoolEndpoint,\n newDeviceMetadata: AuthenticationResult.NewDeviceMetadata,\n accessToken: AuthenticationResult.AccessToken,\n }),\n signInDetails,\n });\n cleanActiveSignInState();\n await dispatchSignedInHubEvent();\n return {\n isSignedIn: true,\n nextStep: { signInStep: 'DONE' },\n };\n }\n return getSignInResult({\n challengeName: handledChallengeName,\n challengeParameters: handledChallengeParameters,\n });\n }\n catch (error) {\n assertServiceError(error);\n const result = getSignInResultFromError(error.name);\n if (result)\n return result;\n throw error;\n }\n}\n\nexport { confirmSignIn };\n//# sourceMappingURL=confirmSignIn.mjs.map\n","import { Amplify, fetchAuthSession } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { assertAuthTokens } from '../utils/types.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../types/errors.mjs';\nimport { createSetUserMFAPreferenceClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createSetUserMFAPreferenceClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Updates the MFA preference of the user.\n *\n * @param input - The UpdateMFAPreferenceInput object.\n * @throws -{@link SetUserMFAPreferenceException } - Service error thrown when the MFA preference cannot be updated.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function updateMFAPreference(input) {\n const { sms, totp, email } = input;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { tokens } = await fetchAuthSession({ forceRefresh: false });\n assertAuthTokens(tokens);\n const setUserMFAPreference = createSetUserMFAPreferenceClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await setUserMFAPreference({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.UpdateMFAPreference),\n }, {\n AccessToken: tokens.accessToken.toString(),\n SMSMfaSettings: getMFASettings(sms),\n SoftwareTokenMfaSettings: getMFASettings(totp),\n EmailMfaSettings: getMFASettings(email),\n });\n}\nfunction getMFASettings(mfaPreference) {\n if (mfaPreference === 'DISABLED') {\n return {\n Enabled: false,\n };\n }\n else if (mfaPreference === 'PREFERRED') {\n return {\n Enabled: true,\n PreferredMfa: true,\n };\n }\n else if (mfaPreference === 'ENABLED') {\n return {\n Enabled: true,\n };\n }\n else if (mfaPreference === 'NOT_PREFERRED') {\n return {\n Enabled: true,\n PreferredMfa: false,\n };\n }\n}\n\nexport { getMFASettings, updateMFAPreference };\n//# sourceMappingURL=updateMFAPreference.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createSetUserMFAPreferenceClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('SetUserMFAPreference'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createSetUserMFAPreferenceClient };\n//# sourceMappingURL=createSetUserMFAPreferenceClient.mjs.map\n","import { Amplify, fetchAuthSession } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { getMFAType, getMFATypes } from '../utils/signInHelpers.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { assertAuthTokens } from '../utils/types.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../types/errors.mjs';\nimport { createGetUserClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createGetUserClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Fetches the preferred MFA setting and enabled MFA settings for the user.\n *\n * @returns FetchMFAPreferenceOutput\n * @throws -{@link GetUserException} : error thrown when the service fails to fetch MFA preference\n * and settings.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function fetchMFAPreference() {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { tokens } = await fetchAuthSession({ forceRefresh: false });\n assertAuthTokens(tokens);\n const getUser = createGetUserClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { PreferredMfaSetting, UserMFASettingList } = await getUser({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.FetchMFAPreference),\n }, {\n AccessToken: tokens.accessToken.toString(),\n });\n return {\n preferred: getMFAType(PreferredMfaSetting),\n enabled: getMFATypes(UserMFASettingList),\n };\n}\n\nexport { fetchMFAPreference };\n//# sourceMappingURL=fetchMFAPreference.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createGetUserClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('GetUser'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createGetUserClient };\n//# sourceMappingURL=createGetUserClient.mjs.map\n","import { Amplify, fetchAuthSession } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { assertAuthTokens } from '../utils/types.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../types/errors.mjs';\nimport { createVerifySoftwareTokenClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createVerifySoftwareTokenClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Verifies an OTP code retrieved from an associated authentication app.\n *\n * @param input - The VerifyTOTPSetupInput\n * @throws -{@link VerifySoftwareTokenException }:\n * Thrown due to an invalid MFA token.\n * @throws -{@link AuthValidationErrorCode }:\n * Thrown when `code` is not defined.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function verifyTOTPSetup(input) {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { code, options } = input;\n assertValidationError(!!code, AuthValidationErrorCode.EmptyVerifyTOTPSetupCode);\n const { tokens } = await fetchAuthSession({ forceRefresh: false });\n assertAuthTokens(tokens);\n const verifySoftwareToken = createVerifySoftwareTokenClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await verifySoftwareToken({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.VerifyTOTPSetup),\n }, {\n AccessToken: tokens.accessToken.toString(),\n UserCode: code,\n FriendlyDeviceName: options?.friendlyDeviceName,\n });\n}\n\nexport { verifyTOTPSetup };\n//# sourceMappingURL=verifyTOTPSetup.mjs.map\n","import { Amplify, fetchAuthSession } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { assertAuthTokens } from '../utils/types.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../types/errors.mjs';\nimport { createChangePasswordClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createChangePasswordClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Updates user's password while authenticated.\n *\n * @param input - The UpdatePasswordInput object.\n * @throws - {@link ChangePasswordException} - Cognito service errors thrown when updating a password.\n * @throws - {@link AuthValidationErrorCode} - Validation errors thrown when oldPassword or newPassword are empty.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function updatePassword(input) {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { oldPassword, newPassword } = input;\n assertValidationError(!!oldPassword, AuthValidationErrorCode.EmptyUpdatePassword);\n assertValidationError(!!newPassword, AuthValidationErrorCode.EmptyUpdatePassword);\n const { tokens } = await fetchAuthSession({ forceRefresh: false });\n assertAuthTokens(tokens);\n const changePassword = createChangePasswordClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await changePassword({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.UpdatePassword),\n }, {\n AccessToken: tokens.accessToken.toString(),\n PreviousPassword: oldPassword,\n ProposedPassword: newPassword,\n });\n}\n\nexport { updatePassword };\n//# sourceMappingURL=updatePassword.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createChangePasswordClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('ChangePassword'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createChangePasswordClient };\n//# sourceMappingURL=createChangePasswordClient.mjs.map\n","import { Amplify, fetchAuthSession } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { SETUP_TOTP_EXCEPTION } from '../types/errors.mjs';\nimport { getTOTPSetupDetails } from '../utils/signInHelpers.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { assertAuthTokens } from '../utils/types.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport { createAssociateSoftwareTokenClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createAssociateSoftwareTokenClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Sets up TOTP for the user.\n *\n * @returns SetUpTOTPOutput\n * @throws -{@link AssociateSoftwareTokenException}\n * Thrown if a service occurs while setting up TOTP.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n **/\nasync function setUpTOTP() {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { tokens } = await fetchAuthSession({ forceRefresh: false });\n assertAuthTokens(tokens);\n const username = tokens.idToken?.payload['cognito:username'] ?? '';\n const associateSoftwareToken = createAssociateSoftwareTokenClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { SecretCode } = await associateSoftwareToken({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SetUpTOTP),\n }, {\n AccessToken: tokens.accessToken.toString(),\n });\n if (!SecretCode) {\n // This should never happen.\n throw new AuthError({\n name: SETUP_TOTP_EXCEPTION,\n message: 'Failed to set up TOTP.',\n });\n }\n return getTOTPSetupDetails(SecretCode, JSON.stringify(username));\n}\n\nexport { setUpTOTP };\n//# sourceMappingURL=setUpTOTP.mjs.map\n","import { Amplify, fetchAuthSession } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { assertAuthTokens } from '../utils/types.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { toAttributeType } from '../utils/apiHelpers.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../types/errors.mjs';\nimport { createUpdateUserAttributesClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createUpdateUserAttributesClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Updates user's attributes while authenticated.\n *\n * @param input - The UpdateUserAttributesInput object\n * @returns UpdateUserAttributesOutput\n * @throws - {@link UpdateUserAttributesException}\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nconst updateUserAttributes = async (input) => {\n const { userAttributes, options } = input;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n const clientMetadata = options?.clientMetadata;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { tokens } = await fetchAuthSession({ forceRefresh: false });\n assertAuthTokens(tokens);\n const updateUserAttributesClient = createUpdateUserAttributesClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { CodeDeliveryDetailsList } = await updateUserAttributesClient({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.UpdateUserAttributes),\n }, {\n AccessToken: tokens.accessToken.toString(),\n ClientMetadata: clientMetadata,\n UserAttributes: toAttributeType(userAttributes),\n });\n return {\n ...getConfirmedAttributes(userAttributes),\n ...getUnConfirmedAttributes(CodeDeliveryDetailsList),\n };\n};\nfunction getConfirmedAttributes(attributes) {\n const confirmedAttributes = {};\n Object.keys(attributes)?.forEach(key => {\n confirmedAttributes[key] = {\n isUpdated: true,\n nextStep: {\n updateAttributeStep: 'DONE',\n },\n };\n });\n return confirmedAttributes;\n}\nfunction getUnConfirmedAttributes(codeDeliveryDetailsList) {\n const unConfirmedAttributes = {};\n codeDeliveryDetailsList?.forEach(codeDeliveryDetails => {\n const { AttributeName, DeliveryMedium, Destination } = codeDeliveryDetails;\n if (AttributeName)\n unConfirmedAttributes[AttributeName] = {\n isUpdated: false,\n nextStep: {\n updateAttributeStep: 'CONFIRM_ATTRIBUTE_WITH_CODE',\n codeDeliveryDetails: {\n attributeName: AttributeName,\n deliveryMedium: DeliveryMedium,\n destination: Destination,\n },\n },\n };\n });\n return unConfirmedAttributes;\n}\n\nexport { updateUserAttributes };\n//# sourceMappingURL=updateUserAttributes.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createUpdateUserAttributesClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('UpdateUserAttributes'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createUpdateUserAttributesClient };\n//# sourceMappingURL=createUpdateUserAttributesClient.mjs.map\n","import { updateUserAttributes } from './updateUserAttributes.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Updates user's attribute while authenticated.\n *\n * @param input - The UpdateUserAttributeInput object\n * @returns UpdateUserAttributeOutput\n * @throws - {@link UpdateUserAttributesException}\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nconst updateUserAttribute = async (input) => {\n const { userAttribute: { attributeKey, value }, options, } = input;\n const output = await updateUserAttributes({\n userAttributes: { [attributeKey]: value },\n options,\n });\n return Object.values(output)[0];\n};\n\nexport { updateUserAttribute };\n//# sourceMappingURL=updateUserAttribute.mjs.map\n","import { Amplify, fetchAuthSession } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { AuthValidationErrorCode } from '../../../errors/types/validation.mjs';\nimport { assertValidationError } from '../../../errors/utils/assertValidationError.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { assertAuthTokens } from '../utils/types.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../types/errors.mjs';\nimport { createVerifyUserAttributeClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createVerifyUserAttributeClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Confirms a user attribute with the confirmation code.\n *\n * @param input - The ConfirmUserAttributeInput object\n * @throws -{@link AuthValidationErrorCode } -\n * Thrown when `confirmationCode` is not defined.\n * @throws -{@link VerifyUserAttributeException } - Thrown due to an invalid confirmation code or attribute.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function confirmUserAttribute(input) {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { confirmationCode, userAttributeKey } = input;\n assertValidationError(!!confirmationCode, AuthValidationErrorCode.EmptyConfirmUserAttributeCode);\n const { tokens } = await fetchAuthSession({ forceRefresh: false });\n assertAuthTokens(tokens);\n const verifyUserAttribute = createVerifyUserAttributeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await verifyUserAttribute({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ConfirmUserAttribute),\n }, {\n AccessToken: tokens.accessToken.toString(),\n AttributeName: userAttributeKey,\n Code: confirmationCode,\n });\n}\n\nexport { confirmUserAttribute };\n//# sourceMappingURL=confirmUserAttribute.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createVerifyUserAttributeClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('VerifyUserAttribute'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createVerifyUserAttributeClient };\n//# sourceMappingURL=createVerifyUserAttributeClient.mjs.map\n","import { Amplify } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, assertOAuthConfig, urlSafeEncode, isBrowser, AuthAction } from '@aws-amplify/core/internals/utils';\nimport '../utils/oauth/enableOAuthListener.mjs';\nimport { cognitoHostedUIIdentityProviderMap } from '../types/models.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport { openAuthSession } from '../../../utils/openAuthSession.mjs';\nimport { assertUserNotAuthenticated } from '../utils/signInHelpers.mjs';\nimport { generateCodeVerifier } from '../utils/oauth/generateCodeVerifier.mjs';\nimport { generateState } from '../utils/oauth/generateState.mjs';\nimport '../utils/refreshAuthTokens.mjs';\nimport '../tokenProvider/errorHelpers.mjs';\nimport { oAuthStore } from '../utils/oauth/oAuthStore.mjs';\nimport '../tokenProvider/tokenProvider.mjs';\nimport { getRedirectUrl } from '../utils/oauth/getRedirectUrl.mjs';\nimport { handleFailure } from '../utils/oauth/handleFailure.mjs';\nimport { completeOAuthFlow } from '../utils/oauth/completeOAuthFlow.mjs';\nimport { createOAuthError } from '../utils/oauth/createOAuthError.mjs';\nimport { listenForOAuthFlowCancellation } from '../utils/oauth/cancelOAuthFlow.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Signs in a user with OAuth. Redirects the application to an Identity Provider.\n *\n * @param input - The SignInWithRedirectInput object, if empty it will redirect to Cognito HostedUI\n *\n * @throws AuthTokenConfigException - Thrown when the user pool config is invalid.\n * @throws OAuthNotConfigureException - Thrown when the oauth config is invalid.\n */\nasync function signInWithRedirect(input) {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n assertOAuthConfig(authConfig);\n oAuthStore.setAuthConfig(authConfig);\n await assertUserNotAuthenticated();\n let provider = 'COGNITO'; // Default\n if (typeof input?.provider === 'string') {\n provider = cognitoHostedUIIdentityProviderMap[input.provider];\n }\n else if (input?.provider?.custom) {\n provider = input.provider.custom;\n }\n return oauthSignIn({\n oauthConfig: authConfig.loginWith.oauth,\n clientId: authConfig.userPoolClientId,\n provider,\n customState: input?.customState,\n preferPrivateSession: input?.options?.preferPrivateSession,\n });\n}\nconst oauthSignIn = async ({ oauthConfig, provider, clientId, customState, preferPrivateSession, }) => {\n const { domain, redirectSignIn, responseType, scopes } = oauthConfig;\n const randomState = generateState();\n /* encodeURIComponent is not URL safe, use urlSafeEncode instead. Cognito\n single-encodes/decodes url on first sign in and double-encodes/decodes url\n when user already signed in. Using encodeURIComponent, Base32, Base64 add\n characters % or = which on further encoding becomes unsafe. '=' create issue\n for parsing query params.\n Refer: https://github.com/aws-amplify/amplify-js/issues/5218 */\n const state = customState\n ? `${randomState}-${urlSafeEncode(customState)}`\n : randomState;\n const { value, method, toCodeChallenge } = generateCodeVerifier(128);\n const redirectUri = getRedirectUrl(oauthConfig.redirectSignIn);\n if (isBrowser())\n oAuthStore.storeOAuthInFlight(true);\n oAuthStore.storeOAuthState(state);\n oAuthStore.storePKCE(value);\n const queryString = Object.entries({\n redirect_uri: redirectUri,\n response_type: responseType,\n client_id: clientId,\n identity_provider: provider,\n scope: scopes.join(' '),\n state,\n ...(responseType === 'code' && {\n code_challenge: toCodeChallenge(),\n code_challenge_method: method,\n }),\n })\n .map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`)\n .join('&');\n // TODO(v6): use URL object instead\n const oAuthUrl = `https://${domain}/oauth2/authorize?${queryString}`;\n // this will only take effect in the following scenarios:\n // 1. the user cancels the OAuth flow on web via back button, and\n // 2. when bfcache is enabled\n listenForOAuthFlowCancellation(oAuthStore);\n // the following is effective only in react-native as openAuthSession resolves only in react-native\n const { type, error, url } = (await openAuthSession(oAuthUrl)) ??\n {};\n try {\n if (type === 'error') {\n throw createOAuthError(String(error));\n }\n if (type === 'success' && url) {\n await completeOAuthFlow({\n currentUrl: url,\n clientId,\n domain,\n redirectUri,\n responseType,\n userAgentValue: getAuthUserAgentValue(AuthAction.SignInWithRedirect),\n preferPrivateSession,\n });\n }\n }\n catch (err) {\n await handleFailure(err);\n // rethrow the error so it can be caught by `await signInWithRedirect()` in react-native\n throw err;\n }\n};\n\nexport { signInWithRedirect };\n//# sourceMappingURL=signInWithRedirect.mjs.map\n","import { Amplify } from '@aws-amplify/core';\nimport { isBrowser, ADD_OAUTH_LISTENER } from '@aws-amplify/core/internals/utils';\nimport { attemptCompleteOAuthFlow } from './attemptCompleteOAuthFlow.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// attach the side effect for handling the completion of an inflight oauth flow\n// this side effect works only on Web\nisBrowser() &&\n (() => {\n // add the listener to the singleton for triggering\n Amplify[ADD_OAUTH_LISTENER](attemptCompleteOAuthFlow);\n })();\n//# sourceMappingURL=enableOAuthListener.mjs.map\n","import { assertTokenProviderConfig, assertOAuthConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { getAuthUserAgentValue } from '../../../../utils/getAuthUserAgentValue.mjs';\nimport { oAuthStore } from './oAuthStore.mjs';\nimport { completeOAuthFlow } from './completeOAuthFlow.mjs';\nimport { getRedirectUrl } from './getRedirectUrl.mjs';\nimport { handleFailure } from './handleFailure.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst attemptCompleteOAuthFlow = async (authConfig) => {\n try {\n assertTokenProviderConfig(authConfig);\n assertOAuthConfig(authConfig);\n oAuthStore.setAuthConfig(authConfig);\n }\n catch (_) {\n // no-op\n // This should not happen as Amplify singleton checks the oauth config key\n // unless the oauth config object doesn't contain required properties\n return;\n }\n // No inflight OAuth\n if (!(await oAuthStore.loadOAuthInFlight())) {\n return;\n }\n try {\n const currentUrl = window.location.href;\n const { loginWith, userPoolClientId } = authConfig;\n const { domain, redirectSignIn, responseType } = loginWith.oauth;\n const redirectUri = getRedirectUrl(redirectSignIn);\n await completeOAuthFlow({\n currentUrl,\n clientId: userPoolClientId,\n domain,\n redirectUri,\n responseType,\n userAgentValue: getAuthUserAgentValue(AuthAction.SignInWithRedirect),\n });\n }\n catch (err) {\n await handleFailure(err);\n }\n};\n\nexport { attemptCompleteOAuthFlow };\n//# sourceMappingURL=attemptCompleteOAuthFlow.mjs.map\n","import { AmplifyUrl, USER_AGENT_HEADER, urlSafeDecode, AMPLIFY_SYMBOL } from '@aws-amplify/core/internals/utils';\nimport { decodeJWT, Hub } from '@aws-amplify/core';\nimport { cacheCognitoTokens } from '../../tokenProvider/cacheTokens.mjs';\nimport { dispatchSignedInHubEvent } from '../dispatchSignedInHubEvent.mjs';\nimport '../refreshAuthTokens.mjs';\nimport '../../tokenProvider/errorHelpers.mjs';\nimport { oAuthStore } from './oAuthStore.mjs';\nimport { resolveAndClearInflightPromises } from './inflightPromise.mjs';\nimport { tokenOrchestrator } from '../../tokenProvider/tokenProvider.mjs';\nimport { createOAuthError } from './createOAuthError.mjs';\nimport { validateState } from './validateState.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst completeOAuthFlow = async ({ currentUrl, userAgentValue, clientId, redirectUri, responseType, domain, preferPrivateSession, }) => {\n const urlParams = new AmplifyUrl(currentUrl);\n const error = urlParams.searchParams.get('error');\n const errorMessage = urlParams.searchParams.get('error_description');\n if (error) {\n throw createOAuthError(errorMessage ?? error);\n }\n if (responseType === 'code') {\n return handleCodeFlow({\n currentUrl,\n userAgentValue,\n clientId,\n redirectUri,\n domain,\n preferPrivateSession,\n });\n }\n return handleImplicitFlow({\n currentUrl,\n redirectUri,\n preferPrivateSession,\n });\n};\nconst handleCodeFlow = async ({ currentUrl, userAgentValue, clientId, redirectUri, domain, preferPrivateSession, }) => {\n /* Convert URL into an object with parameters as keys\n{ redirect_uri: 'http://localhost:3000/', response_type: 'code', ...} */\n const url = new AmplifyUrl(currentUrl);\n const code = url.searchParams.get('code');\n const state = url.searchParams.get('state');\n // if `code` or `state` is not presented in the redirect url, most likely\n // that the end user cancelled the inflight oauth flow by:\n // 1. clicking the back button of browser\n // 2. closing the provider hosted UI page and coming back to the app\n if (!code || !state) {\n throw createOAuthError('User cancelled OAuth flow.');\n }\n // may throw error is being caught in attemptCompleteOAuthFlow.ts\n const validatedState = await validateState(state);\n const oAuthTokenEndpoint = 'https://' + domain + '/oauth2/token';\n // TODO(v6): check hub events\n // dispatchAuthEvent(\n // \t'codeFlow',\n // \t{},\n // \t`Retrieving tokens from ${oAuthTokenEndpoint}`\n // );\n const codeVerifier = await oAuthStore.loadPKCE();\n const oAuthTokenBody = {\n grant_type: 'authorization_code',\n code,\n client_id: clientId,\n redirect_uri: redirectUri,\n ...(codeVerifier ? { code_verifier: codeVerifier } : {}),\n };\n const body = Object.entries(oAuthTokenBody)\n .map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`)\n .join('&');\n const { access_token, refresh_token: refreshToken, id_token, error, error_message: errorMessage, token_type, expires_in, } = await (await fetch(oAuthTokenEndpoint, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n [USER_AGENT_HEADER]: userAgentValue,\n },\n body,\n })).json();\n if (error) {\n // error is being caught in attemptCompleteOAuthFlow.ts\n throw createOAuthError(errorMessage ?? error);\n }\n const username = (access_token && decodeJWT(access_token).payload.username) ?? 'username';\n await cacheCognitoTokens({\n username,\n AccessToken: access_token,\n IdToken: id_token,\n RefreshToken: refreshToken,\n TokenType: token_type,\n ExpiresIn: expires_in,\n });\n return completeFlow({\n redirectUri,\n state: validatedState,\n preferPrivateSession,\n });\n};\nconst handleImplicitFlow = async ({ currentUrl, redirectUri, preferPrivateSession, }) => {\n // hash is `null` if `#` doesn't exist on URL\n const url = new AmplifyUrl(currentUrl);\n const { id_token, access_token, state, token_type, expires_in, error_description, error, } = (url.hash ?? '#')\n .substring(1) // Remove # from returned code\n .split('&')\n .map(pairings => pairings.split('='))\n .reduce((accum, [k, v]) => ({ ...accum, [k]: v }), {\n id_token: undefined,\n access_token: undefined,\n state: undefined,\n token_type: undefined,\n expires_in: undefined,\n error_description: undefined,\n error: undefined,\n });\n if (error) {\n throw createOAuthError(error_description ?? error);\n }\n if (!access_token) {\n // error is being caught in attemptCompleteOAuthFlow.ts\n throw createOAuthError('No access token returned from OAuth flow.');\n }\n const validatedState = await validateState(state);\n const username = (access_token && decodeJWT(access_token).payload.username) ?? 'username';\n await cacheCognitoTokens({\n username,\n AccessToken: access_token,\n IdToken: id_token,\n TokenType: token_type,\n ExpiresIn: expires_in,\n });\n return completeFlow({\n redirectUri,\n state: validatedState,\n preferPrivateSession,\n });\n};\nconst completeFlow = async ({ redirectUri, state, preferPrivateSession, }) => {\n await tokenOrchestrator.setOAuthMetadata({\n oauthSignIn: true,\n });\n await oAuthStore.clearOAuthData();\n await oAuthStore.storeOAuthSignIn(true, preferPrivateSession);\n // this should be called before any call that involves `fetchAuthSession`\n // e.g. `getCurrentUser()` below, so it allows every inflight async calls to\n // `fetchAuthSession` can be resolved\n resolveAndClearInflightPromises();\n if (isCustomState(state)) {\n Hub.dispatch('auth', {\n event: 'customOAuthState',\n data: urlSafeDecode(getCustomState(state)),\n }, 'Auth', AMPLIFY_SYMBOL);\n }\n Hub.dispatch('auth', { event: 'signInWithRedirect' }, 'Auth', AMPLIFY_SYMBOL);\n await dispatchSignedInHubEvent();\n clearHistory(redirectUri);\n};\nconst isCustomState = (state) => {\n return /-/.test(state);\n};\nconst getCustomState = (state) => {\n return state.split('-').splice(1).join('-');\n};\nconst clearHistory = (redirectUri) => {\n if (typeof window !== 'undefined' && typeof window.history !== 'undefined') {\n window.history.replaceState(window.history.state, '', redirectUri);\n }\n};\n\nexport { completeOAuthFlow };\n//# sourceMappingURL=completeOAuthFlow.mjs.map\n","import { authErrorMessages } from '../../../../Errors.mjs';\nimport { AuthErrorCodes } from '../../../../common/AuthErrorStrings.mjs';\nimport { AuthError } from '../../../../errors/AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createOAuthError = (message, recoverySuggestion) => new AuthError({\n message: message ?? 'An error has occurred during the oauth process.',\n name: AuthErrorCodes.OAuthSignInError,\n recoverySuggestion: recoverySuggestion ?? authErrorMessages.oauthSignInError.log,\n});\n\nexport { createOAuthError };\n//# sourceMappingURL=createOAuthError.mjs.map\n","import { ConsoleLogger } from '@aws-amplify/core';\nimport { AuthErrorStrings } from './common/AuthErrorStrings.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// TODO: delete this module when the Auth class is removed.\nconst logger = new ConsoleLogger('AuthError');\nclass AuthError extends Error {\n constructor(type) {\n const { message, log } = authErrorMessages[type];\n super(message);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = AuthError;\n Object.setPrototypeOf(this, AuthError.prototype);\n this.name = 'AuthError';\n this.log = log || message;\n logger.error(this.log);\n }\n}\nclass NoUserPoolError extends AuthError {\n constructor(type) {\n super(type);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = NoUserPoolError;\n Object.setPrototypeOf(this, NoUserPoolError.prototype);\n this.name = 'NoUserPoolError';\n }\n}\nconst authErrorMessages = {\n oauthSignInError: {\n message: AuthErrorStrings.OAUTH_ERROR,\n log: 'Make sure Cognito Hosted UI has been configured correctly',\n },\n noConfig: {\n message: AuthErrorStrings.DEFAULT_MSG,\n log: `\n Error: Amplify has not been configured correctly.\n This error is typically caused by one of the following scenarios:\n\n 1. Make sure you're passing the awsconfig object to Amplify.configure() in your app's entry point\n See https://aws-amplify.github.io/docs/js/authentication#configure-your-app for more information\n \n 2. There might be multiple conflicting versions of amplify packages in your node_modules.\n\t\t\t\tRefer to our docs site for help upgrading Amplify packages (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js)\n `,\n },\n missingAuthConfig: {\n message: AuthErrorStrings.DEFAULT_MSG,\n log: `\n Error: Amplify has not been configured correctly. \n The configuration object is missing required auth properties.\n This error is typically caused by one of the following scenarios:\n\n 1. Did you run \\`amplify push\\` after adding auth via \\`amplify add auth\\`?\n See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information\n\n 2. This could also be caused by multiple conflicting versions of amplify packages, see (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js) for help upgrading Amplify packages.\n `,\n },\n emptyUsername: {\n message: AuthErrorStrings.EMPTY_USERNAME,\n },\n // TODO: should include a list of valid sign-in types\n invalidUsername: {\n message: AuthErrorStrings.INVALID_USERNAME,\n },\n emptyPassword: {\n message: AuthErrorStrings.EMPTY_PASSWORD,\n },\n emptyCode: {\n message: AuthErrorStrings.EMPTY_CODE,\n },\n signUpError: {\n message: AuthErrorStrings.SIGN_UP_ERROR,\n log: 'The first parameter should either be non-null string or object',\n },\n noMFA: {\n message: AuthErrorStrings.NO_MFA,\n },\n invalidMFA: {\n message: AuthErrorStrings.INVALID_MFA,\n },\n emptyChallengeResponse: {\n message: AuthErrorStrings.EMPTY_CHALLENGE,\n },\n noUserSession: {\n message: AuthErrorStrings.NO_USER_SESSION,\n },\n deviceConfig: {\n message: AuthErrorStrings.DEVICE_CONFIG,\n },\n networkError: {\n message: AuthErrorStrings.NETWORK_ERROR,\n },\n autoSignInError: {\n message: AuthErrorStrings.AUTOSIGNIN_ERROR,\n },\n default: {\n message: AuthErrorStrings.DEFAULT_MSG,\n },\n};\n\nexport { AuthError, NoUserPoolError, authErrorMessages };\n//# sourceMappingURL=Errors.mjs.map\n","import { AuthError } from '../../../../errors/AuthError.mjs';\nimport { AuthErrorTypes } from '../../../../types/Auth.mjs';\nimport { oAuthStore } from './oAuthStore.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst flowCancelledMessage = '`signInWithRedirect` has been canceled.';\nconst validationFailedMessage = 'An error occurred while validating the state.';\nconst validationRecoverySuggestion = 'Try to initiate an OAuth flow from Amplify';\nconst validateState = async (state) => {\n const savedState = await oAuthStore.loadOAuthState();\n // This is because savedState only exists if the flow was initiated by Amplify\n const validatedState = state === savedState ? savedState : undefined;\n if (!validatedState) {\n throw new AuthError({\n name: AuthErrorTypes.OAuthSignInError,\n message: state === null ? flowCancelledMessage : validationFailedMessage,\n recoverySuggestion: state === null ? undefined : validationRecoverySuggestion,\n });\n }\n return validatedState;\n};\n\nexport { flowCancelledMessage, validateState, validationFailedMessage, validationRecoverySuggestion };\n//# sourceMappingURL=validateState.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar AuthErrorTypes;\n(function (AuthErrorTypes) {\n AuthErrorTypes[\"NoConfig\"] = \"noConfig\";\n AuthErrorTypes[\"MissingAuthConfig\"] = \"missingAuthConfig\";\n AuthErrorTypes[\"EmptyUsername\"] = \"emptyUsername\";\n AuthErrorTypes[\"InvalidUsername\"] = \"invalidUsername\";\n AuthErrorTypes[\"EmptyPassword\"] = \"emptyPassword\";\n AuthErrorTypes[\"EmptyCode\"] = \"emptyCode\";\n AuthErrorTypes[\"SignUpError\"] = \"signUpError\";\n AuthErrorTypes[\"NoMFA\"] = \"noMFA\";\n AuthErrorTypes[\"InvalidMFA\"] = \"invalidMFA\";\n AuthErrorTypes[\"EmptyChallengeResponse\"] = \"emptyChallengeResponse\";\n AuthErrorTypes[\"NoUserSession\"] = \"noUserSession\";\n AuthErrorTypes[\"Default\"] = \"default\";\n AuthErrorTypes[\"DeviceConfig\"] = \"deviceConfig\";\n AuthErrorTypes[\"NetworkError\"] = \"networkError\";\n AuthErrorTypes[\"AutoSignInError\"] = \"autoSignInError\";\n AuthErrorTypes[\"OAuthSignInError\"] = \"oauthSignInError\";\n})(AuthErrorTypes || (AuthErrorTypes = {}));\n\nexport { AuthErrorTypes };\n//# sourceMappingURL=Auth.mjs.map\n","import { invalidPreferredRedirectUrlException, invalidOriginException, invalidRedirectException } from '../../../../errors/constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/** @internal */\nfunction getRedirectUrl(redirects, preferredRedirectUrl) {\n if (preferredRedirectUrl) {\n const redirectUrl = redirects?.find(redirect => redirect === preferredRedirectUrl);\n if (!redirectUrl) {\n throw invalidPreferredRedirectUrlException;\n }\n return redirectUrl;\n }\n else {\n const redirectUrlFromTheSameOrigin = redirects?.find(isSameOriginAndPathName) ??\n redirects?.find(isTheSameDomain);\n const redirectUrlFromDifferentOrigin = redirects?.find(isHttps) ?? redirects?.find(isHttp);\n if (redirectUrlFromTheSameOrigin) {\n return redirectUrlFromTheSameOrigin;\n }\n else if (redirectUrlFromDifferentOrigin) {\n throw invalidOriginException;\n }\n throw invalidRedirectException;\n }\n}\n// origin + pathname => https://example.com/app\nconst isSameOriginAndPathName = (redirect) => redirect.startsWith(\n// eslint-disable-next-line no-constant-binary-expression\nString(window.location.origin + window.location.pathname ?? '/'));\n// domain => outlook.live.com, github.com\nconst isTheSameDomain = (redirect) => redirect.includes(String(window.location.hostname));\nconst isHttp = (redirect) => redirect.startsWith('http://');\nconst isHttps = (redirect) => redirect.startsWith('https://');\n\nexport { getRedirectUrl };\n//# sourceMappingURL=getRedirectUrl.mjs.map\n","import { Hub } from '@aws-amplify/core';\nimport { AMPLIFY_SYMBOL } from '@aws-amplify/core/internals/utils';\nimport { oAuthStore } from './oAuthStore.mjs';\nimport { resolveAndClearInflightPromises } from './inflightPromise.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst handleFailure = async (error) => {\n resolveAndClearInflightPromises();\n await oAuthStore.clearOAuthInflightData();\n Hub.dispatch('auth', { event: 'signInWithRedirect_failure', data: { error } }, 'Auth', AMPLIFY_SYMBOL);\n};\n\nexport { handleFailure };\n//# sourceMappingURL=handleFailure.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst cognitoHostedUIIdentityProviderMap = {\n Google: 'Google',\n Facebook: 'Facebook',\n Amazon: 'LoginWithAmazon',\n Apple: 'SignInWithApple',\n};\n\nexport { cognitoHostedUIIdentityProviderMap };\n//# sourceMappingURL=models.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst openAuthSession = async (url) => {\n if (!window?.location) {\n return;\n }\n // enforce HTTPS\n window.location.href = url.replace('http://', 'https://');\n};\n\nexport { openAuthSession };\n//# sourceMappingURL=openAuthSession.mjs.map\n","import { Sha256 } from '@aws-crypto/sha256-js';\nimport { getCrypto, base64Encoder } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst CODE_VERIFIER_CHARSET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n/**\n *\n * @param length Desired length of the code verifier.\n *\n * **NOTE:** According to the [RFC 7636](https://datatracker.ietf.org/doc/html/rfc7636#section-4.1)\n * A code verifier must be with a length >= 43 and <= 128.\n *\n * @returns An object that contains the generated `codeVerifier` and a method\n * `toCodeChallenge` to generate the code challenge from the `codeVerifier`\n * following the spec of [RFC 7636](https://datatracker.ietf.org/doc/html/rfc7636#section-4.2).\n */\nconst generateCodeVerifier = (length) => {\n const randomBytes = new Uint8Array(length);\n getCrypto().getRandomValues(randomBytes);\n let value = '';\n let codeChallenge;\n for (const byte of randomBytes) {\n value += CODE_VERIFIER_CHARSET.charAt(byte % CODE_VERIFIER_CHARSET.length);\n }\n return {\n value,\n method: 'S256',\n toCodeChallenge() {\n if (codeChallenge) {\n return codeChallenge;\n }\n codeChallenge = generateCodeChallenge(value);\n return codeChallenge;\n },\n };\n};\nfunction generateCodeChallenge(codeVerifier) {\n const awsCryptoHash = new Sha256();\n awsCryptoHash.update(codeVerifier);\n const codeChallenge = removePaddingChar(base64Encoder.convert(awsCryptoHash.digestSync(), { urlSafe: true }));\n return codeChallenge;\n}\nfunction removePaddingChar(base64Encoded) {\n return base64Encoded.replace(/=/g, '');\n}\n\nexport { generateCodeVerifier };\n//# sourceMappingURL=generateCodeVerifier.mjs.map\n","import { generateRandomString } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst generateState = () => {\n return generateRandomString(32);\n};\n\nexport { generateState };\n//# sourceMappingURL=generateState.mjs.map\n","import { createOAuthError } from './createOAuthError.mjs';\nimport { handleFailure } from './handleFailure.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst listenForOAuthFlowCancellation = (store) => {\n async function handleCancelOAuthFlow(event) {\n const isBfcache = event.persisted;\n if (isBfcache && (await store.loadOAuthInFlight())) {\n const error = createOAuthError('User cancelled OAuth flow.');\n await handleFailure(error);\n }\n window.removeEventListener('pageshow', handleCancelOAuthFlow);\n }\n window.addEventListener('pageshow', handleCancelOAuthFlow);\n};\n\nexport { listenForOAuthFlowCancellation };\n//# sourceMappingURL=cancelOAuthFlow.mjs.map\n","import { Amplify } from '@aws-amplify/core';\nimport { fetchUserAttributes as fetchUserAttributes$1 } from './internal/fetchUserAttributes.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Fetches the current user attributes while authenticated.\n *\n * @throws - {@link GetUserException} - Cognito service errors thrown when the service is not able to get the user.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nconst fetchUserAttributes = () => {\n return fetchUserAttributes$1(Amplify);\n};\n\nexport { fetchUserAttributes };\n//# sourceMappingURL=fetchUserAttributes.mjs.map\n","import { assertTokenProviderConfig, fetchAuthSession, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { getRegionFromUserPoolId } from '../../../../foundation/parsers/regionParsers.mjs';\nimport { assertAuthTokens } from '../../utils/types.mjs';\nimport { toAuthUserAttribute } from '../../utils/apiHelpers.mjs';\nimport { getAuthUserAgentValue } from '../../../../utils/getAuthUserAgentValue.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../../common/AuthErrorStrings.mjs';\nimport '../../../../errors/types/validation.mjs';\nimport '../../types/errors.mjs';\nimport { createGetUserClient } from '../../../../foundation/factories/serviceClients/cognitoIdentityProvider/createGetUserClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../../factories/createCognitoUserPoolEndpointResolver.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst fetchUserAttributes = async (amplify) => {\n const authConfig = amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { tokens } = await fetchAuthSession(amplify, {\n forceRefresh: false,\n });\n assertAuthTokens(tokens);\n const getUser = createGetUserClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { UserAttributes } = await getUser({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.FetchUserAttributes),\n }, {\n AccessToken: tokens.accessToken.toString(),\n });\n return toAuthUserAttribute(UserAttributes);\n};\n\nexport { fetchUserAttributes };\n//# sourceMappingURL=fetchUserAttributes.mjs.map\n","import { ConsoleLogger, Amplify, clearCredentials, Hub, defaultStorage } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, assertOAuthConfig, AMPLIFY_SYMBOL, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport '../utils/refreshAuthTokens.mjs';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport '../tokenProvider/errorHelpers.mjs';\nimport { DefaultOAuthStore } from '../utils/signInWithRedirectStore.mjs';\nimport { tokenOrchestrator } from '../tokenProvider/tokenProvider.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { assertAuthTokensWithRefreshToken, assertAuthTokens } from '../utils/types.mjs';\nimport '@aws-crypto/sha256-js';\nimport { handleOAuthSignOut } from '../utils/oauth/handleOAuthSignOut.mjs';\nimport { OAUTH_SIGNOUT_EXCEPTION } from '../../../errors/constants.mjs';\nimport '../../../Errors.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../types/Auth.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport { createRevokeTokenClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createRevokeTokenClient.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../types/errors.mjs';\nimport { createGlobalSignOutClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createGlobalSignOutClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('Auth');\n/**\n * Signs a user out\n *\n * @param input - The SignOutInput object\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function signOut(input) {\n const cognitoConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(cognitoConfig);\n if (input?.global) {\n await globalSignOut(cognitoConfig);\n }\n else {\n await clientSignOut(cognitoConfig);\n }\n let hasOAuthConfig;\n try {\n assertOAuthConfig(cognitoConfig);\n hasOAuthConfig = true;\n }\n catch (err) {\n hasOAuthConfig = false;\n }\n if (hasOAuthConfig) {\n const oAuthStore = new DefaultOAuthStore(defaultStorage);\n oAuthStore.setAuthConfig(cognitoConfig);\n const { type } = (await handleOAuthSignOut(cognitoConfig, oAuthStore, tokenOrchestrator, input?.oauth?.redirectUrl)) ?? {};\n if (type === 'error') {\n throw new AuthError({\n name: OAUTH_SIGNOUT_EXCEPTION,\n message: `An error occurred when attempting to log out from OAuth provider.`,\n });\n }\n }\n else {\n // complete sign out\n tokenOrchestrator.clearTokens();\n await clearCredentials();\n Hub.dispatch('auth', { event: 'signedOut' }, 'Auth', AMPLIFY_SYMBOL);\n }\n}\nasync function clientSignOut(cognitoConfig) {\n try {\n const { userPoolEndpoint, userPoolId, userPoolClientId } = cognitoConfig;\n const authTokens = await tokenOrchestrator.getTokenStore().loadTokens();\n assertAuthTokensWithRefreshToken(authTokens);\n if (isSessionRevocable(authTokens.accessToken)) {\n const revokeToken = createRevokeTokenClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await revokeToken({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignOut),\n }, {\n ClientId: userPoolClientId,\n Token: authTokens.refreshToken,\n });\n }\n }\n catch (err) {\n // this shouldn't throw\n logger.debug('Client signOut error caught but will proceed with token removal');\n }\n}\nasync function globalSignOut(cognitoConfig) {\n try {\n const { userPoolEndpoint, userPoolId } = cognitoConfig;\n const authTokens = await tokenOrchestrator.getTokenStore().loadTokens();\n assertAuthTokens(authTokens);\n const globalSignOutClient = createGlobalSignOutClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await globalSignOutClient({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SignOut),\n }, {\n AccessToken: authTokens.accessToken.toString(),\n });\n }\n catch (err) {\n // it should not throw\n logger.debug('Global signOut error caught but will proceed with token removal');\n }\n}\nconst isSessionRevocable = (token) => !!token?.payload?.origin_jti;\n\nexport { signOut };\n//# sourceMappingURL=signOut.mjs.map\n","import { completeOAuthSignOut } from './completeOAuthSignOut.mjs';\nimport { oAuthSignOutRedirect } from './oAuthSignOutRedirect.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst handleOAuthSignOut = async (cognitoConfig, store, tokenOrchestrator, redirectUrl) => {\n const { isOAuthSignIn } = await store.loadOAuthSignIn();\n const oauthMetadata = await tokenOrchestrator.getOAuthMetadata();\n // Clear everything before attempting to visted logout endpoint since the current application\n // state could be wiped away on redirect\n await completeOAuthSignOut(store);\n // The isOAuthSignIn flag is propagated by the oAuthToken store which manages oauth keys in local storage only.\n // These keys are used to determine if a user is in an inflight or signedIn oauth states.\n // However, this behavior represents an issue when 2 apps share the same set of tokens in Cookie storage because the app that didn't\n // start the OAuth will not have access to the oauth keys.\n // A heuristic solution is to add oauth metadata to the tokenOrchestrator which will have access to the underlying\n // storage mechanism that is used by Amplify.\n if (isOAuthSignIn || oauthMetadata?.oauthSignIn) {\n // On web, this will always end up being a void action\n return oAuthSignOutRedirect(cognitoConfig, false, redirectUrl);\n }\n};\n\nexport { handleOAuthSignOut };\n//# sourceMappingURL=handleOAuthSignOut.mjs.map\n","import { clearCredentials, Hub } from '@aws-amplify/core';\nimport { AMPLIFY_SYMBOL } from '@aws-amplify/core/internals/utils';\nimport '../refreshAuthTokens.mjs';\nimport '../../tokenProvider/errorHelpers.mjs';\nimport '../types.mjs';\nimport { tokenOrchestrator } from '../../tokenProvider/tokenProvider.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst completeOAuthSignOut = async (store) => {\n await store.clearOAuthData();\n tokenOrchestrator.clearTokens();\n await clearCredentials();\n Hub.dispatch('auth', { event: 'signedOut' }, 'Auth', AMPLIFY_SYMBOL);\n};\n\nexport { completeOAuthSignOut };\n//# sourceMappingURL=completeOAuthSignOut.mjs.map\n","import { assertOAuthConfig } from '@aws-amplify/core/internals/utils';\nimport { openAuthSession } from '../../../../utils/openAuthSession.mjs';\nimport { getRedirectUrl } from './getRedirectUrl.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst oAuthSignOutRedirect = async (authConfig, preferPrivateSession = false, redirectUrl) => {\n assertOAuthConfig(authConfig);\n const { loginWith, userPoolClientId } = authConfig;\n const { domain, redirectSignOut } = loginWith.oauth;\n const signoutUri = getRedirectUrl(redirectSignOut, redirectUrl);\n const oAuthLogoutEndpoint = `https://${domain}/logout?${Object.entries({\n client_id: userPoolClientId,\n logout_uri: encodeURIComponent(signoutUri),\n })\n .map(([k, v]) => `${k}=${v}`)\n .join('&')}`;\n return openAuthSession(oAuthLogoutEndpoint);\n};\n\nexport { oAuthSignOutRedirect };\n//# sourceMappingURL=oAuthSignOutRedirect.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createRevokeTokenClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('RevokeToken'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createRevokeTokenClient };\n//# sourceMappingURL=createRevokeTokenClient.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createGlobalSignOutClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('GlobalSignOut'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createGlobalSignOutClient };\n//# sourceMappingURL=createGlobalSignOutClient.mjs.map\n","import { Amplify, fetchAuthSession } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { assertAuthTokens } from '../utils/types.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../types/errors.mjs';\nimport { createGetUserAttributeVerificationCodeClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createGetUserAttributeVerificationCodeClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Resends user's confirmation code when updating attributes while authenticated.\n *\n * @param input - The SendUserAttributeVerificationCodeInput object\n * @returns SendUserAttributeVerificationCodeOutput\n * @throws - {@link GetUserAttributeVerificationException}\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nconst sendUserAttributeVerificationCode = async (input) => {\n const { userAttributeKey, options } = input;\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n const clientMetadata = options?.clientMetadata;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { tokens } = await fetchAuthSession({ forceRefresh: false });\n assertAuthTokens(tokens);\n const getUserAttributeVerificationCode = createGetUserAttributeVerificationCodeClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { CodeDeliveryDetails } = await getUserAttributeVerificationCode({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.SendUserAttributeVerificationCode),\n }, {\n AccessToken: tokens.accessToken.toString(),\n ClientMetadata: clientMetadata,\n AttributeName: userAttributeKey,\n });\n const { DeliveryMedium, AttributeName, Destination } = {\n ...CodeDeliveryDetails,\n };\n return {\n destination: Destination,\n deliveryMedium: DeliveryMedium,\n attributeName: AttributeName,\n };\n};\n\nexport { sendUserAttributeVerificationCode };\n//# sourceMappingURL=sendUserAttributeVerificationCode.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createGetUserAttributeVerificationCodeClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('GetUserAttributeVerificationCode'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createGetUserAttributeVerificationCodeClient };\n//# sourceMappingURL=createGetUserAttributeVerificationCodeClient.mjs.map\n","import { Amplify, fetchAuthSession } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { assertAuthTokens } from '../utils/types.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../types/errors.mjs';\nimport { createDeleteUserAttributesClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createDeleteUserAttributesClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Deletes user attributes.\n *\n * @param input - The DeleteUserAttributesInput object\n * @throws -{@link DeleteUserAttributesException } - Thrown due to invalid attribute.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function deleteUserAttributes(input) {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userAttributeKeys } = input;\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { tokens } = await fetchAuthSession({ forceRefresh: false });\n assertAuthTokens(tokens);\n const deleteUserAttributesClient = createDeleteUserAttributesClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await deleteUserAttributesClient({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.DeleteUserAttributes),\n }, {\n AccessToken: tokens.accessToken.toString(),\n UserAttributeNames: userAttributeKeys,\n });\n}\n\nexport { deleteUserAttributes };\n//# sourceMappingURL=deleteUserAttributes.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createDeleteUserAttributesClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('DeleteUserAttributes'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createDeleteUserAttributesClient };\n//# sourceMappingURL=createDeleteUserAttributesClient.mjs.map\n","import { Amplify, fetchAuthSession } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { assertAuthTokens } from '../utils/types.mjs';\nimport '../utils/refreshAuthTokens.mjs';\nimport '../tokenProvider/errorHelpers.mjs';\nimport { tokenOrchestrator } from '../tokenProvider/tokenProvider.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../types/errors.mjs';\nimport { createDeleteUserClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createDeleteUserClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { signOut } from './signOut.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Deletes a user from the user pool while authenticated.\n *\n * @throws - {@link DeleteUserException}\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function deleteUser() {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { tokens } = await fetchAuthSession();\n assertAuthTokens(tokens);\n const serviceDeleteUser = createDeleteUserClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await serviceDeleteUser({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.DeleteUser),\n }, {\n AccessToken: tokens.accessToken.toString(),\n });\n await tokenOrchestrator.clearDeviceMetadata();\n await signOut();\n}\n\nexport { deleteUser };\n//# sourceMappingURL=deleteUser.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { createEmptyResponseDeserializer } from './shared/serde/createEmptyResponseDeserializer.mjs';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createDeleteUserClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('DeleteUser'), createEmptyResponseDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createDeleteUserClient };\n//# sourceMappingURL=createDeleteUserClient.mjs.map\n","import { parseJsonError } from '@aws-amplify/core/internals/aws-client-utils';\nimport { assertServiceError } from '../../../../../../errors/utils/assertServiceError.mjs';\nimport { AuthError } from '../../../../../../errors/AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createEmptyResponseDeserializer = () => async (response) => {\n if (response.statusCode >= 300) {\n const error = await parseJsonError(response);\n assertServiceError(error);\n throw new AuthError({ name: error.name, message: error.message });\n }\n else {\n return undefined;\n }\n};\n\nexport { createEmptyResponseDeserializer };\n//# sourceMappingURL=createEmptyResponseDeserializer.mjs.map\n","import { Amplify, fetchAuthSession } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { assertAuthTokens, assertDeviceMetadata } from '../utils/types.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport '../utils/refreshAuthTokens.mjs';\nimport '../tokenProvider/errorHelpers.mjs';\nimport { tokenOrchestrator } from '../tokenProvider/tokenProvider.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../types/errors.mjs';\nimport { createUpdateDeviceStatusClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createUpdateDeviceStatusClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Marks device as remembered while authenticated.\n *\n * @throws - {@link UpdateDeviceStatusException} - Cognito service errors thrown when\n * setting device status to remembered using an invalid device key.\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function rememberDevice() {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { tokens } = await fetchAuthSession();\n assertAuthTokens(tokens);\n const deviceMetadata = await tokenOrchestrator?.getDeviceMetadata();\n assertDeviceMetadata(deviceMetadata);\n const updateDeviceStatus = createUpdateDeviceStatusClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await updateDeviceStatus({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.RememberDevice),\n }, {\n AccessToken: tokens.accessToken.toString(),\n DeviceKey: deviceMetadata.deviceKey,\n DeviceRememberedStatus: 'remembered',\n });\n}\n\nexport { rememberDevice };\n//# sourceMappingURL=rememberDevice.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createUpdateDeviceStatusClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('UpdateDeviceStatus'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createUpdateDeviceStatusClient };\n//# sourceMappingURL=createUpdateDeviceStatusClient.mjs.map\n","import { Amplify, fetchAuthSession } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { assertAuthTokens, assertDeviceMetadata } from '../utils/types.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport '../utils/refreshAuthTokens.mjs';\nimport '../tokenProvider/errorHelpers.mjs';\nimport { tokenOrchestrator } from '../tokenProvider/tokenProvider.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../types/errors.mjs';\nimport { createForgetDeviceClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createForgetDeviceClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Forget a remembered device while authenticated.\n *\n * @param input - The ForgetDeviceInput object.\n * @throws - {@link ForgetDeviceException} - Cognito service errors thrown when\n * forgetting device with invalid device key\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function forgetDevice(input) {\n const { device: { id: externalDeviceKey } = { id: undefined } } = input ?? {};\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { tokens } = await fetchAuthSession();\n assertAuthTokens(tokens);\n const deviceMetadata = await tokenOrchestrator.getDeviceMetadata();\n const currentDeviceKey = deviceMetadata?.deviceKey;\n if (!externalDeviceKey)\n assertDeviceMetadata(deviceMetadata);\n const serviceForgetDevice = createForgetDeviceClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await serviceForgetDevice({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ForgetDevice),\n }, {\n AccessToken: tokens.accessToken.toString(),\n DeviceKey: externalDeviceKey ?? currentDeviceKey,\n });\n if (!externalDeviceKey || externalDeviceKey === currentDeviceKey)\n await tokenOrchestrator.clearDeviceMetadata();\n}\n\nexport { forgetDevice };\n//# sourceMappingURL=forgetDevice.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { createEmptyResponseDeserializer } from './shared/serde/createEmptyResponseDeserializer.mjs';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createForgetDeviceClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('ForgetDevice'), createEmptyResponseDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createForgetDeviceClient };\n//# sourceMappingURL=createForgetDeviceClient.mjs.map\n","import { Amplify, fetchAuthSession } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { assertAuthTokens } from '../utils/types.mjs';\nimport { getRegionFromUserPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { getAuthUserAgentValue } from '../../../utils/getAuthUserAgentValue.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../../common/AuthErrorStrings.mjs';\nimport '../../../errors/types/validation.mjs';\nimport '../types/errors.mjs';\nimport { createListDevicesClient } from '../../../foundation/factories/serviceClients/cognitoIdentityProvider/createListDevicesClient.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../factories/createCognitoUserPoolEndpointResolver.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// Cognito Documentation for max device\n// https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListDevices.html#API_ListDevices_RequestSyntax\nconst MAX_DEVICES = 60;\n/**\n * Fetches devices that have been remembered using {@link rememberDevice}\n * for the currently authenticated user.\n *\n * @returns FetchDevicesOutput\n * @throws {@link ListDevicesException}\n * @throws AuthTokenConfigException - Thrown when the token provider config is invalid.\n */\nasync function fetchDevices() {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { tokens } = await fetchAuthSession();\n assertAuthTokens(tokens);\n const listDevices = createListDevicesClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const response = await listDevices({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.FetchDevices),\n }, {\n AccessToken: tokens.accessToken.toString(),\n Limit: MAX_DEVICES,\n });\n return parseDevicesResponse(response.Devices ?? []);\n}\nconst parseDevicesResponse = async (devices) => {\n return devices.map(({ DeviceKey: id = '', DeviceAttributes = [], DeviceCreateDate, DeviceLastModifiedDate, DeviceLastAuthenticatedDate, }) => {\n let deviceName;\n const attributes = DeviceAttributes.reduce((attrs, { Name, Value }) => {\n if (Name && Value) {\n if (Name === 'device_name')\n deviceName = Value;\n attrs[Name] = Value;\n }\n return attrs;\n }, {});\n return {\n id,\n name: deviceName,\n attributes,\n createDate: DeviceCreateDate\n ? new Date(DeviceCreateDate * 1000)\n : undefined,\n lastModifiedDate: DeviceLastModifiedDate\n ? new Date(DeviceLastModifiedDate * 1000)\n : undefined,\n lastAuthenticatedDate: DeviceLastAuthenticatedDate\n ? new Date(DeviceLastAuthenticatedDate * 1000)\n : undefined,\n };\n });\n};\n\nexport { fetchDevices };\n//# sourceMappingURL=fetchDevices.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createListDevicesClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('ListDevices'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createListDevicesClient };\n//# sourceMappingURL=createListDevicesClient.mjs.map\n","import { defaultStorage } from '@aws-amplify/core';\nimport { DefaultIdentityIdStore } from './IdentityIdStore.mjs';\nimport { CognitoAWSCredentialsAndIdentityIdProvider } from './credentialsProvider.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Cognito specific implmentation of the CredentialsProvider interface\n * that manages setting and getting of AWS Credentials.\n *\n * @throws configuration expections: `InvalidIdentityPoolIdException`\n * - Auth errors that may arise from misconfiguration.\n * @throws service expections: {@link GetCredentialsForIdentityException}, {@link GetIdException}\n *\n */\nconst cognitoCredentialsProvider = new CognitoAWSCredentialsAndIdentityIdProvider(new DefaultIdentityIdStore(defaultStorage));\n\nexport { CognitoAWSCredentialsAndIdentityIdProvider, DefaultIdentityIdStore, cognitoCredentialsProvider };\n//# sourceMappingURL=index.mjs.map\n","import { ConsoleLogger } from '@aws-amplify/core';\nimport { assertIdentityPoolIdConfig } from '@aws-amplify/core/internals/utils';\nimport { getAuthStorageKeys } from '../tokenProvider/TokenStore.mjs';\nimport { IdentityIdStorageKeys } from './types.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('DefaultIdentityIdStore');\nclass DefaultIdentityIdStore {\n setAuthConfig(authConfigParam) {\n assertIdentityPoolIdConfig(authConfigParam.Cognito);\n this.authConfig = authConfigParam;\n this._authKeys = createKeysForAuthStorage('Cognito', authConfigParam.Cognito.identityPoolId);\n }\n constructor(keyValueStorage) {\n this._authKeys = {};\n this._hasGuestIdentityId = false;\n this.keyValueStorage = keyValueStorage;\n }\n async loadIdentityId() {\n assertIdentityPoolIdConfig(this.authConfig?.Cognito);\n try {\n if (this._primaryIdentityId) {\n return {\n id: this._primaryIdentityId,\n type: 'primary',\n };\n }\n else {\n const storedIdentityId = await this.keyValueStorage.getItem(this._authKeys.identityId);\n if (storedIdentityId) {\n this._hasGuestIdentityId = true;\n return {\n id: storedIdentityId,\n type: 'guest',\n };\n }\n return null;\n }\n }\n catch (err) {\n logger.log('Error getting stored IdentityId.', err);\n return null;\n }\n }\n async storeIdentityId(identity) {\n assertIdentityPoolIdConfig(this.authConfig?.Cognito);\n if (identity.type === 'guest') {\n this.keyValueStorage.setItem(this._authKeys.identityId, identity.id);\n // Clear in-memory storage of primary identityId\n this._primaryIdentityId = undefined;\n this._hasGuestIdentityId = true;\n }\n else {\n this._primaryIdentityId = identity.id;\n // Clear locally stored guest id\n if (this._hasGuestIdentityId) {\n this.keyValueStorage.removeItem(this._authKeys.identityId);\n this._hasGuestIdentityId = false;\n }\n }\n }\n async clearIdentityId() {\n this._primaryIdentityId = undefined;\n await this.keyValueStorage.removeItem(this._authKeys.identityId);\n }\n}\nconst createKeysForAuthStorage = (provider, identifier) => {\n return getAuthStorageKeys(IdentityIdStorageKeys)(`com.amplify.${provider}`, identifier);\n};\n\nexport { DefaultIdentityIdStore };\n//# sourceMappingURL=IdentityIdStore.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst IdentityIdStorageKeys = {\n identityId: 'identityId',\n};\n\nexport { IdentityIdStorageKeys };\n//# sourceMappingURL=types.mjs.map\n","import { ConsoleLogger, getCredentialsForIdentity } from '@aws-amplify/core';\nimport { assertIdentityPoolIdConfig } from '@aws-amplify/core/internals/utils';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { getRegionFromIdentityPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { assertIdTokenInAuthTokens } from '../utils/types.mjs';\nimport { cognitoIdentityIdProvider } from './IdentityIdProvider.mjs';\nimport { formLoginsMap } from './utils.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('CognitoCredentialsProvider');\nconst CREDENTIALS_TTL = 50 * 60 * 1000; // 50 min, can be modified on config if required in the future\nclass CognitoAWSCredentialsAndIdentityIdProvider {\n constructor(identityIdStore) {\n this._nextCredentialsRefresh = 0;\n this._identityIdStore = identityIdStore;\n }\n async clearCredentialsAndIdentityId() {\n logger.debug('Clearing out credentials and identityId');\n this._credentialsAndIdentityId = undefined;\n await this._identityIdStore.clearIdentityId();\n }\n async clearCredentials() {\n logger.debug('Clearing out in-memory credentials');\n this._credentialsAndIdentityId = undefined;\n }\n async getCredentialsAndIdentityId(getCredentialsOptions) {\n const isAuthenticated = getCredentialsOptions.authenticated;\n const { tokens } = getCredentialsOptions;\n const { authConfig } = getCredentialsOptions;\n try {\n assertIdentityPoolIdConfig(authConfig?.Cognito);\n }\n catch {\n // No identity pool configured, skipping\n return;\n }\n if (!isAuthenticated && !authConfig.Cognito.allowGuestAccess) {\n // TODO(V6): return partial result like Native platforms\n return;\n }\n const { forceRefresh } = getCredentialsOptions;\n const tokenHasChanged = this.hasTokenChanged(tokens);\n const identityId = await cognitoIdentityIdProvider({\n tokens,\n authConfig: authConfig.Cognito,\n identityIdStore: this._identityIdStore,\n });\n // Clear cached credentials when forceRefresh is true OR the cache token has changed\n if (forceRefresh || tokenHasChanged) {\n this.clearCredentials();\n }\n if (!isAuthenticated) {\n return this.getGuestCredentials(identityId, authConfig.Cognito);\n }\n else {\n assertIdTokenInAuthTokens(tokens);\n return this.credsForOIDCTokens(authConfig.Cognito, tokens, identityId);\n }\n }\n async getGuestCredentials(identityId, authConfig) {\n // Return existing in-memory cached credentials only if it exists, is not past it's lifetime and is unauthenticated credentials\n if (this._credentialsAndIdentityId &&\n !this.isPastTTL() &&\n this._credentialsAndIdentityId.isAuthenticatedCreds === false) {\n logger.info('returning stored credentials as they neither past TTL nor expired.');\n return this._credentialsAndIdentityId;\n }\n // Clear to discard if any authenticated credentials are set and start with a clean slate\n this.clearCredentials();\n const region = getRegionFromIdentityPoolId(authConfig.identityPoolId);\n // use identityId to obtain guest credentials\n // save credentials in-memory\n // No logins params should be passed for guest creds:\n // https://docs.aws.amazon.com/cognitoidentity/latest/APIReference/API_GetCredentialsForIdentity.html\n const clientResult = await getCredentialsForIdentity({ region }, {\n IdentityId: identityId,\n });\n if (clientResult.Credentials &&\n clientResult.Credentials.AccessKeyId &&\n clientResult.Credentials.SecretKey) {\n this._nextCredentialsRefresh = new Date().getTime() + CREDENTIALS_TTL;\n const res = {\n credentials: {\n accessKeyId: clientResult.Credentials.AccessKeyId,\n secretAccessKey: clientResult.Credentials.SecretKey,\n sessionToken: clientResult.Credentials.SessionToken,\n expiration: clientResult.Credentials.Expiration,\n },\n identityId,\n };\n const identityIdRes = clientResult.IdentityId;\n if (identityIdRes) {\n res.identityId = identityIdRes;\n this._identityIdStore.storeIdentityId({\n id: identityIdRes,\n type: 'guest',\n });\n }\n this._credentialsAndIdentityId = {\n ...res,\n isAuthenticatedCreds: false,\n };\n return res;\n }\n else {\n throw new AuthError({\n name: 'CredentialsNotFoundException',\n message: `Cognito did not respond with either Credentials, AccessKeyId or SecretKey.`,\n });\n }\n }\n async credsForOIDCTokens(authConfig, authTokens, identityId) {\n if (this._credentialsAndIdentityId &&\n !this.isPastTTL() &&\n this._credentialsAndIdentityId.isAuthenticatedCreds === true) {\n logger.debug('returning stored credentials as they neither past TTL nor expired.');\n return this._credentialsAndIdentityId;\n }\n // Clear to discard if any unauthenticated credentials are set and start with a clean slate\n this.clearCredentials();\n const logins = authTokens.idToken\n ? formLoginsMap(authTokens.idToken.toString())\n : {};\n const region = getRegionFromIdentityPoolId(authConfig.identityPoolId);\n const clientResult = await getCredentialsForIdentity({ region }, {\n IdentityId: identityId,\n Logins: logins,\n });\n if (clientResult.Credentials &&\n clientResult.Credentials.AccessKeyId &&\n clientResult.Credentials.SecretKey) {\n const res = {\n credentials: {\n accessKeyId: clientResult.Credentials.AccessKeyId,\n secretAccessKey: clientResult.Credentials.SecretKey,\n sessionToken: clientResult.Credentials.SessionToken,\n expiration: clientResult.Credentials.Expiration,\n },\n identityId,\n };\n // Store the credentials in-memory along with the expiration\n this._credentialsAndIdentityId = {\n ...res,\n isAuthenticatedCreds: true,\n associatedIdToken: authTokens.idToken?.toString(),\n };\n this._nextCredentialsRefresh = new Date().getTime() + CREDENTIALS_TTL;\n const identityIdRes = clientResult.IdentityId;\n if (identityIdRes) {\n res.identityId = identityIdRes;\n this._identityIdStore.storeIdentityId({\n id: identityIdRes,\n type: 'primary',\n });\n }\n return res;\n }\n else {\n throw new AuthError({\n name: 'CredentialsException',\n message: `Cognito did not respond with either Credentials, AccessKeyId or SecretKey.`,\n });\n }\n }\n isPastTTL() {\n return this._nextCredentialsRefresh === undefined\n ? true\n : this._nextCredentialsRefresh <= Date.now();\n }\n hasTokenChanged(tokens) {\n return (!!tokens &&\n !!this._credentialsAndIdentityId?.associatedIdToken &&\n tokens.idToken?.toString() !==\n this._credentialsAndIdentityId.associatedIdToken);\n }\n}\n\nexport { CognitoAWSCredentialsAndIdentityIdProvider };\n//# sourceMappingURL=credentialsProvider.mjs.map\n","import { ConsoleLogger, getId } from '@aws-amplify/core';\nimport { AuthError } from '../../../errors/AuthError.mjs';\nimport { getRegionFromIdentityPoolId } from '../../../foundation/parsers/regionParsers.mjs';\nimport { formLoginsMap } from './utils.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('CognitoIdentityIdProvider');\n/**\n * Provides a Cognito identityId\n *\n * @param tokens - The AuthTokens received after SignIn\n * @returns string\n * @throws configuration exceptions: `InvalidIdentityPoolIdException`\n * - Auth errors that may arise from misconfiguration.\n * @throws service exceptions: {@link GetIdException }\n */\nasync function cognitoIdentityIdProvider({ tokens, authConfig, identityIdStore, }) {\n identityIdStore.setAuthConfig({ Cognito: authConfig });\n // will return null only if there is no identityId cached or if there is an error retrieving it\n let identityId = await identityIdStore.loadIdentityId();\n // Tokens are available so return primary identityId\n if (tokens) {\n // If there is existing primary identityId in-memory return that\n if (identityId && identityId.type === 'primary') {\n return identityId.id;\n }\n else {\n const logins = tokens.idToken\n ? formLoginsMap(tokens.idToken.toString())\n : {};\n const generatedIdentityId = await generateIdentityId(logins, authConfig);\n if (identityId && identityId.id === generatedIdentityId) {\n logger.debug(`The guest identity ${identityId.id} has become the primary identity.`);\n }\n identityId = {\n id: generatedIdentityId,\n type: 'primary',\n };\n }\n }\n else {\n // If there is existing guest identityId cached return that\n if (identityId && identityId.type === 'guest') {\n return identityId.id;\n }\n else {\n identityId = {\n id: await generateIdentityId({}, authConfig),\n type: 'guest',\n };\n }\n }\n // Store in-memory or local storage depending on guest or primary identityId\n identityIdStore.storeIdentityId(identityId);\n return identityId.id;\n}\nasync function generateIdentityId(logins, authConfig) {\n const identityPoolId = authConfig?.identityPoolId;\n const region = getRegionFromIdentityPoolId(identityPoolId);\n // IdentityId is absent so get it using IdentityPoolId with Cognito's GetId API\n const idResult = \n // for a first-time user, this will return a brand new identity\n // for a returning user, this will retrieve the previous identity assocaited with the logins\n (await getId({\n region,\n }, {\n IdentityPoolId: identityPoolId,\n Logins: logins,\n })).IdentityId;\n if (!idResult) {\n throw new AuthError({\n name: 'GetIdResponseException',\n message: 'Received undefined response from getId operation',\n recoverySuggestion: 'Make sure to pass a valid identityPoolId in the configuration.',\n });\n }\n return idResult;\n}\n\nexport { cognitoIdentityIdProvider };\n//# sourceMappingURL=IdentityIdProvider.mjs.map\n","import { decodeJWT } from '@aws-amplify/core/internals/utils';\nimport { AuthError } from '../../../errors/AuthError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction formLoginsMap(idToken) {\n const issuer = decodeJWT(idToken).payload.iss;\n const res = {};\n if (!issuer) {\n throw new AuthError({\n name: 'InvalidIdTokenException',\n message: 'Invalid Idtoken.',\n });\n }\n const domainName = issuer.replace(/(^\\w+:|^)\\/\\//, '');\n res[domainName] = idToken;\n return res;\n}\n\nexport { formLoginsMap };\n//# sourceMappingURL=utils.mjs.map\n","// src/index.ts\nexport * from \"@tanstack/query-core\";\nexport * from \"./types.js\";\nimport { useQueries } from \"./useQueries.js\";\nimport { useQuery } from \"./useQuery.js\";\nimport { useSuspenseQuery } from \"./useSuspenseQuery.js\";\nimport { useSuspenseInfiniteQuery } from \"./useSuspenseInfiniteQuery.js\";\nimport { useSuspenseQueries } from \"./useSuspenseQueries.js\";\nimport { queryOptions } from \"./queryOptions.js\";\nimport { infiniteQueryOptions } from \"./infiniteQueryOptions.js\";\nimport {\n QueryClientContext,\n QueryClientProvider,\n useQueryClient\n} from \"./QueryClientProvider.js\";\nimport { HydrationBoundary } from \"./HydrationBoundary.js\";\nimport {\n QueryErrorResetBoundary,\n useQueryErrorResetBoundary\n} from \"./QueryErrorResetBoundary.js\";\nimport { useIsFetching } from \"./useIsFetching.js\";\nimport { useIsMutating, useMutationState } from \"./useMutationState.js\";\nimport { useMutation } from \"./useMutation.js\";\nimport { useInfiniteQuery } from \"./useInfiniteQuery.js\";\nimport { useIsRestoring, IsRestoringProvider } from \"./isRestoring.js\";\nexport {\n HydrationBoundary,\n IsRestoringProvider,\n QueryClientContext,\n QueryClientProvider,\n QueryErrorResetBoundary,\n infiniteQueryOptions,\n queryOptions,\n useInfiniteQuery,\n useIsFetching,\n useIsMutating,\n useIsRestoring,\n useMutation,\n useMutationState,\n useQueries,\n useQuery,\n useQueryClient,\n useQueryErrorResetBoundary,\n useSuspenseInfiniteQuery,\n useSuspenseQueries,\n useSuspenseQuery\n};\n//# sourceMappingURL=index.js.map","import \"./chunk-WPSKCR32.js\";\n\n// src/index.ts\nimport { CancelledError } from \"./retryer.js\";\nimport { QueryCache } from \"./queryCache.js\";\nimport { QueryClient } from \"./queryClient.js\";\nimport { QueryObserver } from \"./queryObserver.js\";\nimport { QueriesObserver } from \"./queriesObserver.js\";\nimport { InfiniteQueryObserver } from \"./infiniteQueryObserver.js\";\nimport { MutationCache } from \"./mutationCache.js\";\nimport { MutationObserver } from \"./mutationObserver.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { onlineManager } from \"./onlineManager.js\";\nimport {\n hashKey,\n replaceEqualDeep,\n isServer,\n matchQuery,\n keepPreviousData\n} from \"./utils.js\";\nimport { isCancelledError } from \"./retryer.js\";\nimport {\n dehydrate,\n hydrate,\n defaultShouldDehydrateQuery,\n defaultShouldDehydrateMutation\n} from \"./hydration.js\";\nexport * from \"./types.js\";\nimport { Query } from \"./query.js\";\nexport {\n CancelledError,\n InfiniteQueryObserver,\n MutationCache,\n MutationObserver,\n QueriesObserver,\n Query,\n QueryCache,\n QueryClient,\n QueryObserver,\n defaultShouldDehydrateMutation,\n defaultShouldDehydrateQuery,\n dehydrate,\n focusManager,\n hashKey,\n hydrate,\n isCancelledError,\n isServer,\n keepPreviousData,\n matchQuery,\n notifyManager,\n onlineManager,\n replaceEqualDeep\n};\n//# sourceMappingURL=index.js.map","var __accessCheck = (obj, member, msg) => {\n if (!member.has(obj))\n throw TypeError(\"Cannot \" + msg);\n};\nvar __privateGet = (obj, member, getter) => {\n __accessCheck(obj, member, \"read from private field\");\n return getter ? getter.call(obj) : member.get(obj);\n};\nvar __privateAdd = (obj, member, value) => {\n if (member.has(obj))\n throw TypeError(\"Cannot add the same private member more than once\");\n member instanceof WeakSet ? member.add(obj) : member.set(obj, value);\n};\nvar __privateSet = (obj, member, value, setter) => {\n __accessCheck(obj, member, \"write to private field\");\n setter ? setter.call(obj, value) : member.set(obj, value);\n return value;\n};\nvar __privateWrapper = (obj, member, setter, getter) => ({\n set _(value) {\n __privateSet(obj, member, value, setter);\n },\n get _() {\n return __privateGet(obj, member, getter);\n }\n});\nvar __privateMethod = (obj, member, method) => {\n __accessCheck(obj, member, \"access private method\");\n return method;\n};\n\nexport {\n __privateGet,\n __privateAdd,\n __privateSet,\n __privateWrapper,\n __privateMethod\n};\n//# sourceMappingURL=chunk-WPSKCR32.js.map","import \"./chunk-WPSKCR32.js\";\n\n// src/retryer.ts\nimport { focusManager } from \"./focusManager.js\";\nimport { onlineManager } from \"./onlineManager.js\";\nimport { isServer, sleep } from \"./utils.js\";\nfunction defaultRetryDelay(failureCount) {\n return Math.min(1e3 * 2 ** failureCount, 3e4);\n}\nfunction canFetch(networkMode) {\n return (networkMode ?? \"online\") === \"online\" ? onlineManager.isOnline() : true;\n}\nvar CancelledError = class {\n constructor(options) {\n this.revert = options == null ? void 0 : options.revert;\n this.silent = options == null ? void 0 : options.silent;\n }\n};\nfunction isCancelledError(value) {\n return value instanceof CancelledError;\n}\nfunction createRetryer(config) {\n let isRetryCancelled = false;\n let failureCount = 0;\n let isResolved = false;\n let continueFn;\n let promiseResolve;\n let promiseReject;\n const promise = new Promise((outerResolve, outerReject) => {\n promiseResolve = outerResolve;\n promiseReject = outerReject;\n });\n const cancel = (cancelOptions) => {\n var _a;\n if (!isResolved) {\n reject(new CancelledError(cancelOptions));\n (_a = config.abort) == null ? void 0 : _a.call(config);\n }\n };\n const cancelRetry = () => {\n isRetryCancelled = true;\n };\n const continueRetry = () => {\n isRetryCancelled = false;\n };\n const shouldPause = () => !focusManager.isFocused() || config.networkMode !== \"always\" && !onlineManager.isOnline();\n const resolve = (value) => {\n var _a;\n if (!isResolved) {\n isResolved = true;\n (_a = config.onSuccess) == null ? void 0 : _a.call(config, value);\n continueFn == null ? void 0 : continueFn();\n promiseResolve(value);\n }\n };\n const reject = (value) => {\n var _a;\n if (!isResolved) {\n isResolved = true;\n (_a = config.onError) == null ? void 0 : _a.call(config, value);\n continueFn == null ? void 0 : continueFn();\n promiseReject(value);\n }\n };\n const pause = () => {\n return new Promise((continueResolve) => {\n var _a;\n continueFn = (value) => {\n const canContinue = isResolved || !shouldPause();\n if (canContinue) {\n continueResolve(value);\n }\n return canContinue;\n };\n (_a = config.onPause) == null ? void 0 : _a.call(config);\n }).then(() => {\n var _a;\n continueFn = void 0;\n if (!isResolved) {\n (_a = config.onContinue) == null ? void 0 : _a.call(config);\n }\n });\n };\n const run = () => {\n if (isResolved) {\n return;\n }\n let promiseOrValue;\n try {\n promiseOrValue = config.fn();\n } catch (error) {\n promiseOrValue = Promise.reject(error);\n }\n Promise.resolve(promiseOrValue).then(resolve).catch((error) => {\n var _a;\n if (isResolved) {\n return;\n }\n const retry = config.retry ?? (isServer ? 0 : 3);\n const retryDelay = config.retryDelay ?? defaultRetryDelay;\n const delay = typeof retryDelay === \"function\" ? retryDelay(failureCount, error) : retryDelay;\n const shouldRetry = retry === true || typeof retry === \"number\" && failureCount < retry || typeof retry === \"function\" && retry(failureCount, error);\n if (isRetryCancelled || !shouldRetry) {\n reject(error);\n return;\n }\n failureCount++;\n (_a = config.onFail) == null ? void 0 : _a.call(config, failureCount, error);\n sleep(delay).then(() => {\n if (shouldPause()) {\n return pause();\n }\n return;\n }).then(() => {\n if (isRetryCancelled) {\n reject(error);\n } else {\n run();\n }\n });\n });\n };\n if (canFetch(config.networkMode)) {\n run();\n } else {\n pause().then(run);\n }\n return {\n promise,\n cancel,\n continue: () => {\n const didContinue = continueFn == null ? void 0 : continueFn();\n return didContinue ? promise : Promise.resolve();\n },\n cancelRetry,\n continueRetry\n };\n}\nexport {\n CancelledError,\n canFetch,\n createRetryer,\n isCancelledError\n};\n//# sourceMappingURL=retryer.js.map","import {\n __privateAdd,\n __privateGet,\n __privateSet\n} from \"./chunk-WPSKCR32.js\";\n\n// src/focusManager.ts\nimport { Subscribable } from \"./subscribable.js\";\nimport { isServer } from \"./utils.js\";\nvar _focused, _cleanup, _setup;\nvar FocusManager = class extends Subscribable {\n constructor() {\n super();\n __privateAdd(this, _focused, void 0);\n __privateAdd(this, _cleanup, void 0);\n __privateAdd(this, _setup, void 0);\n __privateSet(this, _setup, (onFocus) => {\n if (!isServer && window.addEventListener) {\n const listener = () => onFocus();\n window.addEventListener(\"visibilitychange\", listener, false);\n return () => {\n window.removeEventListener(\"visibilitychange\", listener);\n };\n }\n return;\n });\n }\n onSubscribe() {\n if (!__privateGet(this, _cleanup)) {\n this.setEventListener(__privateGet(this, _setup));\n }\n }\n onUnsubscribe() {\n var _a;\n if (!this.hasListeners()) {\n (_a = __privateGet(this, _cleanup)) == null ? void 0 : _a.call(this);\n __privateSet(this, _cleanup, void 0);\n }\n }\n setEventListener(setup) {\n var _a;\n __privateSet(this, _setup, setup);\n (_a = __privateGet(this, _cleanup)) == null ? void 0 : _a.call(this);\n __privateSet(this, _cleanup, setup((focused) => {\n if (typeof focused === \"boolean\") {\n this.setFocused(focused);\n } else {\n this.onFocus();\n }\n }));\n }\n setFocused(focused) {\n const changed = __privateGet(this, _focused) !== focused;\n if (changed) {\n __privateSet(this, _focused, focused);\n this.onFocus();\n }\n }\n onFocus() {\n this.listeners.forEach((listener) => {\n listener();\n });\n }\n isFocused() {\n var _a;\n if (typeof __privateGet(this, _focused) === \"boolean\") {\n return __privateGet(this, _focused);\n }\n return ((_a = globalThis.document) == null ? void 0 : _a.visibilityState) !== \"hidden\";\n }\n};\n_focused = new WeakMap();\n_cleanup = new WeakMap();\n_setup = new WeakMap();\nvar focusManager = new FocusManager();\nexport {\n FocusManager,\n focusManager\n};\n//# sourceMappingURL=focusManager.js.map","import \"./chunk-WPSKCR32.js\";\n\n// src/subscribable.ts\nvar Subscribable = class {\n constructor() {\n this.listeners = /* @__PURE__ */ new Set();\n this.subscribe = this.subscribe.bind(this);\n }\n subscribe(listener) {\n this.listeners.add(listener);\n this.onSubscribe();\n return () => {\n this.listeners.delete(listener);\n this.onUnsubscribe();\n };\n }\n hasListeners() {\n return this.listeners.size > 0;\n }\n onSubscribe() {\n }\n onUnsubscribe() {\n }\n};\nexport {\n Subscribable\n};\n//# sourceMappingURL=subscribable.js.map","import \"./chunk-WPSKCR32.js\";\n\n// src/utils.ts\nvar isServer = typeof window === \"undefined\" || \"Deno\" in window;\nfunction noop() {\n return void 0;\n}\nfunction functionalUpdate(updater, input) {\n return typeof updater === \"function\" ? updater(input) : updater;\n}\nfunction isValidTimeout(value) {\n return typeof value === \"number\" && value >= 0 && value !== Infinity;\n}\nfunction timeUntilStale(updatedAt, staleTime) {\n return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);\n}\nfunction matchQuery(filters, query) {\n const {\n type = \"all\",\n exact,\n fetchStatus,\n predicate,\n queryKey,\n stale\n } = filters;\n if (queryKey) {\n if (exact) {\n if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {\n return false;\n }\n } else if (!partialMatchKey(query.queryKey, queryKey)) {\n return false;\n }\n }\n if (type !== \"all\") {\n const isActive = query.isActive();\n if (type === \"active\" && !isActive) {\n return false;\n }\n if (type === \"inactive\" && isActive) {\n return false;\n }\n }\n if (typeof stale === \"boolean\" && query.isStale() !== stale) {\n return false;\n }\n if (typeof fetchStatus !== \"undefined\" && fetchStatus !== query.state.fetchStatus) {\n return false;\n }\n if (predicate && !predicate(query)) {\n return false;\n }\n return true;\n}\nfunction matchMutation(filters, mutation) {\n const { exact, status, predicate, mutationKey } = filters;\n if (mutationKey) {\n if (!mutation.options.mutationKey) {\n return false;\n }\n if (exact) {\n if (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) {\n return false;\n }\n } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {\n return false;\n }\n }\n if (status && mutation.state.status !== status) {\n return false;\n }\n if (predicate && !predicate(mutation)) {\n return false;\n }\n return true;\n}\nfunction hashQueryKeyByOptions(queryKey, options) {\n const hashFn = (options == null ? void 0 : options.queryKeyHashFn) || hashKey;\n return hashFn(queryKey);\n}\nfunction hashKey(queryKey) {\n return JSON.stringify(\n queryKey,\n (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => {\n result[key] = val[key];\n return result;\n }, {}) : val\n );\n}\nfunction partialMatchKey(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== typeof b) {\n return false;\n }\n if (a && b && typeof a === \"object\" && typeof b === \"object\") {\n return !Object.keys(b).some((key) => !partialMatchKey(a[key], b[key]));\n }\n return false;\n}\nfunction replaceEqualDeep(a, b) {\n if (a === b) {\n return a;\n }\n const array = isPlainArray(a) && isPlainArray(b);\n if (array || isPlainObject(a) && isPlainObject(b)) {\n const aSize = array ? a.length : Object.keys(a).length;\n const bItems = array ? b : Object.keys(b);\n const bSize = bItems.length;\n const copy = array ? [] : {};\n let equalItems = 0;\n for (let i = 0; i < bSize; i++) {\n const key = array ? i : bItems[i];\n copy[key] = replaceEqualDeep(a[key], b[key]);\n if (copy[key] === a[key]) {\n equalItems++;\n }\n }\n return aSize === bSize && equalItems === aSize ? a : copy;\n }\n return b;\n}\nfunction shallowEqualObjects(a, b) {\n if (a && !b || b && !a) {\n return false;\n }\n for (const key in a) {\n if (a[key] !== b[key]) {\n return false;\n }\n }\n return true;\n}\nfunction isPlainArray(value) {\n return Array.isArray(value) && value.length === Object.keys(value).length;\n}\nfunction isPlainObject(o) {\n if (!hasObjectPrototype(o)) {\n return false;\n }\n const ctor = o.constructor;\n if (typeof ctor === \"undefined\") {\n return true;\n }\n const prot = ctor.prototype;\n if (!hasObjectPrototype(prot)) {\n return false;\n }\n if (!prot.hasOwnProperty(\"isPrototypeOf\")) {\n return false;\n }\n return true;\n}\nfunction hasObjectPrototype(o) {\n return Object.prototype.toString.call(o) === \"[object Object]\";\n}\nfunction sleep(ms) {\n return new Promise((resolve) => {\n setTimeout(resolve, ms);\n });\n}\nfunction scheduleMicrotask(callback) {\n sleep(0).then(callback);\n}\nfunction replaceData(prevData, data, options) {\n if (typeof options.structuralSharing === \"function\") {\n return options.structuralSharing(prevData, data);\n } else if (options.structuralSharing !== false) {\n return replaceEqualDeep(prevData, data);\n }\n return data;\n}\nfunction keepPreviousData(previousData) {\n return previousData;\n}\nfunction addToEnd(items, item, max = 0) {\n const newItems = [...items, item];\n return max && newItems.length > max ? newItems.slice(1) : newItems;\n}\nfunction addToStart(items, item, max = 0) {\n const newItems = [item, ...items];\n return max && newItems.length > max ? newItems.slice(0, -1) : newItems;\n}\nexport {\n addToEnd,\n addToStart,\n functionalUpdate,\n hashKey,\n hashQueryKeyByOptions,\n isPlainArray,\n isPlainObject,\n isServer,\n isValidTimeout,\n keepPreviousData,\n matchMutation,\n matchQuery,\n noop,\n partialMatchKey,\n replaceData,\n replaceEqualDeep,\n scheduleMicrotask,\n shallowEqualObjects,\n sleep,\n timeUntilStale\n};\n//# sourceMappingURL=utils.js.map","import {\n __privateAdd,\n __privateGet,\n __privateSet\n} from \"./chunk-WPSKCR32.js\";\n\n// src/onlineManager.ts\nimport { Subscribable } from \"./subscribable.js\";\nimport { isServer } from \"./utils.js\";\nvar _online, _cleanup, _setup;\nvar OnlineManager = class extends Subscribable {\n constructor() {\n super();\n __privateAdd(this, _online, true);\n __privateAdd(this, _cleanup, void 0);\n __privateAdd(this, _setup, void 0);\n __privateSet(this, _setup, (onOnline) => {\n if (!isServer && window.addEventListener) {\n const onlineListener = () => onOnline(true);\n const offlineListener = () => onOnline(false);\n window.addEventListener(\"online\", onlineListener, false);\n window.addEventListener(\"offline\", offlineListener, false);\n return () => {\n window.removeEventListener(\"online\", onlineListener);\n window.removeEventListener(\"offline\", offlineListener);\n };\n }\n return;\n });\n }\n onSubscribe() {\n if (!__privateGet(this, _cleanup)) {\n this.setEventListener(__privateGet(this, _setup));\n }\n }\n onUnsubscribe() {\n var _a;\n if (!this.hasListeners()) {\n (_a = __privateGet(this, _cleanup)) == null ? void 0 : _a.call(this);\n __privateSet(this, _cleanup, void 0);\n }\n }\n setEventListener(setup) {\n var _a;\n __privateSet(this, _setup, setup);\n (_a = __privateGet(this, _cleanup)) == null ? void 0 : _a.call(this);\n __privateSet(this, _cleanup, setup(this.setOnline.bind(this)));\n }\n setOnline(online) {\n const changed = __privateGet(this, _online) !== online;\n if (changed) {\n __privateSet(this, _online, online);\n this.listeners.forEach((listener) => {\n listener(online);\n });\n }\n }\n isOnline() {\n return __privateGet(this, _online);\n }\n};\n_online = new WeakMap();\n_cleanup = new WeakMap();\n_setup = new WeakMap();\nvar onlineManager = new OnlineManager();\nexport {\n OnlineManager,\n onlineManager\n};\n//# sourceMappingURL=onlineManager.js.map","import {\n __privateAdd,\n __privateGet,\n __privateSet\n} from \"./chunk-WPSKCR32.js\";\n\n// src/queryCache.ts\nimport { hashQueryKeyByOptions, matchQuery } from \"./utils.js\";\nimport { Query } from \"./query.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nvar _queries;\nvar QueryCache = class extends Subscribable {\n constructor(config = {}) {\n super();\n this.config = config;\n __privateAdd(this, _queries, void 0);\n __privateSet(this, _queries, /* @__PURE__ */ new Map());\n }\n build(client, options, state) {\n const queryKey = options.queryKey;\n const queryHash = options.queryHash ?? hashQueryKeyByOptions(queryKey, options);\n let query = this.get(queryHash);\n if (!query) {\n query = new Query({\n cache: this,\n queryKey,\n queryHash,\n options: client.defaultQueryOptions(options),\n state,\n defaultOptions: client.getQueryDefaults(queryKey)\n });\n this.add(query);\n }\n return query;\n }\n add(query) {\n if (!__privateGet(this, _queries).has(query.queryHash)) {\n __privateGet(this, _queries).set(query.queryHash, query);\n this.notify({\n type: \"added\",\n query\n });\n }\n }\n remove(query) {\n const queryInMap = __privateGet(this, _queries).get(query.queryHash);\n if (queryInMap) {\n query.destroy();\n if (queryInMap === query) {\n __privateGet(this, _queries).delete(query.queryHash);\n }\n this.notify({ type: \"removed\", query });\n }\n }\n clear() {\n notifyManager.batch(() => {\n this.getAll().forEach((query) => {\n this.remove(query);\n });\n });\n }\n get(queryHash) {\n return __privateGet(this, _queries).get(queryHash);\n }\n getAll() {\n return [...__privateGet(this, _queries).values()];\n }\n find(filters) {\n const defaultedFilters = { exact: true, ...filters };\n return this.getAll().find(\n (query) => matchQuery(defaultedFilters, query)\n );\n }\n findAll(filters = {}) {\n const queries = this.getAll();\n return Object.keys(filters).length > 0 ? queries.filter((query) => matchQuery(filters, query)) : queries;\n }\n notify(event) {\n notifyManager.batch(() => {\n this.listeners.forEach((listener) => {\n listener(event);\n });\n });\n }\n onFocus() {\n notifyManager.batch(() => {\n this.getAll().forEach((query) => {\n query.onFocus();\n });\n });\n }\n onOnline() {\n notifyManager.batch(() => {\n this.getAll().forEach((query) => {\n query.onOnline();\n });\n });\n }\n};\n_queries = new WeakMap();\nexport {\n QueryCache\n};\n//# sourceMappingURL=queryCache.js.map","import {\n __privateAdd,\n __privateGet,\n __privateMethod,\n __privateSet\n} from \"./chunk-WPSKCR32.js\";\n\n// src/query.ts\nimport { noop, replaceData, timeUntilStale } from \"./utils.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { canFetch, createRetryer, isCancelledError } from \"./retryer.js\";\nimport { Removable } from \"./removable.js\";\nvar _initialState, _revertState, _cache, _promise, _retryer, _observers, _defaultOptions, _abortSignalConsumed, _setOptions, setOptions_fn, _dispatch, dispatch_fn;\nvar Query = class extends Removable {\n constructor(config) {\n super();\n __privateAdd(this, _setOptions);\n __privateAdd(this, _dispatch);\n __privateAdd(this, _initialState, void 0);\n __privateAdd(this, _revertState, void 0);\n __privateAdd(this, _cache, void 0);\n __privateAdd(this, _promise, void 0);\n __privateAdd(this, _retryer, void 0);\n __privateAdd(this, _observers, void 0);\n __privateAdd(this, _defaultOptions, void 0);\n __privateAdd(this, _abortSignalConsumed, void 0);\n __privateSet(this, _abortSignalConsumed, false);\n __privateSet(this, _defaultOptions, config.defaultOptions);\n __privateMethod(this, _setOptions, setOptions_fn).call(this, config.options);\n __privateSet(this, _observers, []);\n __privateSet(this, _cache, config.cache);\n this.queryKey = config.queryKey;\n this.queryHash = config.queryHash;\n __privateSet(this, _initialState, config.state || getDefaultState(this.options));\n this.state = __privateGet(this, _initialState);\n this.scheduleGc();\n }\n get meta() {\n return this.options.meta;\n }\n optionalRemove() {\n if (!__privateGet(this, _observers).length && this.state.fetchStatus === \"idle\") {\n __privateGet(this, _cache).remove(this);\n }\n }\n setData(newData, options) {\n const data = replaceData(this.state.data, newData, this.options);\n __privateMethod(this, _dispatch, dispatch_fn).call(this, {\n data,\n type: \"success\",\n dataUpdatedAt: options == null ? void 0 : options.updatedAt,\n manual: options == null ? void 0 : options.manual\n });\n return data;\n }\n setState(state, setStateOptions) {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"setState\", state, setStateOptions });\n }\n cancel(options) {\n var _a;\n const promise = __privateGet(this, _promise);\n (_a = __privateGet(this, _retryer)) == null ? void 0 : _a.cancel(options);\n return promise ? promise.then(noop).catch(noop) : Promise.resolve();\n }\n destroy() {\n super.destroy();\n this.cancel({ silent: true });\n }\n reset() {\n this.destroy();\n this.setState(__privateGet(this, _initialState));\n }\n isActive() {\n return __privateGet(this, _observers).some(\n (observer) => observer.options.enabled !== false\n );\n }\n isDisabled() {\n return this.getObserversCount() > 0 && !this.isActive();\n }\n isStale() {\n return this.state.isInvalidated || !this.state.dataUpdatedAt || __privateGet(this, _observers).some((observer) => observer.getCurrentResult().isStale);\n }\n isStaleByTime(staleTime = 0) {\n return this.state.isInvalidated || !this.state.dataUpdatedAt || !timeUntilStale(this.state.dataUpdatedAt, staleTime);\n }\n onFocus() {\n var _a;\n const observer = __privateGet(this, _observers).find((x) => x.shouldFetchOnWindowFocus());\n observer == null ? void 0 : observer.refetch({ cancelRefetch: false });\n (_a = __privateGet(this, _retryer)) == null ? void 0 : _a.continue();\n }\n onOnline() {\n var _a;\n const observer = __privateGet(this, _observers).find((x) => x.shouldFetchOnReconnect());\n observer == null ? void 0 : observer.refetch({ cancelRefetch: false });\n (_a = __privateGet(this, _retryer)) == null ? void 0 : _a.continue();\n }\n addObserver(observer) {\n if (!__privateGet(this, _observers).includes(observer)) {\n __privateGet(this, _observers).push(observer);\n this.clearGcTimeout();\n __privateGet(this, _cache).notify({ type: \"observerAdded\", query: this, observer });\n }\n }\n removeObserver(observer) {\n if (__privateGet(this, _observers).includes(observer)) {\n __privateSet(this, _observers, __privateGet(this, _observers).filter((x) => x !== observer));\n if (!__privateGet(this, _observers).length) {\n if (__privateGet(this, _retryer)) {\n if (__privateGet(this, _abortSignalConsumed)) {\n __privateGet(this, _retryer).cancel({ revert: true });\n } else {\n __privateGet(this, _retryer).cancelRetry();\n }\n }\n this.scheduleGc();\n }\n __privateGet(this, _cache).notify({ type: \"observerRemoved\", query: this, observer });\n }\n }\n getObserversCount() {\n return __privateGet(this, _observers).length;\n }\n invalidate() {\n if (!this.state.isInvalidated) {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"invalidate\" });\n }\n }\n fetch(options, fetchOptions) {\n var _a, _b, _c, _d;\n if (this.state.fetchStatus !== \"idle\") {\n if (this.state.dataUpdatedAt && (fetchOptions == null ? void 0 : fetchOptions.cancelRefetch)) {\n this.cancel({ silent: true });\n } else if (__privateGet(this, _promise)) {\n (_a = __privateGet(this, _retryer)) == null ? void 0 : _a.continueRetry();\n return __privateGet(this, _promise);\n }\n }\n if (options) {\n __privateMethod(this, _setOptions, setOptions_fn).call(this, options);\n }\n if (!this.options.queryFn) {\n const observer = __privateGet(this, _observers).find((x) => x.options.queryFn);\n if (observer) {\n __privateMethod(this, _setOptions, setOptions_fn).call(this, observer.options);\n }\n }\n if (process.env.NODE_ENV !== \"production\") {\n if (!Array.isArray(this.options.queryKey)) {\n console.error(\n `As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']`\n );\n }\n }\n const abortController = new AbortController();\n const queryFnContext = {\n queryKey: this.queryKey,\n meta: this.meta\n };\n const addSignalProperty = (object) => {\n Object.defineProperty(object, \"signal\", {\n enumerable: true,\n get: () => {\n __privateSet(this, _abortSignalConsumed, true);\n return abortController.signal;\n }\n });\n };\n addSignalProperty(queryFnContext);\n const fetchFn = () => {\n if (!this.options.queryFn) {\n return Promise.reject(\n new Error(`Missing queryFn: '${this.options.queryHash}'`)\n );\n }\n __privateSet(this, _abortSignalConsumed, false);\n if (this.options.persister) {\n return this.options.persister(\n this.options.queryFn,\n queryFnContext,\n this\n );\n }\n return this.options.queryFn(\n queryFnContext\n );\n };\n const context = {\n fetchOptions,\n options: this.options,\n queryKey: this.queryKey,\n state: this.state,\n fetchFn\n };\n addSignalProperty(context);\n (_b = this.options.behavior) == null ? void 0 : _b.onFetch(\n context,\n this\n );\n __privateSet(this, _revertState, this.state);\n if (this.state.fetchStatus === \"idle\" || this.state.fetchMeta !== ((_c = context.fetchOptions) == null ? void 0 : _c.meta)) {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"fetch\", meta: (_d = context.fetchOptions) == null ? void 0 : _d.meta });\n }\n const onError = (error) => {\n var _a2, _b2, _c2, _d2;\n if (!(isCancelledError(error) && error.silent)) {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, {\n type: \"error\",\n error\n });\n }\n if (!isCancelledError(error)) {\n (_b2 = (_a2 = __privateGet(this, _cache).config).onError) == null ? void 0 : _b2.call(\n _a2,\n error,\n this\n );\n (_d2 = (_c2 = __privateGet(this, _cache).config).onSettled) == null ? void 0 : _d2.call(\n _c2,\n this.state.data,\n error,\n this\n );\n }\n if (!this.isFetchingOptimistic) {\n this.scheduleGc();\n }\n this.isFetchingOptimistic = false;\n };\n __privateSet(this, _retryer, createRetryer({\n fn: context.fetchFn,\n abort: abortController.abort.bind(abortController),\n onSuccess: (data) => {\n var _a2, _b2, _c2, _d2;\n if (typeof data === \"undefined\") {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(\n `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`\n );\n }\n onError(new Error(`${this.queryHash} data is undefined`));\n return;\n }\n this.setData(data);\n (_b2 = (_a2 = __privateGet(this, _cache).config).onSuccess) == null ? void 0 : _b2.call(_a2, data, this);\n (_d2 = (_c2 = __privateGet(this, _cache).config).onSettled) == null ? void 0 : _d2.call(\n _c2,\n data,\n this.state.error,\n this\n );\n if (!this.isFetchingOptimistic) {\n this.scheduleGc();\n }\n this.isFetchingOptimistic = false;\n },\n onError,\n onFail: (failureCount, error) => {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"failed\", failureCount, error });\n },\n onPause: () => {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"pause\" });\n },\n onContinue: () => {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"continue\" });\n },\n retry: context.options.retry,\n retryDelay: context.options.retryDelay,\n networkMode: context.options.networkMode\n }));\n __privateSet(this, _promise, __privateGet(this, _retryer).promise);\n return __privateGet(this, _promise);\n }\n};\n_initialState = new WeakMap();\n_revertState = new WeakMap();\n_cache = new WeakMap();\n_promise = new WeakMap();\n_retryer = new WeakMap();\n_observers = new WeakMap();\n_defaultOptions = new WeakMap();\n_abortSignalConsumed = new WeakMap();\n_setOptions = new WeakSet();\nsetOptions_fn = function(options) {\n this.options = { ...__privateGet(this, _defaultOptions), ...options };\n this.updateGcTime(this.options.gcTime);\n};\n_dispatch = new WeakSet();\ndispatch_fn = function(action) {\n const reducer = (state) => {\n switch (action.type) {\n case \"failed\":\n return {\n ...state,\n fetchFailureCount: action.failureCount,\n fetchFailureReason: action.error\n };\n case \"pause\":\n return {\n ...state,\n fetchStatus: \"paused\"\n };\n case \"continue\":\n return {\n ...state,\n fetchStatus: \"fetching\"\n };\n case \"fetch\":\n return {\n ...state,\n fetchFailureCount: 0,\n fetchFailureReason: null,\n fetchMeta: action.meta ?? null,\n fetchStatus: canFetch(this.options.networkMode) ? \"fetching\" : \"paused\",\n ...!state.dataUpdatedAt && {\n error: null,\n status: \"pending\"\n }\n };\n case \"success\":\n return {\n ...state,\n data: action.data,\n dataUpdateCount: state.dataUpdateCount + 1,\n dataUpdatedAt: action.dataUpdatedAt ?? Date.now(),\n error: null,\n isInvalidated: false,\n status: \"success\",\n ...!action.manual && {\n fetchStatus: \"idle\",\n fetchFailureCount: 0,\n fetchFailureReason: null\n }\n };\n case \"error\":\n const error = action.error;\n if (isCancelledError(error) && error.revert && __privateGet(this, _revertState)) {\n return { ...__privateGet(this, _revertState), fetchStatus: \"idle\" };\n }\n return {\n ...state,\n error,\n errorUpdateCount: state.errorUpdateCount + 1,\n errorUpdatedAt: Date.now(),\n fetchFailureCount: state.fetchFailureCount + 1,\n fetchFailureReason: error,\n fetchStatus: \"idle\",\n status: \"error\"\n };\n case \"invalidate\":\n return {\n ...state,\n isInvalidated: true\n };\n case \"setState\":\n return {\n ...state,\n ...action.state\n };\n }\n };\n this.state = reducer(this.state);\n notifyManager.batch(() => {\n __privateGet(this, _observers).forEach((observer) => {\n observer.onQueryUpdate();\n });\n __privateGet(this, _cache).notify({ query: this, type: \"updated\", action });\n });\n};\nfunction getDefaultState(options) {\n const data = typeof options.initialData === \"function\" ? options.initialData() : options.initialData;\n const hasData = typeof data !== \"undefined\";\n const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === \"function\" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;\n return {\n data,\n dataUpdateCount: 0,\n dataUpdatedAt: hasData ? initialDataUpdatedAt ?? Date.now() : 0,\n error: null,\n errorUpdateCount: 0,\n errorUpdatedAt: 0,\n fetchFailureCount: 0,\n fetchFailureReason: null,\n fetchMeta: null,\n isInvalidated: false,\n status: hasData ? \"success\" : \"pending\",\n fetchStatus: \"idle\"\n };\n}\nexport {\n Query\n};\n//# sourceMappingURL=query.js.map","import \"./chunk-WPSKCR32.js\";\n\n// src/notifyManager.ts\nimport { scheduleMicrotask } from \"./utils.js\";\nfunction createNotifyManager() {\n let queue = [];\n let transactions = 0;\n let notifyFn = (callback) => {\n callback();\n };\n let batchNotifyFn = (callback) => {\n callback();\n };\n const batch = (callback) => {\n let result;\n transactions++;\n try {\n result = callback();\n } finally {\n transactions--;\n if (!transactions) {\n flush();\n }\n }\n return result;\n };\n const schedule = (callback) => {\n if (transactions) {\n queue.push(callback);\n } else {\n scheduleMicrotask(() => {\n notifyFn(callback);\n });\n }\n };\n const batchCalls = (callback) => {\n return (...args) => {\n schedule(() => {\n callback(...args);\n });\n };\n };\n const flush = () => {\n const originalQueue = queue;\n queue = [];\n if (originalQueue.length) {\n scheduleMicrotask(() => {\n batchNotifyFn(() => {\n originalQueue.forEach((callback) => {\n notifyFn(callback);\n });\n });\n });\n }\n };\n const setNotifyFunction = (fn) => {\n notifyFn = fn;\n };\n const setBatchNotifyFunction = (fn) => {\n batchNotifyFn = fn;\n };\n return {\n batch,\n batchCalls,\n schedule,\n setNotifyFunction,\n setBatchNotifyFunction\n };\n}\nvar notifyManager = createNotifyManager();\nexport {\n createNotifyManager,\n notifyManager\n};\n//# sourceMappingURL=notifyManager.js.map","import {\n __privateAdd,\n __privateGet,\n __privateSet\n} from \"./chunk-WPSKCR32.js\";\n\n// src/removable.ts\nimport { isServer, isValidTimeout } from \"./utils.js\";\nvar _gcTimeout;\nvar Removable = class {\n constructor() {\n __privateAdd(this, _gcTimeout, void 0);\n }\n destroy() {\n this.clearGcTimeout();\n }\n scheduleGc() {\n this.clearGcTimeout();\n if (isValidTimeout(this.gcTime)) {\n __privateSet(this, _gcTimeout, setTimeout(() => {\n this.optionalRemove();\n }, this.gcTime));\n }\n }\n updateGcTime(newGcTime) {\n this.gcTime = Math.max(\n this.gcTime || 0,\n newGcTime ?? (isServer ? Infinity : 5 * 60 * 1e3)\n );\n }\n clearGcTimeout() {\n if (__privateGet(this, _gcTimeout)) {\n clearTimeout(__privateGet(this, _gcTimeout));\n __privateSet(this, _gcTimeout, void 0);\n }\n }\n};\n_gcTimeout = new WeakMap();\nexport {\n Removable\n};\n//# sourceMappingURL=removable.js.map","import {\n __privateAdd,\n __privateGet,\n __privateSet,\n __privateWrapper\n} from \"./chunk-WPSKCR32.js\";\n\n// src/queryClient.ts\nimport {\n functionalUpdate,\n hashKey,\n hashQueryKeyByOptions,\n noop,\n partialMatchKey\n} from \"./utils.js\";\nimport { QueryCache } from \"./queryCache.js\";\nimport { MutationCache } from \"./mutationCache.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { onlineManager } from \"./onlineManager.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { infiniteQueryBehavior } from \"./infiniteQueryBehavior.js\";\nvar _queryCache, _mutationCache, _defaultOptions, _queryDefaults, _mutationDefaults, _mountCount, _unsubscribeFocus, _unsubscribeOnline;\nvar QueryClient = class {\n constructor(config = {}) {\n __privateAdd(this, _queryCache, void 0);\n __privateAdd(this, _mutationCache, void 0);\n __privateAdd(this, _defaultOptions, void 0);\n __privateAdd(this, _queryDefaults, void 0);\n __privateAdd(this, _mutationDefaults, void 0);\n __privateAdd(this, _mountCount, void 0);\n __privateAdd(this, _unsubscribeFocus, void 0);\n __privateAdd(this, _unsubscribeOnline, void 0);\n __privateSet(this, _queryCache, config.queryCache || new QueryCache());\n __privateSet(this, _mutationCache, config.mutationCache || new MutationCache());\n __privateSet(this, _defaultOptions, config.defaultOptions || {});\n __privateSet(this, _queryDefaults, /* @__PURE__ */ new Map());\n __privateSet(this, _mutationDefaults, /* @__PURE__ */ new Map());\n __privateSet(this, _mountCount, 0);\n }\n mount() {\n __privateWrapper(this, _mountCount)._++;\n if (__privateGet(this, _mountCount) !== 1)\n return;\n __privateSet(this, _unsubscribeFocus, focusManager.subscribe(() => {\n if (focusManager.isFocused()) {\n this.resumePausedMutations();\n __privateGet(this, _queryCache).onFocus();\n }\n }));\n __privateSet(this, _unsubscribeOnline, onlineManager.subscribe(() => {\n if (onlineManager.isOnline()) {\n this.resumePausedMutations();\n __privateGet(this, _queryCache).onOnline();\n }\n }));\n }\n unmount() {\n var _a, _b;\n __privateWrapper(this, _mountCount)._--;\n if (__privateGet(this, _mountCount) !== 0)\n return;\n (_a = __privateGet(this, _unsubscribeFocus)) == null ? void 0 : _a.call(this);\n __privateSet(this, _unsubscribeFocus, void 0);\n (_b = __privateGet(this, _unsubscribeOnline)) == null ? void 0 : _b.call(this);\n __privateSet(this, _unsubscribeOnline, void 0);\n }\n isFetching(filters) {\n return __privateGet(this, _queryCache).findAll({ ...filters, fetchStatus: \"fetching\" }).length;\n }\n isMutating(filters) {\n return __privateGet(this, _mutationCache).findAll({ ...filters, status: \"pending\" }).length;\n }\n getQueryData(queryKey) {\n var _a;\n return (_a = __privateGet(this, _queryCache).find({ queryKey })) == null ? void 0 : _a.state.data;\n }\n ensureQueryData(options) {\n const cachedData = this.getQueryData(options.queryKey);\n return cachedData !== void 0 ? Promise.resolve(cachedData) : this.fetchQuery(options);\n }\n getQueriesData(filters) {\n return this.getQueryCache().findAll(filters).map(({ queryKey, state }) => {\n const data = state.data;\n return [queryKey, data];\n });\n }\n setQueryData(queryKey, updater, options) {\n const query = __privateGet(this, _queryCache).find({ queryKey });\n const prevData = query == null ? void 0 : query.state.data;\n const data = functionalUpdate(updater, prevData);\n if (typeof data === \"undefined\") {\n return void 0;\n }\n const defaultedOptions = this.defaultQueryOptions({ queryKey });\n return __privateGet(this, _queryCache).build(this, defaultedOptions).setData(data, { ...options, manual: true });\n }\n setQueriesData(filters, updater, options) {\n return notifyManager.batch(\n () => this.getQueryCache().findAll(filters).map(({ queryKey }) => [\n queryKey,\n this.setQueryData(queryKey, updater, options)\n ])\n );\n }\n getQueryState(queryKey) {\n var _a;\n return (_a = __privateGet(this, _queryCache).find({ queryKey })) == null ? void 0 : _a.state;\n }\n removeQueries(filters) {\n const queryCache = __privateGet(this, _queryCache);\n notifyManager.batch(() => {\n queryCache.findAll(filters).forEach((query) => {\n queryCache.remove(query);\n });\n });\n }\n resetQueries(filters, options) {\n const queryCache = __privateGet(this, _queryCache);\n const refetchFilters = {\n type: \"active\",\n ...filters\n };\n return notifyManager.batch(() => {\n queryCache.findAll(filters).forEach((query) => {\n query.reset();\n });\n return this.refetchQueries(refetchFilters, options);\n });\n }\n cancelQueries(filters = {}, cancelOptions = {}) {\n const defaultedCancelOptions = { revert: true, ...cancelOptions };\n const promises = notifyManager.batch(\n () => __privateGet(this, _queryCache).findAll(filters).map((query) => query.cancel(defaultedCancelOptions))\n );\n return Promise.all(promises).then(noop).catch(noop);\n }\n invalidateQueries(filters = {}, options = {}) {\n return notifyManager.batch(() => {\n __privateGet(this, _queryCache).findAll(filters).forEach((query) => {\n query.invalidate();\n });\n if (filters.refetchType === \"none\") {\n return Promise.resolve();\n }\n const refetchFilters = {\n ...filters,\n type: filters.refetchType ?? filters.type ?? \"active\"\n };\n return this.refetchQueries(refetchFilters, options);\n });\n }\n refetchQueries(filters = {}, options) {\n const fetchOptions = {\n ...options,\n cancelRefetch: (options == null ? void 0 : options.cancelRefetch) ?? true\n };\n const promises = notifyManager.batch(\n () => __privateGet(this, _queryCache).findAll(filters).filter((query) => !query.isDisabled()).map((query) => {\n let promise = query.fetch(void 0, fetchOptions);\n if (!fetchOptions.throwOnError) {\n promise = promise.catch(noop);\n }\n return query.state.fetchStatus === \"paused\" ? Promise.resolve() : promise;\n })\n );\n return Promise.all(promises).then(noop);\n }\n fetchQuery(options) {\n const defaultedOptions = this.defaultQueryOptions(options);\n if (typeof defaultedOptions.retry === \"undefined\") {\n defaultedOptions.retry = false;\n }\n const query = __privateGet(this, _queryCache).build(this, defaultedOptions);\n return query.isStaleByTime(defaultedOptions.staleTime) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);\n }\n prefetchQuery(options) {\n return this.fetchQuery(options).then(noop).catch(noop);\n }\n fetchInfiniteQuery(options) {\n options.behavior = infiniteQueryBehavior(options.pages);\n return this.fetchQuery(options);\n }\n prefetchInfiniteQuery(options) {\n return this.fetchInfiniteQuery(options).then(noop).catch(noop);\n }\n resumePausedMutations() {\n return __privateGet(this, _mutationCache).resumePausedMutations();\n }\n getQueryCache() {\n return __privateGet(this, _queryCache);\n }\n getMutationCache() {\n return __privateGet(this, _mutationCache);\n }\n getDefaultOptions() {\n return __privateGet(this, _defaultOptions);\n }\n setDefaultOptions(options) {\n __privateSet(this, _defaultOptions, options);\n }\n setQueryDefaults(queryKey, options) {\n __privateGet(this, _queryDefaults).set(hashKey(queryKey), {\n queryKey,\n defaultOptions: options\n });\n }\n getQueryDefaults(queryKey) {\n const defaults = [...__privateGet(this, _queryDefaults).values()];\n let result = {};\n defaults.forEach((queryDefault) => {\n if (partialMatchKey(queryKey, queryDefault.queryKey)) {\n result = { ...result, ...queryDefault.defaultOptions };\n }\n });\n return result;\n }\n setMutationDefaults(mutationKey, options) {\n __privateGet(this, _mutationDefaults).set(hashKey(mutationKey), {\n mutationKey,\n defaultOptions: options\n });\n }\n getMutationDefaults(mutationKey) {\n const defaults = [...__privateGet(this, _mutationDefaults).values()];\n let result = {};\n defaults.forEach((queryDefault) => {\n if (partialMatchKey(mutationKey, queryDefault.mutationKey)) {\n result = { ...result, ...queryDefault.defaultOptions };\n }\n });\n return result;\n }\n defaultQueryOptions(options) {\n if (options == null ? void 0 : options._defaulted) {\n return options;\n }\n const defaultedOptions = {\n ...__privateGet(this, _defaultOptions).queries,\n ...(options == null ? void 0 : options.queryKey) && this.getQueryDefaults(options.queryKey),\n ...options,\n _defaulted: true\n };\n if (!defaultedOptions.queryHash) {\n defaultedOptions.queryHash = hashQueryKeyByOptions(\n defaultedOptions.queryKey,\n defaultedOptions\n );\n }\n if (typeof defaultedOptions.refetchOnReconnect === \"undefined\") {\n defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== \"always\";\n }\n if (typeof defaultedOptions.throwOnError === \"undefined\") {\n defaultedOptions.throwOnError = !!defaultedOptions.suspense;\n }\n if (typeof defaultedOptions.networkMode === \"undefined\" && defaultedOptions.persister) {\n defaultedOptions.networkMode = \"offlineFirst\";\n }\n return defaultedOptions;\n }\n defaultMutationOptions(options) {\n if (options == null ? void 0 : options._defaulted) {\n return options;\n }\n return {\n ...__privateGet(this, _defaultOptions).mutations,\n ...(options == null ? void 0 : options.mutationKey) && this.getMutationDefaults(options.mutationKey),\n ...options,\n _defaulted: true\n };\n }\n clear() {\n __privateGet(this, _queryCache).clear();\n __privateGet(this, _mutationCache).clear();\n }\n};\n_queryCache = new WeakMap();\n_mutationCache = new WeakMap();\n_defaultOptions = new WeakMap();\n_queryDefaults = new WeakMap();\n_mutationDefaults = new WeakMap();\n_mountCount = new WeakMap();\n_unsubscribeFocus = new WeakMap();\n_unsubscribeOnline = new WeakMap();\nexport {\n QueryClient\n};\n//# sourceMappingURL=queryClient.js.map","import {\n __privateAdd,\n __privateGet,\n __privateSet,\n __privateWrapper\n} from \"./chunk-WPSKCR32.js\";\n\n// src/mutationCache.ts\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Mutation } from \"./mutation.js\";\nimport { matchMutation, noop } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nvar _mutations, _mutationId, _resuming;\nvar MutationCache = class extends Subscribable {\n constructor(config = {}) {\n super();\n this.config = config;\n __privateAdd(this, _mutations, void 0);\n __privateAdd(this, _mutationId, void 0);\n __privateAdd(this, _resuming, void 0);\n __privateSet(this, _mutations, []);\n __privateSet(this, _mutationId, 0);\n }\n build(client, options, state) {\n const mutation = new Mutation({\n mutationCache: this,\n mutationId: ++__privateWrapper(this, _mutationId)._,\n options: client.defaultMutationOptions(options),\n state\n });\n this.add(mutation);\n return mutation;\n }\n add(mutation) {\n __privateGet(this, _mutations).push(mutation);\n this.notify({ type: \"added\", mutation });\n }\n remove(mutation) {\n __privateSet(this, _mutations, __privateGet(this, _mutations).filter((x) => x !== mutation));\n this.notify({ type: \"removed\", mutation });\n }\n clear() {\n notifyManager.batch(() => {\n __privateGet(this, _mutations).forEach((mutation) => {\n this.remove(mutation);\n });\n });\n }\n getAll() {\n return __privateGet(this, _mutations);\n }\n find(filters) {\n const defaultedFilters = { exact: true, ...filters };\n return __privateGet(this, _mutations).find(\n (mutation) => matchMutation(defaultedFilters, mutation)\n );\n }\n findAll(filters = {}) {\n return __privateGet(this, _mutations).filter(\n (mutation) => matchMutation(filters, mutation)\n );\n }\n notify(event) {\n notifyManager.batch(() => {\n this.listeners.forEach((listener) => {\n listener(event);\n });\n });\n }\n resumePausedMutations() {\n __privateSet(this, _resuming, (__privateGet(this, _resuming) ?? Promise.resolve()).then(() => {\n const pausedMutations = __privateGet(this, _mutations).filter((x) => x.state.isPaused);\n return notifyManager.batch(\n () => pausedMutations.reduce(\n (promise, mutation) => promise.then(() => mutation.continue().catch(noop)),\n Promise.resolve()\n )\n );\n }).then(() => {\n __privateSet(this, _resuming, void 0);\n }));\n return __privateGet(this, _resuming);\n }\n};\n_mutations = new WeakMap();\n_mutationId = new WeakMap();\n_resuming = new WeakMap();\nexport {\n MutationCache\n};\n//# sourceMappingURL=mutationCache.js.map","import {\n __privateAdd,\n __privateGet,\n __privateMethod,\n __privateSet\n} from \"./chunk-WPSKCR32.js\";\n\n// src/mutation.ts\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Removable } from \"./removable.js\";\nimport { canFetch, createRetryer } from \"./retryer.js\";\nvar _observers, _defaultOptions, _mutationCache, _retryer, _dispatch, dispatch_fn;\nvar Mutation = class extends Removable {\n constructor(config) {\n super();\n __privateAdd(this, _dispatch);\n __privateAdd(this, _observers, void 0);\n __privateAdd(this, _defaultOptions, void 0);\n __privateAdd(this, _mutationCache, void 0);\n __privateAdd(this, _retryer, void 0);\n this.mutationId = config.mutationId;\n __privateSet(this, _defaultOptions, config.defaultOptions);\n __privateSet(this, _mutationCache, config.mutationCache);\n __privateSet(this, _observers, []);\n this.state = config.state || getDefaultState();\n this.setOptions(config.options);\n this.scheduleGc();\n }\n setOptions(options) {\n this.options = { ...__privateGet(this, _defaultOptions), ...options };\n this.updateGcTime(this.options.gcTime);\n }\n get meta() {\n return this.options.meta;\n }\n addObserver(observer) {\n if (!__privateGet(this, _observers).includes(observer)) {\n __privateGet(this, _observers).push(observer);\n this.clearGcTimeout();\n __privateGet(this, _mutationCache).notify({\n type: \"observerAdded\",\n mutation: this,\n observer\n });\n }\n }\n removeObserver(observer) {\n __privateSet(this, _observers, __privateGet(this, _observers).filter((x) => x !== observer));\n this.scheduleGc();\n __privateGet(this, _mutationCache).notify({\n type: \"observerRemoved\",\n mutation: this,\n observer\n });\n }\n optionalRemove() {\n if (!__privateGet(this, _observers).length) {\n if (this.state.status === \"pending\") {\n this.scheduleGc();\n } else {\n __privateGet(this, _mutationCache).remove(this);\n }\n }\n }\n continue() {\n var _a;\n return ((_a = __privateGet(this, _retryer)) == null ? void 0 : _a.continue()) ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before\n this.execute(this.state.variables);\n }\n async execute(variables) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;\n const executeMutation = () => {\n __privateSet(this, _retryer, createRetryer({\n fn: () => {\n if (!this.options.mutationFn) {\n return Promise.reject(new Error(\"No mutationFn found\"));\n }\n return this.options.mutationFn(variables);\n },\n onFail: (failureCount, error) => {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"failed\", failureCount, error });\n },\n onPause: () => {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"pause\" });\n },\n onContinue: () => {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"continue\" });\n },\n retry: this.options.retry ?? 0,\n retryDelay: this.options.retryDelay,\n networkMode: this.options.networkMode\n }));\n return __privateGet(this, _retryer).promise;\n };\n const restored = this.state.status === \"pending\";\n try {\n if (!restored) {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"pending\", variables });\n await ((_b = (_a = __privateGet(this, _mutationCache).config).onMutate) == null ? void 0 : _b.call(\n _a,\n variables,\n this\n ));\n const context = await ((_d = (_c = this.options).onMutate) == null ? void 0 : _d.call(_c, variables));\n if (context !== this.state.context) {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, {\n type: \"pending\",\n context,\n variables\n });\n }\n }\n const data = await executeMutation();\n await ((_f = (_e = __privateGet(this, _mutationCache).config).onSuccess) == null ? void 0 : _f.call(\n _e,\n data,\n variables,\n this.state.context,\n this\n ));\n await ((_h = (_g = this.options).onSuccess) == null ? void 0 : _h.call(_g, data, variables, this.state.context));\n await ((_j = (_i = __privateGet(this, _mutationCache).config).onSettled) == null ? void 0 : _j.call(\n _i,\n data,\n null,\n this.state.variables,\n this.state.context,\n this\n ));\n await ((_l = (_k = this.options).onSettled) == null ? void 0 : _l.call(_k, data, null, variables, this.state.context));\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"success\", data });\n return data;\n } catch (error) {\n try {\n await ((_n = (_m = __privateGet(this, _mutationCache).config).onError) == null ? void 0 : _n.call(\n _m,\n error,\n variables,\n this.state.context,\n this\n ));\n await ((_p = (_o = this.options).onError) == null ? void 0 : _p.call(\n _o,\n error,\n variables,\n this.state.context\n ));\n await ((_r = (_q = __privateGet(this, _mutationCache).config).onSettled) == null ? void 0 : _r.call(\n _q,\n void 0,\n error,\n this.state.variables,\n this.state.context,\n this\n ));\n await ((_t = (_s = this.options).onSettled) == null ? void 0 : _t.call(\n _s,\n void 0,\n error,\n variables,\n this.state.context\n ));\n throw error;\n } finally {\n __privateMethod(this, _dispatch, dispatch_fn).call(this, { type: \"error\", error });\n }\n }\n }\n};\n_observers = new WeakMap();\n_defaultOptions = new WeakMap();\n_mutationCache = new WeakMap();\n_retryer = new WeakMap();\n_dispatch = new WeakSet();\ndispatch_fn = function(action) {\n const reducer = (state) => {\n switch (action.type) {\n case \"failed\":\n return {\n ...state,\n failureCount: action.failureCount,\n failureReason: action.error\n };\n case \"pause\":\n return {\n ...state,\n isPaused: true\n };\n case \"continue\":\n return {\n ...state,\n isPaused: false\n };\n case \"pending\":\n return {\n ...state,\n context: action.context,\n data: void 0,\n failureCount: 0,\n failureReason: null,\n error: null,\n isPaused: !canFetch(this.options.networkMode),\n status: \"pending\",\n variables: action.variables,\n submittedAt: Date.now()\n };\n case \"success\":\n return {\n ...state,\n data: action.data,\n failureCount: 0,\n failureReason: null,\n error: null,\n status: \"success\",\n isPaused: false\n };\n case \"error\":\n return {\n ...state,\n data: void 0,\n error: action.error,\n failureCount: state.failureCount + 1,\n failureReason: action.error,\n isPaused: false,\n status: \"error\"\n };\n }\n };\n this.state = reducer(this.state);\n notifyManager.batch(() => {\n __privateGet(this, _observers).forEach((observer) => {\n observer.onMutationUpdate(action);\n });\n __privateGet(this, _mutationCache).notify({\n mutation: this,\n type: \"updated\",\n action\n });\n });\n};\nfunction getDefaultState() {\n return {\n context: void 0,\n data: void 0,\n error: null,\n failureCount: 0,\n failureReason: null,\n isPaused: false,\n status: \"idle\",\n variables: void 0,\n submittedAt: 0\n };\n}\nexport {\n Mutation,\n getDefaultState\n};\n//# sourceMappingURL=mutation.js.map","import \"./chunk-WPSKCR32.js\";\n\n// src/infiniteQueryBehavior.ts\nimport { addToEnd, addToStart } from \"./utils.js\";\nfunction infiniteQueryBehavior(pages) {\n return {\n onFetch: (context, query) => {\n const fetchFn = async () => {\n var _a, _b, _c, _d, _e;\n const options = context.options;\n const direction = (_c = (_b = (_a = context.fetchOptions) == null ? void 0 : _a.meta) == null ? void 0 : _b.fetchMore) == null ? void 0 : _c.direction;\n const oldPages = ((_d = context.state.data) == null ? void 0 : _d.pages) || [];\n const oldPageParams = ((_e = context.state.data) == null ? void 0 : _e.pageParams) || [];\n const empty = { pages: [], pageParams: [] };\n let cancelled = false;\n const addSignalProperty = (object) => {\n Object.defineProperty(object, \"signal\", {\n enumerable: true,\n get: () => {\n if (context.signal.aborted) {\n cancelled = true;\n } else {\n context.signal.addEventListener(\"abort\", () => {\n cancelled = true;\n });\n }\n return context.signal;\n }\n });\n };\n const queryFn = context.options.queryFn || (() => Promise.reject(\n new Error(`Missing queryFn: '${context.options.queryHash}'`)\n ));\n const fetchPage = async (data, param, previous) => {\n if (cancelled) {\n return Promise.reject();\n }\n if (param == null && data.pages.length) {\n return Promise.resolve(data);\n }\n const queryFnContext = {\n queryKey: context.queryKey,\n pageParam: param,\n direction: previous ? \"backward\" : \"forward\",\n meta: context.options.meta\n };\n addSignalProperty(queryFnContext);\n const page = await queryFn(\n queryFnContext\n );\n const { maxPages } = context.options;\n const addTo = previous ? addToStart : addToEnd;\n return {\n pages: addTo(data.pages, page, maxPages),\n pageParams: addTo(data.pageParams, param, maxPages)\n };\n };\n let result;\n if (direction && oldPages.length) {\n const previous = direction === \"backward\";\n const pageParamFn = previous ? getPreviousPageParam : getNextPageParam;\n const oldData = {\n pages: oldPages,\n pageParams: oldPageParams\n };\n const param = pageParamFn(options, oldData);\n result = await fetchPage(oldData, param, previous);\n } else {\n result = await fetchPage(\n empty,\n oldPageParams[0] ?? options.initialPageParam\n );\n const remainingPages = pages ?? oldPages.length;\n for (let i = 1; i < remainingPages; i++) {\n const param = getNextPageParam(options, result);\n result = await fetchPage(result, param);\n }\n }\n return result;\n };\n if (context.options.persister) {\n context.fetchFn = () => {\n var _a, _b;\n return (_b = (_a = context.options).persister) == null ? void 0 : _b.call(\n _a,\n fetchFn,\n {\n queryKey: context.queryKey,\n meta: context.options.meta,\n signal: context.signal\n },\n query\n );\n };\n } else {\n context.fetchFn = fetchFn;\n }\n }\n };\n}\nfunction getNextPageParam(options, { pages, pageParams }) {\n const lastIndex = pages.length - 1;\n return options.getNextPageParam(\n pages[lastIndex],\n pages,\n pageParams[lastIndex],\n pageParams\n );\n}\nfunction getPreviousPageParam(options, { pages, pageParams }) {\n var _a;\n return (_a = options.getPreviousPageParam) == null ? void 0 : _a.call(\n options,\n pages[0],\n pages,\n pageParams[0],\n pageParams\n );\n}\nfunction hasNextPage(options, data) {\n if (!data)\n return false;\n return getNextPageParam(options, data) != null;\n}\nfunction hasPreviousPage(options, data) {\n if (!data || !options.getPreviousPageParam)\n return false;\n return getPreviousPageParam(options, data) != null;\n}\nexport {\n hasNextPage,\n hasPreviousPage,\n infiniteQueryBehavior\n};\n//# sourceMappingURL=infiniteQueryBehavior.js.map","import {\n __privateAdd,\n __privateGet,\n __privateMethod,\n __privateSet\n} from \"./chunk-WPSKCR32.js\";\n\n// src/queryObserver.ts\nimport {\n isServer,\n isValidTimeout,\n noop,\n replaceData,\n shallowEqualObjects,\n timeUntilStale\n} from \"./utils.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { canFetch } from \"./retryer.js\";\nvar _client, _currentQuery, _currentQueryInitialState, _currentResult, _currentResultState, _currentResultOptions, _selectError, _selectFn, _selectResult, _lastQueryWithDefinedData, _staleTimeoutId, _refetchIntervalId, _currentRefetchInterval, _trackedProps, _executeFetch, executeFetch_fn, _updateStaleTimeout, updateStaleTimeout_fn, _computeRefetchInterval, computeRefetchInterval_fn, _updateRefetchInterval, updateRefetchInterval_fn, _updateTimers, updateTimers_fn, _clearStaleTimeout, clearStaleTimeout_fn, _clearRefetchInterval, clearRefetchInterval_fn, _updateQuery, updateQuery_fn, _notify, notify_fn;\nvar QueryObserver = class extends Subscribable {\n constructor(client, options) {\n super();\n __privateAdd(this, _executeFetch);\n __privateAdd(this, _updateStaleTimeout);\n __privateAdd(this, _computeRefetchInterval);\n __privateAdd(this, _updateRefetchInterval);\n __privateAdd(this, _updateTimers);\n __privateAdd(this, _clearStaleTimeout);\n __privateAdd(this, _clearRefetchInterval);\n __privateAdd(this, _updateQuery);\n __privateAdd(this, _notify);\n __privateAdd(this, _client, void 0);\n __privateAdd(this, _currentQuery, void 0);\n __privateAdd(this, _currentQueryInitialState, void 0);\n __privateAdd(this, _currentResult, void 0);\n __privateAdd(this, _currentResultState, void 0);\n __privateAdd(this, _currentResultOptions, void 0);\n __privateAdd(this, _selectError, void 0);\n __privateAdd(this, _selectFn, void 0);\n __privateAdd(this, _selectResult, void 0);\n // This property keeps track of the last query with defined data.\n // It will be used to pass the previous data and query to the placeholder function between renders.\n __privateAdd(this, _lastQueryWithDefinedData, void 0);\n __privateAdd(this, _staleTimeoutId, void 0);\n __privateAdd(this, _refetchIntervalId, void 0);\n __privateAdd(this, _currentRefetchInterval, void 0);\n __privateAdd(this, _trackedProps, /* @__PURE__ */ new Set());\n __privateSet(this, _client, client);\n this.options = options;\n __privateSet(this, _selectError, null);\n this.bindMethods();\n this.setOptions(options);\n }\n bindMethods() {\n this.refetch = this.refetch.bind(this);\n }\n onSubscribe() {\n if (this.listeners.size === 1) {\n __privateGet(this, _currentQuery).addObserver(this);\n if (shouldFetchOnMount(__privateGet(this, _currentQuery), this.options)) {\n __privateMethod(this, _executeFetch, executeFetch_fn).call(this);\n } else {\n this.updateResult();\n }\n __privateMethod(this, _updateTimers, updateTimers_fn).call(this);\n }\n }\n onUnsubscribe() {\n if (!this.hasListeners()) {\n this.destroy();\n }\n }\n shouldFetchOnReconnect() {\n return shouldFetchOn(\n __privateGet(this, _currentQuery),\n this.options,\n this.options.refetchOnReconnect\n );\n }\n shouldFetchOnWindowFocus() {\n return shouldFetchOn(\n __privateGet(this, _currentQuery),\n this.options,\n this.options.refetchOnWindowFocus\n );\n }\n destroy() {\n this.listeners = /* @__PURE__ */ new Set();\n __privateMethod(this, _clearStaleTimeout, clearStaleTimeout_fn).call(this);\n __privateMethod(this, _clearRefetchInterval, clearRefetchInterval_fn).call(this);\n __privateGet(this, _currentQuery).removeObserver(this);\n }\n setOptions(options, notifyOptions) {\n const prevOptions = this.options;\n const prevQuery = __privateGet(this, _currentQuery);\n this.options = __privateGet(this, _client).defaultQueryOptions(options);\n if (!shallowEqualObjects(prevOptions, this.options)) {\n __privateGet(this, _client).getQueryCache().notify({\n type: \"observerOptionsUpdated\",\n query: __privateGet(this, _currentQuery),\n observer: this\n });\n }\n if (typeof this.options.enabled !== \"undefined\" && typeof this.options.enabled !== \"boolean\") {\n throw new Error(\"Expected enabled to be a boolean\");\n }\n if (!this.options.queryKey) {\n this.options.queryKey = prevOptions.queryKey;\n }\n __privateMethod(this, _updateQuery, updateQuery_fn).call(this);\n const mounted = this.hasListeners();\n if (mounted && shouldFetchOptionally(\n __privateGet(this, _currentQuery),\n prevQuery,\n this.options,\n prevOptions\n )) {\n __privateMethod(this, _executeFetch, executeFetch_fn).call(this);\n }\n this.updateResult(notifyOptions);\n if (mounted && (__privateGet(this, _currentQuery) !== prevQuery || this.options.enabled !== prevOptions.enabled || this.options.staleTime !== prevOptions.staleTime)) {\n __privateMethod(this, _updateStaleTimeout, updateStaleTimeout_fn).call(this);\n }\n const nextRefetchInterval = __privateMethod(this, _computeRefetchInterval, computeRefetchInterval_fn).call(this);\n if (mounted && (__privateGet(this, _currentQuery) !== prevQuery || this.options.enabled !== prevOptions.enabled || nextRefetchInterval !== __privateGet(this, _currentRefetchInterval))) {\n __privateMethod(this, _updateRefetchInterval, updateRefetchInterval_fn).call(this, nextRefetchInterval);\n }\n }\n getOptimisticResult(options) {\n const query = __privateGet(this, _client).getQueryCache().build(__privateGet(this, _client), options);\n const result = this.createResult(query, options);\n if (shouldAssignObserverCurrentProperties(this, result)) {\n __privateSet(this, _currentResult, result);\n __privateSet(this, _currentResultOptions, this.options);\n __privateSet(this, _currentResultState, __privateGet(this, _currentQuery).state);\n }\n return result;\n }\n getCurrentResult() {\n return __privateGet(this, _currentResult);\n }\n trackResult(result) {\n const trackedResult = {};\n Object.keys(result).forEach((key) => {\n Object.defineProperty(trackedResult, key, {\n configurable: false,\n enumerable: true,\n get: () => {\n __privateGet(this, _trackedProps).add(key);\n return result[key];\n }\n });\n });\n return trackedResult;\n }\n getCurrentQuery() {\n return __privateGet(this, _currentQuery);\n }\n refetch({ ...options } = {}) {\n return this.fetch({\n ...options\n });\n }\n fetchOptimistic(options) {\n const defaultedOptions = __privateGet(this, _client).defaultQueryOptions(options);\n const query = __privateGet(this, _client).getQueryCache().build(__privateGet(this, _client), defaultedOptions);\n query.isFetchingOptimistic = true;\n return query.fetch().then(() => this.createResult(query, defaultedOptions));\n }\n fetch(fetchOptions) {\n return __privateMethod(this, _executeFetch, executeFetch_fn).call(this, {\n ...fetchOptions,\n cancelRefetch: fetchOptions.cancelRefetch ?? true\n }).then(() => {\n this.updateResult();\n return __privateGet(this, _currentResult);\n });\n }\n createResult(query, options) {\n var _a;\n const prevQuery = __privateGet(this, _currentQuery);\n const prevOptions = this.options;\n const prevResult = __privateGet(this, _currentResult);\n const prevResultState = __privateGet(this, _currentResultState);\n const prevResultOptions = __privateGet(this, _currentResultOptions);\n const queryChange = query !== prevQuery;\n const queryInitialState = queryChange ? query.state : __privateGet(this, _currentQueryInitialState);\n const { state } = query;\n let { error, errorUpdatedAt, fetchStatus, status } = state;\n let isPlaceholderData = false;\n let data;\n if (options._optimisticResults) {\n const mounted = this.hasListeners();\n const fetchOnMount = !mounted && shouldFetchOnMount(query, options);\n const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);\n if (fetchOnMount || fetchOptionally) {\n fetchStatus = canFetch(query.options.networkMode) ? \"fetching\" : \"paused\";\n if (!state.dataUpdatedAt) {\n status = \"pending\";\n }\n }\n if (options._optimisticResults === \"isRestoring\") {\n fetchStatus = \"idle\";\n }\n }\n if (options.select && typeof state.data !== \"undefined\") {\n if (prevResult && state.data === (prevResultState == null ? void 0 : prevResultState.data) && options.select === __privateGet(this, _selectFn)) {\n data = __privateGet(this, _selectResult);\n } else {\n try {\n __privateSet(this, _selectFn, options.select);\n data = options.select(state.data);\n data = replaceData(prevResult == null ? void 0 : prevResult.data, data, options);\n __privateSet(this, _selectResult, data);\n __privateSet(this, _selectError, null);\n } catch (selectError) {\n __privateSet(this, _selectError, selectError);\n }\n }\n } else {\n data = state.data;\n }\n if (typeof options.placeholderData !== \"undefined\" && typeof data === \"undefined\" && status === \"pending\") {\n let placeholderData;\n if ((prevResult == null ? void 0 : prevResult.isPlaceholderData) && options.placeholderData === (prevResultOptions == null ? void 0 : prevResultOptions.placeholderData)) {\n placeholderData = prevResult.data;\n } else {\n placeholderData = typeof options.placeholderData === \"function\" ? options.placeholderData(\n (_a = __privateGet(this, _lastQueryWithDefinedData)) == null ? void 0 : _a.state.data,\n __privateGet(this, _lastQueryWithDefinedData)\n ) : options.placeholderData;\n if (options.select && typeof placeholderData !== \"undefined\") {\n try {\n placeholderData = options.select(placeholderData);\n __privateSet(this, _selectError, null);\n } catch (selectError) {\n __privateSet(this, _selectError, selectError);\n }\n }\n }\n if (typeof placeholderData !== \"undefined\") {\n status = \"success\";\n data = replaceData(\n prevResult == null ? void 0 : prevResult.data,\n placeholderData,\n options\n );\n isPlaceholderData = true;\n }\n }\n if (__privateGet(this, _selectError)) {\n error = __privateGet(this, _selectError);\n data = __privateGet(this, _selectResult);\n errorUpdatedAt = Date.now();\n status = \"error\";\n }\n const isFetching = fetchStatus === \"fetching\";\n const isPending = status === \"pending\";\n const isError = status === \"error\";\n const isLoading = isPending && isFetching;\n const result = {\n status,\n fetchStatus,\n isPending,\n isSuccess: status === \"success\",\n isError,\n isInitialLoading: isLoading,\n isLoading,\n data,\n dataUpdatedAt: state.dataUpdatedAt,\n error,\n errorUpdatedAt,\n failureCount: state.fetchFailureCount,\n failureReason: state.fetchFailureReason,\n errorUpdateCount: state.errorUpdateCount,\n isFetched: state.dataUpdateCount > 0 || state.errorUpdateCount > 0,\n isFetchedAfterMount: state.dataUpdateCount > queryInitialState.dataUpdateCount || state.errorUpdateCount > queryInitialState.errorUpdateCount,\n isFetching,\n isRefetching: isFetching && !isPending,\n isLoadingError: isError && state.dataUpdatedAt === 0,\n isPaused: fetchStatus === \"paused\",\n isPlaceholderData,\n isRefetchError: isError && state.dataUpdatedAt !== 0,\n isStale: isStale(query, options),\n refetch: this.refetch\n };\n return result;\n }\n updateResult(notifyOptions) {\n const prevResult = __privateGet(this, _currentResult);\n const nextResult = this.createResult(__privateGet(this, _currentQuery), this.options);\n __privateSet(this, _currentResultState, __privateGet(this, _currentQuery).state);\n __privateSet(this, _currentResultOptions, this.options);\n if (__privateGet(this, _currentResultState).data !== void 0) {\n __privateSet(this, _lastQueryWithDefinedData, __privateGet(this, _currentQuery));\n }\n if (shallowEqualObjects(nextResult, prevResult)) {\n return;\n }\n __privateSet(this, _currentResult, nextResult);\n const defaultNotifyOptions = {};\n const shouldNotifyListeners = () => {\n if (!prevResult) {\n return true;\n }\n const { notifyOnChangeProps } = this.options;\n const notifyOnChangePropsValue = typeof notifyOnChangeProps === \"function\" ? notifyOnChangeProps() : notifyOnChangeProps;\n if (notifyOnChangePropsValue === \"all\" || !notifyOnChangePropsValue && !__privateGet(this, _trackedProps).size) {\n return true;\n }\n const includedProps = new Set(\n notifyOnChangePropsValue ?? __privateGet(this, _trackedProps)\n );\n if (this.options.throwOnError) {\n includedProps.add(\"error\");\n }\n return Object.keys(__privateGet(this, _currentResult)).some((key) => {\n const typedKey = key;\n const changed = __privateGet(this, _currentResult)[typedKey] !== prevResult[typedKey];\n return changed && includedProps.has(typedKey);\n });\n };\n if ((notifyOptions == null ? void 0 : notifyOptions.listeners) !== false && shouldNotifyListeners()) {\n defaultNotifyOptions.listeners = true;\n }\n __privateMethod(this, _notify, notify_fn).call(this, { ...defaultNotifyOptions, ...notifyOptions });\n }\n onQueryUpdate() {\n this.updateResult();\n if (this.hasListeners()) {\n __privateMethod(this, _updateTimers, updateTimers_fn).call(this);\n }\n }\n};\n_client = new WeakMap();\n_currentQuery = new WeakMap();\n_currentQueryInitialState = new WeakMap();\n_currentResult = new WeakMap();\n_currentResultState = new WeakMap();\n_currentResultOptions = new WeakMap();\n_selectError = new WeakMap();\n_selectFn = new WeakMap();\n_selectResult = new WeakMap();\n_lastQueryWithDefinedData = new WeakMap();\n_staleTimeoutId = new WeakMap();\n_refetchIntervalId = new WeakMap();\n_currentRefetchInterval = new WeakMap();\n_trackedProps = new WeakMap();\n_executeFetch = new WeakSet();\nexecuteFetch_fn = function(fetchOptions) {\n __privateMethod(this, _updateQuery, updateQuery_fn).call(this);\n let promise = __privateGet(this, _currentQuery).fetch(\n this.options,\n fetchOptions\n );\n if (!(fetchOptions == null ? void 0 : fetchOptions.throwOnError)) {\n promise = promise.catch(noop);\n }\n return promise;\n};\n_updateStaleTimeout = new WeakSet();\nupdateStaleTimeout_fn = function() {\n __privateMethod(this, _clearStaleTimeout, clearStaleTimeout_fn).call(this);\n if (isServer || __privateGet(this, _currentResult).isStale || !isValidTimeout(this.options.staleTime)) {\n return;\n }\n const time = timeUntilStale(\n __privateGet(this, _currentResult).dataUpdatedAt,\n this.options.staleTime\n );\n const timeout = time + 1;\n __privateSet(this, _staleTimeoutId, setTimeout(() => {\n if (!__privateGet(this, _currentResult).isStale) {\n this.updateResult();\n }\n }, timeout));\n};\n_computeRefetchInterval = new WeakSet();\ncomputeRefetchInterval_fn = function() {\n return (typeof this.options.refetchInterval === \"function\" ? this.options.refetchInterval(__privateGet(this, _currentQuery)) : this.options.refetchInterval) ?? false;\n};\n_updateRefetchInterval = new WeakSet();\nupdateRefetchInterval_fn = function(nextInterval) {\n __privateMethod(this, _clearRefetchInterval, clearRefetchInterval_fn).call(this);\n __privateSet(this, _currentRefetchInterval, nextInterval);\n if (isServer || this.options.enabled === false || !isValidTimeout(__privateGet(this, _currentRefetchInterval)) || __privateGet(this, _currentRefetchInterval) === 0) {\n return;\n }\n __privateSet(this, _refetchIntervalId, setInterval(() => {\n if (this.options.refetchIntervalInBackground || focusManager.isFocused()) {\n __privateMethod(this, _executeFetch, executeFetch_fn).call(this);\n }\n }, __privateGet(this, _currentRefetchInterval)));\n};\n_updateTimers = new WeakSet();\nupdateTimers_fn = function() {\n __privateMethod(this, _updateStaleTimeout, updateStaleTimeout_fn).call(this);\n __privateMethod(this, _updateRefetchInterval, updateRefetchInterval_fn).call(this, __privateMethod(this, _computeRefetchInterval, computeRefetchInterval_fn).call(this));\n};\n_clearStaleTimeout = new WeakSet();\nclearStaleTimeout_fn = function() {\n if (__privateGet(this, _staleTimeoutId)) {\n clearTimeout(__privateGet(this, _staleTimeoutId));\n __privateSet(this, _staleTimeoutId, void 0);\n }\n};\n_clearRefetchInterval = new WeakSet();\nclearRefetchInterval_fn = function() {\n if (__privateGet(this, _refetchIntervalId)) {\n clearInterval(__privateGet(this, _refetchIntervalId));\n __privateSet(this, _refetchIntervalId, void 0);\n }\n};\n_updateQuery = new WeakSet();\nupdateQuery_fn = function() {\n const query = __privateGet(this, _client).getQueryCache().build(__privateGet(this, _client), this.options);\n if (query === __privateGet(this, _currentQuery)) {\n return;\n }\n const prevQuery = __privateGet(this, _currentQuery);\n __privateSet(this, _currentQuery, query);\n __privateSet(this, _currentQueryInitialState, query.state);\n if (this.hasListeners()) {\n prevQuery == null ? void 0 : prevQuery.removeObserver(this);\n query.addObserver(this);\n }\n};\n_notify = new WeakSet();\nnotify_fn = function(notifyOptions) {\n notifyManager.batch(() => {\n if (notifyOptions.listeners) {\n this.listeners.forEach((listener) => {\n listener(__privateGet(this, _currentResult));\n });\n }\n __privateGet(this, _client).getQueryCache().notify({\n query: __privateGet(this, _currentQuery),\n type: \"observerResultsUpdated\"\n });\n });\n};\nfunction shouldLoadOnMount(query, options) {\n return options.enabled !== false && !query.state.dataUpdatedAt && !(query.state.status === \"error\" && options.retryOnMount === false);\n}\nfunction shouldFetchOnMount(query, options) {\n return shouldLoadOnMount(query, options) || query.state.dataUpdatedAt > 0 && shouldFetchOn(query, options, options.refetchOnMount);\n}\nfunction shouldFetchOn(query, options, field) {\n if (options.enabled !== false) {\n const value = typeof field === \"function\" ? field(query) : field;\n return value === \"always\" || value !== false && isStale(query, options);\n }\n return false;\n}\nfunction shouldFetchOptionally(query, prevQuery, options, prevOptions) {\n return options.enabled !== false && (query !== prevQuery || prevOptions.enabled === false) && (!options.suspense || query.state.status !== \"error\") && isStale(query, options);\n}\nfunction isStale(query, options) {\n return query.isStaleByTime(options.staleTime);\n}\nfunction shouldAssignObserverCurrentProperties(observer, optimisticResult) {\n if (!shallowEqualObjects(observer.getCurrentResult(), optimisticResult)) {\n return true;\n }\n return false;\n}\nexport {\n QueryObserver\n};\n//# sourceMappingURL=queryObserver.js.map","function _objectDestructuringEmpty(t) {\n if (null == t) throw new TypeError(\"Cannot destructure \" + t);\n}\nmodule.exports = _objectDestructuringEmpty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","import {\n __privateAdd,\n __privateGet,\n __privateMethod,\n __privateSet\n} from \"./chunk-WPSKCR32.js\";\n\n// src/queriesObserver.ts\nimport { notifyManager } from \"./notifyManager.js\";\nimport { QueryObserver } from \"./queryObserver.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { replaceEqualDeep } from \"./utils.js\";\nfunction difference(array1, array2) {\n return array1.filter((x) => !array2.includes(x));\n}\nfunction replaceAt(array, index, value) {\n const copy = array.slice(0);\n copy[index] = value;\n return copy;\n}\nvar _client, _result, _queries, _observers, _options, _combinedResult, _setResult, setResult_fn, _combineResult, combineResult_fn, _findMatchingObservers, findMatchingObservers_fn, _onUpdate, onUpdate_fn, _notify, notify_fn;\nvar QueriesObserver = class extends Subscribable {\n constructor(client, queries, options) {\n super();\n __privateAdd(this, _setResult);\n __privateAdd(this, _combineResult);\n __privateAdd(this, _findMatchingObservers);\n __privateAdd(this, _onUpdate);\n __privateAdd(this, _notify);\n __privateAdd(this, _client, void 0);\n __privateAdd(this, _result, void 0);\n __privateAdd(this, _queries, void 0);\n __privateAdd(this, _observers, void 0);\n __privateAdd(this, _options, void 0);\n __privateAdd(this, _combinedResult, void 0);\n __privateSet(this, _client, client);\n __privateSet(this, _queries, queries);\n __privateSet(this, _options, options);\n __privateSet(this, _observers, []);\n __privateMethod(this, _setResult, setResult_fn).call(this, []);\n this.setQueries(queries, options);\n }\n onSubscribe() {\n if (this.listeners.size === 1) {\n __privateGet(this, _observers).forEach((observer) => {\n observer.subscribe((result) => {\n __privateMethod(this, _onUpdate, onUpdate_fn).call(this, observer, result);\n });\n });\n }\n }\n onUnsubscribe() {\n if (!this.listeners.size) {\n this.destroy();\n }\n }\n destroy() {\n this.listeners = /* @__PURE__ */ new Set();\n __privateGet(this, _observers).forEach((observer) => {\n observer.destroy();\n });\n }\n setQueries(queries, options, notifyOptions) {\n __privateSet(this, _queries, queries);\n __privateSet(this, _options, options);\n notifyManager.batch(() => {\n const prevObservers = __privateGet(this, _observers);\n const newObserverMatches = __privateMethod(this, _findMatchingObservers, findMatchingObservers_fn).call(this, __privateGet(this, _queries));\n newObserverMatches.forEach(\n (match) => match.observer.setOptions(match.defaultedQueryOptions, notifyOptions)\n );\n const newObservers = newObserverMatches.map((match) => match.observer);\n const newResult = newObservers.map(\n (observer) => observer.getCurrentResult()\n );\n const hasIndexChange = newObservers.some(\n (observer, index) => observer !== prevObservers[index]\n );\n if (prevObservers.length === newObservers.length && !hasIndexChange) {\n return;\n }\n __privateSet(this, _observers, newObservers);\n __privateMethod(this, _setResult, setResult_fn).call(this, newResult);\n if (!this.hasListeners()) {\n return;\n }\n difference(prevObservers, newObservers).forEach((observer) => {\n observer.destroy();\n });\n difference(newObservers, prevObservers).forEach((observer) => {\n observer.subscribe((result) => {\n __privateMethod(this, _onUpdate, onUpdate_fn).call(this, observer, result);\n });\n });\n __privateMethod(this, _notify, notify_fn).call(this);\n });\n }\n getCurrentResult() {\n return __privateGet(this, _combinedResult);\n }\n getQueries() {\n return __privateGet(this, _observers).map((observer) => observer.getCurrentQuery());\n }\n getObservers() {\n return __privateGet(this, _observers);\n }\n getOptimisticResult(queries) {\n const matches = __privateMethod(this, _findMatchingObservers, findMatchingObservers_fn).call(this, queries);\n const result = matches.map(\n (match) => match.observer.getOptimisticResult(match.defaultedQueryOptions)\n );\n return [\n result,\n (r) => {\n return __privateMethod(this, _combineResult, combineResult_fn).call(this, r ?? result);\n },\n () => {\n return matches.map((match, index) => {\n const observerResult = result[index];\n return !match.defaultedQueryOptions.notifyOnChangeProps ? match.observer.trackResult(observerResult) : observerResult;\n });\n }\n ];\n }\n};\n_client = new WeakMap();\n_result = new WeakMap();\n_queries = new WeakMap();\n_observers = new WeakMap();\n_options = new WeakMap();\n_combinedResult = new WeakMap();\n_setResult = new WeakSet();\nsetResult_fn = function(value) {\n __privateSet(this, _result, value);\n __privateSet(this, _combinedResult, __privateMethod(this, _combineResult, combineResult_fn).call(this, value));\n};\n_combineResult = new WeakSet();\ncombineResult_fn = function(input) {\n var _a;\n const combine = (_a = __privateGet(this, _options)) == null ? void 0 : _a.combine;\n if (combine) {\n return replaceEqualDeep(__privateGet(this, _combinedResult), combine(input));\n }\n return input;\n};\n_findMatchingObservers = new WeakSet();\nfindMatchingObservers_fn = function(queries) {\n const prevObservers = __privateGet(this, _observers);\n const prevObserversMap = new Map(\n prevObservers.map((observer) => [observer.options.queryHash, observer])\n );\n const defaultedQueryOptions = queries.map(\n (options) => __privateGet(this, _client).defaultQueryOptions(options)\n );\n const matchingObservers = defaultedQueryOptions.flatMap((defaultedOptions) => {\n const match = prevObserversMap.get(defaultedOptions.queryHash);\n if (match != null) {\n return [{ defaultedQueryOptions: defaultedOptions, observer: match }];\n }\n return [];\n });\n const matchedQueryHashes = new Set(\n matchingObservers.map((match) => match.defaultedQueryOptions.queryHash)\n );\n const unmatchedQueries = defaultedQueryOptions.filter(\n (defaultedOptions) => !matchedQueryHashes.has(defaultedOptions.queryHash)\n );\n const getObserver = (options) => {\n const defaultedOptions = __privateGet(this, _client).defaultQueryOptions(options);\n const currentObserver = __privateGet(this, _observers).find(\n (o) => o.options.queryHash === defaultedOptions.queryHash\n );\n return currentObserver ?? new QueryObserver(__privateGet(this, _client), defaultedOptions);\n };\n const newOrReusedObservers = unmatchedQueries.map((options) => {\n return {\n defaultedQueryOptions: options,\n observer: getObserver(options)\n };\n });\n const sortMatchesByOrderOfQueries = (a, b) => defaultedQueryOptions.indexOf(a.defaultedQueryOptions) - defaultedQueryOptions.indexOf(b.defaultedQueryOptions);\n return matchingObservers.concat(newOrReusedObservers).sort(sortMatchesByOrderOfQueries);\n};\n_onUpdate = new WeakSet();\nonUpdate_fn = function(observer, result) {\n const index = __privateGet(this, _observers).indexOf(observer);\n if (index !== -1) {\n __privateMethod(this, _setResult, setResult_fn).call(this, replaceAt(__privateGet(this, _result), index, result));\n __privateMethod(this, _notify, notify_fn).call(this);\n }\n};\n_notify = new WeakSet();\nnotify_fn = function() {\n notifyManager.batch(() => {\n this.listeners.forEach((listener) => {\n listener(__privateGet(this, _result));\n });\n });\n};\nexport {\n QueriesObserver\n};\n//# sourceMappingURL=queriesObserver.js.map","import \"./chunk-WPSKCR32.js\";\n\n// src/infiniteQueryObserver.ts\nimport { QueryObserver } from \"./queryObserver.js\";\nimport {\n hasNextPage,\n hasPreviousPage,\n infiniteQueryBehavior\n} from \"./infiniteQueryBehavior.js\";\nvar InfiniteQueryObserver = class extends QueryObserver {\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(client, options) {\n super(client, options);\n }\n bindMethods() {\n super.bindMethods();\n this.fetchNextPage = this.fetchNextPage.bind(this);\n this.fetchPreviousPage = this.fetchPreviousPage.bind(this);\n }\n setOptions(options, notifyOptions) {\n super.setOptions(\n {\n ...options,\n behavior: infiniteQueryBehavior()\n },\n notifyOptions\n );\n }\n getOptimisticResult(options) {\n options.behavior = infiniteQueryBehavior();\n return super.getOptimisticResult(options);\n }\n fetchNextPage(options) {\n return this.fetch({\n ...options,\n meta: {\n fetchMore: { direction: \"forward\" }\n }\n });\n }\n fetchPreviousPage(options) {\n return this.fetch({\n ...options,\n meta: {\n fetchMore: { direction: \"backward\" }\n }\n });\n }\n createResult(query, options) {\n var _a, _b, _c, _d;\n const { state } = query;\n const result = super.createResult(query, options);\n const { isFetching, isRefetching } = result;\n const isFetchingNextPage = isFetching && ((_b = (_a = state.fetchMeta) == null ? void 0 : _a.fetchMore) == null ? void 0 : _b.direction) === \"forward\";\n const isFetchingPreviousPage = isFetching && ((_d = (_c = state.fetchMeta) == null ? void 0 : _c.fetchMore) == null ? void 0 : _d.direction) === \"backward\";\n return {\n ...result,\n fetchNextPage: this.fetchNextPage,\n fetchPreviousPage: this.fetchPreviousPage,\n hasNextPage: hasNextPage(options, state.data),\n hasPreviousPage: hasPreviousPage(options, state.data),\n isFetchingNextPage,\n isFetchingPreviousPage,\n isRefetching: isRefetching && !isFetchingNextPage && !isFetchingPreviousPage\n };\n }\n};\nexport {\n InfiniteQueryObserver\n};\n//# sourceMappingURL=infiniteQueryObserver.js.map","import {\n __privateAdd,\n __privateGet,\n __privateMethod,\n __privateSet\n} from \"./chunk-WPSKCR32.js\";\n\n// src/mutationObserver.ts\nimport { getDefaultState } from \"./mutation.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { shallowEqualObjects } from \"./utils.js\";\nvar _client, _currentResult, _currentMutation, _mutateOptions, _updateResult, updateResult_fn, _notify, notify_fn;\nvar MutationObserver = class extends Subscribable {\n constructor(client, options) {\n super();\n __privateAdd(this, _updateResult);\n __privateAdd(this, _notify);\n __privateAdd(this, _client, void 0);\n __privateAdd(this, _currentResult, void 0);\n __privateAdd(this, _currentMutation, void 0);\n __privateAdd(this, _mutateOptions, void 0);\n __privateSet(this, _client, client);\n this.setOptions(options);\n this.bindMethods();\n __privateMethod(this, _updateResult, updateResult_fn).call(this);\n }\n bindMethods() {\n this.mutate = this.mutate.bind(this);\n this.reset = this.reset.bind(this);\n }\n setOptions(options) {\n var _a;\n const prevOptions = this.options;\n this.options = __privateGet(this, _client).defaultMutationOptions(options);\n if (!shallowEqualObjects(prevOptions, this.options)) {\n __privateGet(this, _client).getMutationCache().notify({\n type: \"observerOptionsUpdated\",\n mutation: __privateGet(this, _currentMutation),\n observer: this\n });\n }\n (_a = __privateGet(this, _currentMutation)) == null ? void 0 : _a.setOptions(this.options);\n }\n onUnsubscribe() {\n var _a;\n if (!this.hasListeners()) {\n (_a = __privateGet(this, _currentMutation)) == null ? void 0 : _a.removeObserver(this);\n }\n }\n onMutationUpdate(action) {\n __privateMethod(this, _updateResult, updateResult_fn).call(this);\n __privateMethod(this, _notify, notify_fn).call(this, action);\n }\n getCurrentResult() {\n return __privateGet(this, _currentResult);\n }\n reset() {\n __privateSet(this, _currentMutation, void 0);\n __privateMethod(this, _updateResult, updateResult_fn).call(this);\n __privateMethod(this, _notify, notify_fn).call(this);\n }\n mutate(variables, options) {\n var _a;\n __privateSet(this, _mutateOptions, options);\n (_a = __privateGet(this, _currentMutation)) == null ? void 0 : _a.removeObserver(this);\n __privateSet(this, _currentMutation, __privateGet(this, _client).getMutationCache().build(__privateGet(this, _client), this.options));\n __privateGet(this, _currentMutation).addObserver(this);\n return __privateGet(this, _currentMutation).execute(variables);\n }\n};\n_client = new WeakMap();\n_currentResult = new WeakMap();\n_currentMutation = new WeakMap();\n_mutateOptions = new WeakMap();\n_updateResult = new WeakSet();\nupdateResult_fn = function() {\n var _a;\n const state = ((_a = __privateGet(this, _currentMutation)) == null ? void 0 : _a.state) ?? getDefaultState();\n __privateSet(this, _currentResult, {\n ...state,\n isPending: state.status === \"pending\",\n isSuccess: state.status === \"success\",\n isError: state.status === \"error\",\n isIdle: state.status === \"idle\",\n mutate: this.mutate,\n reset: this.reset\n });\n};\n_notify = new WeakSet();\nnotify_fn = function(action) {\n notifyManager.batch(() => {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n if (__privateGet(this, _mutateOptions) && this.hasListeners()) {\n if ((action == null ? void 0 : action.type) === \"success\") {\n (_b = (_a = __privateGet(this, _mutateOptions)).onSuccess) == null ? void 0 : _b.call(\n _a,\n action.data,\n __privateGet(this, _currentResult).variables,\n __privateGet(this, _currentResult).context\n );\n (_d = (_c = __privateGet(this, _mutateOptions)).onSettled) == null ? void 0 : _d.call(\n _c,\n action.data,\n null,\n __privateGet(this, _currentResult).variables,\n __privateGet(this, _currentResult).context\n );\n } else if ((action == null ? void 0 : action.type) === \"error\") {\n (_f = (_e = __privateGet(this, _mutateOptions)).onError) == null ? void 0 : _f.call(\n _e,\n action.error,\n __privateGet(this, _currentResult).variables,\n __privateGet(this, _currentResult).context\n );\n (_h = (_g = __privateGet(this, _mutateOptions)).onSettled) == null ? void 0 : _h.call(\n _g,\n void 0,\n action.error,\n __privateGet(this, _currentResult).variables,\n __privateGet(this, _currentResult).context\n );\n }\n }\n this.listeners.forEach((listener) => {\n listener(__privateGet(this, _currentResult));\n });\n });\n};\nexport {\n MutationObserver\n};\n//# sourceMappingURL=mutationObserver.js.map","import \"./chunk-WPSKCR32.js\";\n\n// src/hydration.ts\nfunction dehydrateMutation(mutation) {\n return {\n mutationKey: mutation.options.mutationKey,\n state: mutation.state,\n ...mutation.meta && { meta: mutation.meta }\n };\n}\nfunction dehydrateQuery(query) {\n return {\n state: query.state,\n queryKey: query.queryKey,\n queryHash: query.queryHash,\n ...query.meta && { meta: query.meta }\n };\n}\nfunction defaultShouldDehydrateMutation(mutation) {\n return mutation.state.isPaused;\n}\nfunction defaultShouldDehydrateQuery(query) {\n return query.state.status === \"success\";\n}\nfunction dehydrate(client, options = {}) {\n const filterMutation = options.shouldDehydrateMutation ?? defaultShouldDehydrateMutation;\n const mutations = client.getMutationCache().getAll().flatMap(\n (mutation) => filterMutation(mutation) ? [dehydrateMutation(mutation)] : []\n );\n const filterQuery = options.shouldDehydrateQuery ?? defaultShouldDehydrateQuery;\n const queries = client.getQueryCache().getAll().flatMap((query) => filterQuery(query) ? [dehydrateQuery(query)] : []);\n return { mutations, queries };\n}\nfunction hydrate(client, dehydratedState, options) {\n if (typeof dehydratedState !== \"object\" || dehydratedState === null) {\n return;\n }\n const mutationCache = client.getMutationCache();\n const queryCache = client.getQueryCache();\n const mutations = dehydratedState.mutations || [];\n const queries = dehydratedState.queries || [];\n mutations.forEach((dehydratedMutation) => {\n var _a;\n mutationCache.build(\n client,\n {\n ...(_a = options == null ? void 0 : options.defaultOptions) == null ? void 0 : _a.mutations,\n mutationKey: dehydratedMutation.mutationKey,\n meta: dehydratedMutation.meta\n },\n dehydratedMutation.state\n );\n });\n queries.forEach(({ queryKey, state, queryHash, meta }) => {\n var _a;\n const query = queryCache.get(queryHash);\n if (query) {\n if (query.state.dataUpdatedAt < state.dataUpdatedAt) {\n const { fetchStatus: _ignored, ...dehydratedQueryState } = state;\n query.setState(dehydratedQueryState);\n }\n return;\n }\n queryCache.build(\n client,\n {\n ...(_a = options == null ? void 0 : options.defaultOptions) == null ? void 0 : _a.queries,\n queryKey,\n queryHash,\n meta\n },\n // Reset fetch status to idle to avoid\n // query being stuck in fetching state upon hydration\n {\n ...state,\n fetchStatus: \"idle\"\n }\n );\n });\n}\nexport {\n defaultShouldDehydrateMutation,\n defaultShouldDehydrateQuery,\n dehydrate,\n hydrate\n};\n//# sourceMappingURL=hydration.js.map","//# sourceMappingURL=types.js.map","//# sourceMappingURL=types.js.map","\"use client\";\n\n// src/useQueries.ts\nimport * as React from \"react\";\nimport {\n QueriesObserver,\n QueryObserver,\n notifyManager\n} from \"@tanstack/query-core\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport { useIsRestoring } from \"./isRestoring.js\";\nimport { useQueryErrorResetBoundary } from \"./QueryErrorResetBoundary.js\";\nimport {\n ensurePreventErrorBoundaryRetry,\n getHasError,\n useClearResetErrorBoundary\n} from \"./errorBoundaryUtils.js\";\nimport {\n ensureStaleTime,\n fetchOptimistic,\n shouldSuspend,\n willFetch\n} from \"./suspense.js\";\nfunction useQueries({\n queries,\n ...options\n}, queryClient) {\n const client = useQueryClient(queryClient);\n const isRestoring = useIsRestoring();\n const errorResetBoundary = useQueryErrorResetBoundary();\n const defaultedQueries = React.useMemo(\n () => queries.map((opts) => {\n const defaultedOptions = client.defaultQueryOptions(opts);\n defaultedOptions._optimisticResults = isRestoring ? \"isRestoring\" : \"optimistic\";\n return defaultedOptions;\n }),\n [queries, client, isRestoring]\n );\n defaultedQueries.forEach((query) => {\n ensureStaleTime(query);\n ensurePreventErrorBoundaryRetry(query, errorResetBoundary);\n });\n useClearResetErrorBoundary(errorResetBoundary);\n const [observer] = React.useState(\n () => new QueriesObserver(\n client,\n defaultedQueries,\n options\n )\n );\n const [optimisticResult, getCombinedResult, trackResult] = observer.getOptimisticResult(defaultedQueries);\n React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) => isRestoring ? () => void 0 : observer.subscribe(notifyManager.batchCalls(onStoreChange)),\n [observer, isRestoring]\n ),\n () => observer.getCurrentResult(),\n () => observer.getCurrentResult()\n );\n React.useEffect(() => {\n observer.setQueries(\n defaultedQueries,\n options,\n {\n listeners: false\n }\n );\n }, [defaultedQueries, options, observer]);\n const shouldAtLeastOneSuspend = optimisticResult.some(\n (result, index) => shouldSuspend(defaultedQueries[index], result)\n );\n const suspensePromises = shouldAtLeastOneSuspend ? optimisticResult.flatMap((result, index) => {\n const opts = defaultedQueries[index];\n if (opts) {\n const queryObserver = new QueryObserver(client, opts);\n if (shouldSuspend(opts, result)) {\n return fetchOptimistic(opts, queryObserver, errorResetBoundary);\n } else if (willFetch(result, isRestoring)) {\n void fetchOptimistic(opts, queryObserver, errorResetBoundary);\n }\n }\n return [];\n }) : [];\n if (suspensePromises.length > 0) {\n observer.setQueries(\n defaultedQueries,\n options,\n {\n listeners: false\n }\n );\n throw Promise.all(suspensePromises);\n }\n const observerQueries = observer.getQueries();\n const firstSingleResultWhichShouldThrow = optimisticResult.find(\n (result, index) => {\n var _a;\n return getHasError({\n result,\n errorResetBoundary,\n throwOnError: ((_a = defaultedQueries[index]) == null ? void 0 : _a.throwOnError) ?? false,\n query: observerQueries[index]\n });\n }\n );\n if (firstSingleResultWhichShouldThrow == null ? void 0 : firstSingleResultWhichShouldThrow.error) {\n throw firstSingleResultWhichShouldThrow.error;\n }\n return getCombinedResult(trackResult());\n}\nexport {\n useQueries\n};\n//# sourceMappingURL=useQueries.js.map","\"use client\";\n\n// src/QueryClientProvider.tsx\nimport * as React from \"react\";\nvar QueryClientContext = React.createContext(\n void 0\n);\nvar useQueryClient = (queryClient) => {\n const client = React.useContext(QueryClientContext);\n if (queryClient) {\n return queryClient;\n }\n if (!client) {\n throw new Error(\"No QueryClient set, use QueryClientProvider to set one\");\n }\n return client;\n};\nvar QueryClientProvider = ({\n client,\n children\n}) => {\n React.useEffect(() => {\n client.mount();\n return () => {\n client.unmount();\n };\n }, [client]);\n return /* @__PURE__ */ React.createElement(QueryClientContext.Provider, { value: client }, children);\n};\nexport {\n QueryClientContext,\n QueryClientProvider,\n useQueryClient\n};\n//# sourceMappingURL=QueryClientProvider.js.map","\"use client\";\n\n// src/isRestoring.ts\nimport * as React from \"react\";\nvar IsRestoringContext = React.createContext(false);\nvar useIsRestoring = () => React.useContext(IsRestoringContext);\nvar IsRestoringProvider = IsRestoringContext.Provider;\nexport {\n IsRestoringProvider,\n useIsRestoring\n};\n//# sourceMappingURL=isRestoring.js.map","\"use client\";\n\n// src/QueryErrorResetBoundary.tsx\nimport * as React from \"react\";\nfunction createValue() {\n let isReset = false;\n return {\n clearReset: () => {\n isReset = false;\n },\n reset: () => {\n isReset = true;\n },\n isReset: () => {\n return isReset;\n }\n };\n}\nvar QueryErrorResetBoundaryContext = React.createContext(createValue());\nvar useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);\nvar QueryErrorResetBoundary = ({\n children\n}) => {\n const [value] = React.useState(() => createValue());\n return /* @__PURE__ */ React.createElement(QueryErrorResetBoundaryContext.Provider, { value }, typeof children === \"function\" ? children(value) : children);\n};\nexport {\n QueryErrorResetBoundary,\n useQueryErrorResetBoundary\n};\n//# sourceMappingURL=QueryErrorResetBoundary.js.map","\"use client\";\n\n// src/errorBoundaryUtils.ts\nimport * as React from \"react\";\nimport { shouldThrowError } from \"./utils.js\";\nvar ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => {\n if (options.suspense || options.throwOnError) {\n if (!errorResetBoundary.isReset()) {\n options.retryOnMount = false;\n }\n }\n};\nvar useClearResetErrorBoundary = (errorResetBoundary) => {\n React.useEffect(() => {\n errorResetBoundary.clearReset();\n }, [errorResetBoundary]);\n};\nvar getHasError = ({\n result,\n errorResetBoundary,\n throwOnError,\n query\n}) => {\n return result.isError && !errorResetBoundary.isReset() && !result.isFetching && shouldThrowError(throwOnError, [result.error, query]);\n};\nexport {\n ensurePreventErrorBoundaryRetry,\n getHasError,\n useClearResetErrorBoundary\n};\n//# sourceMappingURL=errorBoundaryUtils.js.map","// src/utils.ts\nfunction shouldThrowError(throwError, params) {\n if (typeof throwError === \"function\") {\n return throwError(...params);\n }\n return !!throwError;\n}\nexport {\n shouldThrowError\n};\n//# sourceMappingURL=utils.js.map","// src/suspense.ts\nvar defaultThrowOnError = (_error, query) => typeof query.state.data === \"undefined\";\nvar ensureStaleTime = (defaultedOptions) => {\n if (defaultedOptions.suspense) {\n if (typeof defaultedOptions.staleTime !== \"number\") {\n defaultedOptions.staleTime = 1e3;\n }\n }\n};\nvar willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;\nvar shouldSuspend = (defaultedOptions, result) => (defaultedOptions == null ? void 0 : defaultedOptions.suspense) && result.isPending;\nvar fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {\n errorResetBoundary.clearReset();\n});\nexport {\n defaultThrowOnError,\n ensureStaleTime,\n fetchOptimistic,\n shouldSuspend,\n willFetch\n};\n//# sourceMappingURL=suspense.js.map","\"use client\";\n\n// src/useQuery.ts\nimport { QueryObserver } from \"@tanstack/query-core\";\nimport { useBaseQuery } from \"./useBaseQuery.js\";\nfunction useQuery(options, queryClient) {\n return useBaseQuery(options, QueryObserver, queryClient);\n}\nexport {\n useQuery\n};\n//# sourceMappingURL=useQuery.js.map","\"use client\";\n\n// src/useBaseQuery.ts\nimport * as React from \"react\";\nimport { notifyManager } from \"@tanstack/query-core\";\nimport { useQueryErrorResetBoundary } from \"./QueryErrorResetBoundary.js\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport { useIsRestoring } from \"./isRestoring.js\";\nimport {\n ensurePreventErrorBoundaryRetry,\n getHasError,\n useClearResetErrorBoundary\n} from \"./errorBoundaryUtils.js\";\nimport { ensureStaleTime, fetchOptimistic, shouldSuspend } from \"./suspense.js\";\nfunction useBaseQuery(options, Observer, queryClient) {\n if (process.env.NODE_ENV !== \"production\") {\n if (typeof options !== \"object\" || Array.isArray(options)) {\n throw new Error(\n 'Bad argument type. Starting with v5, only the \"Object\" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'\n );\n }\n }\n const client = useQueryClient(queryClient);\n const isRestoring = useIsRestoring();\n const errorResetBoundary = useQueryErrorResetBoundary();\n const defaultedOptions = client.defaultQueryOptions(options);\n defaultedOptions._optimisticResults = isRestoring ? \"isRestoring\" : \"optimistic\";\n ensureStaleTime(defaultedOptions);\n ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary);\n useClearResetErrorBoundary(errorResetBoundary);\n const [observer] = React.useState(\n () => new Observer(\n client,\n defaultedOptions\n )\n );\n const result = observer.getOptimisticResult(defaultedOptions);\n React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) => {\n const unsubscribe = isRestoring ? () => void 0 : observer.subscribe(notifyManager.batchCalls(onStoreChange));\n observer.updateResult();\n return unsubscribe;\n },\n [observer, isRestoring]\n ),\n () => observer.getCurrentResult(),\n () => observer.getCurrentResult()\n );\n React.useEffect(() => {\n observer.setOptions(defaultedOptions, { listeners: false });\n }, [defaultedOptions, observer]);\n if (shouldSuspend(defaultedOptions, result)) {\n observer.setOptions(defaultedOptions, { listeners: false });\n throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary);\n }\n if (getHasError({\n result,\n errorResetBoundary,\n throwOnError: defaultedOptions.throwOnError,\n query: observer.getCurrentQuery()\n })) {\n throw result.error;\n }\n return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;\n}\nexport {\n useBaseQuery\n};\n//# sourceMappingURL=useBaseQuery.js.map","\"use client\";\n\n// src/useSuspenseQuery.ts\nimport { QueryObserver } from \"@tanstack/query-core\";\nimport { useBaseQuery } from \"./useBaseQuery.js\";\nimport { defaultThrowOnError } from \"./suspense.js\";\nfunction useSuspenseQuery(options, queryClient) {\n return useBaseQuery(\n {\n ...options,\n enabled: true,\n suspense: true,\n throwOnError: defaultThrowOnError\n },\n QueryObserver,\n queryClient\n );\n}\nexport {\n useSuspenseQuery\n};\n//# sourceMappingURL=useSuspenseQuery.js.map","\"use client\";\n\n// src/useSuspenseInfiniteQuery.ts\nimport { InfiniteQueryObserver } from \"@tanstack/query-core\";\nimport { useBaseQuery } from \"./useBaseQuery.js\";\nimport { defaultThrowOnError } from \"./suspense.js\";\nfunction useSuspenseInfiniteQuery(options, queryClient) {\n return useBaseQuery(\n {\n ...options,\n enabled: true,\n suspense: true,\n throwOnError: defaultThrowOnError\n },\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n InfiniteQueryObserver,\n queryClient\n );\n}\nexport {\n useSuspenseInfiniteQuery\n};\n//# sourceMappingURL=useSuspenseInfiniteQuery.js.map","\"use client\";\n\n// src/useSuspenseQueries.ts\nimport { useQueries } from \"./useQueries.js\";\nimport { defaultThrowOnError } from \"./suspense.js\";\nfunction useSuspenseQueries(options, queryClient) {\n return useQueries(\n {\n ...options,\n queries: options.queries.map((query) => ({\n ...query,\n suspense: true,\n throwOnError: defaultThrowOnError,\n enabled: true\n }))\n },\n queryClient\n );\n}\nexport {\n useSuspenseQueries\n};\n//# sourceMappingURL=useSuspenseQueries.js.map","// src/queryOptions.ts\nfunction queryOptions(options) {\n return options;\n}\nexport {\n queryOptions\n};\n//# sourceMappingURL=queryOptions.js.map","// src/infiniteQueryOptions.ts\nfunction infiniteQueryOptions(options) {\n return options;\n}\nexport {\n infiniteQueryOptions\n};\n//# sourceMappingURL=infiniteQueryOptions.js.map","\"use client\";\n\n// src/HydrationBoundary.tsx\nimport * as React from \"react\";\nimport { hydrate } from \"@tanstack/query-core\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nvar HydrationBoundary = ({\n children,\n options = {},\n state,\n queryClient\n}) => {\n const client = useQueryClient(queryClient);\n const [hydrationQueue, setHydrationQueue] = React.useState();\n const optionsRef = React.useRef(options);\n optionsRef.current = options;\n React.useMemo(() => {\n if (state) {\n if (typeof state !== \"object\") {\n return;\n }\n const queryCache = client.getQueryCache();\n const queries = state.queries || [];\n const newQueries = [];\n const existingQueries = [];\n for (const dehydratedQuery of queries) {\n const existingQuery = queryCache.get(dehydratedQuery.queryHash);\n if (!existingQuery) {\n newQueries.push(dehydratedQuery);\n } else {\n const hydrationIsNewer = dehydratedQuery.state.dataUpdatedAt > existingQuery.state.dataUpdatedAt;\n const queryAlreadyQueued = hydrationQueue == null ? void 0 : hydrationQueue.find(\n (query) => query.queryHash === dehydratedQuery.queryHash\n );\n if (hydrationIsNewer && (!queryAlreadyQueued || dehydratedQuery.state.dataUpdatedAt > queryAlreadyQueued.state.dataUpdatedAt)) {\n existingQueries.push(dehydratedQuery);\n }\n }\n }\n if (newQueries.length > 0) {\n hydrate(client, { queries: newQueries }, optionsRef.current);\n }\n if (existingQueries.length > 0) {\n setHydrationQueue(\n (prev) => prev ? [...prev, ...existingQueries] : existingQueries\n );\n }\n }\n }, [client, hydrationQueue, state]);\n React.useEffect(() => {\n if (hydrationQueue) {\n hydrate(client, { queries: hydrationQueue }, optionsRef.current);\n setHydrationQueue(void 0);\n }\n }, [client, hydrationQueue]);\n return children;\n};\nexport {\n HydrationBoundary\n};\n//# sourceMappingURL=HydrationBoundary.js.map","\"use client\";\n\n// src/useIsFetching.ts\nimport * as React from \"react\";\nimport { notifyManager } from \"@tanstack/query-core\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nfunction useIsFetching(filters, queryClient) {\n const client = useQueryClient(queryClient);\n const queryCache = client.getQueryCache();\n return React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) => queryCache.subscribe(notifyManager.batchCalls(onStoreChange)),\n [queryCache]\n ),\n () => client.isFetching(filters),\n () => client.isFetching(filters)\n );\n}\nexport {\n useIsFetching\n};\n//# sourceMappingURL=useIsFetching.js.map","\"use client\";\n\n// src/useMutationState.ts\nimport * as React from \"react\";\nimport { notifyManager, replaceEqualDeep } from \"@tanstack/query-core\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nfunction useIsMutating(filters, queryClient) {\n const client = useQueryClient(queryClient);\n return useMutationState(\n { filters: { ...filters, status: \"pending\" } },\n client\n ).length;\n}\nfunction getResult(mutationCache, options) {\n return mutationCache.findAll(options.filters).map(\n (mutation) => options.select ? options.select(\n mutation\n ) : mutation.state\n );\n}\nfunction useMutationState(options = {}, queryClient) {\n const mutationCache = useQueryClient(queryClient).getMutationCache();\n const optionsRef = React.useRef(options);\n const result = React.useRef();\n if (!result.current) {\n result.current = getResult(mutationCache, options);\n }\n React.useEffect(() => {\n optionsRef.current = options;\n });\n return React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) => mutationCache.subscribe(() => {\n const nextResult = replaceEqualDeep(\n result.current,\n getResult(mutationCache, optionsRef.current)\n );\n if (result.current !== nextResult) {\n result.current = nextResult;\n notifyManager.schedule(onStoreChange);\n }\n }),\n [mutationCache]\n ),\n () => result.current,\n () => result.current\n );\n}\nexport {\n useIsMutating,\n useMutationState\n};\n//# sourceMappingURL=useMutationState.js.map","\"use client\";\n\n// src/useMutation.ts\nimport * as React from \"react\";\nimport { MutationObserver, notifyManager } from \"@tanstack/query-core\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport { shouldThrowError } from \"./utils.js\";\nfunction useMutation(options, queryClient) {\n const client = useQueryClient(queryClient);\n const [observer] = React.useState(\n () => new MutationObserver(\n client,\n options\n )\n );\n React.useEffect(() => {\n observer.setOptions(options);\n }, [observer, options]);\n const result = React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)),\n [observer]\n ),\n () => observer.getCurrentResult(),\n () => observer.getCurrentResult()\n );\n const mutate = React.useCallback(\n (variables, mutateOptions) => {\n observer.mutate(variables, mutateOptions).catch(noop);\n },\n [observer]\n );\n if (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) {\n throw result.error;\n }\n return { ...result, mutate, mutateAsync: result.mutate };\n}\nfunction noop() {\n}\nexport {\n useMutation\n};\n//# sourceMappingURL=useMutation.js.map","\"use client\";\n\n// src/useInfiniteQuery.ts\nimport { InfiniteQueryObserver } from \"@tanstack/query-core\";\nimport { useBaseQuery } from \"./useBaseQuery.js\";\nfunction useInfiniteQuery(options, queryClient) {\n return useBaseQuery(\n options,\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n InfiniteQueryObserver,\n queryClient\n );\n}\nexport {\n useInfiniteQuery\n};\n//# sourceMappingURL=useInfiniteQuery.js.map","export { default as Link } from './Link';\nexport { default as LinkingContext } from './LinkingContext';\nexport { default as NavigationContainer } from './NavigationContainer';\nexport { default as ServerContainer } from './ServerContainer';\nexport { default as DarkTheme } from './theming/DarkTheme';\nexport { default as DefaultTheme } from './theming/DefaultTheme';\nexport { default as ThemeProvider } from './theming/ThemeProvider';\nexport { default as useTheme } from './theming/useTheme';\nexport * from './types';\nexport { default as useLinkBuilder } from './useLinkBuilder';\nexport { default as useLinkProps } from './useLinkProps';\nexport { default as useLinkTo } from './useLinkTo';\nexport { default as useScrollToTop } from './useScrollToTop';\nexport * from '@react-navigation/core';\n//# sourceMappingURL=index.js.map","import * as React from 'react';\nimport { Platform, Text } from 'react-native';\nimport useLinkProps from './useLinkProps';\n/**\n * Component to render link to another screen using a path.\n * Uses an anchor tag on the web.\n *\n * @param props.to Absolute path to screen (e.g. `/feeds/hot`).\n * @param props.action Optional action to use for in-page navigation. By default, the path is parsed to an action based on linking config.\n * @param props.children Child elements to render the content.\n */\nexport default function Link(_ref) {\n let {\n to,\n action,\n ...rest\n } = _ref;\n const props = useLinkProps({\n to,\n action\n });\n const onPress = e => {\n if ('onPress' in rest) {\n var _rest$onPress;\n (_rest$onPress = rest.onPress) === null || _rest$onPress === void 0 ? void 0 : _rest$onPress.call(rest, e);\n }\n props.onPress(e);\n };\n return /*#__PURE__*/React.createElement(Text, {\n ...props,\n ...rest,\n ...Platform.select({\n web: {\n onClick: onPress\n },\n default: {\n onPress\n }\n })\n });\n}\n//# sourceMappingURL=Link.js.map","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\n'use client';\n\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"hrefAttrs\", \"numberOfLines\", \"onClick\", \"onLayout\", \"onPress\", \"onMoveShouldSetResponder\", \"onMoveShouldSetResponderCapture\", \"onResponderEnd\", \"onResponderGrant\", \"onResponderMove\", \"onResponderReject\", \"onResponderRelease\", \"onResponderStart\", \"onResponderTerminate\", \"onResponderTerminationRequest\", \"onScrollShouldSetResponder\", \"onScrollShouldSetResponderCapture\", \"onSelectionChangeShouldSetResponder\", \"onSelectionChangeShouldSetResponderCapture\", \"onStartShouldSetResponder\", \"onStartShouldSetResponderCapture\", \"selectable\"];\nimport * as React from 'react';\nimport createElement from '../createElement';\nimport * as forwardedProps from '../../modules/forwardedProps';\nimport pick from '../../modules/pick';\nimport useElementLayout from '../../modules/useElementLayout';\nimport useMergeRefs from '../../modules/useMergeRefs';\nimport usePlatformMethods from '../../modules/usePlatformMethods';\nimport useResponderEvents from '../../modules/useResponderEvents';\nimport StyleSheet from '../StyleSheet';\nimport TextAncestorContext from './TextAncestorContext';\nimport { useLocaleContext, getLocaleDirection } from '../../modules/useLocale';\n//import { warnOnce } from '../../modules/warnOnce';\n\nvar forwardPropsList = Object.assign({}, forwardedProps.defaultProps, forwardedProps.accessibilityProps, forwardedProps.clickProps, forwardedProps.focusProps, forwardedProps.keyboardProps, forwardedProps.mouseProps, forwardedProps.touchProps, forwardedProps.styleProps, {\n href: true,\n lang: true,\n pointerEvents: true\n});\nvar pickProps = props => pick(props, forwardPropsList);\nvar Text = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {\n var hrefAttrs = props.hrefAttrs,\n numberOfLines = props.numberOfLines,\n onClick = props.onClick,\n onLayout = props.onLayout,\n onPress = props.onPress,\n onMoveShouldSetResponder = props.onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture = props.onMoveShouldSetResponderCapture,\n onResponderEnd = props.onResponderEnd,\n onResponderGrant = props.onResponderGrant,\n onResponderMove = props.onResponderMove,\n onResponderReject = props.onResponderReject,\n onResponderRelease = props.onResponderRelease,\n onResponderStart = props.onResponderStart,\n onResponderTerminate = props.onResponderTerminate,\n onResponderTerminationRequest = props.onResponderTerminationRequest,\n onScrollShouldSetResponder = props.onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture = props.onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder = props.onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture = props.onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder = props.onStartShouldSetResponder,\n onStartShouldSetResponderCapture = props.onStartShouldSetResponderCapture,\n selectable = props.selectable,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n\n /*\n if (selectable != null) {\n warnOnce(\n 'selectable',\n 'selectable prop is deprecated. Use styles.userSelect.'\n );\n }\n */\n\n var hasTextAncestor = React.useContext(TextAncestorContext);\n var hostRef = React.useRef(null);\n var _useLocaleContext = useLocaleContext(),\n contextDirection = _useLocaleContext.direction;\n useElementLayout(hostRef, onLayout);\n useResponderEvents(hostRef, {\n onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture,\n onResponderEnd,\n onResponderGrant,\n onResponderMove,\n onResponderReject,\n onResponderRelease,\n onResponderStart,\n onResponderTerminate,\n onResponderTerminationRequest,\n onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder,\n onStartShouldSetResponderCapture\n });\n var handleClick = React.useCallback(e => {\n if (onClick != null) {\n onClick(e);\n } else if (onPress != null) {\n e.stopPropagation();\n onPress(e);\n }\n }, [onClick, onPress]);\n var component = hasTextAncestor ? 'span' : 'div';\n var langDirection = props.lang != null ? getLocaleDirection(props.lang) : null;\n var componentDirection = props.dir || langDirection;\n var writingDirection = componentDirection || contextDirection;\n var supportedProps = pickProps(rest);\n supportedProps.dir = componentDirection;\n // 'auto' by default allows browsers to infer writing direction (root elements only)\n if (!hasTextAncestor) {\n supportedProps.dir = componentDirection != null ? componentDirection : 'auto';\n }\n if (onClick || onPress) {\n supportedProps.onClick = handleClick;\n }\n supportedProps.style = [numberOfLines != null && numberOfLines > 1 && {\n WebkitLineClamp: numberOfLines\n }, hasTextAncestor === true ? styles.textHasAncestor$raw : styles.text$raw, numberOfLines === 1 && styles.textOneLine, numberOfLines != null && numberOfLines > 1 && styles.textMultiLine, props.style, selectable === true && styles.selectable, selectable === false && styles.notSelectable, onPress && styles.pressable];\n if (props.href != null) {\n component = 'a';\n if (hrefAttrs != null) {\n var download = hrefAttrs.download,\n rel = hrefAttrs.rel,\n target = hrefAttrs.target;\n if (download != null) {\n supportedProps.download = download;\n }\n if (rel != null) {\n supportedProps.rel = rel;\n }\n if (typeof target === 'string') {\n supportedProps.target = target.charAt(0) !== '_' ? '_' + target : target;\n }\n }\n }\n var platformMethodsRef = usePlatformMethods(supportedProps);\n var setRef = useMergeRefs(hostRef, platformMethodsRef, forwardedRef);\n supportedProps.ref = setRef;\n var element = createElement(component, supportedProps, {\n writingDirection\n });\n return hasTextAncestor ? element : /*#__PURE__*/React.createElement(TextAncestorContext.Provider, {\n value: true\n }, element);\n});\nText.displayName = 'Text';\nvar textStyle = {\n backgroundColor: 'transparent',\n border: '0 solid black',\n boxSizing: 'border-box',\n color: 'black',\n display: 'inline',\n font: '14px System',\n listStyle: 'none',\n margin: 0,\n padding: 0,\n position: 'relative',\n textAlign: 'start',\n textDecoration: 'none',\n whiteSpace: 'pre-wrap',\n wordWrap: 'break-word'\n};\nvar styles = StyleSheet.create({\n text$raw: textStyle,\n textHasAncestor$raw: _objectSpread(_objectSpread({}, textStyle), {}, {\n color: 'inherit',\n font: 'inherit',\n textAlign: 'inherit',\n whiteSpace: 'inherit'\n }),\n textOneLine: {\n maxWidth: '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n wordWrap: 'normal'\n },\n // See #13\n textMultiLine: {\n display: '-webkit-box',\n maxWidth: '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n WebkitBoxOrient: 'vertical'\n },\n notSelectable: {\n userSelect: 'none'\n },\n selectable: {\n userSelect: 'text'\n },\n pressable: {\n cursor: 'pointer'\n }\n});\nexport default Text;","import { getPathFromState, NavigationContainerRefContext, NavigationHelpersContext } from '@react-navigation/core';\nimport * as React from 'react';\nimport { Platform } from 'react-native';\nimport LinkingContext from './LinkingContext';\nimport useLinkTo from './useLinkTo';\nconst getStateFromParams = params => {\n if (params !== null && params !== void 0 && params.state) {\n return params.state;\n }\n if (params !== null && params !== void 0 && params.screen) {\n return {\n routes: [{\n name: params.screen,\n params: params.params,\n // @ts-expect-error\n state: params.screen ? getStateFromParams(params.params) : undefined\n }]\n };\n }\n return undefined;\n};\n\n/**\n * Hook to get props for an anchor tag so it can work with in page navigation.\n *\n * @param props.to Absolute path to screen (e.g. `/feeds/hot`).\n * @param props.action Optional action to use for in-page navigation. By default, the path is parsed to an action based on linking config.\n */\nexport default function useLinkProps(_ref) {\n let {\n to,\n action\n } = _ref;\n const root = React.useContext(NavigationContainerRefContext);\n const navigation = React.useContext(NavigationHelpersContext);\n const {\n options\n } = React.useContext(LinkingContext);\n const linkTo = useLinkTo();\n const onPress = e => {\n var _e$currentTarget;\n let shouldHandle = false;\n if (Platform.OS !== 'web' || !e) {\n shouldHandle = e ? !e.defaultPrevented : true;\n } else if (!e.defaultPrevented &&\n // onPress prevented default\n // @ts-expect-error: these properties exist on web, but not in React Native\n !(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && (\n // ignore clicks with modifier keys\n // @ts-expect-error: these properties exist on web, but not in React Native\n e.button == null || e.button === 0) &&\n // ignore everything but left clicks\n // @ts-expect-error: these properties exist on web, but not in React Native\n [undefined, null, '', 'self'].includes((_e$currentTarget = e.currentTarget) === null || _e$currentTarget === void 0 ? void 0 : _e$currentTarget.target) // let browser handle \"target=_blank\" etc.\n ) {\n e.preventDefault();\n shouldHandle = true;\n }\n if (shouldHandle) {\n if (action) {\n if (navigation) {\n navigation.dispatch(action);\n } else if (root) {\n root.dispatch(action);\n } else {\n throw new Error(\"Couldn't find a navigation object. Is your component inside NavigationContainer?\");\n }\n } else {\n linkTo(to);\n }\n }\n };\n const getPathFromStateHelper = (options === null || options === void 0 ? void 0 : options.getPathFromState) ?? getPathFromState;\n const href = typeof to === 'string' ? to : getPathFromStateHelper({\n routes: [{\n name: to.screen,\n // @ts-expect-error\n params: to.params,\n // @ts-expect-error\n state: getStateFromParams(to.params)\n }]\n }, options === null || options === void 0 ? void 0 : options.config);\n return {\n href,\n accessibilityRole: 'link',\n onPress\n };\n}\n//# sourceMappingURL=useLinkProps.js.map","export { default as BaseNavigationContainer } from './BaseNavigationContainer';\nexport { default as createNavigationContainerRef } from './createNavigationContainerRef';\nexport { default as createNavigatorFactory } from './createNavigatorFactory';\nexport { default as CurrentRenderContext } from './CurrentRenderContext';\nexport { default as findFocusedRoute } from './findFocusedRoute';\nexport { default as getActionFromState } from './getActionFromState';\nexport { default as getFocusedRouteNameFromRoute } from './getFocusedRouteNameFromRoute';\nexport { default as getPathFromState } from './getPathFromState';\nexport { default as getStateFromPath } from './getStateFromPath';\nexport { default as NavigationContainerRefContext } from './NavigationContainerRefContext';\nexport { default as NavigationContext } from './NavigationContext';\nexport { default as NavigationHelpersContext } from './NavigationHelpersContext';\nexport { default as NavigationRouteContext } from './NavigationRouteContext';\nexport { default as PreventRemoveContext } from './PreventRemoveContext';\nexport { default as PreventRemoveProvider } from './PreventRemoveProvider';\nexport * from './types';\nexport { default as useFocusEffect } from './useFocusEffect';\nexport { default as useIsFocused } from './useIsFocused';\nexport { default as useNavigation } from './useNavigation';\nexport { default as useNavigationBuilder } from './useNavigationBuilder';\nexport { default as useNavigationContainerRef } from './useNavigationContainerRef';\nexport { default as useNavigationState } from './useNavigationState';\nexport { default as UNSTABLE_usePreventRemove } from './usePreventRemove';\nexport { default as usePreventRemoveContext } from './usePreventRemoveContext';\nexport { default as useRoute } from './useRoute';\nexport { default as validatePathConfig } from './validatePathConfig';\nexport * from '@react-navigation/routers';\n//# sourceMappingURL=index.js.map","import { CommonActions } from '@react-navigation/routers';\nimport * as React from 'react';\nimport checkDuplicateRouteNames from './checkDuplicateRouteNames';\nimport checkSerializable from './checkSerializable';\nimport { NOT_INITIALIZED_ERROR } from './createNavigationContainerRef';\nimport EnsureSingleNavigator from './EnsureSingleNavigator';\nimport findFocusedRoute from './findFocusedRoute';\nimport NavigationBuilderContext from './NavigationBuilderContext';\nimport NavigationContainerRefContext from './NavigationContainerRefContext';\nimport NavigationContext from './NavigationContext';\nimport NavigationRouteContext from './NavigationRouteContext';\nimport NavigationStateContext from './NavigationStateContext';\nimport UnhandledActionContext from './UnhandledActionContext';\nimport useChildListeners from './useChildListeners';\nimport useEventEmitter from './useEventEmitter';\nimport useKeyedChildListeners from './useKeyedChildListeners';\nimport useOptionsGetters from './useOptionsGetters';\nimport { ScheduleUpdateContext } from './useScheduleUpdate';\nimport useSyncState from './useSyncState';\nconst serializableWarnings = [];\nconst duplicateNameWarnings = [];\n\n/**\n * Remove `key` and `routeNames` from the state objects recursively to get partial state.\n *\n * @param state Initial state object.\n */\nconst getPartialState = state => {\n if (state === undefined) {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n key,\n routeNames,\n ...partialState\n } = state;\n return {\n ...partialState,\n stale: true,\n routes: state.routes.map(route => {\n if (route.state === undefined) {\n return route;\n }\n return {\n ...route,\n state: getPartialState(route.state)\n };\n })\n };\n};\n\n/**\n * Container component which holds the navigation state.\n * This should be rendered at the root wrapping the whole app.\n *\n * @param props.initialState Initial state object for the navigation tree.\n * @param props.onStateChange Callback which is called with the latest navigation state when it changes.\n * @param props.children Child elements to render the content.\n * @param props.ref Ref object which refers to the navigation object containing helper methods.\n */\nconst BaseNavigationContainer = /*#__PURE__*/React.forwardRef(function BaseNavigationContainer(_ref, ref) {\n let {\n initialState,\n onStateChange,\n onUnhandledAction,\n independent,\n children\n } = _ref;\n const parent = React.useContext(NavigationStateContext);\n if (!parent.isDefault && !independent) {\n throw new Error(\"Looks like you have nested a 'NavigationContainer' inside another. Normally you need only one container at the root of the app, so this was probably an error. If this was intentional, pass 'independent={true}' explicitly. Note that this will make the child navigators disconnected from the parent and you won't be able to navigate between them.\");\n }\n const [state, getState, setState, scheduleUpdate, flushUpdates] = useSyncState(() => getPartialState(initialState == null ? undefined : initialState));\n const isFirstMountRef = React.useRef(true);\n const navigatorKeyRef = React.useRef();\n const getKey = React.useCallback(() => navigatorKeyRef.current, []);\n const setKey = React.useCallback(key => {\n navigatorKeyRef.current = key;\n }, []);\n const {\n listeners,\n addListener\n } = useChildListeners();\n const {\n keyedListeners,\n addKeyedListener\n } = useKeyedChildListeners();\n const dispatch = React.useCallback(action => {\n if (listeners.focus[0] == null) {\n console.error(NOT_INITIALIZED_ERROR);\n } else {\n listeners.focus[0](navigation => navigation.dispatch(action));\n }\n }, [listeners.focus]);\n const canGoBack = React.useCallback(() => {\n if (listeners.focus[0] == null) {\n return false;\n }\n const {\n result,\n handled\n } = listeners.focus[0](navigation => navigation.canGoBack());\n if (handled) {\n return result;\n } else {\n return false;\n }\n }, [listeners.focus]);\n const resetRoot = React.useCallback(state => {\n var _keyedListeners$getSt, _keyedListeners$getSt2;\n const target = (state === null || state === void 0 ? void 0 : state.key) ?? ((_keyedListeners$getSt = (_keyedListeners$getSt2 = keyedListeners.getState).root) === null || _keyedListeners$getSt === void 0 ? void 0 : _keyedListeners$getSt.call(_keyedListeners$getSt2).key);\n if (target == null) {\n console.error(NOT_INITIALIZED_ERROR);\n } else {\n listeners.focus[0](navigation => navigation.dispatch({\n ...CommonActions.reset(state),\n target\n }));\n }\n }, [keyedListeners.getState, listeners.focus]);\n const getRootState = React.useCallback(() => {\n var _keyedListeners$getSt3, _keyedListeners$getSt4;\n return (_keyedListeners$getSt3 = (_keyedListeners$getSt4 = keyedListeners.getState).root) === null || _keyedListeners$getSt3 === void 0 ? void 0 : _keyedListeners$getSt3.call(_keyedListeners$getSt4);\n }, [keyedListeners.getState]);\n const getCurrentRoute = React.useCallback(() => {\n const state = getRootState();\n if (state == null) {\n return undefined;\n }\n const route = findFocusedRoute(state);\n return route;\n }, [getRootState]);\n const emitter = useEventEmitter();\n const {\n addOptionsGetter,\n getCurrentOptions\n } = useOptionsGetters({});\n const navigation = React.useMemo(() => ({\n ...Object.keys(CommonActions).reduce((acc, name) => {\n acc[name] = function () {\n return (\n // @ts-expect-error: this is ok\n dispatch(CommonActions[name](...arguments))\n );\n };\n return acc;\n }, {}),\n ...emitter.create('root'),\n dispatch,\n resetRoot,\n isFocused: () => true,\n canGoBack,\n getParent: () => undefined,\n getState: () => stateRef.current,\n getRootState,\n getCurrentRoute,\n getCurrentOptions,\n isReady: () => listeners.focus[0] != null,\n setOptions: () => {\n throw new Error('Cannot call setOptions outside a screen');\n }\n }), [canGoBack, dispatch, emitter, getCurrentOptions, getCurrentRoute, getRootState, listeners.focus, resetRoot]);\n React.useImperativeHandle(ref, () => navigation, [navigation]);\n const onDispatchAction = React.useCallback((action, noop) => {\n emitter.emit({\n type: '__unsafe_action__',\n data: {\n action,\n noop,\n stack: stackRef.current\n }\n });\n }, [emitter]);\n const lastEmittedOptionsRef = React.useRef();\n const onOptionsChange = React.useCallback(options => {\n if (lastEmittedOptionsRef.current === options) {\n return;\n }\n lastEmittedOptionsRef.current = options;\n emitter.emit({\n type: 'options',\n data: {\n options\n }\n });\n }, [emitter]);\n const stackRef = React.useRef();\n const builderContext = React.useMemo(() => ({\n addListener,\n addKeyedListener,\n onDispatchAction,\n onOptionsChange,\n stackRef\n }), [addListener, addKeyedListener, onDispatchAction, onOptionsChange]);\n const scheduleContext = React.useMemo(() => ({\n scheduleUpdate,\n flushUpdates\n }), [scheduleUpdate, flushUpdates]);\n const isInitialRef = React.useRef(true);\n const getIsInitial = React.useCallback(() => isInitialRef.current, []);\n const context = React.useMemo(() => ({\n state,\n getState,\n setState,\n getKey,\n setKey,\n getIsInitial,\n addOptionsGetter\n }), [state, getState, setState, getKey, setKey, getIsInitial, addOptionsGetter]);\n const onStateChangeRef = React.useRef(onStateChange);\n const stateRef = React.useRef(state);\n React.useEffect(() => {\n isInitialRef.current = false;\n onStateChangeRef.current = onStateChange;\n stateRef.current = state;\n });\n React.useEffect(() => {\n const hydratedState = getRootState();\n if (process.env.NODE_ENV !== 'production') {\n if (hydratedState !== undefined) {\n const serializableResult = checkSerializable(hydratedState);\n if (!serializableResult.serializable) {\n const {\n location,\n reason\n } = serializableResult;\n let path = '';\n let pointer = hydratedState;\n let params = false;\n for (let i = 0; i < location.length; i++) {\n const curr = location[i];\n const prev = location[i - 1];\n pointer = pointer[curr];\n if (!params && curr === 'state') {\n continue;\n } else if (!params && curr === 'routes') {\n if (path) {\n path += ' > ';\n }\n } else if (!params && typeof curr === 'number' && prev === 'routes') {\n var _pointer;\n path += (_pointer = pointer) === null || _pointer === void 0 ? void 0 : _pointer.name;\n } else if (!params) {\n path += ` > ${curr}`;\n params = true;\n } else {\n if (typeof curr === 'number' || /^[0-9]+$/.test(curr)) {\n path += `[${curr}]`;\n } else if (/^[a-z$_]+$/i.test(curr)) {\n path += `.${curr}`;\n } else {\n path += `[${JSON.stringify(curr)}]`;\n }\n }\n }\n const message = `Non-serializable values were found in the navigation state. Check:\\n\\n${path} (${reason})\\n\\nThis can break usage such as persisting and restoring state. This might happen if you passed non-serializable values such as function, class instances etc. in params. If you need to use components with callbacks in your options, you can use 'navigation.setOptions' instead. See https://reactnavigation.org/docs/troubleshooting#i-get-the-warning-non-serializable-values-were-found-in-the-navigation-state for more details.`;\n if (!serializableWarnings.includes(message)) {\n serializableWarnings.push(message);\n console.warn(message);\n }\n }\n const duplicateRouteNamesResult = checkDuplicateRouteNames(hydratedState);\n if (duplicateRouteNamesResult.length) {\n const message = `Found screens with the same name nested inside one another. Check:\\n${duplicateRouteNamesResult.map(locations => `\\n${locations.join(', ')}`)}\\n\\nThis can cause confusing behavior during navigation. Consider using unique names for each screen instead.`;\n if (!duplicateNameWarnings.includes(message)) {\n duplicateNameWarnings.push(message);\n console.warn(message);\n }\n }\n }\n }\n emitter.emit({\n type: 'state',\n data: {\n state\n }\n });\n if (!isFirstMountRef.current && onStateChangeRef.current) {\n onStateChangeRef.current(hydratedState);\n }\n isFirstMountRef.current = false;\n }, [getRootState, emitter, state]);\n const defaultOnUnhandledAction = React.useCallback(action => {\n if (process.env.NODE_ENV === 'production') {\n return;\n }\n const payload = action.payload;\n let message = `The action '${action.type}'${payload ? ` with payload ${JSON.stringify(action.payload)}` : ''} was not handled by any navigator.`;\n switch (action.type) {\n case 'NAVIGATE':\n case 'PUSH':\n case 'REPLACE':\n case 'JUMP_TO':\n if (payload !== null && payload !== void 0 && payload.name) {\n message += `\\n\\nDo you have a screen named '${payload.name}'?\\n\\nIf you're trying to navigate to a screen in a nested navigator, see https://reactnavigation.org/docs/nesting-navigators#navigating-to-a-screen-in-a-nested-navigator.`;\n } else {\n message += `\\n\\nYou need to pass the name of the screen to navigate to.\\n\\nSee https://reactnavigation.org/docs/navigation-actions for usage.`;\n }\n break;\n case 'GO_BACK':\n case 'POP':\n case 'POP_TO_TOP':\n message += `\\n\\nIs there any screen to go back to?`;\n break;\n case 'OPEN_DRAWER':\n case 'CLOSE_DRAWER':\n case 'TOGGLE_DRAWER':\n message += `\\n\\nIs your screen inside a Drawer navigator?`;\n break;\n }\n message += `\\n\\nThis is a development-only warning and won't be shown in production.`;\n console.error(message);\n }, []);\n let element = /*#__PURE__*/React.createElement(NavigationContainerRefContext.Provider, {\n value: navigation\n }, /*#__PURE__*/React.createElement(ScheduleUpdateContext.Provider, {\n value: scheduleContext\n }, /*#__PURE__*/React.createElement(NavigationBuilderContext.Provider, {\n value: builderContext\n }, /*#__PURE__*/React.createElement(NavigationStateContext.Provider, {\n value: context\n }, /*#__PURE__*/React.createElement(UnhandledActionContext.Provider, {\n value: onUnhandledAction ?? defaultOnUnhandledAction\n }, /*#__PURE__*/React.createElement(EnsureSingleNavigator, null, children))))));\n if (independent) {\n // We need to clear any existing contexts for nested independent container to work correctly\n element = /*#__PURE__*/React.createElement(NavigationRouteContext.Provider, {\n value: undefined\n }, /*#__PURE__*/React.createElement(NavigationContext.Provider, {\n value: undefined\n }, element));\n }\n return element;\n});\nexport default BaseNavigationContainer;\n//# sourceMappingURL=BaseNavigationContainer.js.map","import * as CommonActions from './CommonActions';\nexport { CommonActions };\nexport { default as BaseRouter } from './BaseRouter';\nexport { DrawerActions, default as DrawerRouter } from './DrawerRouter';\nexport { StackActions, default as StackRouter } from './StackRouter';\nexport { TabActions, default as TabRouter } from './TabRouter';\nexport * from './types';\n//# sourceMappingURL=index.js.map","export function goBack() {\n return {\n type: 'GO_BACK'\n };\n}\n// eslint-disable-next-line no-redeclare\nexport function navigate() {\n if (typeof (arguments.length <= 0 ? undefined : arguments[0]) === 'string') {\n return {\n type: 'NAVIGATE',\n payload: {\n name: arguments.length <= 0 ? undefined : arguments[0],\n params: arguments.length <= 1 ? undefined : arguments[1]\n }\n };\n } else {\n const payload = (arguments.length <= 0 ? undefined : arguments[0]) || {};\n if (!payload.hasOwnProperty('key') && !payload.hasOwnProperty('name')) {\n throw new Error('You need to specify name or key when calling navigate with an object as the argument. See https://reactnavigation.org/docs/navigation-actions#navigate for usage.');\n }\n return {\n type: 'NAVIGATE',\n payload\n };\n }\n}\nexport function reset(state) {\n return {\n type: 'RESET',\n payload: state\n };\n}\nexport function setParams(params) {\n return {\n type: 'SET_PARAMS',\n payload: {\n params\n }\n };\n}\n//# sourceMappingURL=CommonActions.js.map","import { nanoid } from 'nanoid/non-secure';\n/**\n * Base router object that can be used when writing custom routers.\n * This provides few helper methods to handle common actions such as `RESET`.\n */\nconst BaseRouter = {\n getStateForAction(state, action) {\n switch (action.type) {\n case 'SET_PARAMS':\n {\n const index = action.source ? state.routes.findIndex(r => r.key === action.source) : state.index;\n if (index === -1) {\n return null;\n }\n return {\n ...state,\n routes: state.routes.map((r, i) => i === index ? {\n ...r,\n params: {\n ...r.params,\n ...action.payload.params\n }\n } : r)\n };\n }\n case 'RESET':\n {\n const nextState = action.payload;\n if (nextState.routes.length === 0 || nextState.routes.some(route => !state.routeNames.includes(route.name))) {\n return null;\n }\n if (nextState.stale === false) {\n if (state.routeNames.length !== nextState.routeNames.length || nextState.routeNames.some(name => !state.routeNames.includes(name))) {\n return null;\n }\n return {\n ...nextState,\n routes: nextState.routes.map(route => route.key ? route : {\n ...route,\n key: `${route.name}-${nanoid()}`\n })\n };\n }\n return nextState;\n }\n default:\n return null;\n }\n },\n shouldActionChangeFocus(action) {\n return action.type === 'NAVIGATE';\n }\n};\nexport default BaseRouter;\n//# sourceMappingURL=BaseRouter.js.map","// This alphabet uses `A-Za-z0-9_-` symbols.\n// The order of characters is optimized for better gzip and brotli compression.\n// References to the same file (works both for gzip and brotli):\n// `'use`, `andom`, and `rict'`\n// References to the brotli default dictionary:\n// `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf`\nlet urlAlphabet =\n 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\n\nlet customAlphabet = (alphabet, defaultSize = 21) => {\n return (size = defaultSize) => {\n let id = ''\n // A compact alternative for `for (var i = 0; i < step; i++)`.\n let i = size | 0\n while (i--) {\n // `| 0` is more compact and faster than `Math.floor()`.\n id += alphabet[(Math.random() * alphabet.length) | 0]\n }\n return id\n }\n}\n\nlet nanoid = (size = 21) => {\n let id = ''\n // A compact alternative for `for (var i = 0; i < step; i++)`.\n let i = size | 0\n while (i--) {\n // `| 0` is more compact and faster than `Math.floor()`.\n id += urlAlphabet[(Math.random() * 64) | 0]\n }\n return id\n}\n\nexport { nanoid, customAlphabet }\n","import { nanoid } from 'nanoid/non-secure';\nimport TabRouter, { TabActions } from './TabRouter';\nexport const DrawerActions = {\n ...TabActions,\n openDrawer() {\n return {\n type: 'OPEN_DRAWER'\n };\n },\n closeDrawer() {\n return {\n type: 'CLOSE_DRAWER'\n };\n },\n toggleDrawer() {\n return {\n type: 'TOGGLE_DRAWER'\n };\n }\n};\nexport default function DrawerRouter(_ref) {\n let {\n defaultStatus = 'closed',\n ...rest\n } = _ref;\n const router = TabRouter(rest);\n const isDrawerInHistory = state => {\n var _state$history;\n return Boolean((_state$history = state.history) === null || _state$history === void 0 ? void 0 : _state$history.some(it => it.type === 'drawer'));\n };\n const addDrawerToHistory = state => {\n if (isDrawerInHistory(state)) {\n return state;\n }\n return {\n ...state,\n history: [...state.history, {\n type: 'drawer',\n status: defaultStatus === 'open' ? 'closed' : 'open'\n }]\n };\n };\n const removeDrawerFromHistory = state => {\n if (!isDrawerInHistory(state)) {\n return state;\n }\n return {\n ...state,\n history: state.history.filter(it => it.type !== 'drawer')\n };\n };\n const openDrawer = state => {\n if (defaultStatus === 'open') {\n return removeDrawerFromHistory(state);\n }\n return addDrawerToHistory(state);\n };\n const closeDrawer = state => {\n if (defaultStatus === 'open') {\n return addDrawerToHistory(state);\n }\n return removeDrawerFromHistory(state);\n };\n return {\n ...router,\n type: 'drawer',\n getInitialState(_ref2) {\n let {\n routeNames,\n routeParamList,\n routeGetIdList\n } = _ref2;\n const state = router.getInitialState({\n routeNames,\n routeParamList,\n routeGetIdList\n });\n return {\n ...state,\n default: defaultStatus,\n stale: false,\n type: 'drawer',\n key: `drawer-${nanoid()}`\n };\n },\n getRehydratedState(partialState, _ref3) {\n let {\n routeNames,\n routeParamList,\n routeGetIdList\n } = _ref3;\n if (partialState.stale === false) {\n return partialState;\n }\n let state = router.getRehydratedState(partialState, {\n routeNames,\n routeParamList,\n routeGetIdList\n });\n if (isDrawerInHistory(partialState)) {\n // Re-sync the drawer entry in history to correct it if it was wrong\n state = removeDrawerFromHistory(state);\n state = addDrawerToHistory(state);\n }\n return {\n ...state,\n default: defaultStatus,\n type: 'drawer',\n key: `drawer-${nanoid()}`\n };\n },\n getStateForRouteFocus(state, key) {\n const result = router.getStateForRouteFocus(state, key);\n return closeDrawer(result);\n },\n getStateForAction(state, action, options) {\n switch (action.type) {\n case 'OPEN_DRAWER':\n return openDrawer(state);\n case 'CLOSE_DRAWER':\n return closeDrawer(state);\n case 'TOGGLE_DRAWER':\n if (isDrawerInHistory(state)) {\n return removeDrawerFromHistory(state);\n }\n return addDrawerToHistory(state);\n case 'JUMP_TO':\n case 'NAVIGATE':\n {\n const result = router.getStateForAction(state, action, options);\n if (result != null && result.index !== state.index) {\n return closeDrawer(result);\n }\n return result;\n }\n case 'GO_BACK':\n if (isDrawerInHistory(state)) {\n return removeDrawerFromHistory(state);\n }\n return router.getStateForAction(state, action, options);\n default:\n return router.getStateForAction(state, action, options);\n }\n },\n actionCreators: DrawerActions\n };\n}\n//# sourceMappingURL=DrawerRouter.js.map","import { nanoid } from 'nanoid/non-secure';\nimport BaseRouter from './BaseRouter';\nconst TYPE_ROUTE = 'route';\nexport const TabActions = {\n jumpTo(name, params) {\n return {\n type: 'JUMP_TO',\n payload: {\n name,\n params\n }\n };\n }\n};\nconst getRouteHistory = (routes, index, backBehavior, initialRouteName) => {\n const history = [{\n type: TYPE_ROUTE,\n key: routes[index].key\n }];\n let initialRouteIndex;\n switch (backBehavior) {\n case 'order':\n for (let i = index; i > 0; i--) {\n history.unshift({\n type: TYPE_ROUTE,\n key: routes[i - 1].key\n });\n }\n break;\n case 'firstRoute':\n if (index !== 0) {\n history.unshift({\n type: TYPE_ROUTE,\n key: routes[0].key\n });\n }\n break;\n case 'initialRoute':\n initialRouteIndex = routes.findIndex(route => route.name === initialRouteName);\n initialRouteIndex = initialRouteIndex === -1 ? 0 : initialRouteIndex;\n if (index !== initialRouteIndex) {\n history.unshift({\n type: TYPE_ROUTE,\n key: routes[initialRouteIndex].key\n });\n }\n break;\n case 'history':\n // The history will fill up on navigation\n break;\n }\n return history;\n};\nconst changeIndex = (state, index, backBehavior, initialRouteName) => {\n let history;\n if (backBehavior === 'history') {\n const currentKey = state.routes[index].key;\n history = state.history.filter(it => it.type === 'route' ? it.key !== currentKey : false).concat({\n type: TYPE_ROUTE,\n key: currentKey\n });\n } else {\n history = getRouteHistory(state.routes, index, backBehavior, initialRouteName);\n }\n return {\n ...state,\n index,\n history\n };\n};\nexport default function TabRouter(_ref) {\n let {\n initialRouteName,\n backBehavior = 'firstRoute'\n } = _ref;\n const router = {\n ...BaseRouter,\n type: 'tab',\n getInitialState(_ref2) {\n let {\n routeNames,\n routeParamList\n } = _ref2;\n const index = initialRouteName !== undefined && routeNames.includes(initialRouteName) ? routeNames.indexOf(initialRouteName) : 0;\n const routes = routeNames.map(name => ({\n name,\n key: `${name}-${nanoid()}`,\n params: routeParamList[name]\n }));\n const history = getRouteHistory(routes, index, backBehavior, initialRouteName);\n return {\n stale: false,\n type: 'tab',\n key: `tab-${nanoid()}`,\n index,\n routeNames,\n history,\n routes\n };\n },\n getRehydratedState(partialState, _ref3) {\n var _state$routes, _state$history;\n let {\n routeNames,\n routeParamList\n } = _ref3;\n let state = partialState;\n if (state.stale === false) {\n return state;\n }\n const routes = routeNames.map(name => {\n const route = state.routes.find(r => r.name === name);\n return {\n ...route,\n name,\n key: route && route.name === name && route.key ? route.key : `${name}-${nanoid()}`,\n params: routeParamList[name] !== undefined ? {\n ...routeParamList[name],\n ...(route ? route.params : undefined)\n } : route ? route.params : undefined\n };\n });\n const index = Math.min(Math.max(routeNames.indexOf((_state$routes = state.routes[(state === null || state === void 0 ? void 0 : state.index) ?? 0]) === null || _state$routes === void 0 ? void 0 : _state$routes.name), 0), routes.length - 1);\n const history = ((_state$history = state.history) === null || _state$history === void 0 ? void 0 : _state$history.filter(it => routes.find(r => r.key === it.key))) ?? [];\n return changeIndex({\n stale: false,\n type: 'tab',\n key: `tab-${nanoid()}`,\n index,\n routeNames,\n history,\n routes\n }, index, backBehavior, initialRouteName);\n },\n getStateForRouteNamesChange(state, _ref4) {\n let {\n routeNames,\n routeParamList,\n routeKeyChanges\n } = _ref4;\n const routes = routeNames.map(name => state.routes.find(r => r.name === name && !routeKeyChanges.includes(r.name)) || {\n name,\n key: `${name}-${nanoid()}`,\n params: routeParamList[name]\n });\n const index = Math.max(0, routeNames.indexOf(state.routes[state.index].name));\n let history = state.history.filter(\n // Type will always be 'route' for tabs, but could be different in a router extending this (e.g. drawer)\n it => it.type !== 'route' || routes.find(r => r.key === it.key));\n if (!history.length) {\n history = getRouteHistory(routes, index, backBehavior, initialRouteName);\n }\n return {\n ...state,\n history,\n routeNames,\n routes,\n index\n };\n },\n getStateForRouteFocus(state, key) {\n const index = state.routes.findIndex(r => r.key === key);\n if (index === -1 || index === state.index) {\n return state;\n }\n return changeIndex(state, index, backBehavior, initialRouteName);\n },\n getStateForAction(state, action, _ref5) {\n let {\n routeParamList,\n routeGetIdList\n } = _ref5;\n switch (action.type) {\n case 'JUMP_TO':\n case 'NAVIGATE':\n {\n let index = -1;\n if (action.type === 'NAVIGATE' && action.payload.key) {\n index = state.routes.findIndex(route => route.key === action.payload.key);\n } else {\n index = state.routes.findIndex(route => route.name === action.payload.name);\n }\n if (index === -1) {\n return null;\n }\n return changeIndex({\n ...state,\n routes: state.routes.map((route, i) => {\n if (i !== index) {\n return route;\n }\n const getId = routeGetIdList[route.name];\n const currentId = getId === null || getId === void 0 ? void 0 : getId({\n params: route.params\n });\n const nextId = getId === null || getId === void 0 ? void 0 : getId({\n params: action.payload.params\n });\n const key = currentId === nextId ? route.key : `${route.name}-${nanoid()}`;\n let params;\n if (action.type === 'NAVIGATE' && action.payload.merge && currentId === nextId) {\n params = action.payload.params !== undefined || routeParamList[route.name] !== undefined ? {\n ...routeParamList[route.name],\n ...route.params,\n ...action.payload.params\n } : route.params;\n } else {\n params = routeParamList[route.name] !== undefined ? {\n ...routeParamList[route.name],\n ...action.payload.params\n } : action.payload.params;\n }\n const path = action.type === 'NAVIGATE' && action.payload.path != null ? action.payload.path : route.path;\n return params !== route.params || path !== route.path ? {\n ...route,\n key,\n path,\n params\n } : route;\n })\n }, index, backBehavior, initialRouteName);\n }\n case 'GO_BACK':\n {\n if (state.history.length === 1) {\n return null;\n }\n const previousKey = state.history[state.history.length - 2].key;\n const index = state.routes.findIndex(route => route.key === previousKey);\n if (index === -1) {\n return null;\n }\n return {\n ...state,\n history: state.history.slice(0, -1),\n index\n };\n }\n default:\n return BaseRouter.getStateForAction(state, action);\n }\n },\n shouldActionChangeFocus(action) {\n return action.type === 'NAVIGATE';\n },\n actionCreators: TabActions\n };\n return router;\n}\n//# sourceMappingURL=TabRouter.js.map","import { nanoid } from 'nanoid/non-secure';\nimport BaseRouter from './BaseRouter';\nexport const StackActions = {\n replace(name, params) {\n return {\n type: 'REPLACE',\n payload: {\n name,\n params\n }\n };\n },\n push(name, params) {\n return {\n type: 'PUSH',\n payload: {\n name,\n params\n }\n };\n },\n pop() {\n let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n return {\n type: 'POP',\n payload: {\n count\n }\n };\n },\n popToTop() {\n return {\n type: 'POP_TO_TOP'\n };\n }\n};\nexport default function StackRouter(options) {\n const router = {\n ...BaseRouter,\n type: 'stack',\n getInitialState(_ref) {\n let {\n routeNames,\n routeParamList\n } = _ref;\n const initialRouteName = options.initialRouteName !== undefined && routeNames.includes(options.initialRouteName) ? options.initialRouteName : routeNames[0];\n return {\n stale: false,\n type: 'stack',\n key: `stack-${nanoid()}`,\n index: 0,\n routeNames,\n routes: [{\n key: `${initialRouteName}-${nanoid()}`,\n name: initialRouteName,\n params: routeParamList[initialRouteName]\n }]\n };\n },\n getRehydratedState(partialState, _ref2) {\n let {\n routeNames,\n routeParamList\n } = _ref2;\n let state = partialState;\n if (state.stale === false) {\n return state;\n }\n const routes = state.routes.filter(route => routeNames.includes(route.name)).map(route => ({\n ...route,\n key: route.key || `${route.name}-${nanoid()}`,\n params: routeParamList[route.name] !== undefined ? {\n ...routeParamList[route.name],\n ...route.params\n } : route.params\n }));\n if (routes.length === 0) {\n const initialRouteName = options.initialRouteName !== undefined ? options.initialRouteName : routeNames[0];\n routes.push({\n key: `${initialRouteName}-${nanoid()}`,\n name: initialRouteName,\n params: routeParamList[initialRouteName]\n });\n }\n return {\n stale: false,\n type: 'stack',\n key: `stack-${nanoid()}`,\n index: routes.length - 1,\n routeNames,\n routes\n };\n },\n getStateForRouteNamesChange(state, _ref3) {\n let {\n routeNames,\n routeParamList,\n routeKeyChanges\n } = _ref3;\n const routes = state.routes.filter(route => routeNames.includes(route.name) && !routeKeyChanges.includes(route.name));\n if (routes.length === 0) {\n const initialRouteName = options.initialRouteName !== undefined && routeNames.includes(options.initialRouteName) ? options.initialRouteName : routeNames[0];\n routes.push({\n key: `${initialRouteName}-${nanoid()}`,\n name: initialRouteName,\n params: routeParamList[initialRouteName]\n });\n }\n return {\n ...state,\n routeNames,\n routes,\n index: Math.min(state.index, routes.length - 1)\n };\n },\n getStateForRouteFocus(state, key) {\n const index = state.routes.findIndex(r => r.key === key);\n if (index === -1 || index === state.index) {\n return state;\n }\n return {\n ...state,\n index,\n routes: state.routes.slice(0, index + 1)\n };\n },\n getStateForAction(state, action, options) {\n const {\n routeParamList\n } = options;\n switch (action.type) {\n case 'REPLACE':\n {\n const index = action.target === state.key && action.source ? state.routes.findIndex(r => r.key === action.source) : state.index;\n if (index === -1) {\n return null;\n }\n const {\n name,\n key,\n params\n } = action.payload;\n if (!state.routeNames.includes(name)) {\n return null;\n }\n return {\n ...state,\n routes: state.routes.map((route, i) => i === index ? {\n key: key !== undefined ? key : `${name}-${nanoid()}`,\n name,\n params: routeParamList[name] !== undefined ? {\n ...routeParamList[name],\n ...params\n } : params\n } : route)\n };\n }\n case 'PUSH':\n if (state.routeNames.includes(action.payload.name)) {\n const getId = options.routeGetIdList[action.payload.name];\n const id = getId === null || getId === void 0 ? void 0 : getId({\n params: action.payload.params\n });\n const route = id ? state.routes.find(route => route.name === action.payload.name && id === (getId === null || getId === void 0 ? void 0 : getId({\n params: route.params\n }))) : undefined;\n let routes;\n if (route) {\n routes = state.routes.filter(r => r.key !== route.key);\n routes.push({\n ...route,\n params: routeParamList[action.payload.name] !== undefined ? {\n ...routeParamList[action.payload.name],\n ...action.payload.params\n } : action.payload.params\n });\n } else {\n routes = [...state.routes, {\n key: `${action.payload.name}-${nanoid()}`,\n name: action.payload.name,\n params: routeParamList[action.payload.name] !== undefined ? {\n ...routeParamList[action.payload.name],\n ...action.payload.params\n } : action.payload.params\n }];\n }\n return {\n ...state,\n index: routes.length - 1,\n routes\n };\n }\n return null;\n case 'POP':\n {\n const index = action.target === state.key && action.source ? state.routes.findIndex(r => r.key === action.source) : state.index;\n if (index > 0) {\n const count = Math.max(index - action.payload.count + 1, 1);\n const routes = state.routes.slice(0, count).concat(state.routes.slice(index + 1));\n return {\n ...state,\n index: routes.length - 1,\n routes\n };\n }\n return null;\n }\n case 'POP_TO_TOP':\n return router.getStateForAction(state, {\n type: 'POP',\n payload: {\n count: state.routes.length - 1\n }\n }, options);\n case 'NAVIGATE':\n if (action.payload.name !== undefined && !state.routeNames.includes(action.payload.name)) {\n return null;\n }\n if (action.payload.key || action.payload.name) {\n // If the route already exists, navigate to that\n let index = -1;\n const getId =\n // `getId` and `key` can't be used together\n action.payload.key === undefined && action.payload.name !== undefined ? options.routeGetIdList[action.payload.name] : undefined;\n const id = getId === null || getId === void 0 ? void 0 : getId({\n params: action.payload.params\n });\n if (id) {\n index = state.routes.findIndex(route => route.name === action.payload.name && id === (getId === null || getId === void 0 ? void 0 : getId({\n params: route.params\n })));\n } else if (state.routes[state.index].name === action.payload.name && action.payload.key === undefined || state.routes[state.index].key === action.payload.key) {\n index = state.index;\n } else {\n for (let i = state.routes.length - 1; i >= 0; i--) {\n if (state.routes[i].name === action.payload.name && action.payload.key === undefined || state.routes[i].key === action.payload.key) {\n index = i;\n break;\n }\n }\n }\n if (index === -1 && action.payload.key && action.payload.name === undefined) {\n return null;\n }\n if (index === -1 && action.payload.name !== undefined) {\n const routes = [...state.routes, {\n key: action.payload.key ?? `${action.payload.name}-${nanoid()}`,\n name: action.payload.name,\n path: action.payload.path,\n params: routeParamList[action.payload.name] !== undefined ? {\n ...routeParamList[action.payload.name],\n ...action.payload.params\n } : action.payload.params\n }];\n return {\n ...state,\n routes,\n index: routes.length - 1\n };\n }\n const route = state.routes[index];\n let params;\n if (action.payload.merge) {\n params = action.payload.params !== undefined || routeParamList[route.name] !== undefined ? {\n ...routeParamList[route.name],\n ...route.params,\n ...action.payload.params\n } : route.params;\n } else {\n params = routeParamList[route.name] !== undefined ? {\n ...routeParamList[route.name],\n ...action.payload.params\n } : action.payload.params;\n }\n return {\n ...state,\n index,\n routes: [...state.routes.slice(0, index), params !== route.params || action.payload.path && action.payload.path !== route.path ? {\n ...route,\n path: action.payload.path ?? route.path,\n params\n } : state.routes[index]]\n };\n }\n return null;\n case 'GO_BACK':\n if (state.index > 0) {\n return router.getStateForAction(state, {\n type: 'POP',\n payload: {\n count: 1\n },\n target: action.target,\n source: action.source\n }, options);\n }\n return null;\n default:\n return BaseRouter.getStateForAction(state, action);\n }\n },\n actionCreators: StackActions\n };\n return router;\n}\n//# sourceMappingURL=StackRouter.js.map","export {};\n//# sourceMappingURL=types.js.map","export default function checkDuplicateRouteNames(state) {\n const duplicates = [];\n const getRouteNames = (location, state) => {\n state.routes.forEach(route => {\n var _route$state, _route$state$routeNam;\n const currentLocation = location ? `${location} > ${route.name}` : route.name;\n (_route$state = route.state) === null || _route$state === void 0 ? void 0 : (_route$state$routeNam = _route$state.routeNames) === null || _route$state$routeNam === void 0 ? void 0 : _route$state$routeNam.forEach(routeName => {\n if (routeName === route.name) {\n duplicates.push([currentLocation, `${currentLocation} > ${route.name}`]);\n }\n });\n if (route.state) {\n getRouteNames(currentLocation, route.state);\n }\n });\n };\n getRouteNames('', state);\n return duplicates;\n}\n//# sourceMappingURL=checkDuplicateRouteNames.js.map","const checkSerializableWithoutCircularReference = (o, seen, location) => {\n if (o === undefined || o === null || typeof o === 'boolean' || typeof o === 'number' || typeof o === 'string') {\n return {\n serializable: true\n };\n }\n if (Object.prototype.toString.call(o) !== '[object Object]' && !Array.isArray(o)) {\n return {\n serializable: false,\n location,\n reason: typeof o === 'function' ? 'Function' : String(o)\n };\n }\n if (seen.has(o)) {\n return {\n serializable: false,\n reason: 'Circular reference',\n location\n };\n }\n seen.add(o);\n if (Array.isArray(o)) {\n for (let i = 0; i < o.length; i++) {\n const childResult = checkSerializableWithoutCircularReference(o[i], new Set(seen), [...location, i]);\n if (!childResult.serializable) {\n return childResult;\n }\n }\n } else {\n for (const key in o) {\n const childResult = checkSerializableWithoutCircularReference(o[key], new Set(seen), [...location, key]);\n if (!childResult.serializable) {\n return childResult;\n }\n }\n }\n return {\n serializable: true\n };\n};\nexport default function checkSerializable(o) {\n return checkSerializableWithoutCircularReference(o, new Set(), []);\n}\n//# sourceMappingURL=checkSerializable.js.map","import { CommonActions } from '@react-navigation/routers';\nexport const NOT_INITIALIZED_ERROR = \"The 'navigation' object hasn't been initialized yet. This might happen if you don't have a navigator mounted, or if the navigator hasn't finished mounting. See https://reactnavigation.org/docs/navigating-without-navigation-prop#handling-initialization for more details.\";\nexport default function createNavigationContainerRef() {\n const methods = [...Object.keys(CommonActions), 'addListener', 'removeListener', 'resetRoot', 'dispatch', 'isFocused', 'canGoBack', 'getRootState', 'getState', 'getParent', 'getCurrentRoute', 'getCurrentOptions'];\n const listeners = {};\n const removeListener = (event, callback) => {\n if (listeners[event]) {\n listeners[event] = listeners[event].filter(cb => cb !== callback);\n }\n };\n let current = null;\n const ref = {\n get current() {\n return current;\n },\n set current(value) {\n current = value;\n if (value != null) {\n Object.entries(listeners).forEach(_ref => {\n let [event, callbacks] = _ref;\n callbacks.forEach(callback => {\n value.addListener(event, callback);\n });\n });\n }\n },\n isReady: () => {\n if (current == null) {\n return false;\n }\n return current.isReady();\n },\n ...methods.reduce((acc, name) => {\n acc[name] = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (current == null) {\n switch (name) {\n case 'addListener':\n {\n const [event, callback] = args;\n listeners[event] = listeners[event] || [];\n listeners[event].push(callback);\n return () => removeListener(event, callback);\n }\n case 'removeListener':\n {\n const [event, callback] = args;\n removeListener(event, callback);\n break;\n }\n default:\n console.error(NOT_INITIALIZED_ERROR);\n }\n } else {\n // @ts-expect-error: this is ok\n return current[name](...args);\n }\n };\n return acc;\n }, {})\n };\n return ref;\n}\n//# sourceMappingURL=createNavigationContainerRef.js.map","import * as React from 'react';\nconst MULTIPLE_NAVIGATOR_ERROR = `Another navigator is already registered for this container. You likely have multiple navigators under a single \"NavigationContainer\" or \"Screen\". Make sure each navigator is under a separate \"Screen\" container. See https://reactnavigation.org/docs/nesting-navigators for a guide on nesting.`;\nexport const SingleNavigatorContext = /*#__PURE__*/React.createContext(undefined);\n\n/**\n * Component which ensures that there's only one navigator nested under it.\n */\nexport default function EnsureSingleNavigator(_ref) {\n let {\n children\n } = _ref;\n const navigatorKeyRef = React.useRef();\n const value = React.useMemo(() => ({\n register(key) {\n const currentKey = navigatorKeyRef.current;\n if (currentKey !== undefined && key !== currentKey) {\n throw new Error(MULTIPLE_NAVIGATOR_ERROR);\n }\n navigatorKeyRef.current = key;\n },\n unregister(key) {\n const currentKey = navigatorKeyRef.current;\n if (key !== currentKey) {\n return;\n }\n navigatorKeyRef.current = undefined;\n }\n }), []);\n return /*#__PURE__*/React.createElement(SingleNavigatorContext.Provider, {\n value: value\n }, children);\n}\n//# sourceMappingURL=EnsureSingleNavigator.js.map","export default function findFocusedRoute(state) {\n var _current2, _current3;\n let current = state;\n while (((_current = current) === null || _current === void 0 ? void 0 : _current.routes[current.index ?? 0].state) != null) {\n var _current;\n current = current.routes[current.index ?? 0].state;\n }\n const route = (_current2 = current) === null || _current2 === void 0 ? void 0 : _current2.routes[((_current3 = current) === null || _current3 === void 0 ? void 0 : _current3.index) ?? 0];\n return route;\n}\n//# sourceMappingURL=findFocusedRoute.js.map","import * as React from 'react';\n/**\n * Context which holds the required helpers needed to build nested navigators.\n */\nconst NavigationBuilderContext = /*#__PURE__*/React.createContext({\n onDispatchAction: () => undefined,\n onOptionsChange: () => undefined\n});\nexport default NavigationBuilderContext;\n//# sourceMappingURL=NavigationBuilderContext.js.map","import * as React from 'react';\n/**\n * Context which holds the route prop for a screen.\n */\nconst NavigationContainerRefContext = /*#__PURE__*/React.createContext(undefined);\nexport default NavigationContainerRefContext;\n//# sourceMappingURL=NavigationContainerRefContext.js.map","import * as React from 'react';\n/**\n * Context which holds the navigation prop for a screen.\n */\nconst NavigationContext = /*#__PURE__*/React.createContext(undefined);\nexport default NavigationContext;\n//# sourceMappingURL=NavigationContext.js.map","import * as React from 'react';\n\n/**\n * Context which holds the route prop for a screen.\n */\nconst NavigationRouteContext = /*#__PURE__*/React.createContext(undefined);\nexport default NavigationRouteContext;\n//# sourceMappingURL=NavigationRouteContext.js.map","import * as React from 'react';\nconst MISSING_CONTEXT_ERROR = \"Couldn't find a navigation context. Have you wrapped your app with 'NavigationContainer'? See https://reactnavigation.org/docs/getting-started for setup instructions.\";\nexport default /*#__PURE__*/React.createContext({\n isDefault: true,\n get getKey() {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n get setKey() {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n get getState() {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n get setState() {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n get getIsInitial() {\n throw new Error(MISSING_CONTEXT_ERROR);\n }\n});\n//# sourceMappingURL=NavigationStateContext.js.map","import * as React from 'react';\nconst UnhandledActionContext = /*#__PURE__*/React.createContext(undefined);\nexport default UnhandledActionContext;\n//# sourceMappingURL=UnhandledActionContext.js.map","import * as React from 'react';\n/**\n * Hook which lets child navigators add action listeners.\n */\nexport default function useChildListeners() {\n const {\n current: listeners\n } = React.useRef({\n action: [],\n focus: []\n });\n const addListener = React.useCallback((type, listener) => {\n listeners[type].push(listener);\n let removed = false;\n return () => {\n const index = listeners[type].indexOf(listener);\n if (!removed && index > -1) {\n removed = true;\n listeners[type].splice(index, 1);\n }\n };\n }, [listeners]);\n return {\n listeners,\n addListener\n };\n}\n//# sourceMappingURL=useChildListeners.js.map","import * as React from 'react';\n/**\n * Hook to manage the event system used by the navigator to notify screens of various events.\n */\nexport default function useEventEmitter(listen) {\n const listenRef = React.useRef(listen);\n React.useEffect(() => {\n listenRef.current = listen;\n });\n const listeners = React.useRef(Object.create(null));\n const create = React.useCallback(target => {\n const removeListener = (type, callback) => {\n const callbacks = listeners.current[type] ? listeners.current[type][target] : undefined;\n if (!callbacks) {\n return;\n }\n const index = callbacks.indexOf(callback);\n if (index > -1) {\n callbacks.splice(index, 1);\n }\n };\n const addListener = (type, callback) => {\n listeners.current[type] = listeners.current[type] || {};\n listeners.current[type][target] = listeners.current[type][target] || [];\n listeners.current[type][target].push(callback);\n let removed = false;\n return () => {\n // Prevent removing other listeners when unsubscribing same listener multiple times\n if (!removed) {\n removed = true;\n removeListener(type, callback);\n }\n };\n };\n return {\n addListener,\n removeListener\n };\n }, []);\n const emit = React.useCallback(_ref => {\n var _items$target, _listenRef$current;\n let {\n type,\n data,\n target,\n canPreventDefault\n } = _ref;\n const items = listeners.current[type] || {};\n\n // Copy the current list of callbacks in case they are mutated during execution\n const callbacks = target !== undefined ? (_items$target = items[target]) === null || _items$target === void 0 ? void 0 : _items$target.slice() : [].concat(...Object.keys(items).map(t => items[t])).filter((cb, i, self) => self.lastIndexOf(cb) === i);\n const event = {\n get type() {\n return type;\n }\n };\n if (target !== undefined) {\n Object.defineProperty(event, 'target', {\n enumerable: true,\n get() {\n return target;\n }\n });\n }\n if (data !== undefined) {\n Object.defineProperty(event, 'data', {\n enumerable: true,\n get() {\n return data;\n }\n });\n }\n if (canPreventDefault) {\n let defaultPrevented = false;\n Object.defineProperties(event, {\n defaultPrevented: {\n enumerable: true,\n get() {\n return defaultPrevented;\n }\n },\n preventDefault: {\n enumerable: true,\n value() {\n defaultPrevented = true;\n }\n }\n });\n }\n (_listenRef$current = listenRef.current) === null || _listenRef$current === void 0 ? void 0 : _listenRef$current.call(listenRef, event);\n callbacks === null || callbacks === void 0 ? void 0 : callbacks.forEach(cb => cb(event));\n return event;\n }, []);\n return React.useMemo(() => ({\n create,\n emit\n }), [create, emit]);\n}\n//# sourceMappingURL=useEventEmitter.js.map","import * as React from 'react';\n/**\n * Hook which lets child navigators add getters to be called for obtaining rehydrated state.\n */\nexport default function useKeyedChildListeners() {\n const {\n current: keyedListeners\n } = React.useRef(Object.assign(Object.create(null), {\n getState: {},\n beforeRemove: {}\n }));\n const addKeyedListener = React.useCallback((type, key, listener) => {\n // @ts-expect-error: according to ref stated above you can use `key` to index type\n keyedListeners[type][key] = listener;\n return () => {\n // @ts-expect-error: according to ref stated above you can use `key` to index type\n keyedListeners[type][key] = undefined;\n };\n }, [keyedListeners]);\n return {\n keyedListeners,\n addKeyedListener\n };\n}\n//# sourceMappingURL=useKeyedChildListeners.js.map","import * as React from 'react';\nimport NavigationBuilderContext from './NavigationBuilderContext';\nimport NavigationStateContext from './NavigationStateContext';\nexport default function useOptionsGetters(_ref) {\n let {\n key,\n options,\n navigation\n } = _ref;\n const optionsRef = React.useRef(options);\n const optionsGettersFromChildRef = React.useRef({});\n const {\n onOptionsChange\n } = React.useContext(NavigationBuilderContext);\n const {\n addOptionsGetter: parentAddOptionsGetter\n } = React.useContext(NavigationStateContext);\n const optionsChangeListener = React.useCallback(() => {\n const isFocused = (navigation === null || navigation === void 0 ? void 0 : navigation.isFocused()) ?? true;\n const hasChildren = Object.keys(optionsGettersFromChildRef.current).length;\n if (isFocused && !hasChildren) {\n onOptionsChange(optionsRef.current ?? {});\n }\n }, [navigation, onOptionsChange]);\n React.useEffect(() => {\n optionsRef.current = options;\n optionsChangeListener();\n return navigation === null || navigation === void 0 ? void 0 : navigation.addListener('focus', optionsChangeListener);\n }, [navigation, options, optionsChangeListener]);\n const getOptionsFromListener = React.useCallback(() => {\n for (let key in optionsGettersFromChildRef.current) {\n if (optionsGettersFromChildRef.current.hasOwnProperty(key)) {\n var _optionsGettersFromCh, _optionsGettersFromCh2;\n const result = (_optionsGettersFromCh = (_optionsGettersFromCh2 = optionsGettersFromChildRef.current)[key]) === null || _optionsGettersFromCh === void 0 ? void 0 : _optionsGettersFromCh.call(_optionsGettersFromCh2);\n\n // null means unfocused route\n if (result !== null) {\n return result;\n }\n }\n }\n return null;\n }, []);\n const getCurrentOptions = React.useCallback(() => {\n const isFocused = (navigation === null || navigation === void 0 ? void 0 : navigation.isFocused()) ?? true;\n if (!isFocused) {\n return null;\n }\n const optionsFromListener = getOptionsFromListener();\n if (optionsFromListener !== null) {\n return optionsFromListener;\n }\n return optionsRef.current;\n }, [navigation, getOptionsFromListener]);\n React.useEffect(() => {\n return parentAddOptionsGetter === null || parentAddOptionsGetter === void 0 ? void 0 : parentAddOptionsGetter(key, getCurrentOptions);\n }, [getCurrentOptions, parentAddOptionsGetter, key]);\n const addOptionsGetter = React.useCallback((key, getter) => {\n optionsGettersFromChildRef.current[key] = getter;\n optionsChangeListener();\n return () => {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete optionsGettersFromChildRef.current[key];\n optionsChangeListener();\n };\n }, [optionsChangeListener]);\n return {\n addOptionsGetter,\n getCurrentOptions\n };\n}\n//# sourceMappingURL=useOptionsGetters.js.map","import * as React from 'react';\nconst MISSING_CONTEXT_ERROR = \"Couldn't find a schedule context.\";\nexport const ScheduleUpdateContext = /*#__PURE__*/React.createContext({\n scheduleUpdate() {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n flushUpdates() {\n throw new Error(MISSING_CONTEXT_ERROR);\n }\n});\n\n/**\n * When screen config changes, we want to update the navigator in the same update phase.\n * However, navigation state is in the root component and React won't let us update it from a child.\n * This is a workaround for that, the scheduled update is stored in the ref without actually calling setState.\n * It lets all subsequent updates access the latest state so it stays correct.\n * Then we call setState during after the component updates.\n */\nexport default function useScheduleUpdate(callback) {\n const {\n scheduleUpdate,\n flushUpdates\n } = React.useContext(ScheduleUpdateContext);\n scheduleUpdate(callback);\n React.useEffect(flushUpdates);\n}\n//# sourceMappingURL=useScheduleUpdate.js.map","import * as React from 'react';\nconst UNINTIALIZED_STATE = {};\n\n/**\n * This is definitely not compatible with concurrent mode, but we don't have a solution for sync state yet.\n */\nexport default function useSyncState(initialState) {\n const stateRef = React.useRef(UNINTIALIZED_STATE);\n const isSchedulingRef = React.useRef(false);\n const isMountedRef = React.useRef(true);\n React.useEffect(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n if (stateRef.current === UNINTIALIZED_STATE) {\n stateRef.current =\n // @ts-expect-error: initialState is a function, but TypeScript doesn't think so\n typeof initialState === 'function' ? initialState() : initialState;\n }\n const [trackingState, setTrackingState] = React.useState(stateRef.current);\n const getState = React.useCallback(() => stateRef.current, []);\n const setState = React.useCallback(state => {\n if (state === stateRef.current || !isMountedRef.current) {\n return;\n }\n stateRef.current = state;\n if (!isSchedulingRef.current) {\n setTrackingState(state);\n }\n }, []);\n const scheduleUpdate = React.useCallback(callback => {\n isSchedulingRef.current = true;\n try {\n callback();\n } finally {\n isSchedulingRef.current = false;\n }\n }, []);\n const flushUpdates = React.useCallback(() => {\n if (!isMountedRef.current) {\n return;\n }\n\n // Make sure that the tracking state is up-to-date.\n // We call it unconditionally, but React should skip the update if state is unchanged.\n setTrackingState(stateRef.current);\n }, []);\n\n // If we're rendering and the tracking state is out of date, update it immediately\n // This will make sure that our updates are applied as early as possible.\n if (trackingState !== stateRef.current) {\n setTrackingState(stateRef.current);\n }\n const state = stateRef.current;\n React.useDebugValue(state);\n return [state, getState, setState, scheduleUpdate, flushUpdates];\n}\n//# sourceMappingURL=useSyncState.js.map","import Group from './Group';\nimport Screen from './Screen';\n/**\n * Higher order component to create a `Navigator` and `Screen` pair.\n * Custom navigators should wrap the navigator component in `createNavigator` before exporting.\n *\n * @param Navigator The navigtor component to wrap.\n * @returns Factory method to create a `Navigator` and `Screen` pair.\n */\nexport default function createNavigatorFactory(Navigator) {\n return function () {\n if (arguments[0] !== undefined) {\n throw new Error(\"Creating a navigator doesn't take an argument. Maybe you are trying to use React Navigation 4 API? See https://reactnavigation.org/docs/hello-react-navigation for the latest API and guides.\");\n }\n return {\n Navigator,\n Group,\n Screen\n };\n };\n}\n//# sourceMappingURL=createNavigatorFactory.js.map","/**\n * Empty component used for grouping screen configs.\n */\nexport default function Group(_) {\n /* istanbul ignore next */\n return null;\n}\n//# sourceMappingURL=Group.js.map","/**\n * Empty component used for specifying route configuration.\n */\nexport default function Screen(_) {\n /* istanbul ignore next */\n return null;\n}\n//# sourceMappingURL=Screen.js.map","import * as React from 'react';\n\n/**\n * Context which holds the values for the current navigation tree.\n * Intended for use in SSR. This is not safe to use on the client.\n */\nconst CurrentRenderContext = /*#__PURE__*/React.createContext(undefined);\nexport default CurrentRenderContext;\n//# sourceMappingURL=CurrentRenderContext.js.map","export default function getActionFromState(state, options) {\n var _normalizedConfig$scr;\n // Create a normalized configs object which will be easier to use\n const normalizedConfig = options ? createNormalizedConfigItem(options) : {};\n const routes = state.index != null ? state.routes.slice(0, state.index + 1) : state.routes;\n if (routes.length === 0) {\n return undefined;\n }\n if (!(routes.length === 1 && routes[0].key === undefined || routes.length === 2 && routes[0].key === undefined && routes[0].name === (normalizedConfig === null || normalizedConfig === void 0 ? void 0 : normalizedConfig.initialRouteName) && routes[1].key === undefined)) {\n return {\n type: 'RESET',\n payload: state\n };\n }\n const route = state.routes[state.index ?? state.routes.length - 1];\n let current = route === null || route === void 0 ? void 0 : route.state;\n let config = normalizedConfig === null || normalizedConfig === void 0 ? void 0 : (_normalizedConfig$scr = normalizedConfig.screens) === null || _normalizedConfig$scr === void 0 ? void 0 : _normalizedConfig$scr[route === null || route === void 0 ? void 0 : route.name];\n let params = {\n ...route.params\n };\n let payload = route ? {\n name: route.name,\n path: route.path,\n params\n } : undefined;\n while (current) {\n var _config, _config2, _config2$screens;\n if (current.routes.length === 0) {\n return undefined;\n }\n const routes = current.index != null ? current.routes.slice(0, current.index + 1) : current.routes;\n const route = routes[routes.length - 1];\n\n // Explicitly set to override existing value when merging params\n Object.assign(params, {\n initial: undefined,\n screen: undefined,\n params: undefined,\n state: undefined\n });\n if (routes.length === 1 && routes[0].key === undefined) {\n params.initial = true;\n params.screen = route.name;\n } else if (routes.length === 2 && routes[0].key === undefined && routes[0].name === ((_config = config) === null || _config === void 0 ? void 0 : _config.initialRouteName) && routes[1].key === undefined) {\n params.initial = false;\n params.screen = route.name;\n } else {\n params.state = current;\n break;\n }\n if (route.state) {\n params.params = {\n ...route.params\n };\n params = params.params;\n } else {\n params.path = route.path;\n params.params = route.params;\n }\n current = route.state;\n config = (_config2 = config) === null || _config2 === void 0 ? void 0 : (_config2$screens = _config2.screens) === null || _config2$screens === void 0 ? void 0 : _config2$screens[route.name];\n }\n if (!payload) {\n return;\n }\n\n // Try to construct payload for a `NAVIGATE` action from the state\n // This lets us preserve the navigation state and not lose it\n return {\n type: 'NAVIGATE',\n payload\n };\n}\nconst createNormalizedConfigItem = config => typeof config === 'object' && config != null ? {\n initialRouteName: config.initialRouteName,\n screens: config.screens != null ? createNormalizedConfigs(config.screens) : undefined\n} : {};\nconst createNormalizedConfigs = options => Object.entries(options).reduce((acc, _ref) => {\n let [k, v] = _ref;\n acc[k] = createNormalizedConfigItem(v);\n return acc;\n}, {});\n//# sourceMappingURL=getActionFromState.js.map","import { CHILD_STATE } from './useRouteCache';\nexport default function getFocusedRouteNameFromRoute(route) {\n // @ts-expect-error: this isn't in type definitions coz we want this private\n const state = route[CHILD_STATE] ?? route.state;\n const params = route.params;\n const routeName = state ?\n // Get the currently active route name in the nested navigator\n state.routes[\n // If we have a partial state without index, for tab/drawer, first screen will be focused one, and last for stack\n // The type property will only exist for rehydrated state and not for state from deep link\n state.index ?? (typeof state.type === 'string' && state.type !== 'stack' ? 0 : state.routes.length - 1)].name :\n // If state doesn't exist, we need to default to `screen` param if available\n typeof (params === null || params === void 0 ? void 0 : params.screen) === 'string' ? params.screen : undefined;\n return routeName;\n}\n//# sourceMappingURL=getFocusedRouteNameFromRoute.js.map","import * as React from 'react';\n/**\n * Utilites such as `getFocusedRouteNameFromRoute` need to access state.\n * So we need a way to suppress the warning for those use cases.\n * This is fine since they are internal utilities and this is not public API.\n */\nexport const CHILD_STATE = Symbol('CHILD_STATE');\n\n/**\n * Hook to cache route props for each screen in the navigator.\n * This lets add warnings and modifications to the route object but keep references between renders.\n */\nexport default function useRouteCache(routes) {\n // Cache object which holds route objects for each screen\n const cache = React.useMemo(() => ({\n current: new Map()\n }), []);\n if (process.env.NODE_ENV === 'production') {\n // We don't want the overhead of creating extra maps every render in prod\n return routes;\n }\n cache.current = routes.reduce((acc, route) => {\n const previous = cache.current.get(route);\n if (previous) {\n // If a cached route object already exists, reuse it\n acc.set(route, previous);\n } else {\n const {\n state,\n ...proxy\n } = route;\n Object.defineProperty(proxy, CHILD_STATE, {\n enumerable: false,\n value: state\n });\n acc.set(route, proxy);\n }\n return acc;\n }, new Map());\n return Array.from(cache.current.values());\n}\n//# sourceMappingURL=useRouteCache.js.map","import * as queryString from 'query-string';\nimport fromEntries from './fromEntries';\nimport validatePathConfig from './validatePathConfig';\nconst getActiveRoute = state => {\n const route = typeof state.index === 'number' ? state.routes[state.index] : state.routes[state.routes.length - 1];\n if (route.state) {\n return getActiveRoute(route.state);\n }\n return route;\n};\n\n/**\n * Utility to serialize a navigation state object to a path string.\n *\n * @example\n * ```js\n * getPathFromState(\n * {\n * routes: [\n * {\n * name: 'Chat',\n * params: { author: 'Jane', id: 42 },\n * },\n * ],\n * },\n * {\n * screens: {\n * Chat: {\n * path: 'chat/:author/:id',\n * stringify: { author: author => author.toLowerCase() }\n * }\n * }\n * }\n * )\n * ```\n *\n * @param state Navigation state to serialize.\n * @param options Extra options to fine-tune how to serialize the path.\n * @returns Path representing the state, e.g. /foo/bar?count=42.\n */\nexport default function getPathFromState(state, options) {\n if (state == null) {\n throw Error(\"Got 'undefined' for the navigation state. You must pass a valid state object.\");\n }\n if (options) {\n validatePathConfig(options);\n }\n\n // Create a normalized configs object which will be easier to use\n const configs = options !== null && options !== void 0 && options.screens ? createNormalizedConfigs(options === null || options === void 0 ? void 0 : options.screens) : {};\n let path = '/';\n let current = state;\n const allParams = {};\n while (current) {\n let index = typeof current.index === 'number' ? current.index : 0;\n let route = current.routes[index];\n let pattern;\n let focusedParams;\n let focusedRoute = getActiveRoute(state);\n let currentOptions = configs;\n\n // Keep all the route names that appeared during going deeper in config in case the pattern is resolved to undefined\n let nestedRouteNames = [];\n let hasNext = true;\n while (route.name in currentOptions && hasNext) {\n pattern = currentOptions[route.name].pattern;\n nestedRouteNames.push(route.name);\n if (route.params) {\n var _currentOptions$route;\n const stringify = (_currentOptions$route = currentOptions[route.name]) === null || _currentOptions$route === void 0 ? void 0 : _currentOptions$route.stringify;\n const currentParams = fromEntries(Object.entries(route.params).map(_ref => {\n let [key, value] = _ref;\n return [key, stringify !== null && stringify !== void 0 && stringify[key] ? stringify[key](value) : String(value)];\n }));\n if (pattern) {\n Object.assign(allParams, currentParams);\n }\n if (focusedRoute === route) {\n var _pattern;\n // If this is the focused route, keep the params for later use\n // We save it here since it's been stringified already\n focusedParams = {\n ...currentParams\n };\n (_pattern = pattern) === null || _pattern === void 0 ? void 0 : _pattern.split('/').filter(p => p.startsWith(':'))\n // eslint-disable-next-line no-loop-func\n .forEach(p => {\n const name = getParamName(p);\n\n // Remove the params present in the pattern since we'll only use the rest for query string\n if (focusedParams) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete focusedParams[name];\n }\n });\n }\n }\n\n // If there is no `screens` property or no nested state, we return pattern\n if (!currentOptions[route.name].screens || route.state === undefined) {\n hasNext = false;\n } else {\n index = typeof route.state.index === 'number' ? route.state.index : route.state.routes.length - 1;\n const nextRoute = route.state.routes[index];\n const nestedConfig = currentOptions[route.name].screens;\n\n // if there is config for next route name, we go deeper\n if (nestedConfig && nextRoute.name in nestedConfig) {\n route = nextRoute;\n currentOptions = nestedConfig;\n } else {\n // If not, there is no sense in going deeper in config\n hasNext = false;\n }\n }\n }\n if (pattern === undefined) {\n pattern = nestedRouteNames.join('/');\n }\n if (currentOptions[route.name] !== undefined) {\n path += pattern.split('/').map(p => {\n const name = getParamName(p);\n\n // We don't know what to show for wildcard patterns\n // Showing the route name seems ok, though whatever we show here will be incorrect\n // Since the page doesn't actually exist\n if (p === '*') {\n return route.name;\n }\n\n // If the path has a pattern for a param, put the param in the path\n if (p.startsWith(':')) {\n const value = allParams[name];\n if (value === undefined && p.endsWith('?')) {\n // Optional params without value assigned in route.params should be ignored\n return '';\n }\n return encodeURIComponent(value);\n }\n return encodeURIComponent(p);\n }).join('/');\n } else {\n path += encodeURIComponent(route.name);\n }\n if (!focusedParams) {\n focusedParams = focusedRoute.params;\n }\n if (route.state) {\n path += '/';\n } else if (focusedParams) {\n for (let param in focusedParams) {\n if (focusedParams[param] === 'undefined') {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete focusedParams[param];\n }\n }\n const query = queryString.stringify(focusedParams, {\n sort: false\n });\n if (query) {\n path += `?${query}`;\n }\n }\n current = route.state;\n }\n\n // Remove multiple as well as trailing slashes\n path = path.replace(/\\/+/g, '/');\n path = path.length > 1 ? path.replace(/\\/$/, '') : path;\n return path;\n}\nconst getParamName = pattern => pattern.replace(/^:/, '').replace(/\\?$/, '');\nconst joinPaths = function () {\n for (var _len = arguments.length, paths = new Array(_len), _key = 0; _key < _len; _key++) {\n paths[_key] = arguments[_key];\n }\n return [].concat(...paths.map(p => p.split('/'))).filter(Boolean).join('/');\n};\nconst createConfigItem = (config, parentPattern) => {\n var _pattern2;\n if (typeof config === 'string') {\n // If a string is specified as the value of the key(e.g. Foo: '/path'), use it as the pattern\n const pattern = parentPattern ? joinPaths(parentPattern, config) : config;\n return {\n pattern\n };\n }\n\n // If an object is specified as the value (e.g. Foo: { ... }),\n // It can have `path` property and `screens` prop which has nested configs\n let pattern;\n if (config.exact && config.path === undefined) {\n throw new Error(\"A 'path' needs to be specified when specifying 'exact: true'. If you don't want this screen in the URL, specify it as empty string, e.g. `path: ''`.\");\n }\n pattern = config.exact !== true ? joinPaths(parentPattern || '', config.path || '') : config.path || '';\n const screens = config.screens ? createNormalizedConfigs(config.screens, pattern) : undefined;\n return {\n // Normalize pattern to remove any leading, trailing slashes, duplicate slashes etc.\n pattern: (_pattern2 = pattern) === null || _pattern2 === void 0 ? void 0 : _pattern2.split('/').filter(Boolean).join('/'),\n stringify: config.stringify,\n screens\n };\n};\nconst createNormalizedConfigs = (options, pattern) => fromEntries(Object.entries(options).map(_ref2 => {\n let [name, c] = _ref2;\n const result = createConfigItem(c, pattern);\n return [name, result];\n}));\n//# sourceMappingURL=getPathFromState.js.map","'use strict';\nconst strictUriEncode = require('strict-uri-encode');\nconst decodeComponent = require('decode-uri-component');\nconst splitOnFirst = require('split-on-first');\nconst filterObject = require('filter-obj');\n\nconst isNullOrUndefined = value => value === null || value === undefined;\n\nconst encodeFragmentIdentifier = Symbol('encodeFragmentIdentifier');\n\nfunction encoderForArrayFormat(options) {\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tconst index = result.length;\n\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[', index, ']'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [\n\t\t\t\t\t...result,\n\t\t\t\t\t[encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join('')\n\t\t\t\t];\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[]'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '[]=', encode(value, options)].join('')];\n\t\t\t};\n\n\t\tcase 'colon-list-separator':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), ':list='].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), ':list=', encode(value, options)].join('')];\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\tcase 'bracket-separator': {\n\t\t\tconst keyValueSep = options.arrayFormat === 'bracket-separator' ?\n\t\t\t\t'[]=' :\n\t\t\t\t'=';\n\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\t// Translate null to an empty string so that it doesn't serialize as 'null'\n\t\t\t\tvalue = value === null ? '' : value;\n\n\t\t\t\tif (result.length === 0) {\n\t\t\t\t\treturn [[encode(key, options), keyValueSep, encode(value, options)].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [[result, encode(value, options)].join(options.arrayFormatSeparator)];\n\t\t\t};\n\t\t}\n\n\t\tdefault:\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, encode(key, options)];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '=', encode(value, options)].join('')];\n\t\t\t};\n\t}\n}\n\nfunction parserForArrayFormat(options) {\n\tlet result;\n\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /\\[(\\d*)\\]$/.exec(key);\n\n\t\t\t\tkey = key.replace(/\\[\\d*\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = {};\n\t\t\t\t}\n\n\t\t\t\taccumulator[key][result[1]] = value;\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /(\\[\\])$/.exec(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\n\t\tcase 'colon-list-separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /(:list)$/.exec(key);\n\t\t\t\tkey = key.replace(/:list$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = typeof value === 'string' && value.includes(options.arrayFormatSeparator);\n\t\t\t\tconst isEncodedArray = (typeof value === 'string' && !isArray && decode(value, options).includes(options.arrayFormatSeparator));\n\t\t\t\tvalue = isEncodedArray ? decode(value, options) : value;\n\t\t\t\tconst newValue = isArray || isEncodedArray ? value.split(options.arrayFormatSeparator).map(item => decode(item, options)) : value === null ? value : decode(value, options);\n\t\t\t\taccumulator[key] = newValue;\n\t\t\t};\n\n\t\tcase 'bracket-separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = /(\\[\\])$/.test(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!isArray) {\n\t\t\t\t\taccumulator[key] = value ? decode(value, options) : value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst arrayValue = value === null ?\n\t\t\t\t\t[] :\n\t\t\t\t\tvalue.split(options.arrayFormatSeparator).map(item => decode(item, options));\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = arrayValue;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], arrayValue);\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\t}\n}\n\nfunction validateArrayFormatSeparator(value) {\n\tif (typeof value !== 'string' || value.length !== 1) {\n\t\tthrow new TypeError('arrayFormatSeparator must be single character string');\n\t}\n}\n\nfunction encode(value, options) {\n\tif (options.encode) {\n\t\treturn options.strict ? strictUriEncode(value) : encodeURIComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction decode(value, options) {\n\tif (options.decode) {\n\t\treturn decodeComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction keysSorter(input) {\n\tif (Array.isArray(input)) {\n\t\treturn input.sort();\n\t}\n\n\tif (typeof input === 'object') {\n\t\treturn keysSorter(Object.keys(input))\n\t\t\t.sort((a, b) => Number(a) - Number(b))\n\t\t\t.map(key => input[key]);\n\t}\n\n\treturn input;\n}\n\nfunction removeHash(input) {\n\tconst hashStart = input.indexOf('#');\n\tif (hashStart !== -1) {\n\t\tinput = input.slice(0, hashStart);\n\t}\n\n\treturn input;\n}\n\nfunction getHash(url) {\n\tlet hash = '';\n\tconst hashStart = url.indexOf('#');\n\tif (hashStart !== -1) {\n\t\thash = url.slice(hashStart);\n\t}\n\n\treturn hash;\n}\n\nfunction extract(input) {\n\tinput = removeHash(input);\n\tconst queryStart = input.indexOf('?');\n\tif (queryStart === -1) {\n\t\treturn '';\n\t}\n\n\treturn input.slice(queryStart + 1);\n}\n\nfunction parseValue(value, options) {\n\tif (options.parseNumbers && !Number.isNaN(Number(value)) && (typeof value === 'string' && value.trim() !== '')) {\n\t\tvalue = Number(value);\n\t} else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) {\n\t\tvalue = value.toLowerCase() === 'true';\n\t}\n\n\treturn value;\n}\n\nfunction parse(query, options) {\n\toptions = Object.assign({\n\t\tdecode: true,\n\t\tsort: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ',',\n\t\tparseNumbers: false,\n\t\tparseBooleans: false\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst formatter = parserForArrayFormat(options);\n\n\t// Create an object with no prototype\n\tconst ret = Object.create(null);\n\n\tif (typeof query !== 'string') {\n\t\treturn ret;\n\t}\n\n\tquery = query.trim().replace(/^[?#&]/, '');\n\n\tif (!query) {\n\t\treturn ret;\n\t}\n\n\tfor (const param of query.split('&')) {\n\t\tif (param === '') {\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet [key, value] = splitOnFirst(options.decode ? param.replace(/\\+/g, ' ') : param, '=');\n\n\t\t// Missing `=` should be `null`:\n\t\t// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n\t\tvalue = value === undefined ? null : ['comma', 'separator', 'bracket-separator'].includes(options.arrayFormat) ? value : decode(value, options);\n\t\tformatter(decode(key, options), value, ret);\n\t}\n\n\tfor (const key of Object.keys(ret)) {\n\t\tconst value = ret[key];\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tfor (const k of Object.keys(value)) {\n\t\t\t\tvalue[k] = parseValue(value[k], options);\n\t\t\t}\n\t\t} else {\n\t\t\tret[key] = parseValue(value, options);\n\t\t}\n\t}\n\n\tif (options.sort === false) {\n\t\treturn ret;\n\t}\n\n\treturn (options.sort === true ? Object.keys(ret).sort() : Object.keys(ret).sort(options.sort)).reduce((result, key) => {\n\t\tconst value = ret[key];\n\t\tif (Boolean(value) && typeof value === 'object' && !Array.isArray(value)) {\n\t\t\t// Sort object keys, not values\n\t\t\tresult[key] = keysSorter(value);\n\t\t} else {\n\t\t\tresult[key] = value;\n\t\t}\n\n\t\treturn result;\n\t}, Object.create(null));\n}\n\nexports.extract = extract;\nexports.parse = parse;\n\nexports.stringify = (object, options) => {\n\tif (!object) {\n\t\treturn '';\n\t}\n\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ','\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst shouldFilter = key => (\n\t\t(options.skipNull && isNullOrUndefined(object[key])) ||\n\t\t(options.skipEmptyString && object[key] === '')\n\t);\n\n\tconst formatter = encoderForArrayFormat(options);\n\n\tconst objectCopy = {};\n\n\tfor (const key of Object.keys(object)) {\n\t\tif (!shouldFilter(key)) {\n\t\t\tobjectCopy[key] = object[key];\n\t\t}\n\t}\n\n\tconst keys = Object.keys(objectCopy);\n\n\tif (options.sort !== false) {\n\t\tkeys.sort(options.sort);\n\t}\n\n\treturn keys.map(key => {\n\t\tconst value = object[key];\n\n\t\tif (value === undefined) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (value === null) {\n\t\t\treturn encode(key, options);\n\t\t}\n\n\t\tif (Array.isArray(value)) {\n\t\t\tif (value.length === 0 && options.arrayFormat === 'bracket-separator') {\n\t\t\t\treturn encode(key, options) + '[]';\n\t\t\t}\n\n\t\t\treturn value\n\t\t\t\t.reduce(formatter(key), [])\n\t\t\t\t.join('&');\n\t\t}\n\n\t\treturn encode(key, options) + '=' + encode(value, options);\n\t}).filter(x => x.length > 0).join('&');\n};\n\nexports.parseUrl = (url, options) => {\n\toptions = Object.assign({\n\t\tdecode: true\n\t}, options);\n\n\tconst [url_, hash] = splitOnFirst(url, '#');\n\n\treturn Object.assign(\n\t\t{\n\t\t\turl: url_.split('?')[0] || '',\n\t\t\tquery: parse(extract(url), options)\n\t\t},\n\t\toptions && options.parseFragmentIdentifier && hash ? {fragmentIdentifier: decode(hash, options)} : {}\n\t);\n};\n\nexports.stringifyUrl = (object, options) => {\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true,\n\t\t[encodeFragmentIdentifier]: true\n\t}, options);\n\n\tconst url = removeHash(object.url).split('?')[0] || '';\n\tconst queryFromUrl = exports.extract(object.url);\n\tconst parsedQueryFromUrl = exports.parse(queryFromUrl, {sort: false});\n\n\tconst query = Object.assign(parsedQueryFromUrl, object.query);\n\tlet queryString = exports.stringify(query, options);\n\tif (queryString) {\n\t\tqueryString = `?${queryString}`;\n\t}\n\n\tlet hash = getHash(object.url);\n\tif (object.fragmentIdentifier) {\n\t\thash = `#${options[encodeFragmentIdentifier] ? encode(object.fragmentIdentifier, options) : object.fragmentIdentifier}`;\n\t}\n\n\treturn `${url}${queryString}${hash}`;\n};\n\nexports.pick = (input, filter, options) => {\n\toptions = Object.assign({\n\t\tparseFragmentIdentifier: true,\n\t\t[encodeFragmentIdentifier]: false\n\t}, options);\n\n\tconst {url, query, fragmentIdentifier} = exports.parseUrl(input, options);\n\treturn exports.stringifyUrl({\n\t\turl,\n\t\tquery: filterObject(query, filter),\n\t\tfragmentIdentifier\n\t}, options);\n};\n\nexports.exclude = (input, filter, options) => {\n\tconst exclusionFilter = Array.isArray(filter) ? key => !filter.includes(key) : (key, value) => !filter(key, value);\n\n\treturn exports.pick(input, exclusionFilter, options);\n};\n","'use strict';\nmodule.exports = str => encodeURIComponent(str).replace(/[!'()*]/g, x => `%${x.charCodeAt(0).toString(16).toUpperCase()}`);\n","'use strict';\nvar token = '%[a-f0-9]{2}';\nvar singleMatcher = new RegExp('(' + token + ')|([^%]+?)', 'gi');\nvar multiMatcher = new RegExp('(' + token + ')+', 'gi');\n\nfunction decodeComponents(components, split) {\n\ttry {\n\t\t// Try to decode the entire string first\n\t\treturn [decodeURIComponent(components.join(''))];\n\t} catch (err) {\n\t\t// Do nothing\n\t}\n\n\tif (components.length === 1) {\n\t\treturn components;\n\t}\n\n\tsplit = split || 1;\n\n\t// Split the array in 2 parts\n\tvar left = components.slice(0, split);\n\tvar right = components.slice(split);\n\n\treturn Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));\n}\n\nfunction decode(input) {\n\ttry {\n\t\treturn decodeURIComponent(input);\n\t} catch (err) {\n\t\tvar tokens = input.match(singleMatcher) || [];\n\n\t\tfor (var i = 1; i < tokens.length; i++) {\n\t\t\tinput = decodeComponents(tokens, i).join('');\n\n\t\t\ttokens = input.match(singleMatcher) || [];\n\t\t}\n\n\t\treturn input;\n\t}\n}\n\nfunction customDecodeURIComponent(input) {\n\t// Keep track of all the replacements and prefill the map with the `BOM`\n\tvar replaceMap = {\n\t\t'%FE%FF': '\\uFFFD\\uFFFD',\n\t\t'%FF%FE': '\\uFFFD\\uFFFD'\n\t};\n\n\tvar match = multiMatcher.exec(input);\n\twhile (match) {\n\t\ttry {\n\t\t\t// Decode as big chunks as possible\n\t\t\treplaceMap[match[0]] = decodeURIComponent(match[0]);\n\t\t} catch (err) {\n\t\t\tvar result = decode(match[0]);\n\n\t\t\tif (result !== match[0]) {\n\t\t\t\treplaceMap[match[0]] = result;\n\t\t\t}\n\t\t}\n\n\t\tmatch = multiMatcher.exec(input);\n\t}\n\n\t// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else\n\treplaceMap['%C2'] = '\\uFFFD';\n\n\tvar entries = Object.keys(replaceMap);\n\n\tfor (var i = 0; i < entries.length; i++) {\n\t\t// Replace all decoded components\n\t\tvar key = entries[i];\n\t\tinput = input.replace(new RegExp(key, 'g'), replaceMap[key]);\n\t}\n\n\treturn input;\n}\n\nmodule.exports = function (encodedURI) {\n\tif (typeof encodedURI !== 'string') {\n\t\tthrow new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');\n\t}\n\n\ttry {\n\t\tencodedURI = encodedURI.replace(/\\+/g, ' ');\n\n\t\t// Try the built in decoder first\n\t\treturn decodeURIComponent(encodedURI);\n\t} catch (err) {\n\t\t// Fallback to a more advanced decoder\n\t\treturn customDecodeURIComponent(encodedURI);\n\t}\n};\n","'use strict';\n\nmodule.exports = (string, separator) => {\n\tif (!(typeof string === 'string' && typeof separator === 'string')) {\n\t\tthrow new TypeError('Expected the arguments to be of type `string`');\n\t}\n\n\tif (separator === '') {\n\t\treturn [string];\n\t}\n\n\tconst separatorIndex = string.indexOf(separator);\n\n\tif (separatorIndex === -1) {\n\t\treturn [string];\n\t}\n\n\treturn [\n\t\tstring.slice(0, separatorIndex),\n\t\tstring.slice(separatorIndex + separator.length)\n\t];\n};\n","'use strict';\nmodule.exports = function (obj, predicate) {\n\tvar ret = {};\n\tvar keys = Object.keys(obj);\n\tvar isArr = Array.isArray(predicate);\n\n\tfor (var i = 0; i < keys.length; i++) {\n\t\tvar key = keys[i];\n\t\tvar val = obj[key];\n\n\t\tif (isArr ? predicate.indexOf(key) !== -1 : predicate(key, val, obj)) {\n\t\t\tret[key] = val;\n\t\t}\n\t}\n\n\treturn ret;\n};\n","// Object.fromEntries is not available in older iOS versions\nexport default function fromEntries(entries) {\n return entries.reduce((acc, _ref) => {\n let [k, v] = _ref;\n if (acc.hasOwnProperty(k)) {\n throw new Error(`A value for key '${k}' already exists in the object.`);\n }\n acc[k] = v;\n return acc;\n }, {});\n}\n//# sourceMappingURL=fromEntries.js.map","const formatToList = items => items.map(key => `- ${key}`).join('\\n');\nexport default function validatePathConfig(config) {\n let root = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n const validKeys = ['initialRouteName', 'screens'];\n if (!root) {\n validKeys.push('path', 'exact', 'stringify', 'parse');\n }\n const invalidKeys = Object.keys(config).filter(key => !validKeys.includes(key));\n if (invalidKeys.length) {\n throw new Error(`Found invalid properties in the configuration:\\n${formatToList(invalidKeys)}\\n\\nDid you forget to specify them under a 'screens' property?\\n\\nYou can only specify the following properties:\\n${formatToList(validKeys)}\\n\\nSee https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration.`);\n }\n if (config.screens) {\n Object.entries(config.screens).forEach(_ref => {\n let [_, value] = _ref;\n if (typeof value !== 'string') {\n validatePathConfig(value, false);\n }\n });\n }\n}\n//# sourceMappingURL=validatePathConfig.js.map","import escape from 'escape-string-regexp';\nimport * as queryString from 'query-string';\nimport findFocusedRoute from './findFocusedRoute';\nimport validatePathConfig from './validatePathConfig';\n/**\n * Utility to parse a path string to initial state object accepted by the container.\n * This is useful for deep linking when we need to handle the incoming URL.\n *\n * @example\n * ```js\n * getStateFromPath(\n * '/chat/jane/42',\n * {\n * screens: {\n * Chat: {\n * path: 'chat/:author/:id',\n * parse: { id: Number }\n * }\n * }\n * }\n * )\n * ```\n * @param path Path string to parse and convert, e.g. /foo/bar?count=42.\n * @param options Extra options to fine-tune how to parse the path.\n */\nexport default function getStateFromPath(path, options) {\n if (options) {\n validatePathConfig(options);\n }\n let initialRoutes = [];\n if (options !== null && options !== void 0 && options.initialRouteName) {\n initialRoutes.push({\n initialRouteName: options.initialRouteName,\n parentScreens: []\n });\n }\n const screens = options === null || options === void 0 ? void 0 : options.screens;\n let remaining = path.replace(/\\/+/g, '/') // Replace multiple slash (//) with single ones\n .replace(/^\\//, '') // Remove extra leading slash\n .replace(/\\?.*$/, ''); // Remove query params which we will handle later\n\n // Make sure there is a trailing slash\n remaining = remaining.endsWith('/') ? remaining : `${remaining}/`;\n if (screens === undefined) {\n // When no config is specified, use the path segments as route names\n const routes = remaining.split('/').filter(Boolean).map(segment => {\n const name = decodeURIComponent(segment);\n return {\n name\n };\n });\n if (routes.length) {\n return createNestedStateObject(path, routes, initialRoutes);\n }\n return undefined;\n }\n\n // Create a normalized configs array which will be easier to use\n const configs = [].concat(...Object.keys(screens).map(key => createNormalizedConfigs(key, screens, [], initialRoutes, []))).sort((a, b) => {\n // Sort config so that:\n // - the most exhaustive ones are always at the beginning\n // - patterns with wildcard are always at the end\n\n // If 2 patterns are same, move the one with less route names up\n // This is an error state, so it's only useful for consistent error messages\n if (a.pattern === b.pattern) {\n return b.routeNames.join('>').localeCompare(a.routeNames.join('>'));\n }\n\n // If one of the patterns starts with the other, it's more exhaustive\n // So move it up\n if (a.pattern.startsWith(b.pattern)) {\n return -1;\n }\n if (b.pattern.startsWith(a.pattern)) {\n return 1;\n }\n const aParts = a.pattern.split('/');\n const bParts = b.pattern.split('/');\n for (let i = 0; i < Math.max(aParts.length, bParts.length); i++) {\n // if b is longer, b get higher priority\n if (aParts[i] == null) {\n return 1;\n }\n // if a is longer, a get higher priority\n if (bParts[i] == null) {\n return -1;\n }\n const aWildCard = aParts[i] === '*' || aParts[i].startsWith(':');\n const bWildCard = bParts[i] === '*' || bParts[i].startsWith(':');\n // if both are wildcard we compare next component\n if (aWildCard && bWildCard) {\n continue;\n }\n // if only a is wild card, b get higher priority\n if (aWildCard) {\n return 1;\n }\n // if only b is wild card, a get higher priority\n if (bWildCard) {\n return -1;\n }\n }\n return bParts.length - aParts.length;\n });\n\n // Check for duplicate patterns in the config\n configs.reduce((acc, config) => {\n if (acc[config.pattern]) {\n const a = acc[config.pattern].routeNames;\n const b = config.routeNames;\n\n // It's not a problem if the path string omitted from a inner most screen\n // For example, it's ok if a path resolves to `A > B > C` or `A > B`\n const intersects = a.length > b.length ? b.every((it, i) => a[i] === it) : a.every((it, i) => b[i] === it);\n if (!intersects) {\n throw new Error(`Found conflicting screens with the same pattern. The pattern '${config.pattern}' resolves to both '${a.join(' > ')}' and '${b.join(' > ')}'. Patterns must be unique and cannot resolve to more than one screen.`);\n }\n }\n return Object.assign(acc, {\n [config.pattern]: config\n });\n }, {});\n if (remaining === '/') {\n // We need to add special handling of empty path so navigation to empty path also works\n // When handling empty path, we should only look at the root level config\n const match = configs.find(config => config.path === '' && config.routeNames.every(\n // Make sure that none of the parent configs have a non-empty path defined\n name => {\n var _configs$find;\n return !((_configs$find = configs.find(c => c.screen === name)) !== null && _configs$find !== void 0 && _configs$find.path);\n }));\n if (match) {\n return createNestedStateObject(path, match.routeNames.map(name => ({\n name\n })), initialRoutes, configs);\n }\n return undefined;\n }\n let result;\n let current;\n\n // We match the whole path against the regex instead of segments\n // This makes sure matches such as wildcard will catch any unmatched routes, even if nested\n const {\n routes,\n remainingPath\n } = matchAgainstConfigs(remaining, configs.map(c => ({\n ...c,\n // Add `$` to the regex to make sure it matches till end of the path and not just beginning\n regex: c.regex ? new RegExp(c.regex.source + '$') : undefined\n })));\n if (routes !== undefined) {\n // This will always be empty if full path matched\n current = createNestedStateObject(path, routes, initialRoutes, configs);\n remaining = remainingPath;\n result = current;\n }\n if (current == null || result == null) {\n return undefined;\n }\n return result;\n}\nconst joinPaths = function () {\n for (var _len = arguments.length, paths = new Array(_len), _key = 0; _key < _len; _key++) {\n paths[_key] = arguments[_key];\n }\n return [].concat(...paths.map(p => p.split('/'))).filter(Boolean).join('/');\n};\nconst matchAgainstConfigs = (remaining, configs) => {\n let routes;\n let remainingPath = remaining;\n\n // Go through all configs, and see if the next path segment matches our regex\n for (const config of configs) {\n if (!config.regex) {\n continue;\n }\n const match = remainingPath.match(config.regex);\n\n // If our regex matches, we need to extract params from the path\n if (match) {\n var _config$pattern;\n const matchResult = (_config$pattern = config.pattern) === null || _config$pattern === void 0 ? void 0 : _config$pattern.split('/').reduce((acc, p, index) => {\n if (!p.startsWith(':')) {\n return acc;\n }\n\n // Path parameter so increment position for the segment\n acc.pos += 1;\n const decodedParamSegment = decodeURIComponent(\n // The param segments appear every second item starting from 2 in the regex match result\n match[(acc.pos + 1) * 2]\n // Remove trailing slash\n .replace(/\\/$/, ''));\n Object.assign(acc.matchedParams, {\n [p]: Object.assign(acc.matchedParams[p] || {}, {\n [index]: decodedParamSegment\n })\n });\n return acc;\n }, {\n pos: -1,\n matchedParams: {}\n });\n const matchedParams = matchResult.matchedParams || {};\n routes = config.routeNames.map(name => {\n var _routeConfig$pattern$;\n const routeConfig = configs.find(c => {\n // Check matching name AND pattern in case same screen is used at different levels in config\n return c.screen === name && config.pattern.startsWith(c.pattern);\n });\n\n // Normalize pattern to remove any leading, trailing slashes, duplicate slashes etc.\n const normalizedPath = routeConfig === null || routeConfig === void 0 ? void 0 : routeConfig.path.split('/').filter(Boolean).join('/');\n\n // Get the number of segments in the initial pattern\n const numInitialSegments = routeConfig === null || routeConfig === void 0 ? void 0 : (_routeConfig$pattern$ = routeConfig.pattern\n // Extract the prefix from the pattern by removing the ending path pattern (e.g pattern=`a/b/c/d` and normalizedPath=`c/d` becomes `a/b`)\n .replace(new RegExp(`${escape(normalizedPath)}$`), '')) === null || _routeConfig$pattern$ === void 0 ? void 0 : _routeConfig$pattern$.split('/').length;\n const params = normalizedPath === null || normalizedPath === void 0 ? void 0 : normalizedPath.split('/').reduce((acc, p, index) => {\n var _matchedParams$p;\n if (!p.startsWith(':')) {\n return acc;\n }\n\n // Get the real index of the path parameter in the matched path\n // by offsetting by the number of segments in the initial pattern\n const offset = numInitialSegments ? numInitialSegments - 1 : 0;\n const value = (_matchedParams$p = matchedParams[p]) === null || _matchedParams$p === void 0 ? void 0 : _matchedParams$p[index + offset];\n if (value) {\n var _routeConfig$parse;\n const key = p.replace(/^:/, '').replace(/\\?$/, '');\n acc[key] = routeConfig !== null && routeConfig !== void 0 && (_routeConfig$parse = routeConfig.parse) !== null && _routeConfig$parse !== void 0 && _routeConfig$parse[key] ? routeConfig.parse[key](value) : value;\n }\n return acc;\n }, {});\n if (params && Object.keys(params).length) {\n return {\n name,\n params\n };\n }\n return {\n name\n };\n });\n remainingPath = remainingPath.replace(match[1], '');\n break;\n }\n }\n return {\n routes,\n remainingPath\n };\n};\nconst createNormalizedConfigs = function (screen, routeConfig) {\n let routeNames = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n let initials = arguments.length > 3 ? arguments[3] : undefined;\n let parentScreens = arguments.length > 4 ? arguments[4] : undefined;\n let parentPattern = arguments.length > 5 ? arguments[5] : undefined;\n const configs = [];\n routeNames.push(screen);\n parentScreens.push(screen);\n\n // @ts-expect-error: we can't strongly typecheck this for now\n const config = routeConfig[screen];\n if (typeof config === 'string') {\n // If a string is specified as the value of the key(e.g. Foo: '/path'), use it as the pattern\n const pattern = parentPattern ? joinPaths(parentPattern, config) : config;\n configs.push(createConfigItem(screen, routeNames, pattern, config));\n } else if (typeof config === 'object') {\n let pattern;\n\n // if an object is specified as the value (e.g. Foo: { ... }),\n // it can have `path` property and\n // it could have `screens` prop which has nested configs\n if (typeof config.path === 'string') {\n if (config.exact && config.path === undefined) {\n throw new Error(\"A 'path' needs to be specified when specifying 'exact: true'. If you don't want this screen in the URL, specify it as empty string, e.g. `path: ''`.\");\n }\n pattern = config.exact !== true ? joinPaths(parentPattern || '', config.path || '') : config.path || '';\n configs.push(createConfigItem(screen, routeNames, pattern, config.path, config.parse));\n }\n if (config.screens) {\n // property `initialRouteName` without `screens` has no purpose\n if (config.initialRouteName) {\n initials.push({\n initialRouteName: config.initialRouteName,\n parentScreens\n });\n }\n Object.keys(config.screens).forEach(nestedConfig => {\n const result = createNormalizedConfigs(nestedConfig, config.screens, routeNames, initials, [...parentScreens], pattern ?? parentPattern);\n configs.push(...result);\n });\n }\n }\n routeNames.pop();\n return configs;\n};\nconst createConfigItem = (screen, routeNames, pattern, path, parse) => {\n // Normalize pattern to remove any leading, trailing slashes, duplicate slashes etc.\n pattern = pattern.split('/').filter(Boolean).join('/');\n const regex = pattern ? new RegExp(`^(${pattern.split('/').map(it => {\n if (it.startsWith(':')) {\n return `(([^/]+\\\\/)${it.endsWith('?') ? '?' : ''})`;\n }\n return `${it === '*' ? '.*' : escape(it)}\\\\/`;\n }).join('')})`) : undefined;\n return {\n screen,\n regex,\n pattern,\n path,\n // The routeNames array is mutated, so copy it to keep the current state\n routeNames: [...routeNames],\n parse\n };\n};\nconst findParseConfigForRoute = (routeName, flatConfig) => {\n for (const config of flatConfig) {\n if (routeName === config.routeNames[config.routeNames.length - 1]) {\n return config.parse;\n }\n }\n return undefined;\n};\n\n// Try to find an initial route connected with the one passed\nconst findInitialRoute = (routeName, parentScreens, initialRoutes) => {\n for (const config of initialRoutes) {\n if (parentScreens.length === config.parentScreens.length) {\n let sameParents = true;\n for (let i = 0; i < parentScreens.length; i++) {\n if (parentScreens[i].localeCompare(config.parentScreens[i]) !== 0) {\n sameParents = false;\n break;\n }\n }\n if (sameParents) {\n return routeName !== config.initialRouteName ? config.initialRouteName : undefined;\n }\n }\n }\n return undefined;\n};\n\n// returns state object with values depending on whether\n// it is the end of state and if there is initialRoute for this level\nconst createStateObject = (initialRoute, route, isEmpty) => {\n if (isEmpty) {\n if (initialRoute) {\n return {\n index: 1,\n routes: [{\n name: initialRoute\n }, route]\n };\n } else {\n return {\n routes: [route]\n };\n }\n } else {\n if (initialRoute) {\n return {\n index: 1,\n routes: [{\n name: initialRoute\n }, {\n ...route,\n state: {\n routes: []\n }\n }]\n };\n } else {\n return {\n routes: [{\n ...route,\n state: {\n routes: []\n }\n }]\n };\n }\n }\n};\nconst createNestedStateObject = (path, routes, initialRoutes, flatConfig) => {\n let state;\n let route = routes.shift();\n const parentScreens = [];\n let initialRoute = findInitialRoute(route.name, parentScreens, initialRoutes);\n parentScreens.push(route.name);\n state = createStateObject(initialRoute, route, routes.length === 0);\n if (routes.length > 0) {\n let nestedState = state;\n while (route = routes.shift()) {\n initialRoute = findInitialRoute(route.name, parentScreens, initialRoutes);\n const nestedStateIndex = nestedState.index || nestedState.routes.length - 1;\n nestedState.routes[nestedStateIndex].state = createStateObject(initialRoute, route, routes.length === 0);\n if (routes.length > 0) {\n nestedState = nestedState.routes[nestedStateIndex].state;\n }\n parentScreens.push(route.name);\n }\n }\n route = findFocusedRoute(state);\n route.path = path;\n const params = parseQueryParams(path, flatConfig ? findParseConfigForRoute(route.name, flatConfig) : undefined);\n if (params) {\n route.params = {\n ...route.params,\n ...params\n };\n }\n return state;\n};\nconst parseQueryParams = (path, parseConfig) => {\n const query = path.split('?')[1];\n const params = queryString.parse(query);\n if (parseConfig) {\n Object.keys(params).forEach(name => {\n if (Object.hasOwnProperty.call(parseConfig, name) && typeof params[name] === 'string') {\n params[name] = parseConfig[name](params[name]);\n }\n });\n }\n return Object.keys(params).length ? params : undefined;\n};\n//# sourceMappingURL=getStateFromPath.js.map","'use strict';\n\nmodule.exports = string => {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\t// Escape characters with special meaning either inside or outside character sets.\n\t// Use a simple backslash escape when it’s always valid, and a \\unnnn escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n\treturn string\n\t\t.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\t\t.replace(/-/g, '\\\\x2d');\n};\n","import * as React from 'react';\n/**\n * Context which holds the navigation helpers of the parent navigator.\n * Navigators should use this context in their view component.\n */\nconst NavigationHelpersContext = /*#__PURE__*/React.createContext(undefined);\nexport default NavigationHelpersContext;\n//# sourceMappingURL=NavigationHelpersContext.js.map","import * as React from 'react';\n\n/**\n * A type of an object that have a route key as an object key\n * and a value whether to prevent that route.\n */\n\nconst PreventRemoveContext = /*#__PURE__*/React.createContext(undefined);\nexport default PreventRemoveContext;\n//# sourceMappingURL=PreventRemoveContext.js.map","import { nanoid } from 'nanoid/non-secure';\nimport * as React from 'react';\nimport useLatestCallback from 'use-latest-callback';\nimport NavigationHelpersContext from './NavigationHelpersContext';\nimport NavigationRouteContext from './NavigationRouteContext';\nimport PreventRemoveContext from './PreventRemoveContext';\n/**\n * Util function to transform map of prevented routes to a simpler object.\n */\nconst transformPreventedRoutes = preventedRoutesMap => {\n const preventedRoutesToTransform = [...preventedRoutesMap.values()];\n const preventedRoutes = preventedRoutesToTransform.reduce((acc, _ref) => {\n var _acc$routeKey;\n let {\n routeKey,\n preventRemove\n } = _ref;\n acc[routeKey] = {\n preventRemove: ((_acc$routeKey = acc[routeKey]) === null || _acc$routeKey === void 0 ? void 0 : _acc$routeKey.preventRemove) || preventRemove\n };\n return acc;\n }, {});\n return preventedRoutes;\n};\n\n/**\n * Component used for managing which routes have to be prevented from removal in native-stack.\n */\nexport default function PreventRemoveProvider(_ref2) {\n let {\n children\n } = _ref2;\n const [parentId] = React.useState(() => nanoid());\n const [preventedRoutesMap, setPreventedRoutesMap] = React.useState(new Map());\n const navigation = React.useContext(NavigationHelpersContext);\n const route = React.useContext(NavigationRouteContext);\n const preventRemoveContextValue = React.useContext(PreventRemoveContext);\n // take `setPreventRemove` from parent context - if exist it means we're in a nested context\n const setParentPrevented = preventRemoveContextValue === null || preventRemoveContextValue === void 0 ? void 0 : preventRemoveContextValue.setPreventRemove;\n const setPreventRemove = useLatestCallback((id, routeKey, preventRemove) => {\n if (preventRemove && (navigation == null || navigation !== null && navigation !== void 0 && navigation.getState().routes.every(route => route.key !== routeKey))) {\n throw new Error(`Couldn't find a route with the key ${routeKey}. Is your component inside NavigationContent?`);\n }\n setPreventedRoutesMap(prevPrevented => {\n var _prevPrevented$get, _prevPrevented$get2;\n // values haven't changed - do nothing\n if (routeKey === ((_prevPrevented$get = prevPrevented.get(id)) === null || _prevPrevented$get === void 0 ? void 0 : _prevPrevented$get.routeKey) && preventRemove === ((_prevPrevented$get2 = prevPrevented.get(id)) === null || _prevPrevented$get2 === void 0 ? void 0 : _prevPrevented$get2.preventRemove)) {\n return prevPrevented;\n }\n const nextPrevented = new Map(prevPrevented);\n if (preventRemove) {\n nextPrevented.set(id, {\n routeKey,\n preventRemove\n });\n } else {\n nextPrevented.delete(id);\n }\n return nextPrevented;\n });\n });\n const isPrevented = [...preventedRoutesMap.values()].some(_ref3 => {\n let {\n preventRemove\n } = _ref3;\n return preventRemove;\n });\n React.useEffect(() => {\n if ((route === null || route === void 0 ? void 0 : route.key) !== undefined && setParentPrevented !== undefined) {\n // when route is defined (and setParentPrevented) it means we're in a nested stack\n // route.key then will be the route key of parent\n setParentPrevented(parentId, route.key, isPrevented);\n return () => {\n setParentPrevented(parentId, route.key, false);\n };\n }\n return;\n }, [parentId, isPrevented, route === null || route === void 0 ? void 0 : route.key, setParentPrevented]);\n const value = React.useMemo(() => ({\n setPreventRemove,\n preventedRoutes: transformPreventedRoutes(preventedRoutesMap)\n }), [setPreventRemove, preventedRoutesMap]);\n return /*#__PURE__*/React.createElement(PreventRemoveContext.Provider, {\n value: value\n }, children);\n}\n//# sourceMappingURL=PreventRemoveProvider.js.map","\"use strict\";\nvar React = require(\"react\");\nvar useIsomorphicLayoutEffect_1 = require(\"./useIsomorphicLayoutEffect\");\n/**\n * React hook which returns the latest callback without changing the reference.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction useLatestCallback(callback) {\n var ref = React.useRef(callback);\n var latestCallback = React.useRef(function latestCallback() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return ref.current.apply(this, args);\n }).current;\n (0, useIsomorphicLayoutEffect_1.default)(function () {\n ref.current = callback;\n });\n return latestCallback;\n}\nmodule.exports = useLatestCallback;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar react_1 = require(\"react\");\n/**\n * Use `useEffect` during SSR and `useLayoutEffect` in the browser to avoid warnings.\n */\nvar useIsomorphicLayoutEffect = typeof document !== 'undefined' ? react_1.useLayoutEffect : react_1.useEffect;\nexports.default = useIsomorphicLayoutEffect;\n","export class PrivateValueStore {}\n//# sourceMappingURL=types.js.map","import * as React from 'react';\nimport useNavigation from './useNavigation';\n/**\n * Hook to run an effect in a focused screen, similar to `React.useEffect`.\n * This can be used to perform side-effects such as fetching data or subscribing to events.\n * The passed callback should be wrapped in `React.useCallback` to avoid running the effect too often.\n *\n * @param callback Memoized callback containing the effect, should optionally return a cleanup function.\n */\nexport default function useFocusEffect(effect) {\n const navigation = useNavigation();\n if (arguments[1] !== undefined) {\n const message = \"You passed a second argument to 'useFocusEffect', but it only accepts one argument. \" + \"If you want to pass a dependency array, you can use 'React.useCallback':\\n\\n\" + 'useFocusEffect(\\n' + ' React.useCallback(() => {\\n' + ' // Your code here\\n' + ' }, [depA, depB])\\n' + ');\\n\\n' + 'See usage guide: https://reactnavigation.org/docs/use-focus-effect';\n console.error(message);\n }\n React.useEffect(() => {\n let isFocused = false;\n let cleanup;\n const callback = () => {\n const destroy = effect();\n if (destroy === undefined || typeof destroy === 'function') {\n return destroy;\n }\n if (process.env.NODE_ENV !== 'production') {\n let message = 'An effect function must not return anything besides a function, which is used for clean-up.';\n if (destroy === null) {\n message += \" You returned 'null'. If your effect does not require clean-up, return 'undefined' (or nothing).\";\n } else if (typeof destroy.then === 'function') {\n message += \"\\n\\nIt looks like you wrote 'useFocusEffect(async () => ...)' or returned a Promise. \" + 'Instead, write the async function inside your effect ' + 'and call it immediately:\\n\\n' + 'useFocusEffect(\\n' + ' React.useCallback(() => {\\n' + ' async function fetchData() {\\n' + ' // You can await here\\n' + ' const response = await MyAPI.getData(someId);\\n' + ' // ...\\n' + ' }\\n\\n' + ' fetchData();\\n' + ' }, [someId])\\n' + ');\\n\\n' + 'See usage guide: https://reactnavigation.org/docs/use-focus-effect';\n } else {\n message += ` You returned '${JSON.stringify(destroy)}'.`;\n }\n console.error(message);\n }\n };\n\n // We need to run the effect on intial render/dep changes if the screen is focused\n if (navigation.isFocused()) {\n cleanup = callback();\n isFocused = true;\n }\n const unsubscribeFocus = navigation.addListener('focus', () => {\n // If callback was already called for focus, avoid calling it again\n // The focus event may also fire on intial render, so we guard against runing the effect twice\n if (isFocused) {\n return;\n }\n if (cleanup !== undefined) {\n cleanup();\n }\n cleanup = callback();\n isFocused = true;\n });\n const unsubscribeBlur = navigation.addListener('blur', () => {\n if (cleanup !== undefined) {\n cleanup();\n }\n cleanup = undefined;\n isFocused = false;\n });\n return () => {\n if (cleanup !== undefined) {\n cleanup();\n }\n unsubscribeFocus();\n unsubscribeBlur();\n };\n }, [effect, navigation]);\n}\n//# sourceMappingURL=useFocusEffect.js.map","import * as React from 'react';\nimport NavigationContainerRefContext from './NavigationContainerRefContext';\nimport NavigationContext from './NavigationContext';\n/**\n * Hook to access the navigation prop of the parent screen anywhere.\n *\n * @returns Navigation prop of the parent screen.\n */\nexport default function useNavigation() {\n const root = React.useContext(NavigationContainerRefContext);\n const navigation = React.useContext(NavigationContext);\n if (navigation === undefined && root === undefined) {\n throw new Error(\"Couldn't find a navigation object. Is your component inside NavigationContainer?\");\n }\n\n // FIXME: Figure out a better way to do this\n return navigation ?? root;\n}\n//# sourceMappingURL=useNavigation.js.map","import * as React from 'react';\nimport { useState } from 'react';\nimport useNavigation from './useNavigation';\n\n/**\n * Hook to get the current focus state of the screen. Returns a `true` if screen is focused, otherwise `false`.\n * This can be used if a component needs to render something based on the focus state.\n */\nexport default function useIsFocused() {\n const navigation = useNavigation();\n const [isFocused, setIsFocused] = useState(navigation.isFocused);\n const valueToReturn = navigation.isFocused();\n if (isFocused !== valueToReturn) {\n // If the value has changed since the last render, we need to update it.\n // This could happen if we missed an update from the event listeners during re-render.\n // React will process this update immediately, so the old subscription value won't be committed.\n // It is still nice to avoid returning a mismatched value though, so let's override the return value.\n // This is the same logic as in https://github.com/facebook/react/tree/master/packages/use-subscription\n setIsFocused(valueToReturn);\n }\n React.useEffect(() => {\n const unsubscribeFocus = navigation.addListener('focus', () => setIsFocused(true));\n const unsubscribeBlur = navigation.addListener('blur', () => setIsFocused(false));\n return () => {\n unsubscribeFocus();\n unsubscribeBlur();\n };\n }, [navigation]);\n React.useDebugValue(valueToReturn);\n return valueToReturn;\n}\n//# sourceMappingURL=useIsFocused.js.map","import { CommonActions } from '@react-navigation/routers';\nimport * as React from 'react';\nimport { isValidElementType } from 'react-is';\nimport Group from './Group';\nimport isArrayEqual from './isArrayEqual';\nimport isRecordEqual from './isRecordEqual';\nimport NavigationHelpersContext from './NavigationHelpersContext';\nimport NavigationRouteContext from './NavigationRouteContext';\nimport NavigationStateContext from './NavigationStateContext';\nimport PreventRemoveProvider from './PreventRemoveProvider';\nimport Screen from './Screen';\nimport { PrivateValueStore } from './types';\nimport useChildListeners from './useChildListeners';\nimport useComponent from './useComponent';\nimport useCurrentRender from './useCurrentRender';\nimport useDescriptors from './useDescriptors';\nimport useEventEmitter from './useEventEmitter';\nimport useFocusedListenersChildrenAdapter from './useFocusedListenersChildrenAdapter';\nimport useFocusEvents from './useFocusEvents';\nimport useKeyedChildListeners from './useKeyedChildListeners';\nimport useNavigationHelpers from './useNavigationHelpers';\nimport useOnAction from './useOnAction';\nimport useOnGetState from './useOnGetState';\nimport useOnRouteFocus from './useOnRouteFocus';\nimport useRegisterNavigator from './useRegisterNavigator';\nimport useScheduleUpdate from './useScheduleUpdate';\n\n// This is to make TypeScript compiler happy\n// eslint-disable-next-line babel/no-unused-expressions\nPrivateValueStore;\nconst isValidKey = key => key === undefined || typeof key === 'string' && key !== '';\n\n/**\n * Extract route config object from React children elements.\n *\n * @param children React Elements to extract the config from.\n */\nconst getRouteConfigsFromChildren = (children, groupKey, groupOptions) => {\n const configs = React.Children.toArray(children).reduce((acc, child) => {\n var _child$type, _child$props;\n if ( /*#__PURE__*/React.isValidElement(child)) {\n if (child.type === Screen) {\n // We can only extract the config from `Screen` elements\n // If something else was rendered, it's probably a bug\n\n if (!isValidKey(child.props.navigationKey)) {\n throw new Error(`Got an invalid 'navigationKey' prop (${JSON.stringify(child.props.navigationKey)}) for the screen '${child.props.name}'. It must be a non-empty string or 'undefined'.`);\n }\n acc.push({\n keys: [groupKey, child.props.navigationKey],\n options: groupOptions,\n props: child.props\n });\n return acc;\n }\n if (child.type === React.Fragment || child.type === Group) {\n if (!isValidKey(child.props.navigationKey)) {\n throw new Error(`Got an invalid 'navigationKey' prop (${JSON.stringify(child.props.navigationKey)}) for the group. It must be a non-empty string or 'undefined'.`);\n }\n\n // When we encounter a fragment or group, we need to dive into its children to extract the configs\n // This is handy to conditionally define a group of screens\n acc.push(...getRouteConfigsFromChildren(child.props.children, child.props.navigationKey, child.type !== Group ? groupOptions : groupOptions != null ? [...groupOptions, child.props.screenOptions] : [child.props.screenOptions]));\n return acc;\n }\n }\n throw new Error(`A navigator can only contain 'Screen', 'Group' or 'React.Fragment' as its direct children (found ${/*#__PURE__*/React.isValidElement(child) ? `'${typeof child.type === 'string' ? child.type : (_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.name}'${child.props != null && typeof child.props === 'object' && 'name' in child.props && (_child$props = child.props) !== null && _child$props !== void 0 && _child$props.name ? ` for the screen '${child.props.name}'` : ''}` : typeof child === 'object' ? JSON.stringify(child) : `'${String(child)}'`}). To render this component in the navigator, pass it in the 'component' prop to 'Screen'.`);\n }, []);\n if (process.env.NODE_ENV !== 'production') {\n configs.forEach(config => {\n const {\n name,\n children,\n component,\n getComponent\n } = config.props;\n if (typeof name !== 'string' || !name) {\n throw new Error(`Got an invalid name (${JSON.stringify(name)}) for the screen. It must be a non-empty string.`);\n }\n if (children != null || component !== undefined || getComponent !== undefined) {\n if (children != null && component !== undefined) {\n throw new Error(`Got both 'component' and 'children' props for the screen '${name}'. You must pass only one of them.`);\n }\n if (children != null && getComponent !== undefined) {\n throw new Error(`Got both 'getComponent' and 'children' props for the screen '${name}'. You must pass only one of them.`);\n }\n if (component !== undefined && getComponent !== undefined) {\n throw new Error(`Got both 'component' and 'getComponent' props for the screen '${name}'. You must pass only one of them.`);\n }\n if (children != null && typeof children !== 'function') {\n throw new Error(`Got an invalid value for 'children' prop for the screen '${name}'. It must be a function returning a React Element.`);\n }\n if (component !== undefined && !isValidElementType(component)) {\n throw new Error(`Got an invalid value for 'component' prop for the screen '${name}'. It must be a valid React Component.`);\n }\n if (getComponent !== undefined && typeof getComponent !== 'function') {\n throw new Error(`Got an invalid value for 'getComponent' prop for the screen '${name}'. It must be a function returning a React Component.`);\n }\n if (typeof component === 'function') {\n if (component.name === 'component') {\n // Inline anonymous functions passed in the `component` prop will have the name of the prop\n // It's relatively safe to assume that it's not a component since it should also have PascalCase name\n // We won't catch all scenarios here, but this should catch a good chunk of incorrect use.\n console.warn(`Looks like you're passing an inline function for 'component' prop for the screen '${name}' (e.g. component={() => }). Passing an inline function will cause the component state to be lost on re-render and cause perf issues since it's re-created every render. You can pass the function as children to 'Screen' instead to achieve the desired behaviour.`);\n } else if (/^[a-z]/.test(component.name)) {\n console.warn(`Got a component with the name '${component.name}' for the screen '${name}'. React Components must start with an uppercase letter. If you're passing a regular function and not a component, pass it as children to 'Screen' instead. Otherwise capitalize your component's name.`);\n }\n }\n } else {\n throw new Error(`Couldn't find a 'component', 'getComponent' or 'children' prop for the screen '${name}'. This can happen if you passed 'undefined'. You likely forgot to export your component from the file it's defined in, or mixed up default import and named import when importing.`);\n }\n });\n }\n return configs;\n};\n\n/**\n * Hook for building navigators.\n *\n * @param createRouter Factory method which returns router object.\n * @param options Options object containing `children` and additional options for the router.\n * @returns An object containing `state`, `navigation`, `descriptors` objects.\n */\nexport default function useNavigationBuilder(createRouter, options) {\n const navigatorKey = useRegisterNavigator();\n const route = React.useContext(NavigationRouteContext);\n const {\n children,\n screenListeners,\n ...rest\n } = options;\n const {\n current: router\n } = React.useRef(createRouter({\n ...rest,\n ...(route !== null && route !== void 0 && route.params && route.params.state == null && route.params.initial !== false && typeof route.params.screen === 'string' ? {\n initialRouteName: route.params.screen\n } : null)\n }));\n const routeConfigs = getRouteConfigsFromChildren(children);\n const screens = routeConfigs.reduce((acc, config) => {\n if (config.props.name in acc) {\n throw new Error(`A navigator cannot contain multiple 'Screen' components with the same name (found duplicate screen named '${config.props.name}')`);\n }\n acc[config.props.name] = config;\n return acc;\n }, {});\n const routeNames = routeConfigs.map(config => config.props.name);\n const routeKeyList = routeNames.reduce((acc, curr) => {\n acc[curr] = screens[curr].keys.map(key => key ?? '').join(':');\n return acc;\n }, {});\n const routeParamList = routeNames.reduce((acc, curr) => {\n const {\n initialParams\n } = screens[curr].props;\n acc[curr] = initialParams;\n return acc;\n }, {});\n const routeGetIdList = routeNames.reduce((acc, curr) => Object.assign(acc, {\n [curr]: screens[curr].props.getId\n }), {});\n if (!routeNames.length) {\n throw new Error(\"Couldn't find any screens for the navigator. Have you defined any screens as its children?\");\n }\n const isStateValid = React.useCallback(state => state.type === undefined || state.type === router.type, [router.type]);\n const isStateInitialized = React.useCallback(state => state !== undefined && state.stale === false && isStateValid(state), [isStateValid]);\n const {\n state: currentState,\n getState: getCurrentState,\n setState: setCurrentState,\n setKey,\n getKey,\n getIsInitial\n } = React.useContext(NavigationStateContext);\n const stateCleanedUp = React.useRef(false);\n const cleanUpState = React.useCallback(() => {\n setCurrentState(undefined);\n stateCleanedUp.current = true;\n }, [setCurrentState]);\n const setState = React.useCallback(state => {\n if (stateCleanedUp.current) {\n // State might have been already cleaned up due to unmount\n // We do not want to expose API allowing to override this\n // This would lead to old data preservation on main navigator unmount\n return;\n }\n setCurrentState(state);\n }, [setCurrentState]);\n const [initializedState, isFirstStateInitialization] = React.useMemo(() => {\n var _route$params4;\n const initialRouteParamList = routeNames.reduce((acc, curr) => {\n var _route$params, _route$params2, _route$params3;\n const {\n initialParams\n } = screens[curr].props;\n const initialParamsFromParams = (route === null || route === void 0 ? void 0 : (_route$params = route.params) === null || _route$params === void 0 ? void 0 : _route$params.state) == null && (route === null || route === void 0 ? void 0 : (_route$params2 = route.params) === null || _route$params2 === void 0 ? void 0 : _route$params2.initial) !== false && (route === null || route === void 0 ? void 0 : (_route$params3 = route.params) === null || _route$params3 === void 0 ? void 0 : _route$params3.screen) === curr ? route.params.params : undefined;\n acc[curr] = initialParams !== undefined || initialParamsFromParams !== undefined ? {\n ...initialParams,\n ...initialParamsFromParams\n } : undefined;\n return acc;\n }, {});\n\n // If the current state isn't initialized on first render, we initialize it\n // We also need to re-initialize it if the state passed from parent was changed (maybe due to reset)\n // Otherwise assume that the state was provided as initial state\n // So we need to rehydrate it to make it usable\n if ((currentState === undefined || !isStateValid(currentState)) && (route === null || route === void 0 ? void 0 : (_route$params4 = route.params) === null || _route$params4 === void 0 ? void 0 : _route$params4.state) == null) {\n return [router.getInitialState({\n routeNames,\n routeParamList: initialRouteParamList,\n routeGetIdList\n }), true];\n } else {\n var _route$params5;\n return [router.getRehydratedState((route === null || route === void 0 ? void 0 : (_route$params5 = route.params) === null || _route$params5 === void 0 ? void 0 : _route$params5.state) ?? currentState, {\n routeNames,\n routeParamList: initialRouteParamList,\n routeGetIdList\n }), false];\n }\n // We explicitly don't include routeNames, route.params etc. in the dep list\n // below. We want to avoid forcing a new state to be calculated in those cases\n // Instead, we handle changes to these in the nextState code below. Note\n // that some changes to routeConfigs are explicitly ignored, such as changes\n // to initialParams\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentState, router, isStateValid]);\n const previousRouteKeyListRef = React.useRef(routeKeyList);\n React.useEffect(() => {\n previousRouteKeyListRef.current = routeKeyList;\n });\n const previousRouteKeyList = previousRouteKeyListRef.current;\n let state =\n // If the state isn't initialized, or stale, use the state we initialized instead\n // The state won't update until there's a change needed in the state we have initalized locally\n // So it'll be `undefined` or stale until the first navigation event happens\n isStateInitialized(currentState) ? currentState : initializedState;\n let nextState = state;\n if (!isArrayEqual(state.routeNames, routeNames) || !isRecordEqual(routeKeyList, previousRouteKeyList)) {\n // When the list of route names change, the router should handle it to remove invalid routes\n nextState = router.getStateForRouteNamesChange(state, {\n routeNames,\n routeParamList,\n routeGetIdList,\n routeKeyChanges: Object.keys(routeKeyList).filter(name => previousRouteKeyList.hasOwnProperty(name) && routeKeyList[name] !== previousRouteKeyList[name])\n });\n }\n const previousNestedParamsRef = React.useRef(route === null || route === void 0 ? void 0 : route.params);\n React.useEffect(() => {\n previousNestedParamsRef.current = route === null || route === void 0 ? void 0 : route.params;\n }, [route === null || route === void 0 ? void 0 : route.params]);\n if (route !== null && route !== void 0 && route.params) {\n const previousParams = previousNestedParamsRef.current;\n let action;\n if (typeof route.params.state === 'object' && route.params.state != null && route.params !== previousParams) {\n // If the route was updated with new state, we should reset to it\n action = CommonActions.reset(route.params.state);\n } else if (typeof route.params.screen === 'string' && (route.params.initial === false && isFirstStateInitialization || route.params !== previousParams)) {\n // If the route was updated with new screen name and/or params, we should navigate there\n action = CommonActions.navigate({\n name: route.params.screen,\n params: route.params.params,\n path: route.params.path\n });\n }\n\n // The update should be limited to current navigator only, so we call the router manually\n const updatedState = action ? router.getStateForAction(nextState, action, {\n routeNames,\n routeParamList,\n routeGetIdList\n }) : null;\n nextState = updatedState !== null ? router.getRehydratedState(updatedState, {\n routeNames,\n routeParamList,\n routeGetIdList\n }) : nextState;\n }\n const shouldUpdate = state !== nextState;\n useScheduleUpdate(() => {\n if (shouldUpdate) {\n // If the state needs to be updated, we'll schedule an update\n setState(nextState);\n }\n });\n\n // The up-to-date state will come in next render, but we don't need to wait for it\n // We can't use the outdated state since the screens have changed, which will cause error due to mismatched config\n // So we override the state object we return to use the latest state as soon as possible\n state = nextState;\n React.useEffect(() => {\n setKey(navigatorKey);\n if (!getIsInitial()) {\n // If it's not initial render, we need to update the state\n // This will make sure that our container gets notifier of state changes due to new mounts\n // This is necessary for proper screen tracking, URL updates etc.\n setState(nextState);\n }\n return () => {\n // We need to clean up state for this navigator on unmount\n // We do it in a timeout because we need to detect if another navigator mounted in the meantime\n // For example, if another navigator has started rendering, we should skip cleanup\n // Otherwise, our cleanup step will cleanup state for the other navigator and re-initialize it\n setTimeout(() => {\n if (getCurrentState() !== undefined && getKey() === navigatorKey) {\n cleanUpState();\n }\n }, 0);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // We initialize this ref here to avoid a new getState getting initialized\n // whenever initializedState changes. We want getState to have access to the\n // latest initializedState, but don't need it to change when that happens\n const initializedStateRef = React.useRef();\n initializedStateRef.current = initializedState;\n const getState = React.useCallback(() => {\n const currentState = getCurrentState();\n return isStateInitialized(currentState) ? currentState : initializedStateRef.current;\n }, [getCurrentState, isStateInitialized]);\n const emitter = useEventEmitter(e => {\n let routeNames = [];\n let route;\n if (e.target) {\n var _route;\n route = state.routes.find(route => route.key === e.target);\n if ((_route = route) !== null && _route !== void 0 && _route.name) {\n routeNames.push(route.name);\n }\n } else {\n route = state.routes[state.index];\n routeNames.push(...Object.keys(screens).filter(name => {\n var _route2;\n return ((_route2 = route) === null || _route2 === void 0 ? void 0 : _route2.name) === name;\n }));\n }\n if (route == null) {\n return;\n }\n const navigation = descriptors[route.key].navigation;\n const listeners = [].concat(\n // Get an array of listeners for all screens + common listeners on navigator\n ...[screenListeners, ...routeNames.map(name => {\n const {\n listeners\n } = screens[name].props;\n return listeners;\n })].map(listeners => {\n const map = typeof listeners === 'function' ? listeners({\n route: route,\n navigation\n }) : listeners;\n return map ? Object.keys(map).filter(type => type === e.type).map(type => map === null || map === void 0 ? void 0 : map[type]) : undefined;\n }))\n // We don't want same listener to be called multiple times for same event\n // So we remove any duplicate functions from the array\n .filter((cb, i, self) => cb && self.lastIndexOf(cb) === i);\n listeners.forEach(listener => listener === null || listener === void 0 ? void 0 : listener(e));\n });\n useFocusEvents({\n state,\n emitter\n });\n React.useEffect(() => {\n emitter.emit({\n type: 'state',\n data: {\n state\n }\n });\n }, [emitter, state]);\n const {\n listeners: childListeners,\n addListener\n } = useChildListeners();\n const {\n keyedListeners,\n addKeyedListener\n } = useKeyedChildListeners();\n const onAction = useOnAction({\n router,\n getState,\n setState,\n key: route === null || route === void 0 ? void 0 : route.key,\n actionListeners: childListeners.action,\n beforeRemoveListeners: keyedListeners.beforeRemove,\n routerConfigOptions: {\n routeNames,\n routeParamList,\n routeGetIdList\n },\n emitter\n });\n const onRouteFocus = useOnRouteFocus({\n router,\n key: route === null || route === void 0 ? void 0 : route.key,\n getState,\n setState\n });\n const navigation = useNavigationHelpers({\n id: options.id,\n onAction,\n getState,\n emitter,\n router\n });\n useFocusedListenersChildrenAdapter({\n navigation,\n focusedListeners: childListeners.focus\n });\n useOnGetState({\n getState,\n getStateListeners: keyedListeners.getState\n });\n const descriptors = useDescriptors({\n state,\n screens,\n navigation,\n screenOptions: options.screenOptions,\n defaultScreenOptions: options.defaultScreenOptions,\n onAction,\n getState,\n setState,\n onRouteFocus,\n addListener,\n addKeyedListener,\n router,\n // @ts-expect-error: this should have both core and custom events, but too much work right now\n emitter\n });\n useCurrentRender({\n state,\n navigation,\n descriptors\n });\n const NavigationContent = useComponent(children => /*#__PURE__*/React.createElement(NavigationHelpersContext.Provider, {\n value: navigation\n }, /*#__PURE__*/React.createElement(PreventRemoveProvider, null, children)));\n return {\n state,\n navigation,\n descriptors,\n NavigationContent\n };\n}\n//# sourceMappingURL=useNavigationBuilder.js.map","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/** @license React v16.13.1\n * react-is.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'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","/**\n * Compare two arrays with primitive values as the content.\n * We need to make sure that both values and order match.\n */\nexport default function isArrayEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (a.length !== b.length) {\n return false;\n }\n return a.every((it, index) => it === b[index]);\n}\n//# sourceMappingURL=isArrayEqual.js.map","/**\n * Compare two records with primitive values as the content.\n */\nexport default function isRecordEqual(a, b) {\n if (a === b) {\n return true;\n }\n const aKeys = Object.keys(a);\n const bKeys = Object.keys(b);\n if (aKeys.length !== bKeys.length) {\n return false;\n }\n return aKeys.every(key => a[key] === b[key]);\n}\n//# sourceMappingURL=isRecordEqual.js.map","import * as React from 'react';\nconst NavigationContent = _ref => {\n let {\n render,\n children\n } = _ref;\n return render(children);\n};\nexport default function useComponent(render) {\n const renderRef = React.useRef(render);\n\n // Normally refs shouldn't be mutated in render\n // But we return a component which will be rendered\n // So it's just for immediate consumption\n renderRef.current = render;\n React.useEffect(() => {\n renderRef.current = null;\n });\n return React.useRef(_ref2 => {\n let {\n children\n } = _ref2;\n const render = renderRef.current;\n if (render === null) {\n throw new Error('The returned component must be rendered in the same render phase as the hook.');\n }\n return /*#__PURE__*/React.createElement(NavigationContent, {\n render: render\n }, children);\n }).current;\n}\n//# sourceMappingURL=useComponent.js.map","import * as React from 'react';\nimport CurrentRenderContext from './CurrentRenderContext';\n/**\n * Write the current options, so that server renderer can get current values\n * Mutating values like this is not safe in async mode, but it doesn't apply to SSR\n */\nexport default function useCurrentRender(_ref) {\n let {\n state,\n navigation,\n descriptors\n } = _ref;\n const current = React.useContext(CurrentRenderContext);\n if (current && navigation.isFocused()) {\n current.options = descriptors[state.routes[state.index].key].options;\n }\n}\n//# sourceMappingURL=useCurrentRender.js.map","import * as React from 'react';\nimport NavigationBuilderContext from './NavigationBuilderContext';\nimport NavigationContext from './NavigationContext';\nimport NavigationRouteContext from './NavigationRouteContext';\nimport SceneView from './SceneView';\nimport useNavigationCache from './useNavigationCache';\nimport useRouteCache from './useRouteCache';\n/**\n * Hook to create descriptor objects for the child routes.\n *\n * A descriptor object provides 3 things:\n * - Helper method to render a screen\n * - Options specified by the screen for the navigator\n * - Navigation object intended for the route\n */\nexport default function useDescriptors(_ref) {\n let {\n state,\n screens,\n navigation,\n screenOptions,\n defaultScreenOptions,\n onAction,\n getState,\n setState,\n addListener,\n addKeyedListener,\n onRouteFocus,\n router,\n emitter\n } = _ref;\n const [options, setOptions] = React.useState({});\n const {\n onDispatchAction,\n onOptionsChange,\n stackRef\n } = React.useContext(NavigationBuilderContext);\n const context = React.useMemo(() => ({\n navigation,\n onAction,\n addListener,\n addKeyedListener,\n onRouteFocus,\n onDispatchAction,\n onOptionsChange,\n stackRef\n }), [navigation, onAction, addListener, addKeyedListener, onRouteFocus, onDispatchAction, onOptionsChange, stackRef]);\n const navigations = useNavigationCache({\n state,\n getState,\n navigation,\n setOptions,\n router,\n emitter\n });\n const routes = useRouteCache(state.routes);\n return routes.reduce((acc, route, i) => {\n const config = screens[route.name];\n const screen = config.props;\n const navigation = navigations[route.key];\n const optionsList = [\n // The default `screenOptions` passed to the navigator\n screenOptions,\n // The `screenOptions` props passed to `Group` elements\n ...(config.options ? config.options.filter(Boolean) : []),\n // The `options` prop passed to `Screen` elements,\n screen.options,\n // The options set via `navigation.setOptions`\n options[route.key]];\n const customOptions = optionsList.reduce((acc, curr) => Object.assign(acc,\n // @ts-expect-error: we check for function but TS still complains\n typeof curr !== 'function' ? curr : curr({\n route,\n navigation\n })), {});\n const mergedOptions = {\n ...(typeof defaultScreenOptions === 'function' ?\n // @ts-expect-error: ts gives incorrect error here\n defaultScreenOptions({\n route,\n navigation,\n options: customOptions\n }) : defaultScreenOptions),\n ...customOptions\n };\n const clearOptions = () => setOptions(o => {\n if (route.key in o) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n [route.key]: _,\n ...rest\n } = o;\n return rest;\n }\n return o;\n });\n acc[route.key] = {\n route,\n // @ts-expect-error: it's missing action helpers, fix later\n navigation,\n render() {\n return /*#__PURE__*/React.createElement(NavigationBuilderContext.Provider, {\n key: route.key,\n value: context\n }, /*#__PURE__*/React.createElement(NavigationContext.Provider, {\n value: navigation\n }, /*#__PURE__*/React.createElement(NavigationRouteContext.Provider, {\n value: route\n }, /*#__PURE__*/React.createElement(SceneView, {\n navigation: navigation,\n route: route,\n screen: screen,\n routeState: state.routes[i].state,\n getState: getState,\n setState: setState,\n options: mergedOptions,\n clearOptions: clearOptions\n }))));\n },\n options: mergedOptions\n };\n return acc;\n }, {});\n}\n//# sourceMappingURL=useDescriptors.js.map","import * as React from 'react';\nimport EnsureSingleNavigator from './EnsureSingleNavigator';\nimport NavigationStateContext from './NavigationStateContext';\nimport StaticContainer from './StaticContainer';\nimport useOptionsGetters from './useOptionsGetters';\n/**\n * Component which takes care of rendering the screen for a route.\n * It provides all required contexts and applies optimizations when applicable.\n */\nexport default function SceneView(_ref) {\n let {\n screen,\n route,\n navigation,\n routeState,\n getState,\n setState,\n options,\n clearOptions\n } = _ref;\n const navigatorKeyRef = React.useRef();\n const getKey = React.useCallback(() => navigatorKeyRef.current, []);\n const {\n addOptionsGetter\n } = useOptionsGetters({\n key: route.key,\n options,\n navigation\n });\n const setKey = React.useCallback(key => {\n navigatorKeyRef.current = key;\n }, []);\n const getCurrentState = React.useCallback(() => {\n const state = getState();\n const currentRoute = state.routes.find(r => r.key === route.key);\n return currentRoute ? currentRoute.state : undefined;\n }, [getState, route.key]);\n const setCurrentState = React.useCallback(child => {\n const state = getState();\n setState({\n ...state,\n routes: state.routes.map(r => r.key === route.key ? {\n ...r,\n state: child\n } : r)\n });\n }, [getState, route.key, setState]);\n const isInitialRef = React.useRef(true);\n React.useEffect(() => {\n isInitialRef.current = false;\n });\n\n // Clear options set by this screen when it is unmounted\n React.useEffect(() => {\n return clearOptions;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n const getIsInitial = React.useCallback(() => isInitialRef.current, []);\n const context = React.useMemo(() => ({\n state: routeState,\n getState: getCurrentState,\n setState: setCurrentState,\n getKey,\n setKey,\n getIsInitial,\n addOptionsGetter\n }), [routeState, getCurrentState, setCurrentState, getKey, setKey, getIsInitial, addOptionsGetter]);\n const ScreenComponent = screen.getComponent ? screen.getComponent() : screen.component;\n return /*#__PURE__*/React.createElement(NavigationStateContext.Provider, {\n value: context\n }, /*#__PURE__*/React.createElement(EnsureSingleNavigator, null, /*#__PURE__*/React.createElement(StaticContainer, {\n name: screen.name,\n render: ScreenComponent || screen.children,\n navigation: navigation,\n route: route\n }, ScreenComponent !== undefined ? /*#__PURE__*/React.createElement(ScreenComponent, {\n navigation: navigation,\n route: route\n }) : screen.children !== undefined ? screen.children({\n navigation,\n route\n }) : null)));\n}\n//# sourceMappingURL=SceneView.js.map","import * as React from 'react';\n\n/**\n * Component which prevents updates for children if no props changed\n */\nfunction StaticContainer(props) {\n return props.children;\n}\nexport default /*#__PURE__*/React.memo(StaticContainer, (prevProps, nextProps) => {\n const prevPropKeys = Object.keys(prevProps);\n const nextPropKeys = Object.keys(nextProps);\n if (prevPropKeys.length !== nextPropKeys.length) {\n return false;\n }\n for (const key of prevPropKeys) {\n if (key === 'children') {\n continue;\n }\n if (prevProps[key] !== nextProps[key]) {\n return false;\n }\n }\n return true;\n});\n//# sourceMappingURL=StaticContainer.js.map","import { CommonActions } from '@react-navigation/routers';\nimport * as React from 'react';\nimport NavigationBuilderContext from './NavigationBuilderContext';\n/**\n * Hook to cache navigation objects for each screen in the navigator.\n * It's important to cache them to make sure navigation objects don't change between renders.\n * This lets us apply optimizations like `React.memo` to minimize re-rendering screens.\n */\nexport default function useNavigationCache(_ref) {\n let {\n state,\n getState,\n navigation,\n setOptions,\n router,\n emitter\n } = _ref;\n const {\n stackRef\n } = React.useContext(NavigationBuilderContext);\n\n // Cache object which holds navigation objects for each screen\n // We use `React.useMemo` instead of `React.useRef` coz we want to invalidate it when deps change\n // In reality, these deps will rarely change, if ever\n const cache = React.useMemo(() => ({\n current: {}\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [getState, navigation, setOptions, router, emitter]);\n const actions = {\n ...router.actionCreators,\n ...CommonActions\n };\n cache.current = state.routes.reduce((acc, route) => {\n const previous = cache.current[route.key];\n if (previous) {\n // If a cached navigation object already exists, reuse it\n acc[route.key] = previous;\n } else {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n emit,\n ...rest\n } = navigation;\n const dispatch = thunk => {\n const action = typeof thunk === 'function' ? thunk(getState()) : thunk;\n if (action != null) {\n navigation.dispatch({\n source: route.key,\n ...action\n });\n }\n };\n const withStack = callback => {\n let isStackSet = false;\n try {\n if (process.env.NODE_ENV !== 'production' && stackRef && !stackRef.current) {\n // Capture the stack trace for devtools\n stackRef.current = new Error().stack;\n isStackSet = true;\n }\n callback();\n } finally {\n if (isStackSet && stackRef) {\n stackRef.current = undefined;\n }\n }\n };\n const helpers = Object.keys(actions).reduce((acc, name) => {\n acc[name] = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return withStack(() =>\n // @ts-expect-error: name is a valid key, but TypeScript is dumb\n dispatch(actions[name](...args)));\n };\n return acc;\n }, {});\n acc[route.key] = {\n ...rest,\n ...helpers,\n // FIXME: too much work to fix the types for now\n ...emitter.create(route.key),\n dispatch: thunk => withStack(() => dispatch(thunk)),\n getParent: id => {\n if (id !== undefined && id === rest.getId()) {\n // If the passed id is the same as the current navigation id,\n // we return the cached navigation object for the relevant route\n return acc[route.key];\n }\n return rest.getParent(id);\n },\n setOptions: options => setOptions(o => ({\n ...o,\n [route.key]: {\n ...o[route.key],\n ...options\n }\n })),\n isFocused: () => {\n const state = getState();\n if (state.routes[state.index].key !== route.key) {\n return false;\n }\n\n // If the current screen is focused, we also need to check if parent navigator is focused\n // This makes sure that we return the focus state in the whole tree, not just this navigator\n return navigation ? navigation.isFocused() : true;\n }\n };\n }\n return acc;\n }, {});\n return cache.current;\n}\n//# sourceMappingURL=useNavigationCache.js.map","import * as React from 'react';\nimport NavigationBuilderContext from './NavigationBuilderContext';\n/**\n * Hook for passing focus callback to children\n */\nexport default function useFocusedListenersChildrenAdapter(_ref) {\n let {\n navigation,\n focusedListeners\n } = _ref;\n const {\n addListener\n } = React.useContext(NavigationBuilderContext);\n const listener = React.useCallback(callback => {\n if (navigation.isFocused()) {\n for (const listener of focusedListeners) {\n const {\n handled,\n result\n } = listener(callback);\n if (handled) {\n return {\n handled,\n result\n };\n }\n }\n return {\n handled: true,\n result: callback(navigation)\n };\n } else {\n return {\n handled: false,\n result: null\n };\n }\n }, [focusedListeners, navigation]);\n React.useEffect(() => addListener === null || addListener === void 0 ? void 0 : addListener('focus', listener), [addListener, listener]);\n}\n//# sourceMappingURL=useFocusedListenersChildrenAdapter.js.map","import * as React from 'react';\nimport NavigationContext from './NavigationContext';\n/**\n * Hook to take care of emitting `focus` and `blur` events.\n */\nexport default function useFocusEvents(_ref) {\n let {\n state,\n emitter\n } = _ref;\n const navigation = React.useContext(NavigationContext);\n const lastFocusedKeyRef = React.useRef();\n const currentFocusedKey = state.routes[state.index].key;\n\n // When the parent screen changes its focus state, we also need to change child's focus\n // Coz the child screen can't be focused if the parent screen is out of focus\n React.useEffect(() => navigation === null || navigation === void 0 ? void 0 : navigation.addListener('focus', () => {\n lastFocusedKeyRef.current = currentFocusedKey;\n emitter.emit({\n type: 'focus',\n target: currentFocusedKey\n });\n }), [currentFocusedKey, emitter, navigation]);\n React.useEffect(() => navigation === null || navigation === void 0 ? void 0 : navigation.addListener('blur', () => {\n lastFocusedKeyRef.current = undefined;\n emitter.emit({\n type: 'blur',\n target: currentFocusedKey\n });\n }), [currentFocusedKey, emitter, navigation]);\n React.useEffect(() => {\n const lastFocusedKey = lastFocusedKeyRef.current;\n lastFocusedKeyRef.current = currentFocusedKey;\n\n // We wouldn't have `lastFocusedKey` on initial mount\n // Fire focus event for the current route on mount if there's no parent navigator\n if (lastFocusedKey === undefined && !navigation) {\n emitter.emit({\n type: 'focus',\n target: currentFocusedKey\n });\n }\n\n // We should only emit events when the focused key changed and navigator is focused\n // When navigator is not focused, screens inside shouldn't receive focused status either\n if (lastFocusedKey === currentFocusedKey || !(navigation ? navigation.isFocused() : true)) {\n return;\n }\n if (lastFocusedKey === undefined) {\n // Only fire events after initial mount\n return;\n }\n emitter.emit({\n type: 'blur',\n target: lastFocusedKey\n });\n emitter.emit({\n type: 'focus',\n target: currentFocusedKey\n });\n }, [currentFocusedKey, emitter, navigation]);\n}\n//# sourceMappingURL=useFocusEvents.js.map","import { CommonActions } from '@react-navigation/routers';\nimport * as React from 'react';\nimport NavigationContext from './NavigationContext';\nimport { PrivateValueStore } from './types';\nimport UnhandledActionContext from './UnhandledActionContext';\n// This is to make TypeScript compiler happy\n// eslint-disable-next-line babel/no-unused-expressions\nPrivateValueStore;\n/**\n * Navigation object with helper methods to be used by a navigator.\n * This object includes methods for common actions as well as methods the parent screen's navigation object.\n */\nexport default function useNavigationHelpers(_ref) {\n let {\n id: navigatorId,\n onAction,\n getState,\n emitter,\n router\n } = _ref;\n const onUnhandledAction = React.useContext(UnhandledActionContext);\n const parentNavigationHelpers = React.useContext(NavigationContext);\n return React.useMemo(() => {\n const dispatch = op => {\n const action = typeof op === 'function' ? op(getState()) : op;\n const handled = onAction(action);\n if (!handled) {\n onUnhandledAction === null || onUnhandledAction === void 0 ? void 0 : onUnhandledAction(action);\n }\n };\n const actions = {\n ...router.actionCreators,\n ...CommonActions\n };\n const helpers = Object.keys(actions).reduce((acc, name) => {\n // @ts-expect-error: name is a valid key, but TypeScript is dumb\n acc[name] = function () {\n return dispatch(actions[name](...arguments));\n };\n return acc;\n }, {});\n const navigationHelpers = {\n ...parentNavigationHelpers,\n ...helpers,\n dispatch,\n emit: emitter.emit,\n isFocused: parentNavigationHelpers ? parentNavigationHelpers.isFocused : () => true,\n canGoBack: () => {\n const state = getState();\n return router.getStateForAction(state, CommonActions.goBack(), {\n routeNames: state.routeNames,\n routeParamList: {},\n routeGetIdList: {}\n }) !== null || (parentNavigationHelpers === null || parentNavigationHelpers === void 0 ? void 0 : parentNavigationHelpers.canGoBack()) || false;\n },\n getId: () => navigatorId,\n getParent: id => {\n if (id !== undefined) {\n let current = navigationHelpers;\n while (current && id !== current.getId()) {\n current = current.getParent();\n }\n return current;\n }\n return parentNavigationHelpers;\n },\n getState\n };\n return navigationHelpers;\n }, [navigatorId, emitter.emit, getState, onAction, onUnhandledAction, parentNavigationHelpers, router]);\n}\n//# sourceMappingURL=useNavigationHelpers.js.map","import * as React from 'react';\nimport NavigationBuilderContext from './NavigationBuilderContext';\nimport useOnPreventRemove, { shouldPreventRemove } from './useOnPreventRemove';\n/**\n * Hook to handle actions for a navigator, including state updates and bubbling.\n *\n * Bubbling an action is achieved in 2 ways:\n * 1. To bubble action to parent, we expose the action handler in context and then access the parent context\n * 2. To bubble action to child, child adds event listeners subscribing to actions from parent\n *\n * When the action handler handles as action, it returns `true`, otherwise `false`.\n */\nexport default function useOnAction(_ref) {\n let {\n router,\n getState,\n setState,\n key,\n actionListeners,\n beforeRemoveListeners,\n routerConfigOptions,\n emitter\n } = _ref;\n const {\n onAction: onActionParent,\n onRouteFocus: onRouteFocusParent,\n addListener: addListenerParent,\n onDispatchAction\n } = React.useContext(NavigationBuilderContext);\n const routerConfigOptionsRef = React.useRef(routerConfigOptions);\n React.useEffect(() => {\n routerConfigOptionsRef.current = routerConfigOptions;\n });\n const onAction = React.useCallback(function (action) {\n let visitedNavigators = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Set();\n const state = getState();\n\n // Since actions can bubble both up and down, they could come to the same navigator again\n // We keep track of navigators which have already tried to handle the action and return if it's already visited\n if (visitedNavigators.has(state.key)) {\n return false;\n }\n visitedNavigators.add(state.key);\n if (typeof action.target !== 'string' || action.target === state.key) {\n let result = router.getStateForAction(state, action, routerConfigOptionsRef.current);\n\n // If a target is specified and set to current navigator, the action shouldn't bubble\n // So instead of `null`, we use the state object for such cases to signal that action was handled\n result = result === null && action.target === state.key ? state : result;\n if (result !== null) {\n onDispatchAction(action, state === result);\n if (state !== result) {\n const isPrevented = shouldPreventRemove(emitter, beforeRemoveListeners, state.routes, result.routes, action);\n if (isPrevented) {\n return true;\n }\n setState(result);\n }\n if (onRouteFocusParent !== undefined) {\n // Some actions such as `NAVIGATE` also want to bring the navigated route to focus in the whole tree\n // This means we need to focus all of the parent navigators of this navigator as well\n const shouldFocus = router.shouldActionChangeFocus(action);\n if (shouldFocus && key !== undefined) {\n onRouteFocusParent(key);\n }\n }\n return true;\n }\n }\n if (onActionParent !== undefined) {\n // Bubble action to the parent if the current navigator didn't handle it\n if (onActionParent(action, visitedNavigators)) {\n return true;\n }\n }\n\n // If the action wasn't handled by current navigator or a parent navigator, let children handle it\n for (let i = actionListeners.length - 1; i >= 0; i--) {\n const listener = actionListeners[i];\n if (listener(action, visitedNavigators)) {\n return true;\n }\n }\n return false;\n }, [actionListeners, beforeRemoveListeners, emitter, getState, key, onActionParent, onDispatchAction, onRouteFocusParent, router, setState]);\n useOnPreventRemove({\n getState,\n emitter,\n beforeRemoveListeners\n });\n React.useEffect(() => addListenerParent === null || addListenerParent === void 0 ? void 0 : addListenerParent('action', onAction), [addListenerParent, onAction]);\n return onAction;\n}\n//# sourceMappingURL=useOnAction.js.map","import * as React from 'react';\nimport NavigationBuilderContext from './NavigationBuilderContext';\nimport NavigationRouteContext from './NavigationRouteContext';\nconst VISITED_ROUTE_KEYS = Symbol('VISITED_ROUTE_KEYS');\nexport const shouldPreventRemove = (emitter, beforeRemoveListeners, currentRoutes, nextRoutes, action) => {\n const nextRouteKeys = nextRoutes.map(route => route.key);\n\n // Call these in reverse order so last screens handle the event first\n const removedRoutes = currentRoutes.filter(route => !nextRouteKeys.includes(route.key)).reverse();\n const visitedRouteKeys =\n // @ts-expect-error: add this property to mark that we've already emitted this action\n action[VISITED_ROUTE_KEYS] ?? new Set();\n const beforeRemoveAction = {\n ...action,\n [VISITED_ROUTE_KEYS]: visitedRouteKeys\n };\n for (const route of removedRoutes) {\n var _beforeRemoveListener;\n if (visitedRouteKeys.has(route.key)) {\n // Skip if we've already emitted this action for this screen\n continue;\n }\n\n // First, we need to check if any child screens want to prevent it\n const isPrevented = (_beforeRemoveListener = beforeRemoveListeners[route.key]) === null || _beforeRemoveListener === void 0 ? void 0 : _beforeRemoveListener.call(beforeRemoveListeners, beforeRemoveAction);\n if (isPrevented) {\n return true;\n }\n visitedRouteKeys.add(route.key);\n const event = emitter.emit({\n type: 'beforeRemove',\n target: route.key,\n data: {\n action: beforeRemoveAction\n },\n canPreventDefault: true\n });\n if (event.defaultPrevented) {\n return true;\n }\n }\n return false;\n};\nexport default function useOnPreventRemove(_ref) {\n let {\n getState,\n emitter,\n beforeRemoveListeners\n } = _ref;\n const {\n addKeyedListener\n } = React.useContext(NavigationBuilderContext);\n const route = React.useContext(NavigationRouteContext);\n const routeKey = route === null || route === void 0 ? void 0 : route.key;\n React.useEffect(() => {\n if (routeKey) {\n return addKeyedListener === null || addKeyedListener === void 0 ? void 0 : addKeyedListener('beforeRemove', routeKey, action => {\n const state = getState();\n return shouldPreventRemove(emitter, beforeRemoveListeners, state.routes, [], action);\n });\n }\n }, [addKeyedListener, beforeRemoveListeners, emitter, getState, routeKey]);\n}\n//# sourceMappingURL=useOnPreventRemove.js.map","import * as React from 'react';\nimport isArrayEqual from './isArrayEqual';\nimport NavigationBuilderContext from './NavigationBuilderContext';\nimport NavigationRouteContext from './NavigationRouteContext';\nexport default function useOnGetState(_ref) {\n let {\n getState,\n getStateListeners\n } = _ref;\n const {\n addKeyedListener\n } = React.useContext(NavigationBuilderContext);\n const route = React.useContext(NavigationRouteContext);\n const key = route ? route.key : 'root';\n const getRehydratedState = React.useCallback(() => {\n const state = getState();\n\n // Avoid returning new route objects if we don't need to\n const routes = state.routes.map(route => {\n var _getStateListeners$ro;\n const childState = (_getStateListeners$ro = getStateListeners[route.key]) === null || _getStateListeners$ro === void 0 ? void 0 : _getStateListeners$ro.call(getStateListeners);\n if (route.state === childState) {\n return route;\n }\n return {\n ...route,\n state: childState\n };\n });\n if (isArrayEqual(state.routes, routes)) {\n return state;\n }\n return {\n ...state,\n routes\n };\n }, [getState, getStateListeners]);\n React.useEffect(() => {\n return addKeyedListener === null || addKeyedListener === void 0 ? void 0 : addKeyedListener('getState', key, getRehydratedState);\n }, [addKeyedListener, getRehydratedState, key]);\n}\n//# sourceMappingURL=useOnGetState.js.map","import * as React from 'react';\nimport NavigationBuilderContext from './NavigationBuilderContext';\n/**\n * Hook to handle focus actions for a route.\n * Focus action needs to be treated specially, coz when a nested route is focused,\n * the parent navigators also needs to be focused.\n */\nexport default function useOnRouteFocus(_ref) {\n let {\n router,\n getState,\n key: sourceRouteKey,\n setState\n } = _ref;\n const {\n onRouteFocus: onRouteFocusParent\n } = React.useContext(NavigationBuilderContext);\n return React.useCallback(key => {\n const state = getState();\n const result = router.getStateForRouteFocus(state, key);\n if (result !== state) {\n setState(result);\n }\n if (onRouteFocusParent !== undefined && sourceRouteKey !== undefined) {\n onRouteFocusParent(sourceRouteKey);\n }\n }, [getState, onRouteFocusParent, router, setState, sourceRouteKey]);\n}\n//# sourceMappingURL=useOnRouteFocus.js.map","import { nanoid } from 'nanoid/non-secure';\nimport * as React from 'react';\nimport { SingleNavigatorContext } from './EnsureSingleNavigator';\n\n/**\n * Register a navigator in the parent context (either a navigation container or a screen).\n * This is used to prevent multiple navigators under a single container or screen.\n */\nexport default function useRegisterNavigator() {\n const [key] = React.useState(() => nanoid());\n const container = React.useContext(SingleNavigatorContext);\n if (container === undefined) {\n throw new Error(\"Couldn't register the navigator. Have you wrapped your app with 'NavigationContainer'?\\n\\nThis can also happen if there are multiple copies of '@react-navigation' packages installed.\");\n }\n React.useEffect(() => {\n const {\n register,\n unregister\n } = container;\n register(key);\n return () => unregister(key);\n }, [container, key]);\n return key;\n}\n//# sourceMappingURL=useRegisterNavigator.js.map","import * as React from 'react';\nimport createNavigationContainerRef from './createNavigationContainerRef';\nexport default function useNavigationContainerRef() {\n const navigation = React.useRef(null);\n if (navigation.current == null) {\n navigation.current = createNavigationContainerRef();\n }\n return navigation.current;\n}\n//# sourceMappingURL=useNavigationContainerRef.js.map","import * as React from 'react';\nimport useNavigation from './useNavigation';\n/**\n * Hook to get a value from the current navigation state using a selector.\n *\n * @param selector Selector function to get a value from the state.\n */\nexport default function useNavigationState(selector) {\n const navigation = useNavigation();\n\n // We don't care about the state value, we run the selector again at the end\n // The state is only to make sure that there's a re-render when we have a new value\n const [, setResult] = React.useState(() => selector(navigation.getState()));\n\n // We store the selector in a ref to avoid re-subscribing listeners every render\n const selectorRef = React.useRef(selector);\n React.useEffect(() => {\n selectorRef.current = selector;\n });\n React.useEffect(() => {\n const unsubscribe = navigation.addListener('state', e => {\n setResult(selectorRef.current(e.data.state));\n });\n return unsubscribe;\n }, [navigation]);\n return selector(navigation.getState());\n}\n//# sourceMappingURL=useNavigationState.js.map","import { nanoid } from 'nanoid/non-secure';\nimport * as React from 'react';\nimport useLatestCallback from 'use-latest-callback';\nimport useNavigation from './useNavigation';\nimport usePreventRemoveContext from './usePreventRemoveContext';\nimport useRoute from './useRoute';\n\n/**\n * Hook to prevent screen from being removed. Can be used to prevent users from leaving the screen.\n *\n * @param preventRemove Boolean indicating whether to prevent screen from being removed.\n * @param callback Function which is executed when screen was prevented from being removed.\n */\nexport default function usePreventRemove(preventRemove, callback) {\n const [id] = React.useState(() => nanoid());\n const navigation = useNavigation();\n const {\n key: routeKey\n } = useRoute();\n const {\n setPreventRemove\n } = usePreventRemoveContext();\n React.useEffect(() => {\n setPreventRemove(id, routeKey, preventRemove);\n return () => {\n setPreventRemove(id, routeKey, false);\n };\n }, [setPreventRemove, id, routeKey, preventRemove]);\n const beforeRemoveListener = useLatestCallback(e => {\n if (!preventRemove) {\n return;\n }\n e.preventDefault();\n callback({\n data: e.data\n });\n });\n React.useEffect(() => navigation === null || navigation === void 0 ? void 0 : navigation.addListener('beforeRemove', beforeRemoveListener), [navigation, beforeRemoveListener]);\n}\n//# sourceMappingURL=usePreventRemove.js.map","import * as React from 'react';\nimport PreventRemoveContext from './PreventRemoveContext';\nexport default function usePreventRemoveContext() {\n const value = React.useContext(PreventRemoveContext);\n if (value == null) {\n throw new Error(\"Couldn't find the prevent remove context. Is your component inside NavigationContent?\");\n }\n return value;\n}\n//# sourceMappingURL=usePreventRemoveContext.js.map","import * as React from 'react';\nimport NavigationRouteContext from './NavigationRouteContext';\n/**\n * Hook to access the route prop of the parent screen anywhere.\n *\n * @returns Route prop of the parent screen.\n */\nexport default function useRoute() {\n const route = React.useContext(NavigationRouteContext);\n if (route === undefined) {\n throw new Error(\"Couldn't find a route object. Is your component inside a screen in a navigator?\");\n }\n return route;\n}\n//# sourceMappingURL=useRoute.js.map","import * as React from 'react';\nconst LinkingContext = /*#__PURE__*/React.createContext({\n options: undefined\n});\nLinkingContext.displayName = 'LinkingContext';\nexport default LinkingContext;\n//# sourceMappingURL=LinkingContext.js.map","import { getActionFromState, getStateFromPath, NavigationContainerRefContext } from '@react-navigation/core';\nimport * as React from 'react';\nimport LinkingContext from './LinkingContext';\nexport default function useLinkTo() {\n const navigation = React.useContext(NavigationContainerRefContext);\n const linking = React.useContext(LinkingContext);\n const linkTo = React.useCallback(to => {\n if (navigation === undefined) {\n throw new Error(\"Couldn't find a navigation object. Is your component inside NavigationContainer?\");\n }\n if (typeof to !== 'string') {\n // @ts-expect-error: This is fine\n navigation.navigate(to.screen, to.params);\n return;\n }\n if (!to.startsWith('/')) {\n throw new Error(`The path must start with '/' (${to}).`);\n }\n const {\n options\n } = linking;\n const state = options !== null && options !== void 0 && options.getStateFromPath ? options.getStateFromPath(to, options.config) : getStateFromPath(to, options === null || options === void 0 ? void 0 : options.config);\n if (state) {\n const action = getActionFromState(state, options === null || options === void 0 ? void 0 : options.config);\n if (action !== undefined) {\n navigation.dispatch(action);\n } else {\n navigation.reset(state);\n }\n } else {\n throw new Error('Failed to parse the path to a navigation state.');\n }\n }, [linking, navigation]);\n return linkTo;\n}\n//# sourceMappingURL=useLinkTo.js.map","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport { BaseNavigationContainer, getActionFromState, getPathFromState, getStateFromPath, validatePathConfig } from '@react-navigation/core';\nimport * as React from 'react';\nimport LinkingContext from './LinkingContext';\nimport DefaultTheme from './theming/DefaultTheme';\nimport ThemeProvider from './theming/ThemeProvider';\nimport useBackButton from './useBackButton';\nimport useDocumentTitle from './useDocumentTitle';\nimport useLinking from './useLinking';\nimport useThenable from './useThenable';\nglobal.REACT_NAVIGATION_DEVTOOLS = new WeakMap();\n/**\n * Container component which holds the navigation state designed for React Native apps.\n * This should be rendered at the root wrapping the whole app.\n *\n * @param props.initialState Initial state object for the navigation tree. When deep link handling is enabled, this will override deep links when specified. Make sure that you don't specify an `initialState` when there's a deep link (`Linking.getInitialURL()`).\n * @param props.onReady Callback which is called after the navigation tree mounts.\n * @param props.onStateChange Callback which is called with the latest navigation state when it changes.\n * @param props.theme Theme object for the navigators.\n * @param props.linking Options for deep linking. Deep link handling is enabled when this prop is provided, unless `linking.enabled` is `false`.\n * @param props.fallback Fallback component to render until we have finished getting initial state when linking is enabled. Defaults to `null`.\n * @param props.documentTitle Options to configure the document title on Web. Updating document title is handled by default unless `documentTitle.enabled` is `false`.\n * @param props.children Child elements to render the content.\n * @param props.ref Ref object which refers to the navigation object containing helper methods.\n */\nfunction NavigationContainerInner(_ref, ref) {\n let {\n theme = DefaultTheme,\n linking,\n fallback = null,\n documentTitle,\n onReady,\n ...rest\n } = _ref;\n const isLinkingEnabled = linking ? linking.enabled !== false : false;\n if (linking !== null && linking !== void 0 && linking.config) {\n validatePathConfig(linking.config);\n }\n const refContainer = React.useRef(null);\n useBackButton(refContainer);\n useDocumentTitle(refContainer, documentTitle);\n const {\n getInitialState\n } = useLinking(refContainer, {\n independent: rest.independent,\n enabled: isLinkingEnabled,\n prefixes: [],\n ...linking\n });\n\n // Add additional linking related info to the ref\n // This will be used by the devtools\n React.useEffect(() => {\n if (refContainer.current) {\n REACT_NAVIGATION_DEVTOOLS.set(refContainer.current, {\n get linking() {\n return {\n ...linking,\n enabled: isLinkingEnabled,\n prefixes: (linking === null || linking === void 0 ? void 0 : linking.prefixes) ?? [],\n getStateFromPath: (linking === null || linking === void 0 ? void 0 : linking.getStateFromPath) ?? getStateFromPath,\n getPathFromState: (linking === null || linking === void 0 ? void 0 : linking.getPathFromState) ?? getPathFromState,\n getActionFromState: (linking === null || linking === void 0 ? void 0 : linking.getActionFromState) ?? getActionFromState\n };\n }\n });\n }\n });\n const [isResolved, initialState] = useThenable(getInitialState);\n React.useImperativeHandle(ref, () => refContainer.current);\n const linkingContext = React.useMemo(() => ({\n options: linking\n }), [linking]);\n const isReady = rest.initialState != null || !isLinkingEnabled || isResolved;\n const onReadyRef = React.useRef(onReady);\n React.useEffect(() => {\n onReadyRef.current = onReady;\n });\n React.useEffect(() => {\n if (isReady) {\n var _onReadyRef$current;\n (_onReadyRef$current = onReadyRef.current) === null || _onReadyRef$current === void 0 ? void 0 : _onReadyRef$current.call(onReadyRef);\n }\n }, [isReady]);\n if (!isReady) {\n // This is temporary until we have Suspense for data-fetching\n // Then the fallback will be handled by a parent `Suspense` component\n return fallback;\n }\n return /*#__PURE__*/React.createElement(LinkingContext.Provider, {\n value: linkingContext\n }, /*#__PURE__*/React.createElement(ThemeProvider, {\n value: theme\n }, /*#__PURE__*/React.createElement(BaseNavigationContainer, _extends({}, rest, {\n initialState: rest.initialState == null ? initialState : rest.initialState,\n ref: refContainer\n }))));\n}\nconst NavigationContainer = /*#__PURE__*/React.forwardRef(NavigationContainerInner);\nexport default NavigationContainer;\n//# sourceMappingURL=NavigationContainer.js.map","const DefaultTheme = {\n dark: false,\n colors: {\n primary: 'rgb(0, 122, 255)',\n background: 'rgb(242, 242, 242)',\n card: 'rgb(255, 255, 255)',\n text: 'rgb(28, 28, 30)',\n border: 'rgb(216, 216, 216)',\n notification: 'rgb(255, 59, 48)'\n }\n};\nexport default DefaultTheme;\n//# sourceMappingURL=DefaultTheme.js.map","import * as React from 'react';\nimport ThemeContext from './ThemeContext';\nexport default function ThemeProvider(_ref) {\n let {\n value,\n children\n } = _ref;\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: value\n }, children);\n}\n//# sourceMappingURL=ThemeProvider.js.map","import * as React from 'react';\nimport DefaultTheme from './DefaultTheme';\nconst ThemeContext = /*#__PURE__*/React.createContext(DefaultTheme);\nThemeContext.displayName = 'ThemeContext';\nexport default ThemeContext;\n//# sourceMappingURL=ThemeContext.js.map","export default function useBackButton(_) {\n // No-op\n // BackHandler is not available on web\n}\n//# sourceMappingURL=useBackButton.js.map","import * as React from 'react';\n/**\n * Set the document title for the active screen\n */\nexport default function useDocumentTitle(ref) {\n let {\n enabled = true,\n formatter = (options, route) => (options === null || options === void 0 ? void 0 : options.title) ?? (route === null || route === void 0 ? void 0 : route.name)\n } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n React.useEffect(() => {\n if (!enabled) {\n return;\n }\n const navigation = ref.current;\n if (navigation) {\n const title = formatter(navigation.getCurrentOptions(), navigation.getCurrentRoute());\n document.title = title;\n }\n return navigation === null || navigation === void 0 ? void 0 : navigation.addListener('options', e => {\n const title = formatter(e.data.options, navigation === null || navigation === void 0 ? void 0 : navigation.getCurrentRoute());\n document.title = title;\n });\n });\n}\n//# sourceMappingURL=useDocumentTitle.js.map","import { findFocusedRoute, getActionFromState as getActionFromStateDefault, getPathFromState as getPathFromStateDefault, getStateFromPath as getStateFromPathDefault } from '@react-navigation/core';\nimport isEqual from 'fast-deep-equal';\nimport * as React from 'react';\nimport createMemoryHistory from './createMemoryHistory';\nimport ServerContext from './ServerContext';\n/**\n * Find the matching navigation state that changed between 2 navigation states\n * e.g.: a -> b -> c -> d and a -> b -> c -> e -> f, if history in b changed, b is the matching state\n */\nconst findMatchingState = (a, b) => {\n if (a === undefined || b === undefined || a.key !== b.key) {\n return [undefined, undefined];\n }\n\n // Tab and drawer will have `history` property, but stack will have history in `routes`\n const aHistoryLength = a.history ? a.history.length : a.routes.length;\n const bHistoryLength = b.history ? b.history.length : b.routes.length;\n const aRoute = a.routes[a.index];\n const bRoute = b.routes[b.index];\n const aChildState = aRoute.state;\n const bChildState = bRoute.state;\n\n // Stop here if this is the state object that changed:\n // - history length is different\n // - focused routes are different\n // - one of them doesn't have child state\n // - child state keys are different\n if (aHistoryLength !== bHistoryLength || aRoute.key !== bRoute.key || aChildState === undefined || bChildState === undefined || aChildState.key !== bChildState.key) {\n return [a, b];\n }\n return findMatchingState(aChildState, bChildState);\n};\n\n/**\n * Run async function in series as it's called.\n */\nexport const series = cb => {\n let queue = Promise.resolve();\n const callback = () => {\n queue = queue.then(cb);\n };\n return callback;\n};\nlet linkingHandlers = [];\nexport default function useLinking(ref, _ref) {\n let {\n independent,\n enabled = true,\n config,\n getStateFromPath = getStateFromPathDefault,\n getPathFromState = getPathFromStateDefault,\n getActionFromState = getActionFromStateDefault\n } = _ref;\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'production') {\n return undefined;\n }\n if (independent) {\n return undefined;\n }\n if (enabled !== false && linkingHandlers.length) {\n console.error(['Looks like you have configured linking in multiple places. This is likely an error since deep links should only be handled in one place to avoid conflicts. Make sure that:', \"- You don't have multiple NavigationContainers in the app each with 'linking' enabled\", '- Only a single instance of the root component is rendered'].join('\\n').trim());\n }\n const handler = Symbol();\n if (enabled !== false) {\n linkingHandlers.push(handler);\n }\n return () => {\n const index = linkingHandlers.indexOf(handler);\n if (index > -1) {\n linkingHandlers.splice(index, 1);\n }\n };\n }, [enabled, independent]);\n const [history] = React.useState(createMemoryHistory);\n\n // We store these options in ref to avoid re-creating getInitialState and re-subscribing listeners\n // This lets user avoid wrapping the items in `React.useCallback` or `React.useMemo`\n // Not re-creating `getInitialState` is important coz it makes it easier for the user to use in an effect\n const enabledRef = React.useRef(enabled);\n const configRef = React.useRef(config);\n const getStateFromPathRef = React.useRef(getStateFromPath);\n const getPathFromStateRef = React.useRef(getPathFromState);\n const getActionFromStateRef = React.useRef(getActionFromState);\n React.useEffect(() => {\n enabledRef.current = enabled;\n configRef.current = config;\n getStateFromPathRef.current = getStateFromPath;\n getPathFromStateRef.current = getPathFromState;\n getActionFromStateRef.current = getActionFromState;\n });\n const server = React.useContext(ServerContext);\n const getInitialState = React.useCallback(() => {\n let value;\n if (enabledRef.current) {\n const location = (server === null || server === void 0 ? void 0 : server.location) ?? (typeof window !== 'undefined' ? window.location : undefined);\n const path = location ? location.pathname + location.search : undefined;\n if (path) {\n value = getStateFromPathRef.current(path, configRef.current);\n }\n }\n const thenable = {\n then(onfulfilled) {\n return Promise.resolve(onfulfilled ? onfulfilled(value) : value);\n },\n catch() {\n return thenable;\n }\n };\n return thenable;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n const previousIndexRef = React.useRef(undefined);\n const previousStateRef = React.useRef(undefined);\n const pendingPopStatePathRef = React.useRef(undefined);\n React.useEffect(() => {\n previousIndexRef.current = history.index;\n return history.listen(() => {\n const navigation = ref.current;\n if (!navigation || !enabled) {\n return;\n }\n const {\n location\n } = window;\n const path = location.pathname + location.search;\n const index = history.index;\n const previousIndex = previousIndexRef.current ?? 0;\n previousIndexRef.current = index;\n pendingPopStatePathRef.current = path;\n\n // When browser back/forward is clicked, we first need to check if state object for this index exists\n // If it does we'll reset to that state object\n // Otherwise, we'll handle it like a regular deep link\n const record = history.get(index);\n if ((record === null || record === void 0 ? void 0 : record.path) === path && record !== null && record !== void 0 && record.state) {\n navigation.resetRoot(record.state);\n return;\n }\n const state = getStateFromPathRef.current(path, configRef.current);\n\n // We should only dispatch an action when going forward\n // Otherwise the action will likely add items to history, which would mess things up\n if (state) {\n // Make sure that the routes in the state exist in the root navigator\n // Otherwise there's an error in the linking configuration\n const rootState = navigation.getRootState();\n if (state.routes.some(r => !(rootState !== null && rootState !== void 0 && rootState.routeNames.includes(r.name)))) {\n console.warn(\"The navigation state parsed from the URL contains routes not present in the root navigator. This usually means that the linking configuration doesn't match the navigation structure. See https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration.\");\n return;\n }\n if (index > previousIndex) {\n const action = getActionFromStateRef.current(state, configRef.current);\n if (action !== undefined) {\n try {\n navigation.dispatch(action);\n } catch (e) {\n // Ignore any errors from deep linking.\n // This could happen in case of malformed links, navigation object not being initialized etc.\n console.warn(`An error occurred when trying to handle the link '${path}': ${typeof e === 'object' && e != null && 'message' in e ? e.message : e}`);\n }\n } else {\n navigation.resetRoot(state);\n }\n } else {\n navigation.resetRoot(state);\n }\n } else {\n // if current path didn't return any state, we should revert to initial state\n navigation.resetRoot(state);\n }\n });\n }, [enabled, history, ref]);\n React.useEffect(() => {\n var _ref$current;\n if (!enabled) {\n return;\n }\n const getPathForRoute = (route, state) => {\n // If the `route` object contains a `path`, use that path as long as `route.name` and `params` still match\n // This makes sure that we preserve the original URL for wildcard routes\n if (route !== null && route !== void 0 && route.path) {\n const stateForPath = getStateFromPathRef.current(route.path, configRef.current);\n if (stateForPath) {\n const focusedRoute = findFocusedRoute(stateForPath);\n if (focusedRoute && focusedRoute.name === route.name && isEqual(focusedRoute.params, route.params)) {\n return route.path;\n }\n }\n }\n return getPathFromStateRef.current(state, configRef.current);\n };\n if (ref.current) {\n // We need to record the current metadata on the first render if they aren't set\n // This will allow the initial state to be in the history entry\n const state = ref.current.getRootState();\n if (state) {\n const route = findFocusedRoute(state);\n const path = getPathForRoute(route, state);\n if (previousStateRef.current === undefined) {\n previousStateRef.current = state;\n }\n history.replace({\n path,\n state\n });\n }\n }\n const onStateChange = async () => {\n const navigation = ref.current;\n if (!navigation || !enabled) {\n return;\n }\n const previousState = previousStateRef.current;\n const state = navigation.getRootState();\n\n // root state may not available, for example when root navigators switch inside the container\n if (!state) {\n return;\n }\n const pendingPath = pendingPopStatePathRef.current;\n const route = findFocusedRoute(state);\n const path = getPathForRoute(route, state);\n previousStateRef.current = state;\n pendingPopStatePathRef.current = undefined;\n\n // To detect the kind of state change, we need to:\n // - Find the common focused navigation state in previous and current state\n // - If only the route keys changed, compare history/routes.length to check if we go back/forward/replace\n // - If no common focused navigation state found, it's a replace\n const [previousFocusedState, focusedState] = findMatchingState(previousState, state);\n if (previousFocusedState && focusedState &&\n // We should only handle push/pop if path changed from what was in last `popstate`\n // Otherwise it's likely a change triggered by `popstate`\n path !== pendingPath) {\n const historyDelta = (focusedState.history ? focusedState.history.length : focusedState.routes.length) - (previousFocusedState.history ? previousFocusedState.history.length : previousFocusedState.routes.length);\n if (historyDelta > 0) {\n // If history length is increased, we should pushState\n // Note that path might not actually change here, for example, drawer open should pushState\n history.push({\n path,\n state\n });\n } else if (historyDelta < 0) {\n // If history length is decreased, i.e. entries were removed, we want to go back\n\n const nextIndex = history.backIndex({\n path\n });\n const currentIndex = history.index;\n try {\n if (nextIndex !== -1 && nextIndex < currentIndex &&\n // We should only go back if the entry exists and it's less than current index\n history.get(nextIndex - currentIndex)) {\n // An existing entry for this path exists and it's less than current index, go back to that\n await history.go(nextIndex - currentIndex);\n } else {\n // We couldn't find an existing entry to go back to, so we'll go back by the delta\n // This won't be correct if multiple routes were pushed in one go before\n // Usually this shouldn't happen and this is a fallback for that\n await history.go(historyDelta);\n }\n\n // Store the updated state as well as fix the path if incorrect\n history.replace({\n path,\n state\n });\n } catch (e) {\n // The navigation was interrupted\n }\n } else {\n // If history length is unchanged, we want to replaceState\n history.replace({\n path,\n state\n });\n }\n } else {\n // If no common navigation state was found, assume it's a replace\n // This would happen if the user did a reset/conditionally changed navigators\n history.replace({\n path,\n state\n });\n }\n };\n\n // We debounce onStateChange coz we don't want multiple state changes to be handled at one time\n // This could happen since `history.go(n)` is asynchronous\n // If `pushState` or `replaceState` were called before `history.go(n)` completes, it'll mess stuff up\n return (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.addListener('state', series(onStateChange));\n }, [enabled, history, ref]);\n return {\n getInitialState\n };\n}\n//# sourceMappingURL=useLinking.js.map","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n","import { nanoid } from 'nanoid/non-secure';\nexport default function createMemoryHistory() {\n let index = 0;\n let items = [];\n\n // Pending callbacks for `history.go(n)`\n // We might modify the callback stored if it was interrupted, so we have a ref to identify it\n const pending = [];\n const interrupt = () => {\n // If another history operation was performed we need to interrupt existing ones\n // This makes sure that calls such as `history.replace` after `history.go` don't happen\n // Since otherwise it won't be correct if something else has changed\n pending.forEach(it => {\n const cb = it.cb;\n it.cb = () => cb(true);\n });\n };\n const history = {\n get index() {\n var _window$history$state;\n // We store an id in the state instead of an index\n // Index could get out of sync with in-memory values if page reloads\n const id = (_window$history$state = window.history.state) === null || _window$history$state === void 0 ? void 0 : _window$history$state.id;\n if (id) {\n const index = items.findIndex(item => item.id === id);\n return index > -1 ? index : 0;\n }\n return 0;\n },\n get(index) {\n return items[index];\n },\n backIndex(_ref) {\n let {\n path\n } = _ref;\n // We need to find the index from the element before current to get closest path to go back to\n for (let i = index - 1; i >= 0; i--) {\n const item = items[i];\n if (item.path === path) {\n return i;\n }\n }\n return -1;\n },\n push(_ref2) {\n let {\n path,\n state\n } = _ref2;\n interrupt();\n const id = nanoid();\n\n // When a new entry is pushed, all the existing entries after index will be inaccessible\n // So we remove any existing entries after the current index to clean them up\n items = items.slice(0, index + 1);\n items.push({\n path,\n state,\n id\n });\n index = items.length - 1;\n\n // We pass empty string for title because it's ignored in all browsers except safari\n // We don't store state object in history.state because:\n // - browsers have limits on how big it can be, and we don't control the size\n // - while not recommended, there could be non-serializable data in state\n window.history.pushState({\n id\n }, '', path);\n },\n replace(_ref3) {\n var _window$history$state2;\n let {\n path,\n state\n } = _ref3;\n interrupt();\n const id = ((_window$history$state2 = window.history.state) === null || _window$history$state2 === void 0 ? void 0 : _window$history$state2.id) ?? nanoid();\n\n // Need to keep the hash part of the path if there was no previous history entry\n // or the previous history entry had the same path\n let pathWithHash = path;\n if (!items.length || items.findIndex(item => item.id === id) < 0) {\n // There are two scenarios for creating an array with only one history record:\n // - When loaded id not found in the items array, this function by default will replace\n // the first item. We need to keep only the new updated object, otherwise it will break\n // the page when navigating forward in history.\n // - This is the first time any state modifications are done\n // So we need to push the entry as there's nothing to replace\n pathWithHash = pathWithHash + location.hash;\n items = [{\n path: pathWithHash,\n state,\n id\n }];\n index = 0;\n } else {\n if (items[index].path === path) {\n pathWithHash = pathWithHash + location.hash;\n }\n items[index] = {\n path,\n state,\n id\n };\n }\n window.history.replaceState({\n id\n }, '', pathWithHash);\n },\n // `history.go(n)` is asynchronous, there are couple of things to keep in mind:\n // - it won't do anything if we can't go `n` steps, the `popstate` event won't fire.\n // - each `history.go(n)` call will trigger a separate `popstate` event with correct location.\n // - the `popstate` event fires before the next frame after calling `history.go(n)`.\n // This method differs from `history.go(n)` in the sense that it'll go back as many steps it can.\n go(n) {\n interrupt();\n\n // To guard against unexpected navigation out of the app we will assume that browser history is only as deep as the length of our memory\n // history. If we don't have an item to navigate to then update our index and navigate as far as we can without taking the user out of the app.\n const nextIndex = index + n;\n const lastItemIndex = items.length - 1;\n if (n < 0 && !items[nextIndex]) {\n // Attempted to navigate beyond the first index. Negating the current index will align the browser history with the first item.\n n = -index;\n index = 0;\n } else if (n > 0 && nextIndex > lastItemIndex) {\n // Attempted to navigate past the last index. Calculate how many indices away from the last index and go there.\n n = lastItemIndex - index;\n index = lastItemIndex;\n } else {\n index = nextIndex;\n }\n if (n === 0) {\n return;\n }\n\n // When we call `history.go`, `popstate` will fire when there's history to go back to\n // So we need to somehow handle following cases:\n // - There's history to go back, `history.go` is called, and `popstate` fires\n // - `history.go` is called multiple times, we need to resolve on respective `popstate`\n // - No history to go back, but `history.go` was called, browser has no API to detect it\n return new Promise((resolve, reject) => {\n const done = interrupted => {\n clearTimeout(timer);\n if (interrupted) {\n reject(new Error('History was changed during navigation.'));\n return;\n }\n\n // There seems to be a bug in Chrome regarding updating the title\n // If we set a title just before calling `history.go`, the title gets lost\n // However the value of `document.title` is still what we set it to\n // It's just not displayed in the tab bar\n // To update the tab bar, we need to reset the title to something else first (e.g. '')\n // And set the title to what it was before so it gets applied\n // It won't work without setting it to empty string coz otherwise title isn't changing\n // Which means that the browser won't do anything after setting the title\n const {\n title\n } = window.document;\n window.document.title = '';\n window.document.title = title;\n resolve();\n };\n pending.push({\n ref: done,\n cb: done\n });\n\n // If navigation didn't happen within 100ms, assume that it won't happen\n // This may not be accurate, but hopefully it won't take so much time\n // In Chrome, navigation seems to happen instantly in next microtask\n // But on Firefox, it seems to take much longer, around 50ms from our testing\n // We're using a hacky timeout since there doesn't seem to be way to know for sure\n const timer = setTimeout(() => {\n const index = pending.findIndex(it => it.ref === done);\n if (index > -1) {\n pending[index].cb();\n pending.splice(index, 1);\n }\n }, 100);\n const onPopState = () => {\n var _window$history$state3;\n const id = (_window$history$state3 = window.history.state) === null || _window$history$state3 === void 0 ? void 0 : _window$history$state3.id;\n const currentIndex = items.findIndex(item => item.id === id);\n\n // Fix createMemoryHistory.index variable's value\n // as it may go out of sync when navigating in the browser.\n index = Math.max(currentIndex, 0);\n const last = pending.pop();\n window.removeEventListener('popstate', onPopState);\n last === null || last === void 0 ? void 0 : last.cb();\n };\n window.addEventListener('popstate', onPopState);\n window.history.go(n);\n });\n },\n // The `popstate` event is triggered when history changes, except `pushState` and `replaceState`\n // If we call `history.go(n)` ourselves, we don't want it to trigger the listener\n // Here we normalize it so that only external changes (e.g. user pressing back/forward) trigger the listener\n listen(listener) {\n const onPopState = () => {\n if (pending.length) {\n // This was triggered by `history.go(n)`, we shouldn't call the listener\n return;\n }\n listener();\n };\n window.addEventListener('popstate', onPopState);\n return () => window.removeEventListener('popstate', onPopState);\n }\n };\n return history;\n}\n//# sourceMappingURL=createMemoryHistory.js.map","import * as React from 'react';\nconst ServerContext = /*#__PURE__*/React.createContext(undefined);\nexport default ServerContext;\n//# sourceMappingURL=ServerContext.js.map","import * as React from 'react';\nexport default function useThenable(create) {\n const [promise] = React.useState(create);\n let initialState = [false, undefined];\n\n // Check if our thenable is synchronous\n promise.then(result => {\n initialState = [true, result];\n });\n const [state, setState] = React.useState(initialState);\n const [resolved] = state;\n React.useEffect(() => {\n let cancelled = false;\n const resolve = async () => {\n let result;\n try {\n result = await promise;\n } finally {\n if (!cancelled) {\n setState([true, result]);\n }\n }\n };\n if (!resolved) {\n resolve();\n }\n return () => {\n cancelled = true;\n };\n }, [promise, resolved]);\n return state;\n}\n//# sourceMappingURL=useThenable.js.map","import { CurrentRenderContext } from '@react-navigation/core';\nimport * as React from 'react';\nimport ServerContext from './ServerContext';\n/**\n * Container component for server rendering.\n *\n * @param props.location Location object to base the initial URL for SSR.\n * @param props.children Child elements to render the content.\n * @param props.ref Ref object which contains helper methods.\n */\nexport default /*#__PURE__*/React.forwardRef(function ServerContainer(_ref, ref) {\n let {\n children,\n location\n } = _ref;\n React.useEffect(() => {\n console.error(\"'ServerContainer' should only be used on the server with 'react-dom/server' for SSR.\");\n }, []);\n const current = {};\n if (ref) {\n const value = {\n getCurrentOptions() {\n return current.options;\n }\n };\n\n // We write to the `ref` during render instead of `React.useImperativeHandle`\n // This is because `useImperativeHandle` will update the ref after 'commit',\n // and there's no 'commit' phase during SSR.\n // Mutating ref during render is unsafe in concurrent mode, but we don't care about it for SSR.\n if (typeof ref === 'function') {\n ref(value);\n } else {\n // @ts-expect-error: the TS types are incorrect and say that ref.current is readonly\n ref.current = value;\n }\n }\n return /*#__PURE__*/React.createElement(ServerContext.Provider, {\n value: {\n location\n }\n }, /*#__PURE__*/React.createElement(CurrentRenderContext.Provider, {\n value: current\n }, children));\n});\n//# sourceMappingURL=ServerContainer.js.map","const DarkTheme = {\n dark: true,\n colors: {\n primary: 'rgb(10, 132, 255)',\n background: 'rgb(1, 1, 1)',\n card: 'rgb(18, 18, 18)',\n text: 'rgb(229, 229, 231)',\n border: 'rgb(39, 39, 41)',\n notification: 'rgb(255, 69, 58)'\n }\n};\nexport default DarkTheme;\n//# sourceMappingURL=DarkTheme.js.map","import * as React from 'react';\nimport ThemeContext from './ThemeContext';\nexport default function useTheme() {\n const theme = React.useContext(ThemeContext);\n return theme;\n}\n//# sourceMappingURL=useTheme.js.map","export {};\n//# sourceMappingURL=types.js.map","import { getPathFromState, NavigationHelpersContext } from '@react-navigation/core';\nimport * as React from 'react';\nimport LinkingContext from './LinkingContext';\nconst getRootStateForNavigate = (navigation, state) => {\n const parent = navigation.getParent();\n if (parent) {\n const parentState = parent.getState();\n return getRootStateForNavigate(parent, {\n index: 0,\n routes: [{\n ...parentState.routes[parentState.index],\n state: state\n }]\n });\n }\n return state;\n};\n\n/**\n * Build destination link for a navigate action.\n * Useful for showing anchor tags on the web for buttons that perform navigation.\n */\nexport default function useLinkBuilder() {\n const navigation = React.useContext(NavigationHelpersContext);\n const linking = React.useContext(LinkingContext);\n const buildLink = React.useCallback((name, params) => {\n const {\n options\n } = linking;\n if ((options === null || options === void 0 ? void 0 : options.enabled) === false) {\n return undefined;\n }\n const state = navigation ? getRootStateForNavigate(navigation, {\n index: 0,\n routes: [{\n name,\n params\n }]\n }) :\n // If we couldn't find a navigation object in context, we're at root\n // So we'll construct a basic state object to use\n {\n index: 0,\n routes: [{\n name,\n params\n }]\n };\n const path = options !== null && options !== void 0 && options.getPathFromState ? options.getPathFromState(state, options === null || options === void 0 ? void 0 : options.config) : getPathFromState(state, options === null || options === void 0 ? void 0 : options.config);\n return path;\n }, [linking, navigation]);\n return buildLink;\n}\n//# sourceMappingURL=useLinkBuilder.js.map","import { NavigationContext, useRoute } from '@react-navigation/core';\nimport * as React from 'react';\nfunction getScrollableNode(ref) {\n if (ref.current == null) {\n return null;\n }\n if ('scrollToTop' in ref.current || 'scrollTo' in ref.current || 'scrollToOffset' in ref.current || 'scrollResponderScrollTo' in ref.current) {\n // This is already a scrollable node.\n return ref.current;\n } else if ('getScrollResponder' in ref.current) {\n // If the view is a wrapper like FlatList, SectionList etc.\n // We need to use `getScrollResponder` to get access to the scroll responder\n return ref.current.getScrollResponder();\n } else if ('getNode' in ref.current) {\n // When a `ScrollView` is wraped in `Animated.createAnimatedComponent`\n // we need to use `getNode` to get the ref to the actual scrollview.\n // Note that `getNode` is deprecated in newer versions of react-native\n // this is why we check if we already have a scrollable node above.\n return ref.current.getNode();\n } else {\n return ref.current;\n }\n}\nexport default function useScrollToTop(ref) {\n const navigation = React.useContext(NavigationContext);\n const route = useRoute();\n if (navigation === undefined) {\n throw new Error(\"Couldn't find a navigation object. Is your component inside NavigationContainer?\");\n }\n React.useEffect(() => {\n const tabNavigations = [];\n let currentNavigation = navigation;\n // If the screen is nested inside multiple tab navigators, we should scroll to top for any of them\n // So we need to find all the parent tab navigators and add the listeners there\n while (currentNavigation) {\n if (currentNavigation.getState().type === 'tab') {\n tabNavigations.push(currentNavigation);\n }\n currentNavigation = currentNavigation.getParent();\n }\n if (tabNavigations.length === 0) {\n return;\n }\n const unsubscribers = tabNavigations.map(tab => {\n return tab.addListener(\n // We don't wanna import tab types here to avoid extra deps\n // in addition, there are multiple tab implementations\n // @ts-expect-error\n 'tabPress', e => {\n // We should scroll to top only when the screen is focused\n const isFocused = navigation.isFocused();\n\n // In a nested stack navigator, tab press resets the stack to first screen\n // So we should scroll to top only when we are on first screen\n const isFirst = tabNavigations.includes(navigation) || navigation.getState().routes[0].key === route.key;\n\n // Run the operation in the next frame so we're sure all listeners have been run\n // This is necessary to know if preventDefault() has been called\n requestAnimationFrame(() => {\n const scrollable = getScrollableNode(ref);\n if (isFocused && isFirst && scrollable && !e.defaultPrevented) {\n if ('scrollToTop' in scrollable) {\n scrollable.scrollToTop();\n } else if ('scrollTo' in scrollable) {\n scrollable.scrollTo({\n y: 0,\n animated: true\n });\n } else if ('scrollToOffset' in scrollable) {\n scrollable.scrollToOffset({\n offset: 0,\n animated: true\n });\n } else if ('scrollResponderScrollTo' in scrollable) {\n scrollable.scrollResponderScrollTo({\n y: 0,\n animated: true\n });\n }\n }\n });\n });\n });\n return () => {\n unsubscribers.forEach(unsubscribe => unsubscribe());\n };\n }, [navigation, ref, route.key]);\n}\n//# sourceMappingURL=useScrollToTop.js.map","import React, { useCallback, useEffect, useRef } from 'react';\nimport { Dimensions, View, Animated, Easing, Platform } from 'react-native';\nimport { useIsMobileLayout } from '../../hooks/useIsMobileLayout';\nimport Text from '../v2BaseComponents/Text';\nimport { colors, zIndex } from '../../utils/theme';\nimport { NotificationPortalContainer } from '../v2BaseComponents/FixedPositionPortalContainer';\nimport { TAB_BAR_HEIGHT } from '../AppNavigator/TabNavigation/constants';\nimport { ACTION_BUTTON_LAYOUT_ACTION_BAR_HEIGHT } from '../v2BaseComponents/ActionButtonLayout/ActionButtonLayout';\nimport { useForceUpdate } from '../../hooks/useForceUpdate';\nimport { mainContentPadding } from '../v2BaseComponents/MainContentContainer';\nimport PressableDynamicOpacity from '../v2BaseComponents/PressableDynamicOpacity';\n\nexport interface NotificationProviderOwnProps {\n children: any;\n}\n\nexport type NotificationProviderProps = NotificationProviderOwnProps;\n\nexport type NotificationSeverity = 'error' | 'success' | 'warn';\nexport type NotificationEvent = {\n message: string;\n severity: NotificationSeverity;\n};\n\nexport type NotifyFunc = (severity: NotificationSeverity, message: string) => void;\n\nexport type NotificationContextValue = {\n notify: NotifyFunc;\n};\n\nexport const NotificationContext = React.createContext({\n notify: () => {\n return;\n },\n});\n\nconst NOTIFICATION_TIMEOUT = 5000;\n\nconst Notification: React.FC void }> = ({ message, onClose, severity }) => {\n const [internalIsShown, setInternalIsShown] = React.useState(true);\n // track a mount delay to help with e2e capturing the notification before animation completes\n const [hasMountDelayPassed, setHasMountDelayPassed] = React.useState(false);\n const presenceAnimationRef = useRef(new Animated.Value(0));\n const opacityAnimationRef = useRef(new Animated.Value(0));\n useEffect(() => {\n const timeout = setTimeout(() => {\n setInternalIsShown(false);\n }, NOTIFICATION_TIMEOUT);\n\n return () => {\n clearTimeout(timeout);\n };\n }, []);\n\n useEffect(() => {\n Animated.parallel([\n Animated.timing(presenceAnimationRef.current, {\n toValue: internalIsShown ? 1 : 0,\n duration: 300,\n useNativeDriver: Platform.OS === 'web',\n easing: Easing.inOut(Easing.ease),\n }),\n Animated.timing(opacityAnimationRef.current, {\n toValue: internalIsShown ? 1 : 0,\n duration: 200,\n useNativeDriver: true,\n delay: 100,\n }),\n ]).start((result) => {\n if (result.finished) {\n if (!internalIsShown) {\n onClose();\n } else {\n setHasMountDelayPassed(true);\n }\n }\n });\n }, [internalIsShown]);\n\n const screenLayoutPadding = 2;\n const isMobileLayout = useIsMobileLayout();\n const baseTestId = `notification-${severity}-${message}`;\n const backgroundColor =\n severity === 'error' ? colors.Alert : severity === 'success' ? colors.Success : colors['Primary-Reg'];\n const desktopWidth = 400;\n const notificationWidth = isMobileLayout ? Dimensions.get('window').width * 0.9 : desktopWidth;\n const notificationHeight = ACTION_BUTTON_LAYOUT_ACTION_BAR_HEIGHT - screenLayoutPadding * 2;\n\n return (\n \n \n \n {\n setInternalIsShown(false);\n }}\n style={{\n width: '100%',\n height: '100%',\n }}\n >\n \n \n {message}\n \n \n \n \n \n \n );\n};\n\ntype PendingNotification = {\n severity: NotificationSeverity;\n message: string;\n dateTime: string;\n};\n\nconst NotificationProvider: React.FC = ({ children }: NotificationProviderProps) => {\n const { forceUpdate } = useForceUpdate();\n const pendingNotifications = React.useRef([]);\n const pendingNotification = pendingNotifications.current[pendingNotifications.current.length - 1];\n\n const notify = useCallback(\n (severity, message) => {\n pendingNotifications.current.push({ severity, message, dateTime: new Date().toISOString() });\n forceUpdate();\n },\n [forceUpdate],\n );\n\n const contextValue = React.useMemo(() => ({ notify }), [notify]);\n\n const renderNotification = () => {\n if (!pendingNotification) return null;\n\n return (\n {\n pendingNotifications.current.pop();\n forceUpdate();\n }}\n severity={pendingNotification.severity}\n key={pendingNotification.message + pendingNotification.dateTime}\n />\n );\n };\n\n return (\n <>\n {children}\n {renderNotification()}\n \n );\n};\n\nexport default React.memo(NotificationProvider);\n","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\n'use client';\n\nimport Animated from '../../vendor/react-native/Animated/Animated';\nexport default Animated;","import _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\n/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\nimport Platform from '../../../exports/Platform';\nimport FlatList from './components/AnimatedFlatList';\nimport Image from './components/AnimatedImage';\nimport ScrollView from './components/AnimatedScrollView';\nimport SectionList from './components/AnimatedSectionList';\nimport Text from './components/AnimatedText';\nimport View from './components/AnimatedView';\nimport AnimatedMock from './AnimatedMock';\nimport AnimatedImplementation from './AnimatedImplementation';\nvar Animated = Platform.isTesting ? AnimatedMock : AnimatedImplementation;\nexport default _objectSpread({\n FlatList,\n Image,\n ScrollView,\n SectionList,\n Text,\n View\n}, Animated);","import _extends from \"@babel/runtime/helpers/extends\";\n/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\nimport * as React from 'react';\nimport FlatList from '../../../../exports/FlatList';\nimport createAnimatedComponent from '../createAnimatedComponent';\n/**\n * @see https://github.com/facebook/react-native/commit/b8c8562\n */\nvar FlatListWithEventThrottle = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(FlatList, _extends({\n scrollEventThrottle: 0.0001\n}, props, {\n ref: ref\n})));\nexport default createAnimatedComponent(FlatListWithEventThrottle);","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\n'use client';\n\nimport FlatList from '../../vendor/react-native/FlatList';\nexport default FlatList;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nvar _excluded = [\"numColumns\", \"columnWrapperStyle\", \"removeClippedSubviews\", \"strictMode\"];\n/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\nimport View from '../../../exports/View';\nimport StyleSheet from '../../../exports/StyleSheet';\nimport deepDiffer from '../deepDiffer';\nimport Platform from '../../../exports/Platform';\nimport invariant from 'fbjs/lib/invariant';\nimport * as React from 'react';\nimport VirtualizedList from '../VirtualizedList';\nimport { keyExtractor as defaultKeyExtractor } from '../VirtualizeUtils';\nimport memoizeOne from 'memoize-one';\n/**\n * Default Props Helper Functions\n * Use the following helper functions for default values\n */\n\n// removeClippedSubviewsOrDefault(this.props.removeClippedSubviews)\nfunction removeClippedSubviewsOrDefault(removeClippedSubviews) {\n return removeClippedSubviews !== null && removeClippedSubviews !== void 0 ? removeClippedSubviews : Platform.OS === 'android';\n}\n\n// numColumnsOrDefault(this.props.numColumns)\nfunction numColumnsOrDefault(numColumns) {\n return numColumns !== null && numColumns !== void 0 ? numColumns : 1;\n}\nfunction isArrayLike(data) {\n // $FlowExpectedError[incompatible-use]\n return typeof Object(data).length === 'number';\n}\n/**\n * A performant interface for rendering simple, flat lists, supporting the most handy features:\n *\n * - Fully cross-platform.\n * - Optional horizontal mode.\n * - Configurable viewability callbacks.\n * - Header support.\n * - Footer support.\n * - Separator support.\n * - Pull to Refresh.\n * - Scroll loading.\n * - ScrollToIndex support.\n *\n * If you need section support, use [``](docs/sectionlist.html).\n *\n * Minimal Example:\n *\n * {item.key}}\n * />\n *\n * More complex, multi-select example demonstrating `PureComponent` usage for perf optimization and avoiding bugs.\n *\n * - By binding the `onPressItem` handler, the props will remain `===` and `PureComponent` will\n * prevent wasteful re-renders unless the actual `id`, `selected`, or `title` props change, even\n * if the components rendered in `MyListItem` did not have such optimizations.\n * - By passing `extraData={this.state}` to `FlatList` we make sure `FlatList` itself will re-render\n * when the `state.selected` changes. Without setting this prop, `FlatList` would not know it\n * needs to re-render any items because it is also a `PureComponent` and the prop comparison will\n * not show any changes.\n * - `keyExtractor` tells the list to use the `id`s for the react keys instead of the default `key` property.\n *\n *\n * class MyListItem extends React.PureComponent {\n * _onPress = () => {\n * this.props.onPressItem(this.props.id);\n * };\n *\n * render() {\n * const textColor = this.props.selected ? \"red\" : \"black\";\n * return (\n * \n * \n * \n * {this.props.title}\n * \n * \n * \n * );\n * }\n * }\n *\n * class MultiSelectList extends React.PureComponent {\n * state = {selected: (new Map(): Map)};\n *\n * _keyExtractor = (item, index) => item.id;\n *\n * _onPressItem = (id: string) => {\n * // updater functions are preferred for transactional updates\n * this.setState((state) => {\n * // copy the map rather than modifying state.\n * const selected = new Map(state.selected);\n * selected.set(id, !selected.get(id)); // toggle\n * return {selected};\n * });\n * };\n *\n * _renderItem = ({item}) => (\n * \n * );\n *\n * render() {\n * return (\n * \n * );\n * }\n * }\n *\n * This is a convenience wrapper around [``](docs/virtualizedlist.html),\n * and thus inherits its props (as well as those of `ScrollView`) that aren't explicitly listed\n * here, along with the following caveats:\n *\n * - Internal state is not preserved when content scrolls out of the render window. Make sure all\n * your data is captured in the item data or external stores like Flux, Redux, or Relay.\n * - This is a `PureComponent` which means that it will not re-render if `props` remain shallow-\n * equal. Make sure that everything your `renderItem` function depends on is passed as a prop\n * (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on\n * changes. This includes the `data` prop and parent component state.\n * - In order to constrain memory and enable smooth scrolling, content is rendered asynchronously\n * offscreen. This means it's possible to scroll faster than the fill rate ands momentarily see\n * blank content. This is a tradeoff that can be adjusted to suit the needs of each application,\n * and we are working on improving it behind the scenes.\n * - By default, the list looks for a `key` prop on each item and uses that for the React key.\n * Alternatively, you can provide a custom `keyExtractor` prop.\n *\n * Also inherits [ScrollView Props](docs/scrollview.html#props), unless it is nested in another FlatList of same orientation.\n */\nclass FlatList extends React.PureComponent {\n /**\n * Scrolls to the end of the content. May be janky without `getItemLayout` prop.\n */\n scrollToEnd(params) {\n if (this._listRef) {\n this._listRef.scrollToEnd(params);\n }\n }\n\n /**\n * Scrolls to the item at the specified index such that it is positioned in the viewable area\n * such that `viewPosition` 0 places it at the top, 1 at the bottom, and 0.5 centered in the\n * middle. `viewOffset` is a fixed number of pixels to offset the final target position.\n *\n * Note: cannot scroll to locations outside the render window without specifying the\n * `getItemLayout` prop.\n */\n scrollToIndex(params) {\n if (this._listRef) {\n this._listRef.scrollToIndex(params);\n }\n }\n\n /**\n * Requires linear scan through data - use `scrollToIndex` instead if possible.\n *\n * Note: cannot scroll to locations outside the render window without specifying the\n * `getItemLayout` prop.\n */\n scrollToItem(params) {\n if (this._listRef) {\n this._listRef.scrollToItem(params);\n }\n }\n\n /**\n * Scroll to a specific content pixel offset in the list.\n *\n * Check out [scrollToOffset](docs/virtualizedlist.html#scrolltooffset) of VirtualizedList\n */\n scrollToOffset(params) {\n if (this._listRef) {\n this._listRef.scrollToOffset(params);\n }\n }\n\n /**\n * Tells the list an interaction has occurred, which should trigger viewability calculations, e.g.\n * if `waitForInteractions` is true and the user has not scrolled. This is typically called by\n * taps on items or by navigation actions.\n */\n recordInteraction() {\n if (this._listRef) {\n this._listRef.recordInteraction();\n }\n }\n\n /**\n * Displays the scroll indicators momentarily.\n *\n * @platform ios\n */\n flashScrollIndicators() {\n if (this._listRef) {\n this._listRef.flashScrollIndicators();\n }\n }\n\n /**\n * Provides a handle to the underlying scroll responder.\n */\n getScrollResponder() {\n if (this._listRef) {\n return this._listRef.getScrollResponder();\n }\n }\n\n /**\n * Provides a reference to the underlying host component\n */\n getNativeScrollRef() {\n if (this._listRef) {\n /* $FlowFixMe[incompatible-return] Suppresses errors found when fixing\n * TextInput typing */\n return this._listRef.getScrollRef();\n }\n }\n getScrollableNode() {\n if (this._listRef) {\n return this._listRef.getScrollableNode();\n }\n }\n constructor(_props) {\n super(_props);\n this._virtualizedListPairs = [];\n this._captureRef = ref => {\n this._listRef = ref;\n };\n this._getItem = (data, index) => {\n var numColumns = numColumnsOrDefault(this.props.numColumns);\n if (numColumns > 1) {\n var ret = [];\n for (var kk = 0; kk < numColumns; kk++) {\n var itemIndex = index * numColumns + kk;\n if (itemIndex < data.length) {\n var _item = data[itemIndex];\n ret.push(_item);\n }\n }\n return ret;\n } else {\n return data[index];\n }\n };\n this._getItemCount = data => {\n // Legacy behavior of FlatList was to forward \"undefined\" length if invalid\n // data like a non-arraylike object is passed. VirtualizedList would then\n // coerce this, and the math would work out to no-op. For compatibility, if\n // invalid data is passed, we tell VirtualizedList there are zero items\n // available to prevent it from trying to read from the invalid data\n // (without propagating invalidly typed data).\n if (data != null && isArrayLike(data)) {\n var numColumns = numColumnsOrDefault(this.props.numColumns);\n return numColumns > 1 ? Math.ceil(data.length / numColumns) : data.length;\n } else {\n return 0;\n }\n };\n this._keyExtractor = (items, index) => {\n var _this$props$keyExtrac;\n var numColumns = numColumnsOrDefault(this.props.numColumns);\n var keyExtractor = (_this$props$keyExtrac = this.props.keyExtractor) !== null && _this$props$keyExtrac !== void 0 ? _this$props$keyExtrac : defaultKeyExtractor;\n if (numColumns > 1) {\n invariant(Array.isArray(items), 'FlatList: Encountered internal consistency error, expected each item to consist of an ' + 'array with 1-%s columns; instead, received a single item.', numColumns);\n return items.map((item, kk) => keyExtractor(item, index * numColumns + kk)).join(':');\n }\n\n // $FlowFixMe[incompatible-call] Can't call keyExtractor with an array\n return keyExtractor(items, index);\n };\n this._renderer = (ListItemComponent, renderItem, columnWrapperStyle, numColumns, extraData\n // $FlowFixMe[missing-local-annot]\n ) => {\n var cols = numColumnsOrDefault(numColumns);\n var render = props => {\n if (ListItemComponent) {\n // $FlowFixMe[not-a-component] Component isn't valid\n // $FlowFixMe[incompatible-type-arg] Component isn't valid\n // $FlowFixMe[incompatible-return] Component isn't valid\n return /*#__PURE__*/React.createElement(ListItemComponent, props);\n } else if (renderItem) {\n // $FlowFixMe[incompatible-call]\n return renderItem(props);\n } else {\n return null;\n }\n };\n var renderProp = info => {\n if (cols > 1) {\n var _item2 = info.item,\n _index = info.index;\n invariant(Array.isArray(_item2), 'Expected array of items with numColumns > 1');\n return /*#__PURE__*/React.createElement(View, {\n style: [styles.row, columnWrapperStyle]\n }, _item2.map((it, kk) => {\n var element = render({\n // $FlowFixMe[incompatible-call]\n item: it,\n index: _index * cols + kk,\n separators: info.separators\n });\n return element != null ? /*#__PURE__*/React.createElement(React.Fragment, {\n key: kk\n }, element) : null;\n }));\n } else {\n return render(info);\n }\n };\n return ListItemComponent ? {\n ListItemComponent: renderProp\n } : {\n renderItem: renderProp\n };\n };\n this._memoizedRenderer = memoizeOne(this._renderer);\n this._checkProps(this.props);\n if (this.props.viewabilityConfigCallbackPairs) {\n this._virtualizedListPairs = this.props.viewabilityConfigCallbackPairs.map(pair => ({\n viewabilityConfig: pair.viewabilityConfig,\n onViewableItemsChanged: this._createOnViewableItemsChanged(pair.onViewableItemsChanged)\n }));\n } else if (this.props.onViewableItemsChanged) {\n this._virtualizedListPairs.push({\n /* $FlowFixMe[incompatible-call] (>=0.63.0 site=react_native_fb) This\n * comment suppresses an error found when Flow v0.63 was deployed. To\n * see the error delete this comment and run Flow. */\n viewabilityConfig: this.props.viewabilityConfig,\n onViewableItemsChanged: this._createOnViewableItemsChanged(this.props.onViewableItemsChanged)\n });\n }\n }\n\n // $FlowFixMe[missing-local-annot]\n componentDidUpdate(prevProps) {\n invariant(prevProps.numColumns === this.props.numColumns, 'Changing numColumns on the fly is not supported. Change the key prop on FlatList when ' + 'changing the number of columns to force a fresh render of the component.');\n invariant(prevProps.onViewableItemsChanged === this.props.onViewableItemsChanged, 'Changing onViewableItemsChanged on the fly is not supported');\n invariant(!deepDiffer(prevProps.viewabilityConfig, this.props.viewabilityConfig), 'Changing viewabilityConfig on the fly is not supported');\n invariant(prevProps.viewabilityConfigCallbackPairs === this.props.viewabilityConfigCallbackPairs, 'Changing viewabilityConfigCallbackPairs on the fly is not supported');\n this._checkProps(this.props);\n }\n // $FlowFixMe[missing-local-annot]\n _checkProps(props) {\n var getItem = props.getItem,\n getItemCount = props.getItemCount,\n horizontal = props.horizontal,\n columnWrapperStyle = props.columnWrapperStyle,\n onViewableItemsChanged = props.onViewableItemsChanged,\n viewabilityConfigCallbackPairs = props.viewabilityConfigCallbackPairs;\n var numColumns = numColumnsOrDefault(this.props.numColumns);\n invariant(!getItem && !getItemCount, 'FlatList does not support custom data formats.');\n if (numColumns > 1) {\n invariant(!horizontal, 'numColumns does not support horizontal.');\n } else {\n invariant(!columnWrapperStyle, 'columnWrapperStyle not supported for single column lists');\n }\n invariant(!(onViewableItemsChanged && viewabilityConfigCallbackPairs), 'FlatList does not support setting both onViewableItemsChanged and ' + 'viewabilityConfigCallbackPairs.');\n }\n _pushMultiColumnViewable(arr, v) {\n var _this$props$keyExtrac2;\n var numColumns = numColumnsOrDefault(this.props.numColumns);\n var keyExtractor = (_this$props$keyExtrac2 = this.props.keyExtractor) !== null && _this$props$keyExtrac2 !== void 0 ? _this$props$keyExtrac2 : defaultKeyExtractor;\n v.item.forEach((item, ii) => {\n invariant(v.index != null, 'Missing index!');\n var index = v.index * numColumns + ii;\n arr.push(_objectSpread(_objectSpread({}, v), {}, {\n item,\n key: keyExtractor(item, index),\n index\n }));\n });\n }\n _createOnViewableItemsChanged(onViewableItemsChanged\n // $FlowFixMe[missing-local-annot]\n ) {\n return info => {\n var numColumns = numColumnsOrDefault(this.props.numColumns);\n if (onViewableItemsChanged) {\n if (numColumns > 1) {\n var changed = [];\n var viewableItems = [];\n info.viewableItems.forEach(v => this._pushMultiColumnViewable(viewableItems, v));\n info.changed.forEach(v => this._pushMultiColumnViewable(changed, v));\n onViewableItemsChanged({\n viewableItems,\n changed\n });\n } else {\n onViewableItemsChanged(info);\n }\n }\n };\n }\n\n // $FlowFixMe[missing-local-annot]\n\n render() {\n var _this$props = this.props,\n numColumns = _this$props.numColumns,\n columnWrapperStyle = _this$props.columnWrapperStyle,\n _removeClippedSubviews = _this$props.removeClippedSubviews,\n _this$props$strictMod = _this$props.strictMode,\n strictMode = _this$props$strictMod === void 0 ? false : _this$props$strictMod,\n restProps = _objectWithoutPropertiesLoose(_this$props, _excluded);\n var renderer = strictMode ? this._memoizedRenderer : this._renderer;\n return (\n /*#__PURE__*/\n // $FlowFixMe[incompatible-exact] - `restProps` (`Props`) is inexact.\n React.createElement(VirtualizedList, _extends({}, restProps, {\n getItem: this._getItem,\n getItemCount: this._getItemCount,\n keyExtractor: this._keyExtractor,\n ref: this._captureRef,\n viewabilityConfigCallbackPairs: this._virtualizedListPairs,\n removeClippedSubviews: removeClippedSubviewsOrDefault(_removeClippedSubviews)\n }, renderer(this.props.ListItemComponent, this.props.renderItem, columnWrapperStyle, numColumns, this.props.extraData)))\n );\n }\n}\nvar styles = StyleSheet.create({\n row: {\n flexDirection: 'row'\n }\n});\nexport default FlatList;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n * \n */\n\n'use strict';\n\n/*\n * @returns {bool} true if different, false if equal\n */\nvar deepDiffer = function deepDiffer(one, two, maxDepth) {\n if (maxDepth === void 0) {\n maxDepth = -1;\n }\n if (maxDepth === 0) {\n return true;\n }\n if (one === two) {\n // Short circuit on identical object references instead of traversing them.\n return false;\n }\n if (typeof one === 'function' && typeof two === 'function') {\n // We consider all functions equal\n return false;\n }\n if (typeof one !== 'object' || one === null) {\n // Primitives can be directly compared\n return one !== two;\n }\n if (typeof two !== 'object' || two === null) {\n // We know they are different because the previous case would have triggered\n // otherwise.\n return true;\n }\n if (one.constructor !== two.constructor) {\n return true;\n }\n if (Array.isArray(one)) {\n // We know two is also an array because the constructors are equal\n var len = one.length;\n if (two.length !== len) {\n return true;\n }\n for (var ii = 0; ii < len; ii++) {\n if (deepDiffer(one[ii], two[ii], maxDepth - 1)) {\n return true;\n }\n }\n } else {\n for (var key in one) {\n if (deepDiffer(one[key], two[key], maxDepth - 1)) {\n return true;\n }\n }\n for (var twoKey in two) {\n // The only case we haven't checked yet is keys that are in two but aren't\n // in one, which means they are different.\n if (one[twoKey] === undefined && two[twoKey] !== undefined) {\n return true;\n }\n }\n }\n return false;\n};\nexport default deepDiffer;","import _createForOfIteratorHelperLoose from \"@babel/runtime/helpers/createForOfIteratorHelperLoose\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\n/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\nimport RefreshControl from '../../../exports/RefreshControl';\nimport ScrollView from '../../../exports/ScrollView';\nimport View from '../../../exports/View';\nimport StyleSheet from '../../../exports/StyleSheet';\nimport findNodeHandle from '../../../exports/findNodeHandle';\nimport Batchinator from '../Batchinator';\nimport clamp from '../Utilities/clamp';\nimport infoLog from '../infoLog';\nimport { CellRenderMask } from './CellRenderMask';\nimport ChildListCollection from './ChildListCollection';\nimport FillRateHelper from '../FillRateHelper';\nimport StateSafePureComponent from './StateSafePureComponent';\nimport ViewabilityHelper from '../ViewabilityHelper';\nimport CellRenderer from './VirtualizedListCellRenderer';\nimport { VirtualizedListCellContextProvider, VirtualizedListContext, VirtualizedListContextProvider } from './VirtualizedListContext.js';\nimport { computeWindowedRenderLimits, keyExtractor as defaultKeyExtractor } from '../VirtualizeUtils';\nimport invariant from 'fbjs/lib/invariant';\nimport nullthrows from 'nullthrows';\nimport * as React from 'react';\nvar __DEV__ = process.env.NODE_ENV !== 'production';\nvar ON_EDGE_REACHED_EPSILON = 0.001;\nvar _usedIndexForKey = false;\nvar _keylessItemComponentName = '';\n/**\n * Default Props Helper Functions\n * Use the following helper functions for default values\n */\n\n// horizontalOrDefault(this.props.horizontal)\nfunction horizontalOrDefault(horizontal) {\n return horizontal !== null && horizontal !== void 0 ? horizontal : false;\n}\n\n// initialNumToRenderOrDefault(this.props.initialNumToRender)\nfunction initialNumToRenderOrDefault(initialNumToRender) {\n return initialNumToRender !== null && initialNumToRender !== void 0 ? initialNumToRender : 10;\n}\n\n// maxToRenderPerBatchOrDefault(this.props.maxToRenderPerBatch)\nfunction maxToRenderPerBatchOrDefault(maxToRenderPerBatch) {\n return maxToRenderPerBatch !== null && maxToRenderPerBatch !== void 0 ? maxToRenderPerBatch : 10;\n}\n\n// onStartReachedThresholdOrDefault(this.props.onStartReachedThreshold)\nfunction onStartReachedThresholdOrDefault(onStartReachedThreshold) {\n return onStartReachedThreshold !== null && onStartReachedThreshold !== void 0 ? onStartReachedThreshold : 2;\n}\n\n// onEndReachedThresholdOrDefault(this.props.onEndReachedThreshold)\nfunction onEndReachedThresholdOrDefault(onEndReachedThreshold) {\n return onEndReachedThreshold !== null && onEndReachedThreshold !== void 0 ? onEndReachedThreshold : 2;\n}\n\n// getScrollingThreshold(visibleLength, onEndReachedThreshold)\nfunction getScrollingThreshold(threshold, visibleLength) {\n return threshold * visibleLength / 2;\n}\n\n// scrollEventThrottleOrDefault(this.props.scrollEventThrottle)\nfunction scrollEventThrottleOrDefault(scrollEventThrottle) {\n return scrollEventThrottle !== null && scrollEventThrottle !== void 0 ? scrollEventThrottle : 50;\n}\n\n// windowSizeOrDefault(this.props.windowSize)\nfunction windowSizeOrDefault(windowSize) {\n return windowSize !== null && windowSize !== void 0 ? windowSize : 21;\n}\nfunction findLastWhere(arr, predicate) {\n for (var i = arr.length - 1; i >= 0; i--) {\n if (predicate(arr[i])) {\n return arr[i];\n }\n }\n return null;\n}\n\n/**\n * Base implementation for the more convenient [``](https://reactnative.dev/docs/flatlist)\n * and [``](https://reactnative.dev/docs/sectionlist) components, which are also better\n * documented. In general, this should only really be used if you need more flexibility than\n * `FlatList` provides, e.g. for use with immutable data instead of plain arrays.\n *\n * Virtualization massively improves memory consumption and performance of large lists by\n * maintaining a finite render window of active items and replacing all items outside of the render\n * window with appropriately sized blank space. The window adapts to scrolling behavior, and items\n * are rendered incrementally with low-pri (after any running interactions) if they are far from the\n * visible area, or with hi-pri otherwise to minimize the potential of seeing blank space.\n *\n * Some caveats:\n *\n * - Internal state is not preserved when content scrolls out of the render window. Make sure all\n * your data is captured in the item data or external stores like Flux, Redux, or Relay.\n * - This is a `PureComponent` which means that it will not re-render if `props` remain shallow-\n * equal. Make sure that everything your `renderItem` function depends on is passed as a prop\n * (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on\n * changes. This includes the `data` prop and parent component state.\n * - In order to constrain memory and enable smooth scrolling, content is rendered asynchronously\n * offscreen. This means it's possible to scroll faster than the fill rate ands momentarily see\n * blank content. This is a tradeoff that can be adjusted to suit the needs of each application,\n * and we are working on improving it behind the scenes.\n * - By default, the list looks for a `key` or `id` prop on each item and uses that for the React key.\n * Alternatively, you can provide a custom `keyExtractor` prop.\n * - As an effort to remove defaultProps, use helper functions when referencing certain props\n *\n */\nclass VirtualizedList extends StateSafePureComponent {\n // scrollToEnd may be janky without getItemLayout prop\n scrollToEnd(params) {\n var animated = params ? params.animated : true;\n var veryLast = this.props.getItemCount(this.props.data) - 1;\n if (veryLast < 0) {\n return;\n }\n var frame = this.__getFrameMetricsApprox(veryLast, this.props);\n var offset = Math.max(0, frame.offset + frame.length + this._footerLength - this._scrollMetrics.visibleLength);\n if (this._scrollRef == null) {\n return;\n }\n if (this._scrollRef.scrollTo == null) {\n console.warn('No scrollTo method provided. This may be because you have two nested ' + 'VirtualizedLists with the same orientation, or because you are ' + 'using a custom component that does not implement scrollTo.');\n return;\n }\n this._scrollRef.scrollTo(horizontalOrDefault(this.props.horizontal) ? {\n x: offset,\n animated\n } : {\n y: offset,\n animated\n });\n }\n\n // scrollToIndex may be janky without getItemLayout prop\n scrollToIndex(params) {\n var _this$props = this.props,\n data = _this$props.data,\n horizontal = _this$props.horizontal,\n getItemCount = _this$props.getItemCount,\n getItemLayout = _this$props.getItemLayout,\n onScrollToIndexFailed = _this$props.onScrollToIndexFailed;\n var animated = params.animated,\n index = params.index,\n viewOffset = params.viewOffset,\n viewPosition = params.viewPosition;\n invariant(index >= 0, \"scrollToIndex out of range: requested index \" + index + \" but minimum is 0\");\n invariant(getItemCount(data) >= 1, \"scrollToIndex out of range: item length \" + getItemCount(data) + \" but minimum is 1\");\n invariant(index < getItemCount(data), \"scrollToIndex out of range: requested index \" + index + \" is out of 0 to \" + (getItemCount(data) - 1));\n if (!getItemLayout && index > this._highestMeasuredFrameIndex) {\n invariant(!!onScrollToIndexFailed, 'scrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed, ' + 'otherwise there is no way to know the location of offscreen indices or handle failures.');\n onScrollToIndexFailed({\n averageItemLength: this._averageCellLength,\n highestMeasuredFrameIndex: this._highestMeasuredFrameIndex,\n index\n });\n return;\n }\n var frame = this.__getFrameMetricsApprox(Math.floor(index), this.props);\n var offset = Math.max(0, this._getOffsetApprox(index, this.props) - (viewPosition || 0) * (this._scrollMetrics.visibleLength - frame.length)) - (viewOffset || 0);\n if (this._scrollRef == null) {\n return;\n }\n if (this._scrollRef.scrollTo == null) {\n console.warn('No scrollTo method provided. This may be because you have two nested ' + 'VirtualizedLists with the same orientation, or because you are ' + 'using a custom component that does not implement scrollTo.');\n return;\n }\n this._scrollRef.scrollTo(horizontal ? {\n x: offset,\n animated\n } : {\n y: offset,\n animated\n });\n }\n\n // scrollToItem may be janky without getItemLayout prop. Required linear scan through items -\n // use scrollToIndex instead if possible.\n scrollToItem(params) {\n var item = params.item;\n var _this$props2 = this.props,\n data = _this$props2.data,\n getItem = _this$props2.getItem,\n getItemCount = _this$props2.getItemCount;\n var itemCount = getItemCount(data);\n for (var _index = 0; _index < itemCount; _index++) {\n if (getItem(data, _index) === item) {\n this.scrollToIndex(_objectSpread(_objectSpread({}, params), {}, {\n index: _index\n }));\n break;\n }\n }\n }\n\n /**\n * Scroll to a specific content pixel offset in the list.\n *\n * Param `offset` expects the offset to scroll to.\n * In case of `horizontal` is true, the offset is the x-value,\n * in any other case the offset is the y-value.\n *\n * Param `animated` (`true` by default) defines whether the list\n * should do an animation while scrolling.\n */\n scrollToOffset(params) {\n var animated = params.animated,\n offset = params.offset;\n if (this._scrollRef == null) {\n return;\n }\n if (this._scrollRef.scrollTo == null) {\n console.warn('No scrollTo method provided. This may be because you have two nested ' + 'VirtualizedLists with the same orientation, or because you are ' + 'using a custom component that does not implement scrollTo.');\n return;\n }\n this._scrollRef.scrollTo(horizontalOrDefault(this.props.horizontal) ? {\n x: offset,\n animated\n } : {\n y: offset,\n animated\n });\n }\n recordInteraction() {\n this._nestedChildLists.forEach(childList => {\n childList.recordInteraction();\n });\n this._viewabilityTuples.forEach(t => {\n t.viewabilityHelper.recordInteraction();\n });\n this._updateViewableItems(this.props, this.state.cellsAroundViewport);\n }\n flashScrollIndicators() {\n if (this._scrollRef == null) {\n return;\n }\n this._scrollRef.flashScrollIndicators();\n }\n\n /**\n * Provides a handle to the underlying scroll responder.\n * Note that `this._scrollRef` might not be a `ScrollView`, so we\n * need to check that it responds to `getScrollResponder` before calling it.\n */\n getScrollResponder() {\n if (this._scrollRef && this._scrollRef.getScrollResponder) {\n return this._scrollRef.getScrollResponder();\n }\n }\n getScrollableNode() {\n if (this._scrollRef && this._scrollRef.getScrollableNode) {\n return this._scrollRef.getScrollableNode();\n } else {\n return this._scrollRef;\n }\n }\n getScrollRef() {\n if (this._scrollRef && this._scrollRef.getScrollRef) {\n return this._scrollRef.getScrollRef();\n } else {\n return this._scrollRef;\n }\n }\n _getCellKey() {\n var _this$context;\n return ((_this$context = this.context) == null ? void 0 : _this$context.cellKey) || 'rootList';\n }\n\n // $FlowFixMe[missing-local-annot]\n\n hasMore() {\n return this._hasMore;\n }\n\n // $FlowFixMe[missing-local-annot]\n\n // REACT-NATIVE-WEB patch to preserve during future RN merges: Support inverted wheel scroller.\n\n constructor(_props) {\n var _this$props$updateCel;\n super(_props);\n this._getScrollMetrics = () => {\n return this._scrollMetrics;\n };\n this._getOutermostParentListRef = () => {\n if (this._isNestedWithSameOrientation()) {\n return this.context.getOutermostParentListRef();\n } else {\n return this;\n }\n };\n this._registerAsNestedChild = childList => {\n this._nestedChildLists.add(childList.ref, childList.cellKey);\n if (this._hasInteracted) {\n childList.ref.recordInteraction();\n }\n };\n this._unregisterAsNestedChild = childList => {\n this._nestedChildLists.remove(childList.ref);\n };\n this._onUpdateSeparators = (keys, newProps) => {\n keys.forEach(key => {\n var ref = key != null && this._cellRefs[key];\n ref && ref.updateSeparatorProps(newProps);\n });\n };\n this._getSpacerKey = isVertical => isVertical ? 'height' : 'width';\n this._averageCellLength = 0;\n this._cellRefs = {};\n this._frames = {};\n this._footerLength = 0;\n this._hasTriggeredInitialScrollToIndex = false;\n this._hasInteracted = false;\n this._hasMore = false;\n this._hasWarned = {};\n this._headerLength = 0;\n this._hiPriInProgress = false;\n this._highestMeasuredFrameIndex = 0;\n this._indicesToKeys = new Map();\n this._lastFocusedCellKey = null;\n this._nestedChildLists = new ChildListCollection();\n this._offsetFromParentVirtualizedList = 0;\n this._prevParentOffset = 0;\n this._scrollMetrics = {\n contentLength: 0,\n dOffset: 0,\n dt: 10,\n offset: 0,\n timestamp: 0,\n velocity: 0,\n visibleLength: 0,\n zoomScale: 1\n };\n this._scrollRef = null;\n this._sentStartForContentLength = 0;\n this._sentEndForContentLength = 0;\n this._totalCellLength = 0;\n this._totalCellsMeasured = 0;\n this._viewabilityTuples = [];\n this._captureScrollRef = ref => {\n this._scrollRef = ref;\n };\n this._defaultRenderScrollComponent = props => {\n var onRefresh = props.onRefresh;\n if (this._isNestedWithSameOrientation()) {\n // $FlowFixMe[prop-missing] - Typing ReactNativeComponent revealed errors\n return /*#__PURE__*/React.createElement(View, props);\n } else if (onRefresh) {\n var _props$refreshing;\n invariant(typeof props.refreshing === 'boolean', '`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `' + JSON.stringify((_props$refreshing = props.refreshing) !== null && _props$refreshing !== void 0 ? _props$refreshing : 'undefined') + '`');\n return (\n /*#__PURE__*/\n // $FlowFixMe[prop-missing] Invalid prop usage\n // $FlowFixMe[incompatible-use]\n React.createElement(ScrollView, _extends({}, props, {\n refreshControl: props.refreshControl == null ? /*#__PURE__*/React.createElement(RefreshControl\n // $FlowFixMe[incompatible-type]\n , {\n refreshing: props.refreshing,\n onRefresh: onRefresh,\n progressViewOffset: props.progressViewOffset\n }) : props.refreshControl\n }))\n );\n } else {\n // $FlowFixMe[prop-missing] Invalid prop usage\n // $FlowFixMe[incompatible-use]\n return /*#__PURE__*/React.createElement(ScrollView, props);\n }\n };\n this._onCellLayout = (e, cellKey, index) => {\n var layout = e.nativeEvent.layout;\n var next = {\n offset: this._selectOffset(layout),\n length: this._selectLength(layout),\n index,\n inLayout: true\n };\n var curr = this._frames[cellKey];\n if (!curr || next.offset !== curr.offset || next.length !== curr.length || index !== curr.index) {\n this._totalCellLength += next.length - (curr ? curr.length : 0);\n this._totalCellsMeasured += curr ? 0 : 1;\n this._averageCellLength = this._totalCellLength / this._totalCellsMeasured;\n this._frames[cellKey] = next;\n this._highestMeasuredFrameIndex = Math.max(this._highestMeasuredFrameIndex, index);\n this._scheduleCellsToRenderUpdate();\n } else {\n this._frames[cellKey].inLayout = true;\n }\n this._triggerRemeasureForChildListsInCell(cellKey);\n this._computeBlankness();\n this._updateViewableItems(this.props, this.state.cellsAroundViewport);\n };\n this._onCellUnmount = cellKey => {\n delete this._cellRefs[cellKey];\n var curr = this._frames[cellKey];\n if (curr) {\n this._frames[cellKey] = _objectSpread(_objectSpread({}, curr), {}, {\n inLayout: false\n });\n }\n };\n this._onLayout = e => {\n if (this._isNestedWithSameOrientation()) {\n // Need to adjust our scroll metrics to be relative to our containing\n // VirtualizedList before we can make claims about list item viewability\n this.measureLayoutRelativeToContainingList();\n } else {\n this._scrollMetrics.visibleLength = this._selectLength(e.nativeEvent.layout);\n }\n this.props.onLayout && this.props.onLayout(e);\n this._scheduleCellsToRenderUpdate();\n this._maybeCallOnEdgeReached();\n };\n this._onLayoutEmpty = e => {\n this.props.onLayout && this.props.onLayout(e);\n };\n this._onLayoutFooter = e => {\n this._triggerRemeasureForChildListsInCell(this._getFooterCellKey());\n this._footerLength = this._selectLength(e.nativeEvent.layout);\n };\n this._onLayoutHeader = e => {\n this._headerLength = this._selectLength(e.nativeEvent.layout);\n };\n this._onContentSizeChange = (width, height) => {\n if (width > 0 && height > 0 && this.props.initialScrollIndex != null && this.props.initialScrollIndex > 0 && !this._hasTriggeredInitialScrollToIndex) {\n if (this.props.contentOffset == null) {\n if (this.props.initialScrollIndex < this.props.getItemCount(this.props.data)) {\n this.scrollToIndex({\n animated: false,\n index: nullthrows(this.props.initialScrollIndex)\n });\n } else {\n this.scrollToEnd({\n animated: false\n });\n }\n }\n this._hasTriggeredInitialScrollToIndex = true;\n }\n if (this.props.onContentSizeChange) {\n this.props.onContentSizeChange(width, height);\n }\n this._scrollMetrics.contentLength = this._selectLength({\n height,\n width\n });\n this._scheduleCellsToRenderUpdate();\n this._maybeCallOnEdgeReached();\n };\n this._convertParentScrollMetrics = metrics => {\n // Offset of the top of the nested list relative to the top of its parent's viewport\n var offset = metrics.offset - this._offsetFromParentVirtualizedList;\n // Child's visible length is the same as its parent's\n var visibleLength = metrics.visibleLength;\n var dOffset = offset - this._scrollMetrics.offset;\n var contentLength = this._scrollMetrics.contentLength;\n return {\n visibleLength,\n contentLength,\n offset,\n dOffset\n };\n };\n this._onScroll = e => {\n this._nestedChildLists.forEach(childList => {\n childList._onScroll(e);\n });\n if (this.props.onScroll) {\n this.props.onScroll(e);\n }\n var timestamp = e.timeStamp;\n var visibleLength = this._selectLength(e.nativeEvent.layoutMeasurement);\n var contentLength = this._selectLength(e.nativeEvent.contentSize);\n var offset = this._selectOffset(e.nativeEvent.contentOffset);\n var dOffset = offset - this._scrollMetrics.offset;\n if (this._isNestedWithSameOrientation()) {\n if (this._scrollMetrics.contentLength === 0) {\n // Ignore scroll events until onLayout has been called and we\n // know our offset from our offset from our parent\n return;\n }\n var _this$_convertParentS = this._convertParentScrollMetrics({\n visibleLength,\n offset\n });\n visibleLength = _this$_convertParentS.visibleLength;\n contentLength = _this$_convertParentS.contentLength;\n offset = _this$_convertParentS.offset;\n dOffset = _this$_convertParentS.dOffset;\n }\n var dt = this._scrollMetrics.timestamp ? Math.max(1, timestamp - this._scrollMetrics.timestamp) : 1;\n var velocity = dOffset / dt;\n if (dt > 500 && this._scrollMetrics.dt > 500 && contentLength > 5 * visibleLength && !this._hasWarned.perf) {\n infoLog('VirtualizedList: You have a large list that is slow to update - make sure your ' + 'renderItem function renders components that follow React performance best practices ' + 'like PureComponent, shouldComponentUpdate, etc.', {\n dt,\n prevDt: this._scrollMetrics.dt,\n contentLength\n });\n this._hasWarned.perf = true;\n }\n\n // For invalid negative values (w/ RTL), set this to 1.\n var zoomScale = e.nativeEvent.zoomScale < 0 ? 1 : e.nativeEvent.zoomScale;\n this._scrollMetrics = {\n contentLength,\n dt,\n dOffset,\n offset,\n timestamp,\n velocity,\n visibleLength,\n zoomScale\n };\n this._updateViewableItems(this.props, this.state.cellsAroundViewport);\n if (!this.props) {\n return;\n }\n this._maybeCallOnEdgeReached();\n if (velocity !== 0) {\n this._fillRateHelper.activate();\n }\n this._computeBlankness();\n this._scheduleCellsToRenderUpdate();\n };\n this._onScrollBeginDrag = e => {\n this._nestedChildLists.forEach(childList => {\n childList._onScrollBeginDrag(e);\n });\n this._viewabilityTuples.forEach(tuple => {\n tuple.viewabilityHelper.recordInteraction();\n });\n this._hasInteracted = true;\n this.props.onScrollBeginDrag && this.props.onScrollBeginDrag(e);\n };\n this._onScrollEndDrag = e => {\n this._nestedChildLists.forEach(childList => {\n childList._onScrollEndDrag(e);\n });\n var velocity = e.nativeEvent.velocity;\n if (velocity) {\n this._scrollMetrics.velocity = this._selectOffset(velocity);\n }\n this._computeBlankness();\n this.props.onScrollEndDrag && this.props.onScrollEndDrag(e);\n };\n this._onMomentumScrollBegin = e => {\n this._nestedChildLists.forEach(childList => {\n childList._onMomentumScrollBegin(e);\n });\n this.props.onMomentumScrollBegin && this.props.onMomentumScrollBegin(e);\n };\n this._onMomentumScrollEnd = e => {\n this._nestedChildLists.forEach(childList => {\n childList._onMomentumScrollEnd(e);\n });\n this._scrollMetrics.velocity = 0;\n this._computeBlankness();\n this.props.onMomentumScrollEnd && this.props.onMomentumScrollEnd(e);\n };\n this._updateCellsToRender = () => {\n this._updateViewableItems(this.props, this.state.cellsAroundViewport);\n this.setState((state, props) => {\n var cellsAroundViewport = this._adjustCellsAroundViewport(props, state.cellsAroundViewport);\n var renderMask = VirtualizedList._createRenderMask(props, cellsAroundViewport, this._getNonViewportRenderRegions(props));\n if (cellsAroundViewport.first === state.cellsAroundViewport.first && cellsAroundViewport.last === state.cellsAroundViewport.last && renderMask.equals(state.renderMask)) {\n return null;\n }\n return {\n cellsAroundViewport,\n renderMask\n };\n });\n };\n this._createViewToken = (index, isViewable, props\n // $FlowFixMe[missing-local-annot]\n ) => {\n var data = props.data,\n getItem = props.getItem;\n var item = getItem(data, index);\n return {\n index,\n item,\n key: this._keyExtractor(item, index, props),\n isViewable\n };\n };\n this._getOffsetApprox = (index, props) => {\n if (Number.isInteger(index)) {\n return this.__getFrameMetricsApprox(index, props).offset;\n } else {\n var frameMetrics = this.__getFrameMetricsApprox(Math.floor(index), props);\n var remainder = index - Math.floor(index);\n return frameMetrics.offset + remainder * frameMetrics.length;\n }\n };\n this.__getFrameMetricsApprox = (index, props) => {\n var frame = this._getFrameMetrics(index, props);\n if (frame && frame.index === index) {\n // check for invalid frames due to row re-ordering\n return frame;\n } else {\n var data = props.data,\n getItemCount = props.getItemCount,\n getItemLayout = props.getItemLayout;\n invariant(index >= 0 && index < getItemCount(data), 'Tried to get frame for out of range index ' + index);\n invariant(!getItemLayout, 'Should not have to estimate frames when a measurement metrics function is provided');\n return {\n length: this._averageCellLength,\n offset: this._averageCellLength * index\n };\n }\n };\n this._getFrameMetrics = (index, props) => {\n var data = props.data,\n getItem = props.getItem,\n getItemCount = props.getItemCount,\n getItemLayout = props.getItemLayout;\n invariant(index >= 0 && index < getItemCount(data), 'Tried to get frame for out of range index ' + index);\n var item = getItem(data, index);\n var frame = this._frames[this._keyExtractor(item, index, props)];\n if (!frame || frame.index !== index) {\n if (getItemLayout) {\n /* $FlowFixMe[prop-missing] (>=0.63.0 site=react_native_fb) This comment\n * suppresses an error found when Flow v0.63 was deployed. To see the error\n * delete this comment and run Flow. */\n return getItemLayout(data, index);\n }\n }\n return frame;\n };\n this._getNonViewportRenderRegions = props => {\n // Keep a viewport's worth of content around the last focused cell to allow\n // random navigation around it without any blanking. E.g. tabbing from one\n // focused item out of viewport to another.\n if (!(this._lastFocusedCellKey && this._cellRefs[this._lastFocusedCellKey])) {\n return [];\n }\n var lastFocusedCellRenderer = this._cellRefs[this._lastFocusedCellKey];\n var focusedCellIndex = lastFocusedCellRenderer.props.index;\n var itemCount = props.getItemCount(props.data);\n\n // The last cell we rendered may be at a new index. Bail if we don't know\n // where it is.\n if (focusedCellIndex >= itemCount || this._keyExtractor(props.getItem(props.data, focusedCellIndex), focusedCellIndex, props) !== this._lastFocusedCellKey) {\n return [];\n }\n var first = focusedCellIndex;\n var heightOfCellsBeforeFocused = 0;\n for (var i = first - 1; i >= 0 && heightOfCellsBeforeFocused < this._scrollMetrics.visibleLength; i--) {\n first--;\n heightOfCellsBeforeFocused += this.__getFrameMetricsApprox(i, props).length;\n }\n var last = focusedCellIndex;\n var heightOfCellsAfterFocused = 0;\n for (var _i = last + 1; _i < itemCount && heightOfCellsAfterFocused < this._scrollMetrics.visibleLength; _i++) {\n last++;\n heightOfCellsAfterFocused += this.__getFrameMetricsApprox(_i, props).length;\n }\n return [{\n first,\n last\n }];\n };\n this._checkProps(_props);\n this._fillRateHelper = new FillRateHelper(this._getFrameMetrics);\n this._updateCellsToRenderBatcher = new Batchinator(this._updateCellsToRender, (_this$props$updateCel = this.props.updateCellsBatchingPeriod) !== null && _this$props$updateCel !== void 0 ? _this$props$updateCel : 50);\n if (this.props.viewabilityConfigCallbackPairs) {\n this._viewabilityTuples = this.props.viewabilityConfigCallbackPairs.map(pair => ({\n viewabilityHelper: new ViewabilityHelper(pair.viewabilityConfig),\n onViewableItemsChanged: pair.onViewableItemsChanged\n }));\n } else {\n var _this$props3 = this.props,\n onViewableItemsChanged = _this$props3.onViewableItemsChanged,\n viewabilityConfig = _this$props3.viewabilityConfig;\n if (onViewableItemsChanged) {\n this._viewabilityTuples.push({\n viewabilityHelper: new ViewabilityHelper(viewabilityConfig),\n onViewableItemsChanged: onViewableItemsChanged\n });\n }\n }\n var initialRenderRegion = VirtualizedList._initialRenderRegion(_props);\n this.state = {\n cellsAroundViewport: initialRenderRegion,\n renderMask: VirtualizedList._createRenderMask(_props, initialRenderRegion)\n };\n\n // REACT-NATIVE-WEB patch to preserve during future RN merges: Support inverted wheel scroller.\n // For issue https://github.com/necolas/react-native-web/issues/995\n this.invertedWheelEventHandler = ev => {\n var scrollOffset = this.props.horizontal ? ev.target.scrollLeft : ev.target.scrollTop;\n var scrollLength = this.props.horizontal ? ev.target.scrollWidth : ev.target.scrollHeight;\n var clientLength = this.props.horizontal ? ev.target.clientWidth : ev.target.clientHeight;\n var isEventTargetScrollable = scrollLength > clientLength;\n var delta = this.props.horizontal ? ev.deltaX || ev.wheelDeltaX : ev.deltaY || ev.wheelDeltaY;\n var leftoverDelta = delta;\n if (isEventTargetScrollable) {\n leftoverDelta = delta < 0 ? Math.min(delta + scrollOffset, 0) : Math.max(delta - (scrollLength - clientLength - scrollOffset), 0);\n }\n var targetDelta = delta - leftoverDelta;\n if (this.props.inverted && this._scrollRef && this._scrollRef.getScrollableNode) {\n var node = this._scrollRef.getScrollableNode();\n if (this.props.horizontal) {\n ev.target.scrollLeft += targetDelta;\n var nextScrollLeft = node.scrollLeft - leftoverDelta;\n node.scrollLeft = !this.props.getItemLayout ? Math.min(nextScrollLeft, this._totalCellLength) : nextScrollLeft;\n } else {\n ev.target.scrollTop += targetDelta;\n var nextScrollTop = node.scrollTop - leftoverDelta;\n node.scrollTop = !this.props.getItemLayout ? Math.min(nextScrollTop, this._totalCellLength) : nextScrollTop;\n }\n ev.preventDefault();\n }\n };\n }\n _checkProps(props) {\n var onScroll = props.onScroll,\n windowSize = props.windowSize,\n getItemCount = props.getItemCount,\n data = props.data,\n initialScrollIndex = props.initialScrollIndex;\n invariant(\n // $FlowFixMe[prop-missing]\n !onScroll || !onScroll.__isNative, 'Components based on VirtualizedList must be wrapped with Animated.createAnimatedComponent ' + 'to support native onScroll events with useNativeDriver');\n invariant(windowSizeOrDefault(windowSize) > 0, 'VirtualizedList: The windowSize prop must be present and set to a value greater than 0.');\n invariant(getItemCount, 'VirtualizedList: The \"getItemCount\" prop must be provided');\n var itemCount = getItemCount(data);\n if (initialScrollIndex != null && !this._hasTriggeredInitialScrollToIndex && (initialScrollIndex < 0 || itemCount > 0 && initialScrollIndex >= itemCount) && !this._hasWarned.initialScrollIndex) {\n console.warn(\"initialScrollIndex \\\"\" + initialScrollIndex + \"\\\" is not valid (list has \" + itemCount + \" items)\");\n this._hasWarned.initialScrollIndex = true;\n }\n if (__DEV__ && !this._hasWarned.flexWrap) {\n // $FlowFixMe[underconstrained-implicit-instantiation]\n var flatStyles = StyleSheet.flatten(this.props.contentContainerStyle);\n if (flatStyles != null && flatStyles.flexWrap === 'wrap') {\n console.warn('`flexWrap: `wrap`` is not supported with the `VirtualizedList` components.' + 'Consider using `numColumns` with `FlatList` instead.');\n this._hasWarned.flexWrap = true;\n }\n }\n }\n static _createRenderMask(props, cellsAroundViewport, additionalRegions) {\n var itemCount = props.getItemCount(props.data);\n invariant(cellsAroundViewport.first >= 0 && cellsAroundViewport.last >= cellsAroundViewport.first - 1 && cellsAroundViewport.last < itemCount, \"Invalid cells around viewport \\\"[\" + cellsAroundViewport.first + \", \" + cellsAroundViewport.last + \"]\\\" was passed to VirtualizedList._createRenderMask\");\n var renderMask = new CellRenderMask(itemCount);\n if (itemCount > 0) {\n var allRegions = [cellsAroundViewport, ...(additionalRegions !== null && additionalRegions !== void 0 ? additionalRegions : [])];\n for (var _i2 = 0, _allRegions = allRegions; _i2 < _allRegions.length; _i2++) {\n var region = _allRegions[_i2];\n renderMask.addCells(region);\n }\n\n // The initially rendered cells are retained as part of the\n // \"scroll-to-top\" optimization\n if (props.initialScrollIndex == null || props.initialScrollIndex <= 0) {\n var initialRegion = VirtualizedList._initialRenderRegion(props);\n renderMask.addCells(initialRegion);\n }\n\n // The layout coordinates of sticker headers may be off-screen while the\n // actual header is on-screen. Keep the most recent before the viewport\n // rendered, even if its layout coordinates are not in viewport.\n var stickyIndicesSet = new Set(props.stickyHeaderIndices);\n VirtualizedList._ensureClosestStickyHeader(props, stickyIndicesSet, renderMask, cellsAroundViewport.first);\n }\n return renderMask;\n }\n static _initialRenderRegion(props) {\n var _props$initialScrollI;\n var itemCount = props.getItemCount(props.data);\n var firstCellIndex = Math.max(0, Math.min(itemCount - 1, Math.floor((_props$initialScrollI = props.initialScrollIndex) !== null && _props$initialScrollI !== void 0 ? _props$initialScrollI : 0)));\n var lastCellIndex = Math.min(itemCount, firstCellIndex + initialNumToRenderOrDefault(props.initialNumToRender)) - 1;\n return {\n first: firstCellIndex,\n last: lastCellIndex\n };\n }\n static _ensureClosestStickyHeader(props, stickyIndicesSet, renderMask, cellIdx) {\n var stickyOffset = props.ListHeaderComponent ? 1 : 0;\n for (var itemIdx = cellIdx - 1; itemIdx >= 0; itemIdx--) {\n if (stickyIndicesSet.has(itemIdx + stickyOffset)) {\n renderMask.addCells({\n first: itemIdx,\n last: itemIdx\n });\n break;\n }\n }\n }\n _adjustCellsAroundViewport(props, cellsAroundViewport) {\n var data = props.data,\n getItemCount = props.getItemCount;\n var onEndReachedThreshold = onEndReachedThresholdOrDefault(props.onEndReachedThreshold);\n var _this$_scrollMetrics = this._scrollMetrics,\n contentLength = _this$_scrollMetrics.contentLength,\n offset = _this$_scrollMetrics.offset,\n visibleLength = _this$_scrollMetrics.visibleLength;\n var distanceFromEnd = contentLength - visibleLength - offset;\n\n // Wait until the scroll view metrics have been set up. And until then,\n // we will trust the initialNumToRender suggestion\n if (visibleLength <= 0 || contentLength <= 0) {\n return cellsAroundViewport.last >= getItemCount(data) ? VirtualizedList._constrainToItemCount(cellsAroundViewport, props) : cellsAroundViewport;\n }\n var newCellsAroundViewport;\n if (props.disableVirtualization) {\n var renderAhead = distanceFromEnd < onEndReachedThreshold * visibleLength ? maxToRenderPerBatchOrDefault(props.maxToRenderPerBatch) : 0;\n newCellsAroundViewport = {\n first: 0,\n last: Math.min(cellsAroundViewport.last + renderAhead, getItemCount(data) - 1)\n };\n } else {\n // If we have a non-zero initialScrollIndex and run this before we've scrolled,\n // we'll wipe out the initialNumToRender rendered elements starting at initialScrollIndex.\n // So let's wait until we've scrolled the view to the right place. And until then,\n // we will trust the initialScrollIndex suggestion.\n\n // Thus, we want to recalculate the windowed render limits if any of the following hold:\n // - initialScrollIndex is undefined or is 0\n // - initialScrollIndex > 0 AND scrolling is complete\n // - initialScrollIndex > 0 AND the end of the list is visible (this handles the case\n // where the list is shorter than the visible area)\n if (props.initialScrollIndex && !this._scrollMetrics.offset && Math.abs(distanceFromEnd) >= Number.EPSILON) {\n return cellsAroundViewport.last >= getItemCount(data) ? VirtualizedList._constrainToItemCount(cellsAroundViewport, props) : cellsAroundViewport;\n }\n newCellsAroundViewport = computeWindowedRenderLimits(props, maxToRenderPerBatchOrDefault(props.maxToRenderPerBatch), windowSizeOrDefault(props.windowSize), cellsAroundViewport, this.__getFrameMetricsApprox, this._scrollMetrics);\n invariant(newCellsAroundViewport.last < getItemCount(data), 'computeWindowedRenderLimits() should return range in-bounds');\n }\n if (this._nestedChildLists.size() > 0) {\n // If some cell in the new state has a child list in it, we should only render\n // up through that item, so that we give that list a chance to render.\n // Otherwise there's churn from multiple child lists mounting and un-mounting\n // their items.\n\n // Will this prevent rendering if the nested list doesn't realize the end?\n var childIdx = this._findFirstChildWithMore(newCellsAroundViewport.first, newCellsAroundViewport.last);\n newCellsAroundViewport.last = childIdx !== null && childIdx !== void 0 ? childIdx : newCellsAroundViewport.last;\n }\n return newCellsAroundViewport;\n }\n _findFirstChildWithMore(first, last) {\n for (var ii = first; ii <= last; ii++) {\n var cellKeyForIndex = this._indicesToKeys.get(ii);\n if (cellKeyForIndex != null && this._nestedChildLists.anyInCell(cellKeyForIndex, childList => childList.hasMore())) {\n return ii;\n }\n }\n return null;\n }\n componentDidMount() {\n if (this._isNestedWithSameOrientation()) {\n this.context.registerAsNestedChild({\n ref: this,\n cellKey: this.context.cellKey\n });\n }\n\n // REACT-NATIVE-WEB patch to preserve during future RN merges: Support inverted wheel scroller.\n this.setupWebWheelHandler();\n }\n componentWillUnmount() {\n if (this._isNestedWithSameOrientation()) {\n this.context.unregisterAsNestedChild({\n ref: this\n });\n }\n this._updateCellsToRenderBatcher.dispose({\n abort: true\n });\n this._viewabilityTuples.forEach(tuple => {\n tuple.viewabilityHelper.dispose();\n });\n this._fillRateHelper.deactivateAndFlush();\n\n // REACT-NATIVE-WEB patch to preserve during future RN merges: Support inverted wheel scroller.\n this.teardownWebWheelHandler();\n }\n\n // REACT-NATIVE-WEB patch to preserve during future RN merges: Support inverted wheel scroller.\n setupWebWheelHandler() {\n if (this._scrollRef && this._scrollRef.getScrollableNode) {\n this._scrollRef.getScrollableNode().addEventListener('wheel', this.invertedWheelEventHandler);\n } else {\n setTimeout(() => this.setupWebWheelHandler(), 50);\n return;\n }\n }\n\n // REACT-NATIVE-WEB patch to preserve during future RN merges: Support inverted wheel scroller.\n teardownWebWheelHandler() {\n if (this._scrollRef && this._scrollRef.getScrollableNode) {\n this._scrollRef.getScrollableNode().removeEventListener('wheel', this.invertedWheelEventHandler);\n }\n }\n static getDerivedStateFromProps(newProps, prevState) {\n // first and last could be stale (e.g. if a new, shorter items props is passed in), so we make\n // sure we're rendering a reasonable range here.\n var itemCount = newProps.getItemCount(newProps.data);\n if (itemCount === prevState.renderMask.numCells()) {\n return prevState;\n }\n var constrainedCells = VirtualizedList._constrainToItemCount(prevState.cellsAroundViewport, newProps);\n return {\n cellsAroundViewport: constrainedCells,\n renderMask: VirtualizedList._createRenderMask(newProps, constrainedCells)\n };\n }\n _pushCells(cells, stickyHeaderIndices, stickyIndicesFromProps, first, last, inversionStyle) {\n var _this = this;\n var _this$props4 = this.props,\n CellRendererComponent = _this$props4.CellRendererComponent,\n ItemSeparatorComponent = _this$props4.ItemSeparatorComponent,\n ListHeaderComponent = _this$props4.ListHeaderComponent,\n ListItemComponent = _this$props4.ListItemComponent,\n data = _this$props4.data,\n debug = _this$props4.debug,\n getItem = _this$props4.getItem,\n getItemCount = _this$props4.getItemCount,\n getItemLayout = _this$props4.getItemLayout,\n horizontal = _this$props4.horizontal,\n renderItem = _this$props4.renderItem;\n var stickyOffset = ListHeaderComponent ? 1 : 0;\n var end = getItemCount(data) - 1;\n var prevCellKey;\n last = Math.min(end, last);\n var _loop = function _loop() {\n var item = getItem(data, ii);\n var key = _this._keyExtractor(item, ii, _this.props);\n _this._indicesToKeys.set(ii, key);\n if (stickyIndicesFromProps.has(ii + stickyOffset)) {\n stickyHeaderIndices.push(cells.length);\n }\n var shouldListenForLayout = getItemLayout == null || debug || _this._fillRateHelper.enabled();\n cells.push(/*#__PURE__*/React.createElement(CellRenderer, _extends({\n CellRendererComponent: CellRendererComponent,\n ItemSeparatorComponent: ii < end ? ItemSeparatorComponent : undefined,\n ListItemComponent: ListItemComponent,\n cellKey: key,\n horizontal: horizontal,\n index: ii,\n inversionStyle: inversionStyle,\n item: item,\n key: key,\n prevCellKey: prevCellKey,\n onUpdateSeparators: _this._onUpdateSeparators,\n onCellFocusCapture: e => _this._onCellFocusCapture(key),\n onUnmount: _this._onCellUnmount,\n ref: _ref => {\n _this._cellRefs[key] = _ref;\n },\n renderItem: renderItem\n }, shouldListenForLayout && {\n onCellLayout: _this._onCellLayout\n })));\n prevCellKey = key;\n };\n for (var ii = first; ii <= last; ii++) {\n _loop();\n }\n }\n static _constrainToItemCount(cells, props) {\n var itemCount = props.getItemCount(props.data);\n var last = Math.min(itemCount - 1, cells.last);\n var maxToRenderPerBatch = maxToRenderPerBatchOrDefault(props.maxToRenderPerBatch);\n return {\n first: clamp(0, itemCount - 1 - maxToRenderPerBatch, cells.first),\n last\n };\n }\n _isNestedWithSameOrientation() {\n var nestedContext = this.context;\n return !!(nestedContext && !!nestedContext.horizontal === horizontalOrDefault(this.props.horizontal));\n }\n _keyExtractor(item, index, props\n // $FlowFixMe[missing-local-annot]\n ) {\n if (props.keyExtractor != null) {\n return props.keyExtractor(item, index);\n }\n var key = defaultKeyExtractor(item, index);\n if (key === String(index)) {\n _usedIndexForKey = true;\n if (item.type && item.type.displayName) {\n _keylessItemComponentName = item.type.displayName;\n }\n }\n return key;\n }\n render() {\n this._checkProps(this.props);\n var _this$props5 = this.props,\n ListEmptyComponent = _this$props5.ListEmptyComponent,\n ListFooterComponent = _this$props5.ListFooterComponent,\n ListHeaderComponent = _this$props5.ListHeaderComponent;\n var _this$props6 = this.props,\n data = _this$props6.data,\n horizontal = _this$props6.horizontal;\n var inversionStyle = this.props.inverted ? horizontalOrDefault(this.props.horizontal) ? styles.horizontallyInverted : styles.verticallyInverted : null;\n var cells = [];\n var stickyIndicesFromProps = new Set(this.props.stickyHeaderIndices);\n var stickyHeaderIndices = [];\n\n // 1. Add cell for ListHeaderComponent\n if (ListHeaderComponent) {\n if (stickyIndicesFromProps.has(0)) {\n stickyHeaderIndices.push(0);\n }\n var _element = /*#__PURE__*/React.isValidElement(ListHeaderComponent) ? ListHeaderComponent :\n /*#__PURE__*/\n // $FlowFixMe[not-a-component]\n // $FlowFixMe[incompatible-type-arg]\n React.createElement(ListHeaderComponent, null);\n cells.push(/*#__PURE__*/React.createElement(VirtualizedListCellContextProvider, {\n cellKey: this._getCellKey() + '-header',\n key: \"$header\"\n }, /*#__PURE__*/React.createElement(View, {\n onLayout: this._onLayoutHeader,\n style: [inversionStyle, this.props.ListHeaderComponentStyle]\n },\n // $FlowFixMe[incompatible-type] - Typing ReactNativeComponent revealed errors\n _element)));\n }\n\n // 2a. Add a cell for ListEmptyComponent if applicable\n var itemCount = this.props.getItemCount(data);\n if (itemCount === 0 && ListEmptyComponent) {\n var _element2 = /*#__PURE__*/React.isValidElement(ListEmptyComponent) ? ListEmptyComponent :\n /*#__PURE__*/\n // $FlowFixMe[not-a-component]\n // $FlowFixMe[incompatible-type-arg]\n React.createElement(ListEmptyComponent, null);\n cells.push(/*#__PURE__*/React.createElement(VirtualizedListCellContextProvider, {\n cellKey: this._getCellKey() + '-empty',\n key: \"$empty\"\n }, /*#__PURE__*/React.cloneElement(_element2, {\n onLayout: event => {\n this._onLayoutEmpty(event);\n if (_element2.props.onLayout) {\n _element2.props.onLayout(event);\n }\n },\n style: [inversionStyle, _element2.props.style]\n })));\n }\n\n // 2b. Add cells and spacers for each item\n if (itemCount > 0) {\n _usedIndexForKey = false;\n _keylessItemComponentName = '';\n var spacerKey = this._getSpacerKey(!horizontal);\n var renderRegions = this.state.renderMask.enumerateRegions();\n var lastSpacer = findLastWhere(renderRegions, r => r.isSpacer);\n for (var _iterator = _createForOfIteratorHelperLoose(renderRegions), _step; !(_step = _iterator()).done;) {\n var section = _step.value;\n if (section.isSpacer) {\n // Legacy behavior is to avoid spacers when virtualization is\n // disabled (including head spacers on initial render).\n if (this.props.disableVirtualization) {\n continue;\n }\n\n // Without getItemLayout, we limit our tail spacer to the _highestMeasuredFrameIndex to\n // prevent the user for hyperscrolling into un-measured area because otherwise content will\n // likely jump around as it renders in above the viewport.\n var isLastSpacer = section === lastSpacer;\n var constrainToMeasured = isLastSpacer && !this.props.getItemLayout;\n var last = constrainToMeasured ? clamp(section.first - 1, section.last, this._highestMeasuredFrameIndex) : section.last;\n var firstMetrics = this.__getFrameMetricsApprox(section.first, this.props);\n var lastMetrics = this.__getFrameMetricsApprox(last, this.props);\n var spacerSize = lastMetrics.offset + lastMetrics.length - firstMetrics.offset;\n cells.push(/*#__PURE__*/React.createElement(View, {\n key: \"$spacer-\" + section.first,\n style: {\n [spacerKey]: spacerSize\n }\n }));\n } else {\n this._pushCells(cells, stickyHeaderIndices, stickyIndicesFromProps, section.first, section.last, inversionStyle);\n }\n }\n if (!this._hasWarned.keys && _usedIndexForKey) {\n console.warn('VirtualizedList: missing keys for items, make sure to specify a key or id property on each ' + 'item or provide a custom keyExtractor.', _keylessItemComponentName);\n this._hasWarned.keys = true;\n }\n }\n\n // 3. Add cell for ListFooterComponent\n if (ListFooterComponent) {\n var _element3 = /*#__PURE__*/React.isValidElement(ListFooterComponent) ? ListFooterComponent :\n /*#__PURE__*/\n // $FlowFixMe[not-a-component]\n // $FlowFixMe[incompatible-type-arg]\n React.createElement(ListFooterComponent, null);\n cells.push(/*#__PURE__*/React.createElement(VirtualizedListCellContextProvider, {\n cellKey: this._getFooterCellKey(),\n key: \"$footer\"\n }, /*#__PURE__*/React.createElement(View, {\n onLayout: this._onLayoutFooter,\n style: [inversionStyle, this.props.ListFooterComponentStyle]\n },\n // $FlowFixMe[incompatible-type] - Typing ReactNativeComponent revealed errors\n _element3)));\n }\n\n // 4. Render the ScrollView\n var scrollProps = _objectSpread(_objectSpread({}, this.props), {}, {\n onContentSizeChange: this._onContentSizeChange,\n onLayout: this._onLayout,\n onScroll: this._onScroll,\n onScrollBeginDrag: this._onScrollBeginDrag,\n onScrollEndDrag: this._onScrollEndDrag,\n onMomentumScrollBegin: this._onMomentumScrollBegin,\n onMomentumScrollEnd: this._onMomentumScrollEnd,\n scrollEventThrottle: scrollEventThrottleOrDefault(this.props.scrollEventThrottle),\n // TODO: Android support\n invertStickyHeaders: this.props.invertStickyHeaders !== undefined ? this.props.invertStickyHeaders : this.props.inverted,\n stickyHeaderIndices,\n style: inversionStyle ? [inversionStyle, this.props.style] : this.props.style\n });\n this._hasMore = this.state.cellsAroundViewport.last < itemCount - 1;\n var innerRet = /*#__PURE__*/React.createElement(VirtualizedListContextProvider, {\n value: {\n cellKey: null,\n getScrollMetrics: this._getScrollMetrics,\n horizontal: horizontalOrDefault(this.props.horizontal),\n getOutermostParentListRef: this._getOutermostParentListRef,\n registerAsNestedChild: this._registerAsNestedChild,\n unregisterAsNestedChild: this._unregisterAsNestedChild\n }\n }, /*#__PURE__*/React.cloneElement((this.props.renderScrollComponent || this._defaultRenderScrollComponent)(scrollProps), {\n ref: this._captureScrollRef\n }, cells));\n var ret = innerRet;\n /* https://github.com/necolas/react-native-web/issues/2239: Re-enable when ScrollView.Context.Consumer is available.\n if (__DEV__) {\n ret = (\n \n {scrollContext => {\n if (\n scrollContext != null &&\n !scrollContext.horizontal ===\n !horizontalOrDefault(this.props.horizontal) &&\n !this._hasWarned.nesting &&\n this.context == null &&\n this.props.scrollEnabled !== false\n ) {\n // TODO (T46547044): use React.warn once 16.9 is sync'd: https://github.com/facebook/react/pull/15170\n console.error(\n 'VirtualizedLists should never be nested inside plain ScrollViews with the same ' +\n 'orientation because it can break windowing and other functionality - use another ' +\n 'VirtualizedList-backed container instead.',\n );\n this._hasWarned.nesting = true;\n }\n return innerRet;\n }}\n \n );\n }*/\n if (this.props.debug) {\n return /*#__PURE__*/React.createElement(View, {\n style: styles.debug\n }, ret, this._renderDebugOverlay());\n } else {\n return ret;\n }\n }\n componentDidUpdate(prevProps) {\n var _this$props7 = this.props,\n data = _this$props7.data,\n extraData = _this$props7.extraData;\n if (data !== prevProps.data || extraData !== prevProps.extraData) {\n // clear the viewableIndices cache to also trigger\n // the onViewableItemsChanged callback with the new data\n this._viewabilityTuples.forEach(tuple => {\n tuple.viewabilityHelper.resetViewableIndices();\n });\n }\n // The `this._hiPriInProgress` is guaranteeing a hiPri cell update will only happen\n // once per fiber update. The `_scheduleCellsToRenderUpdate` will set it to true\n // if a hiPri update needs to perform. If `componentDidUpdate` is triggered with\n // `this._hiPriInProgress=true`, means it's triggered by the hiPri update. The\n // `_scheduleCellsToRenderUpdate` will check this condition and not perform\n // another hiPri update.\n var hiPriInProgress = this._hiPriInProgress;\n this._scheduleCellsToRenderUpdate();\n // Make sure setting `this._hiPriInProgress` back to false after `componentDidUpdate`\n // is triggered with `this._hiPriInProgress = true`\n if (hiPriInProgress) {\n this._hiPriInProgress = false;\n }\n }\n\n // Used for preventing scrollToIndex from being called multiple times for initialScrollIndex\n\n // flag to prevent infinite hiPri cell limit update\n\n // $FlowFixMe[missing-local-annot]\n\n /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's\n * LTI update could not be added via codemod */\n\n _computeBlankness() {\n this._fillRateHelper.computeBlankness(this.props, this.state.cellsAroundViewport, this._scrollMetrics);\n }\n\n /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's\n * LTI update could not be added via codemod */\n\n _onCellFocusCapture(cellKey) {\n this._lastFocusedCellKey = cellKey;\n this._updateCellsToRender();\n }\n _triggerRemeasureForChildListsInCell(cellKey) {\n this._nestedChildLists.forEachInCell(cellKey, childList => {\n childList.measureLayoutRelativeToContainingList();\n });\n }\n measureLayoutRelativeToContainingList() {\n // TODO (T35574538): findNodeHandle sometimes crashes with \"Unable to find\n // node on an unmounted component\" during scrolling\n try {\n if (!this._scrollRef) {\n return;\n }\n // We are assuming that getOutermostParentListRef().getScrollRef()\n // is a non-null reference to a ScrollView\n this._scrollRef.measureLayout(this.context.getOutermostParentListRef().getScrollRef(), (x, y, width, height) => {\n this._offsetFromParentVirtualizedList = this._selectOffset({\n x,\n y\n });\n this._scrollMetrics.contentLength = this._selectLength({\n width,\n height\n });\n var scrollMetrics = this._convertParentScrollMetrics(this.context.getScrollMetrics());\n var metricsChanged = this._scrollMetrics.visibleLength !== scrollMetrics.visibleLength || this._scrollMetrics.offset !== scrollMetrics.offset;\n if (metricsChanged) {\n this._scrollMetrics.visibleLength = scrollMetrics.visibleLength;\n this._scrollMetrics.offset = scrollMetrics.offset;\n\n // If metrics of the scrollView changed, then we triggered remeasure for child list\n // to ensure VirtualizedList has the right information.\n this._nestedChildLists.forEach(childList => {\n childList.measureLayoutRelativeToContainingList();\n });\n }\n }, error => {\n console.warn(\"VirtualizedList: Encountered an error while measuring a list's\" + ' offset from its containing VirtualizedList.');\n });\n } catch (error) {\n console.warn('measureLayoutRelativeToContainingList threw an error', error.stack);\n }\n }\n _getFooterCellKey() {\n return this._getCellKey() + '-footer';\n }\n // $FlowFixMe[missing-local-annot]\n _renderDebugOverlay() {\n var normalize = this._scrollMetrics.visibleLength / (this._scrollMetrics.contentLength || 1);\n var framesInLayout = [];\n var itemCount = this.props.getItemCount(this.props.data);\n for (var ii = 0; ii < itemCount; ii++) {\n var frame = this.__getFrameMetricsApprox(ii, this.props);\n /* $FlowFixMe[prop-missing] (>=0.68.0 site=react_native_fb) This comment\n * suppresses an error found when Flow v0.68 was deployed. To see the\n * error delete this comment and run Flow. */\n if (frame.inLayout) {\n framesInLayout.push(frame);\n }\n }\n var windowTop = this.__getFrameMetricsApprox(this.state.cellsAroundViewport.first, this.props).offset;\n var frameLast = this.__getFrameMetricsApprox(this.state.cellsAroundViewport.last, this.props);\n var windowLen = frameLast.offset + frameLast.length - windowTop;\n var visTop = this._scrollMetrics.offset;\n var visLen = this._scrollMetrics.visibleLength;\n return /*#__PURE__*/React.createElement(View, {\n style: [styles.debugOverlayBase, styles.debugOverlay]\n }, framesInLayout.map((f, ii) => /*#__PURE__*/React.createElement(View, {\n key: 'f' + ii,\n style: [styles.debugOverlayBase, styles.debugOverlayFrame, {\n top: f.offset * normalize,\n height: f.length * normalize\n }]\n })), /*#__PURE__*/React.createElement(View, {\n style: [styles.debugOverlayBase, styles.debugOverlayFrameLast, {\n top: windowTop * normalize,\n height: windowLen * normalize\n }]\n }), /*#__PURE__*/React.createElement(View, {\n style: [styles.debugOverlayBase, styles.debugOverlayFrameVis, {\n top: visTop * normalize,\n height: visLen * normalize\n }]\n }));\n }\n _selectLength(metrics) {\n return !horizontalOrDefault(this.props.horizontal) ? metrics.height : metrics.width;\n }\n _selectOffset(metrics) {\n return !horizontalOrDefault(this.props.horizontal) ? metrics.y : metrics.x;\n }\n _maybeCallOnEdgeReached() {\n var _this$props8 = this.props,\n data = _this$props8.data,\n getItemCount = _this$props8.getItemCount,\n onStartReached = _this$props8.onStartReached,\n onStartReachedThreshold = _this$props8.onStartReachedThreshold,\n onEndReached = _this$props8.onEndReached,\n onEndReachedThreshold = _this$props8.onEndReachedThreshold,\n initialScrollIndex = _this$props8.initialScrollIndex;\n var _this$_scrollMetrics2 = this._scrollMetrics,\n contentLength = _this$_scrollMetrics2.contentLength,\n visibleLength = _this$_scrollMetrics2.visibleLength,\n offset = _this$_scrollMetrics2.offset;\n var distanceFromStart = offset;\n var distanceFromEnd = contentLength - visibleLength - offset;\n\n // Especially when oERT is zero it's necessary to 'floor' very small distance values to be 0\n // since debouncing causes us to not fire this event for every single \"pixel\" we scroll and can thus\n // be at the edge of the list with a distance approximating 0 but not quite there.\n if (distanceFromStart < ON_EDGE_REACHED_EPSILON) {\n distanceFromStart = 0;\n }\n if (distanceFromEnd < ON_EDGE_REACHED_EPSILON) {\n distanceFromEnd = 0;\n }\n\n // TODO: T121172172 Look into why we're \"defaulting\" to a threshold of 2px\n // when oERT is not present (different from 2 viewports used elsewhere)\n var DEFAULT_THRESHOLD_PX = 2;\n var startThreshold = onStartReachedThreshold != null ? onStartReachedThreshold * visibleLength : DEFAULT_THRESHOLD_PX;\n var endThreshold = onEndReachedThreshold != null ? onEndReachedThreshold * visibleLength : DEFAULT_THRESHOLD_PX;\n var isWithinStartThreshold = distanceFromStart <= startThreshold;\n var isWithinEndThreshold = distanceFromEnd <= endThreshold;\n\n // First check if the user just scrolled within the end threshold\n // and call onEndReached only once for a given content length,\n // and only if onStartReached is not being executed\n if (onEndReached && this.state.cellsAroundViewport.last === getItemCount(data) - 1 && isWithinEndThreshold && this._scrollMetrics.contentLength !== this._sentEndForContentLength) {\n this._sentEndForContentLength = this._scrollMetrics.contentLength;\n onEndReached({\n distanceFromEnd\n });\n }\n\n // Next check if the user just scrolled within the start threshold\n // and call onStartReached only once for a given content length,\n // and only if onEndReached is not being executed\n else if (onStartReached != null && this.state.cellsAroundViewport.first === 0 && isWithinStartThreshold && this._scrollMetrics.contentLength !== this._sentStartForContentLength) {\n // On initial mount when using initialScrollIndex the offset will be 0 initially\n // and will trigger an unexpected onStartReached. To avoid this we can use\n // timestamp to differentiate between the initial scroll metrics and when we actually\n // received the first scroll event.\n if (!initialScrollIndex || this._scrollMetrics.timestamp !== 0) {\n this._sentStartForContentLength = this._scrollMetrics.contentLength;\n onStartReached({\n distanceFromStart\n });\n }\n }\n\n // If the user scrolls away from the start or end and back again,\n // cause onStartReached or onEndReached to be triggered again\n else {\n this._sentStartForContentLength = isWithinStartThreshold ? this._sentStartForContentLength : 0;\n this._sentEndForContentLength = isWithinEndThreshold ? this._sentEndForContentLength : 0;\n }\n }\n\n /* Translates metrics from a scroll event in a parent VirtualizedList into\n * coordinates relative to the child list.\n */\n\n _scheduleCellsToRenderUpdate() {\n var _this$state$cellsArou = this.state.cellsAroundViewport,\n first = _this$state$cellsArou.first,\n last = _this$state$cellsArou.last;\n var _this$_scrollMetrics3 = this._scrollMetrics,\n offset = _this$_scrollMetrics3.offset,\n visibleLength = _this$_scrollMetrics3.visibleLength,\n velocity = _this$_scrollMetrics3.velocity;\n var itemCount = this.props.getItemCount(this.props.data);\n var hiPri = false;\n var onStartReachedThreshold = onStartReachedThresholdOrDefault(this.props.onStartReachedThreshold);\n var onEndReachedThreshold = onEndReachedThresholdOrDefault(this.props.onEndReachedThreshold);\n // Mark as high priority if we're close to the start of the first item\n // But only if there are items before the first rendered item\n if (first > 0) {\n var distTop = offset - this.__getFrameMetricsApprox(first, this.props).offset;\n hiPri = distTop < 0 || velocity < -2 && distTop < getScrollingThreshold(onStartReachedThreshold, visibleLength);\n }\n // Mark as high priority if we're close to the end of the last item\n // But only if there are items after the last rendered item\n if (!hiPri && last >= 0 && last < itemCount - 1) {\n var distBottom = this.__getFrameMetricsApprox(last, this.props).offset - (offset + visibleLength);\n hiPri = distBottom < 0 || velocity > 2 && distBottom < getScrollingThreshold(onEndReachedThreshold, visibleLength);\n }\n // Only trigger high-priority updates if we've actually rendered cells,\n // and with that size estimate, accurately compute how many cells we should render.\n // Otherwise, it would just render as many cells as it can (of zero dimension),\n // each time through attempting to render more (limited by maxToRenderPerBatch),\n // starving the renderer from actually laying out the objects and computing _averageCellLength.\n // If this is triggered in an `componentDidUpdate` followed by a hiPri cellToRenderUpdate\n // We shouldn't do another hipri cellToRenderUpdate\n if (hiPri && (this._averageCellLength || this.props.getItemLayout) && !this._hiPriInProgress) {\n this._hiPriInProgress = true;\n // Don't worry about interactions when scrolling quickly; focus on filling content as fast\n // as possible.\n this._updateCellsToRenderBatcher.dispose({\n abort: true\n });\n this._updateCellsToRender();\n return;\n } else {\n this._updateCellsToRenderBatcher.schedule();\n }\n }\n\n /**\n * Gets an approximate offset to an item at a given index. Supports\n * fractional indices.\n */\n\n _updateViewableItems(props, cellsAroundViewport) {\n this._viewabilityTuples.forEach(tuple => {\n tuple.viewabilityHelper.onUpdate(props, this._scrollMetrics.offset, this._scrollMetrics.visibleLength, this._getFrameMetrics, this._createViewToken, tuple.onViewableItemsChanged, cellsAroundViewport);\n });\n }\n}\nVirtualizedList.contextType = VirtualizedListContext;\nvar styles = StyleSheet.create({\n verticallyInverted: {\n transform: 'scaleY(-1)'\n },\n horizontallyInverted: {\n transform: 'scaleX(-1)'\n },\n debug: {\n flex: 1\n },\n debugOverlayBase: {\n position: 'absolute',\n top: 0,\n right: 0\n },\n debugOverlay: {\n bottom: 0,\n width: 20,\n borderColor: 'blue',\n borderWidth: 1\n },\n debugOverlayFrame: {\n left: 0,\n backgroundColor: 'orange'\n },\n debugOverlayFrameLast: {\n left: 0,\n borderColor: 'green',\n borderWidth: 2\n },\n debugOverlayFrameVis: {\n left: 0,\n borderColor: 'red',\n borderWidth: 2\n }\n});\nexport default VirtualizedList;","var unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nfunction _createForOfIteratorHelperLoose(r, e) {\n var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (t) return (t = t.call(r)).next.bind(t);\n if (Array.isArray(r) || (t = unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) {\n t && (r = t);\n var o = 0;\n return function () {\n return o >= r.length ? {\n done: !0\n } : {\n done: !1,\n value: r[o++]\n };\n };\n }\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _createForOfIteratorHelperLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./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}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","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}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"colors\", \"enabled\", \"onRefresh\", \"progressBackgroundColor\", \"progressViewOffset\", \"refreshing\", \"size\", \"tintColor\", \"title\", \"titleColor\"];\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nimport View from '../View';\nimport React from 'react';\nfunction RefreshControl(props) {\n var colors = props.colors,\n enabled = props.enabled,\n onRefresh = props.onRefresh,\n progressBackgroundColor = props.progressBackgroundColor,\n progressViewOffset = props.progressViewOffset,\n refreshing = props.refreshing,\n size = props.size,\n tintColor = props.tintColor,\n title = props.title,\n titleColor = props.titleColor,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n return /*#__PURE__*/React.createElement(View, rest);\n}\nexport default RefreshControl;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\n'use client';\n\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"contentContainerStyle\", \"horizontal\", \"onContentSizeChange\", \"refreshControl\", \"stickyHeaderIndices\", \"pagingEnabled\", \"forwardedRef\", \"keyboardDismissMode\", \"onScroll\", \"centerContent\"];\nimport Dimensions from '../Dimensions';\nimport dismissKeyboard from '../../modules/dismissKeyboard';\nimport invariant from 'fbjs/lib/invariant';\nimport mergeRefs from '../../modules/mergeRefs';\nimport Platform from '../Platform';\nimport ScrollViewBase from './ScrollViewBase';\nimport StyleSheet from '../StyleSheet';\nimport TextInputState from '../../modules/TextInputState';\nimport UIManager from '../UIManager';\nimport View from '../View';\nimport React from 'react';\nimport warning from 'fbjs/lib/warning';\nvar emptyObject = {};\nvar IS_ANIMATING_TOUCH_START_THRESHOLD_MS = 16;\nclass ScrollView extends React.Component {\n constructor() {\n super(...arguments);\n this._scrollNodeRef = null;\n this._innerViewRef = null;\n this.isTouching = false;\n this.lastMomentumScrollBeginTime = 0;\n this.lastMomentumScrollEndTime = 0;\n this.observedScrollSinceBecomingResponder = false;\n this.becameResponderWhileAnimating = false;\n this.scrollResponderHandleScrollShouldSetResponder = () => {\n return this.isTouching;\n };\n this.scrollResponderHandleStartShouldSetResponderCapture = e => {\n // First see if we want to eat taps while the keyboard is up\n // var currentlyFocusedTextInput = TextInputState.currentlyFocusedField();\n // if (!this.props.keyboardShouldPersistTaps &&\n // currentlyFocusedTextInput != null &&\n // e.target !== currentlyFocusedTextInput) {\n // return true;\n // }\n return this.scrollResponderIsAnimating();\n };\n this.scrollResponderHandleTerminationRequest = () => {\n return !this.observedScrollSinceBecomingResponder;\n };\n this.scrollResponderHandleTouchEnd = e => {\n var nativeEvent = e.nativeEvent;\n this.isTouching = nativeEvent.touches.length !== 0;\n this.props.onTouchEnd && this.props.onTouchEnd(e);\n };\n this.scrollResponderHandleResponderRelease = e => {\n this.props.onResponderRelease && this.props.onResponderRelease(e);\n\n // By default scroll views will unfocus a textField\n // if another touch occurs outside of it\n var currentlyFocusedTextInput = TextInputState.currentlyFocusedField();\n if (!this.props.keyboardShouldPersistTaps && currentlyFocusedTextInput != null && e.target !== currentlyFocusedTextInput && !this.observedScrollSinceBecomingResponder && !this.becameResponderWhileAnimating) {\n this.props.onScrollResponderKeyboardDismissed && this.props.onScrollResponderKeyboardDismissed(e);\n TextInputState.blurTextInput(currentlyFocusedTextInput);\n }\n };\n this.scrollResponderHandleScroll = e => {\n this.observedScrollSinceBecomingResponder = true;\n this.props.onScroll && this.props.onScroll(e);\n };\n this.scrollResponderHandleResponderGrant = e => {\n this.observedScrollSinceBecomingResponder = false;\n this.props.onResponderGrant && this.props.onResponderGrant(e);\n this.becameResponderWhileAnimating = this.scrollResponderIsAnimating();\n };\n this.scrollResponderHandleScrollBeginDrag = e => {\n this.props.onScrollBeginDrag && this.props.onScrollBeginDrag(e);\n };\n this.scrollResponderHandleScrollEndDrag = e => {\n this.props.onScrollEndDrag && this.props.onScrollEndDrag(e);\n };\n this.scrollResponderHandleMomentumScrollBegin = e => {\n this.lastMomentumScrollBeginTime = Date.now();\n this.props.onMomentumScrollBegin && this.props.onMomentumScrollBegin(e);\n };\n this.scrollResponderHandleMomentumScrollEnd = e => {\n this.lastMomentumScrollEndTime = Date.now();\n this.props.onMomentumScrollEnd && this.props.onMomentumScrollEnd(e);\n };\n this.scrollResponderHandleTouchStart = e => {\n this.isTouching = true;\n this.props.onTouchStart && this.props.onTouchStart(e);\n };\n this.scrollResponderHandleTouchMove = e => {\n this.props.onTouchMove && this.props.onTouchMove(e);\n };\n this.scrollResponderIsAnimating = () => {\n var now = Date.now();\n var timeSinceLastMomentumScrollEnd = now - this.lastMomentumScrollEndTime;\n var isAnimating = timeSinceLastMomentumScrollEnd < IS_ANIMATING_TOUCH_START_THRESHOLD_MS || this.lastMomentumScrollEndTime < this.lastMomentumScrollBeginTime;\n return isAnimating;\n };\n this.scrollResponderScrollTo = (x, y, animated) => {\n if (typeof x === 'number') {\n console.warn('`scrollResponderScrollTo(x, y, animated)` is deprecated. Use `scrollResponderScrollTo({x: 5, y: 5, animated: true})` instead.');\n } else {\n var _ref = x || emptyObject;\n x = _ref.x;\n y = _ref.y;\n animated = _ref.animated;\n }\n var node = this.getScrollableNode();\n var left = x || 0;\n var top = y || 0;\n if (node != null) {\n if (typeof node.scroll === 'function') {\n node.scroll({\n top,\n left,\n behavior: !animated ? 'auto' : 'smooth'\n });\n } else {\n node.scrollLeft = left;\n node.scrollTop = top;\n }\n }\n };\n this.scrollResponderZoomTo = (rect, animated) => {\n if (Platform.OS !== 'ios') {\n invariant('zoomToRect is not implemented');\n }\n };\n this.scrollResponderScrollNativeHandleToKeyboard = (nodeHandle, additionalOffset, preventNegativeScrollOffset) => {\n this.additionalScrollOffset = additionalOffset || 0;\n this.preventNegativeScrollOffset = !!preventNegativeScrollOffset;\n UIManager.measureLayout(nodeHandle, this.getInnerViewNode(), this.scrollResponderTextInputFocusError, this.scrollResponderInputMeasureAndScrollToKeyboard);\n };\n this.scrollResponderInputMeasureAndScrollToKeyboard = (left, top, width, height) => {\n var keyboardScreenY = Dimensions.get('window').height;\n if (this.keyboardWillOpenTo) {\n keyboardScreenY = this.keyboardWillOpenTo.endCoordinates.screenY;\n }\n var scrollOffsetY = top - keyboardScreenY + height + this.additionalScrollOffset;\n\n // By default, this can scroll with negative offset, pulling the content\n // down so that the target component's bottom meets the keyboard's top.\n // If requested otherwise, cap the offset at 0 minimum to avoid content\n // shifting down.\n if (this.preventNegativeScrollOffset) {\n scrollOffsetY = Math.max(0, scrollOffsetY);\n }\n this.scrollResponderScrollTo({\n x: 0,\n y: scrollOffsetY,\n animated: true\n });\n this.additionalOffset = 0;\n this.preventNegativeScrollOffset = false;\n };\n this.scrollResponderKeyboardWillShow = e => {\n this.keyboardWillOpenTo = e;\n this.props.onKeyboardWillShow && this.props.onKeyboardWillShow(e);\n };\n this.scrollResponderKeyboardWillHide = e => {\n this.keyboardWillOpenTo = null;\n this.props.onKeyboardWillHide && this.props.onKeyboardWillHide(e);\n };\n this.scrollResponderKeyboardDidShow = e => {\n // TODO(7693961): The event for DidShow is not available on iOS yet.\n // Use the one from WillShow and do not assign.\n if (e) {\n this.keyboardWillOpenTo = e;\n }\n this.props.onKeyboardDidShow && this.props.onKeyboardDidShow(e);\n };\n this.scrollResponderKeyboardDidHide = e => {\n this.keyboardWillOpenTo = null;\n this.props.onKeyboardDidHide && this.props.onKeyboardDidHide(e);\n };\n this.flashScrollIndicators = () => {\n this.scrollResponderFlashScrollIndicators();\n };\n this.getScrollResponder = () => {\n return this;\n };\n this.getScrollableNode = () => {\n return this._scrollNodeRef;\n };\n this.getInnerViewRef = () => {\n return this._innerViewRef;\n };\n this.getInnerViewNode = () => {\n return this._innerViewRef;\n };\n this.getNativeScrollRef = () => {\n return this._scrollNodeRef;\n };\n this.scrollTo = (y, x, animated) => {\n if (typeof y === 'number') {\n console.warn('`scrollTo(y, x, animated)` is deprecated. Use `scrollTo({x: 5, y: 5, animated: true})` instead.');\n } else {\n var _ref2 = y || emptyObject;\n x = _ref2.x;\n y = _ref2.y;\n animated = _ref2.animated;\n }\n this.scrollResponderScrollTo({\n x: x || 0,\n y: y || 0,\n animated: animated !== false\n });\n };\n this.scrollToEnd = options => {\n // Default to true\n var animated = (options && options.animated) !== false;\n var horizontal = this.props.horizontal;\n var scrollResponderNode = this.getScrollableNode();\n var x = horizontal ? scrollResponderNode.scrollWidth : 0;\n var y = horizontal ? 0 : scrollResponderNode.scrollHeight;\n this.scrollResponderScrollTo({\n x,\n y,\n animated\n });\n };\n this._handleContentOnLayout = e => {\n var _e$nativeEvent$layout = e.nativeEvent.layout,\n width = _e$nativeEvent$layout.width,\n height = _e$nativeEvent$layout.height;\n this.props.onContentSizeChange(width, height);\n };\n this._handleScroll = e => {\n if (process.env.NODE_ENV !== 'production') {\n if (this.props.onScroll && this.props.scrollEventThrottle == null) {\n console.log('You specified `onScroll` on a but not ' + '`scrollEventThrottle`. You will only receive one event. ' + 'Using `16` you get all the events but be aware that it may ' + \"cause frame drops, use a bigger number if you don't need as \" + 'much precision.');\n }\n }\n if (this.props.keyboardDismissMode === 'on-drag') {\n dismissKeyboard();\n }\n this.scrollResponderHandleScroll(e);\n };\n this._setInnerViewRef = node => {\n this._innerViewRef = node;\n };\n this._setScrollNodeRef = node => {\n this._scrollNodeRef = node;\n // ScrollView needs to add more methods to the hostNode in addition to those\n // added by `usePlatformMethods`. This is temporarily until an API like\n // `ScrollView.scrollTo(hostNode, { x, y })` is added to React Native.\n if (node != null) {\n node.getScrollResponder = this.getScrollResponder;\n node.getInnerViewNode = this.getInnerViewNode;\n node.getInnerViewRef = this.getInnerViewRef;\n node.getNativeScrollRef = this.getNativeScrollRef;\n node.getScrollableNode = this.getScrollableNode;\n node.scrollTo = this.scrollTo;\n node.scrollToEnd = this.scrollToEnd;\n node.flashScrollIndicators = this.flashScrollIndicators;\n node.scrollResponderZoomTo = this.scrollResponderZoomTo;\n node.scrollResponderScrollNativeHandleToKeyboard = this.scrollResponderScrollNativeHandleToKeyboard;\n }\n var ref = mergeRefs(this.props.forwardedRef);\n ref(node);\n };\n }\n /**\n * ------------------------------------------------------\n * START SCROLLRESPONDER\n * ------------------------------------------------------\n */\n // Reset to false every time becomes responder. This is used to:\n // - Determine if the scroll view has been scrolled and therefore should\n // refuse to give up its responder lock.\n // - Determine if releasing should dismiss the keyboard when we are in\n // tap-to-dismiss mode (!this.props.keyboardShouldPersistTaps).\n /**\n * Invoke this from an `onScroll` event.\n */\n /**\n * Merely touch starting is not sufficient for a scroll view to become the\n * responder. Being the \"responder\" means that the very next touch move/end\n * event will result in an action/movement.\n *\n * Invoke this from an `onStartShouldSetResponder` event.\n *\n * `onStartShouldSetResponder` is used when the next move/end will trigger\n * some UI movement/action, but when you want to yield priority to views\n * nested inside of the view.\n *\n * There may be some cases where scroll views actually should return `true`\n * from `onStartShouldSetResponder`: Any time we are detecting a standard tap\n * that gives priority to nested views.\n *\n * - If a single tap on the scroll view triggers an action such as\n * recentering a map style view yet wants to give priority to interaction\n * views inside (such as dropped pins or labels), then we would return true\n * from this method when there is a single touch.\n *\n * - Similar to the previous case, if a two finger \"tap\" should trigger a\n * zoom, we would check the `touches` count, and if `>= 2`, we would return\n * true.\n *\n */\n scrollResponderHandleStartShouldSetResponder() {\n return false;\n }\n\n /**\n * There are times when the scroll view wants to become the responder\n * (meaning respond to the next immediate `touchStart/touchEnd`), in a way\n * that *doesn't* give priority to nested views (hence the capture phase):\n *\n * - Currently animating.\n * - Tapping anywhere that is not the focused input, while the keyboard is\n * up (which should dismiss the keyboard).\n *\n * Invoke this from an `onStartShouldSetResponderCapture` event.\n */\n\n /**\n * Invoke this from an `onResponderReject` event.\n *\n * Some other element is not yielding its role as responder. Normally, we'd\n * just disable the `UIScrollView`, but a touch has already began on it, the\n * `UIScrollView` will not accept being disabled after that. The easiest\n * solution for now is to accept the limitation of disallowing this\n * altogether. To improve this, find a way to disable the `UIScrollView` after\n * a touch has already started.\n */\n scrollResponderHandleResponderReject() {\n warning(false, \"ScrollView doesn't take rejection well - scrolls anyway\");\n }\n\n /**\n * We will allow the scroll view to give up its lock iff it acquired the lock\n * during an animation. This is a very useful default that happens to satisfy\n * many common user experiences.\n *\n * - Stop a scroll on the left edge, then turn that into an outer view's\n * backswipe.\n * - Stop a scroll mid-bounce at the top, continue pulling to have the outer\n * view dismiss.\n * - However, without catching the scroll view mid-bounce (while it is\n * motionless), if you drag far enough for the scroll view to become\n * responder (and therefore drag the scroll view a bit), any backswipe\n * navigation of a swipe gesture higher in the view hierarchy, should be\n * rejected.\n */\n\n /**\n * Invoke this from an `onTouchEnd` event.\n *\n * @param {SyntheticEvent} e Event.\n */\n\n /**\n * Invoke this from an `onResponderRelease` event.\n */\n\n /**\n * Invoke this from an `onResponderGrant` event.\n */\n\n /**\n * Unfortunately, `onScrollBeginDrag` also fires when *stopping* the scroll\n * animation, and there's not an easy way to distinguish a drag vs. stopping\n * momentum.\n *\n * Invoke this from an `onScrollBeginDrag` event.\n */\n\n /**\n * Invoke this from an `onScrollEndDrag` event.\n */\n\n /**\n * Invoke this from an `onMomentumScrollBegin` event.\n */\n\n /**\n * Invoke this from an `onMomentumScrollEnd` event.\n */\n\n /**\n * Invoke this from an `onTouchStart` event.\n *\n * Since we know that the `SimpleEventPlugin` occurs later in the plugin\n * order, after `ResponderEventPlugin`, we can detect that we were *not*\n * permitted to be the responder (presumably because a contained view became\n * responder). The `onResponderReject` won't fire in that case - it only\n * fires when a *current* responder rejects our request.\n *\n * @param {SyntheticEvent} e Touch Start event.\n */\n\n /**\n * Invoke this from an `onTouchMove` event.\n *\n * Since we know that the `SimpleEventPlugin` occurs later in the plugin\n * order, after `ResponderEventPlugin`, we can detect that we were *not*\n * permitted to be the responder (presumably because a contained view became\n * responder). The `onResponderReject` won't fire in that case - it only\n * fires when a *current* responder rejects our request.\n *\n * @param {SyntheticEvent} e Touch Start event.\n */\n\n /**\n * A helper function for this class that lets us quickly determine if the\n * view is currently animating. This is particularly useful to know when\n * a touch has just started or ended.\n */\n\n /**\n * A helper function to scroll to a specific point in the scrollview.\n * This is currently used to help focus on child textviews, but can also\n * be used to quickly scroll to any element we want to focus. Syntax:\n *\n * scrollResponderScrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true})\n *\n * Note: The weird argument signature is due to the fact that, for historical reasons,\n * the function also accepts separate arguments as as alternative to the options object.\n * This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED.\n */\n\n /**\n * A helper function to zoom to a specific rect in the scrollview. The argument has the shape\n * {x: number; y: number; width: number; height: number; animated: boolean = true}\n *\n * @platform ios\n */\n\n /**\n * Displays the scroll indicators momentarily.\n */\n scrollResponderFlashScrollIndicators() {}\n\n /**\n * This method should be used as the callback to onFocus in a TextInputs'\n * parent view. Note that any module using this mixin needs to return\n * the parent view's ref in getScrollViewRef() in order to use this method.\n * @param {any} nodeHandle The TextInput node handle\n * @param {number} additionalOffset The scroll view's top \"contentInset\".\n * Default is 0.\n * @param {bool} preventNegativeScrolling Whether to allow pulling the content\n * down to make it meet the keyboard's top. Default is false.\n */\n\n /**\n * The calculations performed here assume the scroll view takes up the entire\n * screen - even if has some content inset. We then measure the offsets of the\n * keyboard, and compensate both for the scroll view's \"contentInset\".\n *\n * @param {number} left Position of input w.r.t. table view.\n * @param {number} top Position of input w.r.t. table view.\n * @param {number} width Width of the text input.\n * @param {number} height Height of the text input.\n */\n\n scrollResponderTextInputFocusError(e) {\n console.error('Error measuring text field: ', e);\n }\n\n /**\n * Warning, this may be called several times for a single keyboard opening.\n * It's best to store the information in this method and then take any action\n * at a later point (either in `keyboardDidShow` or other).\n *\n * Here's the order that events occur in:\n * - focus\n * - willShow {startCoordinates, endCoordinates} several times\n * - didShow several times\n * - blur\n * - willHide {startCoordinates, endCoordinates} several times\n * - didHide several times\n *\n * The `ScrollResponder` providesModule callbacks for each of these events.\n * Even though any user could have easily listened to keyboard events\n * themselves, using these `props` callbacks ensures that ordering of events\n * is consistent - and not dependent on the order that the keyboard events are\n * subscribed to. This matters when telling the scroll view to scroll to where\n * the keyboard is headed - the scroll responder better have been notified of\n * the keyboard destination before being instructed to scroll to where the\n * keyboard will be. Stick to the `ScrollResponder` callbacks, and everything\n * will work.\n *\n * WARNING: These callbacks will fire even if a keyboard is displayed in a\n * different navigation pane. Filter out the events to determine if they are\n * relevant to you. (For example, only if you receive these callbacks after\n * you had explicitly focused a node etc).\n */\n\n /**\n * ------------------------------------------------------\n * END SCROLLRESPONDER\n * ------------------------------------------------------\n */\n\n /**\n * Returns a reference to the underlying scroll responder, which supports\n * operations like `scrollTo`. All ScrollView-like components should\n * implement this method so that they can be composed while providing access\n * to the underlying scroll responder's methods.\n */\n\n /**\n * Scrolls to a given x, y offset, either immediately or with a smooth animation.\n * Syntax:\n *\n * scrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true})\n *\n * Note: The weird argument signature is due to the fact that, for historical reasons,\n * the function also accepts separate arguments as as alternative to the options object.\n * This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED.\n */\n\n /**\n * If this is a vertical ScrollView scrolls to the bottom.\n * If this is a horizontal ScrollView scrolls to the right.\n *\n * Use `scrollToEnd({ animated: true })` for smooth animated scrolling,\n * `scrollToEnd({ animated: false })` for immediate scrolling.\n * If no options are passed, `animated` defaults to true.\n */\n\n render() {\n var _this$props = this.props,\n contentContainerStyle = _this$props.contentContainerStyle,\n horizontal = _this$props.horizontal,\n onContentSizeChange = _this$props.onContentSizeChange,\n refreshControl = _this$props.refreshControl,\n stickyHeaderIndices = _this$props.stickyHeaderIndices,\n pagingEnabled = _this$props.pagingEnabled,\n forwardedRef = _this$props.forwardedRef,\n keyboardDismissMode = _this$props.keyboardDismissMode,\n onScroll = _this$props.onScroll,\n centerContent = _this$props.centerContent,\n other = _objectWithoutPropertiesLoose(_this$props, _excluded);\n if (process.env.NODE_ENV !== 'production' && this.props.style) {\n var style = StyleSheet.flatten(this.props.style);\n var childLayoutProps = ['alignItems', 'justifyContent'].filter(prop => style && style[prop] !== undefined);\n invariant(childLayoutProps.length === 0, \"ScrollView child layout (\" + JSON.stringify(childLayoutProps) + \") \" + 'must be applied through the contentContainerStyle prop.');\n }\n var contentSizeChangeProps = {};\n if (onContentSizeChange) {\n contentSizeChangeProps = {\n onLayout: this._handleContentOnLayout\n };\n }\n var hasStickyHeaderIndices = !horizontal && Array.isArray(stickyHeaderIndices);\n var children = hasStickyHeaderIndices || pagingEnabled ? React.Children.map(this.props.children, (child, i) => {\n var isSticky = hasStickyHeaderIndices && stickyHeaderIndices.indexOf(i) > -1;\n if (child != null && (isSticky || pagingEnabled)) {\n return /*#__PURE__*/React.createElement(View, {\n style: [isSticky && styles.stickyHeader, pagingEnabled && styles.pagingEnabledChild]\n }, child);\n } else {\n return child;\n }\n }) : this.props.children;\n var contentContainer = /*#__PURE__*/React.createElement(View, _extends({}, contentSizeChangeProps, {\n children: children,\n collapsable: false,\n ref: this._setInnerViewRef,\n style: [horizontal && styles.contentContainerHorizontal, centerContent && styles.contentContainerCenterContent, contentContainerStyle]\n }));\n var baseStyle = horizontal ? styles.baseHorizontal : styles.baseVertical;\n var pagingEnabledStyle = horizontal ? styles.pagingEnabledHorizontal : styles.pagingEnabledVertical;\n var props = _objectSpread(_objectSpread({}, other), {}, {\n style: [baseStyle, pagingEnabled && pagingEnabledStyle, this.props.style],\n onTouchStart: this.scrollResponderHandleTouchStart,\n onTouchMove: this.scrollResponderHandleTouchMove,\n onTouchEnd: this.scrollResponderHandleTouchEnd,\n onScrollBeginDrag: this.scrollResponderHandleScrollBeginDrag,\n onScrollEndDrag: this.scrollResponderHandleScrollEndDrag,\n onMomentumScrollBegin: this.scrollResponderHandleMomentumScrollBegin,\n onMomentumScrollEnd: this.scrollResponderHandleMomentumScrollEnd,\n onStartShouldSetResponder: this.scrollResponderHandleStartShouldSetResponder,\n onStartShouldSetResponderCapture: this.scrollResponderHandleStartShouldSetResponderCapture,\n onScrollShouldSetResponder: this.scrollResponderHandleScrollShouldSetResponder,\n onScroll: this._handleScroll,\n onResponderGrant: this.scrollResponderHandleResponderGrant,\n onResponderTerminationRequest: this.scrollResponderHandleTerminationRequest,\n onResponderTerminate: this.scrollResponderHandleTerminate,\n onResponderRelease: this.scrollResponderHandleResponderRelease,\n onResponderReject: this.scrollResponderHandleResponderReject\n });\n var ScrollViewClass = ScrollViewBase;\n invariant(ScrollViewClass !== undefined, 'ScrollViewClass must not be undefined');\n var scrollView = /*#__PURE__*/React.createElement(ScrollViewClass, _extends({}, props, {\n ref: this._setScrollNodeRef\n }), contentContainer);\n if (refreshControl) {\n return /*#__PURE__*/React.cloneElement(refreshControl, {\n style: props.style\n }, scrollView);\n }\n return scrollView;\n }\n}\nvar commonStyle = {\n flexGrow: 1,\n flexShrink: 1,\n // Enable hardware compositing in modern browsers.\n // Creates a new layer with its own backing surface that can significantly\n // improve scroll performance.\n transform: 'translateZ(0)',\n // iOS native scrolling\n WebkitOverflowScrolling: 'touch'\n};\nvar styles = StyleSheet.create({\n baseVertical: _objectSpread(_objectSpread({}, commonStyle), {}, {\n flexDirection: 'column',\n overflowX: 'hidden',\n overflowY: 'auto'\n }),\n baseHorizontal: _objectSpread(_objectSpread({}, commonStyle), {}, {\n flexDirection: 'row',\n overflowX: 'auto',\n overflowY: 'hidden'\n }),\n contentContainerHorizontal: {\n flexDirection: 'row'\n },\n contentContainerCenterContent: {\n justifyContent: 'center',\n flexGrow: 1\n },\n stickyHeader: {\n position: 'sticky',\n top: 0,\n zIndex: 10\n },\n pagingEnabledHorizontal: {\n scrollSnapType: 'x mandatory'\n },\n pagingEnabledVertical: {\n scrollSnapType: 'y mandatory'\n },\n pagingEnabledChild: {\n scrollSnapAlign: 'start'\n }\n});\nvar ForwardedScrollView = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {\n return /*#__PURE__*/React.createElement(ScrollView, _extends({}, props, {\n forwardedRef: forwardedRef\n }));\n});\nForwardedScrollView.displayName = 'ScrollView';\nexport default ForwardedScrollView;","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nimport TextInputState from '../TextInputState';\nvar dismissKeyboard = () => {\n TextInputState.blurTextInput(TextInputState.currentlyFocusedField());\n};\nexport default dismissKeyboard;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nimport UIManager from '../../exports/UIManager';\n\n/**\n * This class is responsible for coordinating the \"focused\"\n * state for TextInputs. All calls relating to the keyboard\n * should be funneled through here\n */\nvar TextInputState = {\n /**\n * Internal state\n */\n _currentlyFocusedNode: null,\n /**\n * Returns the ID of the currently focused text field, if one exists\n * If no text field is focused it returns null\n */\n currentlyFocusedField() {\n if (document.activeElement !== this._currentlyFocusedNode) {\n this._currentlyFocusedNode = null;\n }\n return this._currentlyFocusedNode;\n },\n /**\n * @param {Object} TextInputID id of the text field to focus\n * Focuses the specified text field\n * noop if the text field was already focused\n */\n focusTextInput(textFieldNode) {\n if (textFieldNode !== null) {\n this._currentlyFocusedNode = textFieldNode;\n if (document.activeElement !== textFieldNode) {\n UIManager.focus(textFieldNode);\n }\n }\n },\n /**\n * @param {Object} textFieldNode id of the text field to focus\n * Unfocuses the specified text field\n * noop if it wasn't focused\n */\n blurTextInput(textFieldNode) {\n if (textFieldNode !== null) {\n this._currentlyFocusedNode = null;\n if (document.activeElement === textFieldNode) {\n UIManager.blur(textFieldNode);\n }\n }\n }\n};\nexport default TextInputState;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"onScroll\", \"onTouchMove\", \"onWheel\", \"scrollEnabled\", \"scrollEventThrottle\", \"showsHorizontalScrollIndicator\", \"showsVerticalScrollIndicator\", \"style\"];\n/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nimport * as React from 'react';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\nimport useMergeRefs from '../../modules/useMergeRefs';\nfunction normalizeScrollEvent(e) {\n return {\n nativeEvent: {\n contentOffset: {\n get x() {\n return e.target.scrollLeft;\n },\n get y() {\n return e.target.scrollTop;\n }\n },\n contentSize: {\n get height() {\n return e.target.scrollHeight;\n },\n get width() {\n return e.target.scrollWidth;\n }\n },\n layoutMeasurement: {\n get height() {\n return e.target.offsetHeight;\n },\n get width() {\n return e.target.offsetWidth;\n }\n }\n },\n timeStamp: Date.now()\n };\n}\nfunction shouldEmitScrollEvent(lastTick, eventThrottle) {\n var timeSinceLastTick = Date.now() - lastTick;\n return eventThrottle > 0 && timeSinceLastTick >= eventThrottle;\n}\n\n/**\n * Encapsulates the Web-specific scroll throttling and disabling logic\n */\nvar ScrollViewBase = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {\n var onScroll = props.onScroll,\n onTouchMove = props.onTouchMove,\n onWheel = props.onWheel,\n _props$scrollEnabled = props.scrollEnabled,\n scrollEnabled = _props$scrollEnabled === void 0 ? true : _props$scrollEnabled,\n _props$scrollEventThr = props.scrollEventThrottle,\n scrollEventThrottle = _props$scrollEventThr === void 0 ? 0 : _props$scrollEventThr,\n showsHorizontalScrollIndicator = props.showsHorizontalScrollIndicator,\n showsVerticalScrollIndicator = props.showsVerticalScrollIndicator,\n style = props.style,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n var scrollState = React.useRef({\n isScrolling: false,\n scrollLastTick: 0\n });\n var scrollTimeout = React.useRef(null);\n var scrollRef = React.useRef(null);\n function createPreventableScrollHandler(handler) {\n return e => {\n if (scrollEnabled) {\n if (handler) {\n handler(e);\n }\n }\n };\n }\n function handleScroll(e) {\n e.stopPropagation();\n if (e.target === scrollRef.current) {\n e.persist();\n // A scroll happened, so the scroll resets the scrollend timeout.\n if (scrollTimeout.current != null) {\n clearTimeout(scrollTimeout.current);\n }\n scrollTimeout.current = setTimeout(() => {\n handleScrollEnd(e);\n }, 100);\n if (scrollState.current.isScrolling) {\n // Scroll last tick may have changed, check if we need to notify\n if (shouldEmitScrollEvent(scrollState.current.scrollLastTick, scrollEventThrottle)) {\n handleScrollTick(e);\n }\n } else {\n // Weren't scrolling, so we must have just started\n handleScrollStart(e);\n }\n }\n }\n function handleScrollStart(e) {\n scrollState.current.isScrolling = true;\n handleScrollTick(e);\n }\n function handleScrollTick(e) {\n scrollState.current.scrollLastTick = Date.now();\n if (onScroll) {\n onScroll(normalizeScrollEvent(e));\n }\n }\n function handleScrollEnd(e) {\n scrollState.current.isScrolling = false;\n if (onScroll) {\n onScroll(normalizeScrollEvent(e));\n }\n }\n var hideScrollbar = showsHorizontalScrollIndicator === false || showsVerticalScrollIndicator === false;\n return /*#__PURE__*/React.createElement(View, _extends({}, rest, {\n onScroll: handleScroll,\n onTouchMove: createPreventableScrollHandler(onTouchMove),\n onWheel: createPreventableScrollHandler(onWheel),\n ref: useMergeRefs(scrollRef, forwardedRef),\n style: [style, !scrollEnabled && styles.scrollDisabled, hideScrollbar && styles.hideScrollbar]\n }));\n});\n\n// Chrome doesn't support e.preventDefault in this case; touch-action must be\n// used to disable scrolling.\n// https://developers.google.com/web/updates/2017/01/scrolling-intervention\nvar styles = StyleSheet.create({\n scrollDisabled: {\n overflowX: 'hidden',\n overflowY: 'hidden',\n touchAction: 'none'\n },\n hideScrollbar: {\n scrollbarWidth: 'none'\n }\n});\nexport default ScrollViewBase;","/**\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'use strict';\n\nvar emptyFunction = require(\"./emptyFunction\");\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\n\nfunction printWarning(format) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n}\n\nvar warning = process.env.NODE_ENV !== \"production\" ? function (condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(void 0, [format].concat(args));\n }\n} : emptyFunction;\nmodule.exports = warning;","\"use strict\";\n\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 * \n */\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\n\n\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\n\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\n\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nimport { findDOMNode } from 'react-dom';\n\n/**\n * @deprecated imperatively finding the DOM element of a react component has been deprecated in React 18.\n * You should use ref properties on the component instead.\n */\nvar findNodeHandle = component => {\n var node;\n try {\n node = findDOMNode(component);\n } catch (e) {}\n return node;\n};\nexport default findNodeHandle;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n * \n */\n\n'use strict';\n\nimport InteractionManager from '../../../exports/InteractionManager';\n\n/**\n * A simple class for batching up invocations of a low-pri callback. A timeout is set to run the\n * callback once after a delay, no matter how many times it's scheduled. Once the delay is reached,\n * InteractionManager.runAfterInteractions is used to invoke the callback after any hi-pri\n * interactions are done running.\n *\n * Make sure to cleanup with dispose(). Example:\n *\n * class Widget extends React.Component {\n * _batchedSave: new Batchinator(() => this._saveState, 1000);\n * _saveSate() {\n * // save this.state to disk\n * }\n * componentDidUpdate() {\n * this._batchedSave.schedule();\n * }\n * componentWillUnmount() {\n * this._batchedSave.dispose();\n * }\n * ...\n * }\n */\nclass Batchinator {\n constructor(callback, delayMS) {\n this._delay = delayMS;\n this._callback = callback;\n }\n /*\n * Cleanup any pending tasks.\n *\n * By default, if there is a pending task the callback is run immediately. Set the option abort to\n * true to not call the callback if it was pending.\n */\n dispose(options) {\n if (options === void 0) {\n options = {\n abort: false\n };\n }\n if (this._taskHandle) {\n this._taskHandle.cancel();\n if (!options.abort) {\n this._callback();\n }\n this._taskHandle = null;\n }\n }\n schedule() {\n if (this._taskHandle) {\n return;\n }\n var timeoutHandle = setTimeout(() => {\n this._taskHandle = InteractionManager.runAfterInteractions(() => {\n // Note that we clear the handle before invoking the callback so that if the callback calls\n // schedule again, it will actually schedule another task.\n this._taskHandle = null;\n this._callback();\n });\n }, this._delay);\n this._taskHandle = {\n cancel: () => clearTimeout(timeoutHandle)\n };\n }\n}\nexport default Batchinator;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nimport invariant from 'fbjs/lib/invariant';\nimport TaskQueue from './TaskQueue';\nimport EventEmitter from '../../vendor/react-native/vendor/emitter/EventEmitter';\nimport requestIdleCallback from '../../modules/requestIdleCallback';\nvar _emitter = new EventEmitter();\nvar InteractionManager = {\n Events: {\n interactionStart: 'interactionStart',\n interactionComplete: 'interactionComplete'\n },\n /**\n * Schedule a function to run after all interactions have completed.\n */\n runAfterInteractions(task) {\n var tasks = [];\n var promise = new Promise(resolve => {\n _scheduleUpdate();\n if (task) {\n tasks.push(task);\n }\n tasks.push({\n run: resolve,\n name: 'resolve ' + (task && task.name || '?')\n });\n _taskQueue.enqueueTasks(tasks);\n });\n return {\n then: promise.then.bind(promise),\n done: promise.then.bind(promise),\n cancel: () => {\n _taskQueue.cancelTasks(tasks);\n }\n };\n },\n /**\n * Notify manager that an interaction has started.\n */\n createInteractionHandle() {\n _scheduleUpdate();\n var handle = ++_inc;\n _addInteractionSet.add(handle);\n return handle;\n },\n /**\n * Notify manager that an interaction has completed.\n */\n clearInteractionHandle(handle) {\n invariant(!!handle, 'Must provide a handle to clear.');\n _scheduleUpdate();\n _addInteractionSet.delete(handle);\n _deleteInteractionSet.add(handle);\n },\n addListener: _emitter.addListener.bind(_emitter),\n /**\n *\n * @param deadline\n */\n setDeadline(deadline) {\n _deadline = deadline;\n }\n};\nvar _interactionSet = new Set();\nvar _addInteractionSet = new Set();\nvar _deleteInteractionSet = new Set();\nvar _taskQueue = new TaskQueue({\n onMoreTasks: _scheduleUpdate\n});\nvar _nextUpdateHandle = 0;\nvar _inc = 0;\nvar _deadline = -1;\n\n/**\n * Schedule an asynchronous update to the interaction state.\n */\nfunction _scheduleUpdate() {\n if (!_nextUpdateHandle) {\n if (_deadline > 0) {\n _nextUpdateHandle = setTimeout(_processUpdate);\n } else {\n _nextUpdateHandle = requestIdleCallback(_processUpdate);\n }\n }\n}\n\n/**\n * Notify listeners, process queue, etc\n */\nfunction _processUpdate() {\n _nextUpdateHandle = 0;\n var interactionCount = _interactionSet.size;\n _addInteractionSet.forEach(handle => _interactionSet.add(handle));\n _deleteInteractionSet.forEach(handle => _interactionSet.delete(handle));\n var nextInteractionCount = _interactionSet.size;\n if (interactionCount !== 0 && nextInteractionCount === 0) {\n _emitter.emit(InteractionManager.Events.interactionComplete);\n } else if (interactionCount === 0 && nextInteractionCount !== 0) {\n _emitter.emit(InteractionManager.Events.interactionStart);\n }\n if (nextInteractionCount === 0) {\n // It seems that we can't know the running time of the current event loop,\n // we can only calculate the running time of the current task queue.\n var begin = Date.now();\n while (_taskQueue.hasTasksToProcess()) {\n _taskQueue.processNext();\n if (_deadline > 0 && Date.now() - begin >= _deadline) {\n _scheduleUpdate();\n break;\n }\n }\n }\n _addInteractionSet.clear();\n _deleteInteractionSet.clear();\n}\nexport default InteractionManager;","import _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nimport invariant from 'fbjs/lib/invariant';\nclass TaskQueue {\n constructor(_ref) {\n var onMoreTasks = _ref.onMoreTasks;\n this._onMoreTasks = onMoreTasks;\n this._queueStack = [{\n tasks: [],\n popable: true\n }];\n }\n enqueue(task) {\n this._getCurrentQueue().push(task);\n }\n enqueueTasks(tasks) {\n tasks.forEach(task => this.enqueue(task));\n }\n cancelTasks(tasksToCancel) {\n this._queueStack = this._queueStack.map(queue => _objectSpread(_objectSpread({}, queue), {}, {\n tasks: queue.tasks.filter(task => tasksToCancel.indexOf(task) === -1)\n })).filter((queue, idx) => queue.tasks.length > 0 || idx === 0);\n }\n hasTasksToProcess() {\n return this._getCurrentQueue().length > 0;\n }\n\n /**\n * Executes the next task in the queue.\n */\n processNext() {\n var queue = this._getCurrentQueue();\n if (queue.length) {\n var task = queue.shift();\n try {\n if (typeof task === 'object' && task.gen) {\n this._genPromise(task);\n } else if (typeof task === 'object' && task.run) {\n task.run();\n } else {\n invariant(typeof task === 'function', 'Expected Function, SimpleTask, or PromiseTask, but got:\\n' + JSON.stringify(task, null, 2));\n task();\n }\n } catch (e) {\n e.message = 'TaskQueue: Error with task ' + (task.name || '') + ': ' + e.message;\n throw e;\n }\n }\n }\n _getCurrentQueue() {\n var stackIdx = this._queueStack.length - 1;\n var queue = this._queueStack[stackIdx];\n if (queue.popable && queue.tasks.length === 0 && stackIdx > 0) {\n this._queueStack.pop();\n return this._getCurrentQueue();\n } else {\n return queue.tasks;\n }\n }\n _genPromise(task) {\n var length = this._queueStack.push({\n tasks: [],\n popable: false\n });\n var stackIdx = length - 1;\n var stackItem = this._queueStack[stackIdx];\n task.gen().then(() => {\n stackItem.popable = true;\n this.hasTasksToProcess() && this._onMoreTasks();\n }).catch(ex => {\n setTimeout(() => {\n ex.message = \"TaskQueue: Error resolving Promise in task \" + task.name + \": \" + ex.message;\n throw ex;\n }, 0);\n });\n }\n}\nexport default TaskQueue;","/**\n * Copyright (c) Nicolas Gallagher.\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 */\nimport canUseDOM from '../canUseDom';\nvar _requestIdleCallback = function _requestIdleCallback(cb, options) {\n return setTimeout(() => {\n var start = Date.now();\n cb({\n didTimeout: false,\n timeRemaining() {\n return Math.max(0, 50 - (Date.now() - start));\n }\n });\n }, 1);\n};\nvar _cancelIdleCallback = function _cancelIdleCallback(id) {\n clearTimeout(id);\n};\nvar isSupported = canUseDOM && typeof window.requestIdleCallback !== 'undefined';\nvar requestIdleCallback = isSupported ? window.requestIdleCallback : _requestIdleCallback;\nvar cancelIdleCallback = isSupported ? window.cancelIdleCallback : _cancelIdleCallback;\nexport default requestIdleCallback;\nexport { cancelIdleCallback };","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n * \n */\n\n'use strict';\n\nfunction clamp(min, value, max) {\n if (value < min) {\n return min;\n }\n if (value > max) {\n return max;\n }\n return value;\n}\nexport default clamp;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n * \n */\n\n'use strict';\n\n/**\n * Intentional info-level logging for clear separation from ad-hoc console debug logging.\n */\nfunction infoLog() {\n return console.log(...arguments);\n}\nexport default infoLog;","import _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\n/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\nimport invariant from 'fbjs/lib/invariant';\nexport class CellRenderMask {\n constructor(numCells) {\n invariant(numCells >= 0, 'CellRenderMask must contain a non-negative number os cells');\n this._numCells = numCells;\n if (numCells === 0) {\n this._regions = [];\n } else {\n this._regions = [{\n first: 0,\n last: numCells - 1,\n isSpacer: true\n }];\n }\n }\n enumerateRegions() {\n return this._regions;\n }\n addCells(cells) {\n invariant(cells.first >= 0 && cells.first < this._numCells && cells.last >= -1 && cells.last < this._numCells && cells.last >= cells.first - 1, 'CellRenderMask.addCells called with invalid cell range');\n\n // VirtualizedList uses inclusive ranges, where zero-count states are\n // possible. E.g. [0, -1] for no cells, starting at 0.\n if (cells.last < cells.first) {\n return;\n }\n var _this$_findRegion = this._findRegion(cells.first),\n firstIntersect = _this$_findRegion[0],\n firstIntersectIdx = _this$_findRegion[1];\n var _this$_findRegion2 = this._findRegion(cells.last),\n lastIntersect = _this$_findRegion2[0],\n lastIntersectIdx = _this$_findRegion2[1];\n\n // Fast-path if the cells to add are already all present in the mask. We\n // will otherwise need to do some mutation.\n if (firstIntersectIdx === lastIntersectIdx && !firstIntersect.isSpacer) {\n return;\n }\n\n // We need to replace the existing covered regions with 1-3 new regions\n // depending whether we need to split spacers out of overlapping regions.\n var newLeadRegion = [];\n var newTailRegion = [];\n var newMainRegion = _objectSpread(_objectSpread({}, cells), {}, {\n isSpacer: false\n });\n if (firstIntersect.first < newMainRegion.first) {\n if (firstIntersect.isSpacer) {\n newLeadRegion.push({\n first: firstIntersect.first,\n last: newMainRegion.first - 1,\n isSpacer: true\n });\n } else {\n newMainRegion.first = firstIntersect.first;\n }\n }\n if (lastIntersect.last > newMainRegion.last) {\n if (lastIntersect.isSpacer) {\n newTailRegion.push({\n first: newMainRegion.last + 1,\n last: lastIntersect.last,\n isSpacer: true\n });\n } else {\n newMainRegion.last = lastIntersect.last;\n }\n }\n var replacementRegions = [...newLeadRegion, newMainRegion, ...newTailRegion];\n var numRegionsToDelete = lastIntersectIdx - firstIntersectIdx + 1;\n this._regions.splice(firstIntersectIdx, numRegionsToDelete, ...replacementRegions);\n }\n numCells() {\n return this._numCells;\n }\n equals(other) {\n return this._numCells === other._numCells && this._regions.length === other._regions.length && this._regions.every((region, i) => region.first === other._regions[i].first && region.last === other._regions[i].last && region.isSpacer === other._regions[i].isSpacer);\n }\n _findRegion(cellIdx) {\n var firstIdx = 0;\n var lastIdx = this._regions.length - 1;\n while (firstIdx <= lastIdx) {\n var middleIdx = Math.floor((firstIdx + lastIdx) / 2);\n var middleRegion = this._regions[middleIdx];\n if (cellIdx >= middleRegion.first && cellIdx <= middleRegion.last) {\n return [middleRegion, middleIdx];\n } else if (cellIdx < middleRegion.first) {\n lastIdx = middleIdx - 1;\n } else if (cellIdx > middleRegion.last) {\n firstIdx = middleIdx + 1;\n }\n }\n invariant(false, \"A region was not found containing cellIdx \" + cellIdx);\n }\n}","import _createForOfIteratorHelperLoose from \"@babel/runtime/helpers/createForOfIteratorHelperLoose\";\n/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\nimport invariant from 'fbjs/lib/invariant';\nexport default class ChildListCollection {\n constructor() {\n this._cellKeyToChildren = new Map();\n this._childrenToCellKey = new Map();\n }\n add(list, cellKey) {\n var _this$_cellKeyToChild;\n invariant(!this._childrenToCellKey.has(list), 'Trying to add already present child list');\n var cellLists = (_this$_cellKeyToChild = this._cellKeyToChildren.get(cellKey)) !== null && _this$_cellKeyToChild !== void 0 ? _this$_cellKeyToChild : new Set();\n cellLists.add(list);\n this._cellKeyToChildren.set(cellKey, cellLists);\n this._childrenToCellKey.set(list, cellKey);\n }\n remove(list) {\n var cellKey = this._childrenToCellKey.get(list);\n invariant(cellKey != null, 'Trying to remove non-present child list');\n this._childrenToCellKey.delete(list);\n var cellLists = this._cellKeyToChildren.get(cellKey);\n invariant(cellLists, '_cellKeyToChildren should contain cellKey');\n cellLists.delete(list);\n if (cellLists.size === 0) {\n this._cellKeyToChildren.delete(cellKey);\n }\n }\n forEach(fn) {\n for (var _iterator = _createForOfIteratorHelperLoose(this._cellKeyToChildren.values()), _step; !(_step = _iterator()).done;) {\n var listSet = _step.value;\n for (var _iterator2 = _createForOfIteratorHelperLoose(listSet), _step2; !(_step2 = _iterator2()).done;) {\n var list = _step2.value;\n fn(list);\n }\n }\n }\n forEachInCell(cellKey, fn) {\n var _this$_cellKeyToChild2;\n var listSet = (_this$_cellKeyToChild2 = this._cellKeyToChildren.get(cellKey)) !== null && _this$_cellKeyToChild2 !== void 0 ? _this$_cellKeyToChild2 : [];\n for (var _iterator3 = _createForOfIteratorHelperLoose(listSet), _step3; !(_step3 = _iterator3()).done;) {\n var list = _step3.value;\n fn(list);\n }\n }\n anyInCell(cellKey, fn) {\n var _this$_cellKeyToChild3;\n var listSet = (_this$_cellKeyToChild3 = this._cellKeyToChildren.get(cellKey)) !== null && _this$_cellKeyToChild3 !== void 0 ? _this$_cellKeyToChild3 : [];\n for (var _iterator4 = _createForOfIteratorHelperLoose(listSet), _step4; !(_step4 = _iterator4()).done;) {\n var list = _step4.value;\n if (fn(list)) {\n return true;\n }\n }\n return false;\n }\n size() {\n return this._childrenToCellKey.size;\n }\n}","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nclass Info {\n constructor() {\n this.any_blank_count = 0;\n this.any_blank_ms = 0;\n this.any_blank_speed_sum = 0;\n this.mostly_blank_count = 0;\n this.mostly_blank_ms = 0;\n this.pixels_blank = 0;\n this.pixels_sampled = 0;\n this.pixels_scrolled = 0;\n this.total_time_spent = 0;\n this.sample_count = 0;\n }\n}\nvar DEBUG = false;\nvar _listeners = [];\nvar _minSampleCount = 10;\nvar _sampleRate = DEBUG ? 1 : null;\n\n/**\n * A helper class for detecting when the maximem fill rate of `VirtualizedList` is exceeded.\n * By default the sampling rate is set to zero and this will do nothing. If you want to collect\n * samples (e.g. to log them), make sure to call `FillRateHelper.setSampleRate(0.0-1.0)`.\n *\n * Listeners and sample rate are global for all `VirtualizedList`s - typical usage will combine with\n * `SceneTracker.getActiveScene` to determine the context of the events.\n */\nclass FillRateHelper {\n static addListener(callback) {\n if (_sampleRate === null) {\n console.warn('Call `FillRateHelper.setSampleRate` before `addListener`.');\n }\n _listeners.push(callback);\n return {\n remove: () => {\n _listeners = _listeners.filter(listener => callback !== listener);\n }\n };\n }\n static setSampleRate(sampleRate) {\n _sampleRate = sampleRate;\n }\n static setMinSampleCount(minSampleCount) {\n _minSampleCount = minSampleCount;\n }\n constructor(getFrameMetrics) {\n this._anyBlankStartTime = null;\n this._enabled = false;\n this._info = new Info();\n this._mostlyBlankStartTime = null;\n this._samplesStartTime = null;\n this._getFrameMetrics = getFrameMetrics;\n this._enabled = (_sampleRate || 0) > Math.random();\n this._resetData();\n }\n activate() {\n if (this._enabled && this._samplesStartTime == null) {\n DEBUG && console.debug('FillRateHelper: activate');\n this._samplesStartTime = global.performance.now();\n }\n }\n deactivateAndFlush() {\n if (!this._enabled) {\n return;\n }\n var start = this._samplesStartTime; // const for flow\n if (start == null) {\n DEBUG && console.debug('FillRateHelper: bail on deactivate with no start time');\n return;\n }\n if (this._info.sample_count < _minSampleCount) {\n // Don't bother with under-sampled events.\n this._resetData();\n return;\n }\n var total_time_spent = global.performance.now() - start;\n var info = _objectSpread(_objectSpread({}, this._info), {}, {\n total_time_spent\n });\n if (DEBUG) {\n var derived = {\n avg_blankness: this._info.pixels_blank / this._info.pixels_sampled,\n avg_speed: this._info.pixels_scrolled / (total_time_spent / 1000),\n avg_speed_when_any_blank: this._info.any_blank_speed_sum / this._info.any_blank_count,\n any_blank_per_min: this._info.any_blank_count / (total_time_spent / 1000 / 60),\n any_blank_time_frac: this._info.any_blank_ms / total_time_spent,\n mostly_blank_per_min: this._info.mostly_blank_count / (total_time_spent / 1000 / 60),\n mostly_blank_time_frac: this._info.mostly_blank_ms / total_time_spent\n };\n for (var key in derived) {\n // $FlowFixMe[prop-missing]\n derived[key] = Math.round(1000 * derived[key]) / 1000;\n }\n console.debug('FillRateHelper deactivateAndFlush: ', {\n derived,\n info\n });\n }\n _listeners.forEach(listener => listener(info));\n this._resetData();\n }\n computeBlankness(props, cellsAroundViewport, scrollMetrics) {\n if (!this._enabled || props.getItemCount(props.data) === 0 || cellsAroundViewport.last < cellsAroundViewport.first || this._samplesStartTime == null) {\n return 0;\n }\n var dOffset = scrollMetrics.dOffset,\n offset = scrollMetrics.offset,\n velocity = scrollMetrics.velocity,\n visibleLength = scrollMetrics.visibleLength;\n\n // Denominator metrics that we track for all events - most of the time there is no blankness and\n // we want to capture that.\n this._info.sample_count++;\n this._info.pixels_sampled += Math.round(visibleLength);\n this._info.pixels_scrolled += Math.round(Math.abs(dOffset));\n var scrollSpeed = Math.round(Math.abs(velocity) * 1000); // px / sec\n\n // Whether blank now or not, record the elapsed time blank if we were blank last time.\n var now = global.performance.now();\n if (this._anyBlankStartTime != null) {\n this._info.any_blank_ms += now - this._anyBlankStartTime;\n }\n this._anyBlankStartTime = null;\n if (this._mostlyBlankStartTime != null) {\n this._info.mostly_blank_ms += now - this._mostlyBlankStartTime;\n }\n this._mostlyBlankStartTime = null;\n var blankTop = 0;\n var first = cellsAroundViewport.first;\n var firstFrame = this._getFrameMetrics(first, props);\n while (first <= cellsAroundViewport.last && (!firstFrame || !firstFrame.inLayout)) {\n firstFrame = this._getFrameMetrics(first, props);\n first++;\n }\n // Only count blankTop if we aren't rendering the first item, otherwise we will count the header\n // as blank.\n if (firstFrame && first > 0) {\n blankTop = Math.min(visibleLength, Math.max(0, firstFrame.offset - offset));\n }\n var blankBottom = 0;\n var last = cellsAroundViewport.last;\n var lastFrame = this._getFrameMetrics(last, props);\n while (last >= cellsAroundViewport.first && (!lastFrame || !lastFrame.inLayout)) {\n lastFrame = this._getFrameMetrics(last, props);\n last--;\n }\n // Only count blankBottom if we aren't rendering the last item, otherwise we will count the\n // footer as blank.\n if (lastFrame && last < props.getItemCount(props.data) - 1) {\n var bottomEdge = lastFrame.offset + lastFrame.length;\n blankBottom = Math.min(visibleLength, Math.max(0, offset + visibleLength - bottomEdge));\n }\n var pixels_blank = Math.round(blankTop + blankBottom);\n var blankness = pixels_blank / visibleLength;\n if (blankness > 0) {\n this._anyBlankStartTime = now;\n this._info.any_blank_speed_sum += scrollSpeed;\n this._info.any_blank_count++;\n this._info.pixels_blank += pixels_blank;\n if (blankness > 0.5) {\n this._mostlyBlankStartTime = now;\n this._info.mostly_blank_count++;\n }\n } else if (scrollSpeed < 0.01 || Math.abs(dOffset) < 1) {\n this.deactivateAndFlush();\n }\n return blankness;\n }\n enabled() {\n return this._enabled;\n }\n _resetData() {\n this._anyBlankStartTime = null;\n this._info = new Info();\n this._mostlyBlankStartTime = null;\n this._samplesStartTime = null;\n }\n}\nexport default FillRateHelper;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\nimport invariant from 'fbjs/lib/invariant';\nimport * as React from 'react';\n\n/**\n * `setState` is called asynchronously, and should not rely on the value of\n * `this.props` or `this.state`:\n * https://reactjs.org/docs/state-and-lifecycle.html#state-updates-may-be-asynchronous\n *\n * SafePureComponent adds runtime enforcement, to catch cases where these\n * variables are read in a state updater function, instead of the ones passed\n * in.\n */\nexport default class StateSafePureComponent extends React.PureComponent {\n constructor(props) {\n super(props);\n this._inAsyncStateUpdate = false;\n this._installSetStateHooks();\n }\n setState(partialState, callback) {\n if (typeof partialState === 'function') {\n super.setState((state, props) => {\n this._inAsyncStateUpdate = true;\n var ret;\n try {\n ret = partialState(state, props);\n } catch (err) {\n throw err;\n } finally {\n this._inAsyncStateUpdate = false;\n }\n return ret;\n }, callback);\n } else {\n super.setState(partialState, callback);\n }\n }\n _installSetStateHooks() {\n var that = this;\n var props = this.props,\n state = this.state;\n Object.defineProperty(this, 'props', {\n get() {\n invariant(!that._inAsyncStateUpdate, '\"this.props\" should not be accessed during state updates');\n return props;\n },\n set(newProps) {\n props = newProps;\n }\n });\n Object.defineProperty(this, 'state', {\n get() {\n invariant(!that._inAsyncStateUpdate, '\"this.state\" should not be acceessed during state updates');\n return state;\n },\n set(newState) {\n state = newState;\n }\n });\n }\n}","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport _createForOfIteratorHelperLoose from \"@babel/runtime/helpers/createForOfIteratorHelperLoose\";\nimport invariant from 'fbjs/lib/invariant';\n/**\n * A Utility class for calculating viewable items based on current metrics like scroll position and\n * layout.\n *\n * An item is said to be in a \"viewable\" state when any of the following\n * is true for longer than `minimumViewTime` milliseconds (after an interaction if `waitForInteraction`\n * is true):\n *\n * - Occupying >= `viewAreaCoveragePercentThreshold` of the view area XOR fraction of the item\n * visible in the view area >= `itemVisiblePercentThreshold`.\n * - Entirely visible on screen\n */\nclass ViewabilityHelper {\n constructor(config) {\n if (config === void 0) {\n config = {\n viewAreaCoveragePercentThreshold: 0\n };\n }\n this._hasInteracted = false;\n this._timers = new Set();\n this._viewableIndices = [];\n this._viewableItems = new Map();\n this._config = config;\n }\n\n /**\n * Cleanup, e.g. on unmount. Clears any pending timers.\n */\n dispose() {\n /* $FlowFixMe[incompatible-call] (>=0.63.0 site=react_native_fb) This\n * comment suppresses an error found when Flow v0.63 was deployed. To see\n * the error delete this comment and run Flow. */\n this._timers.forEach(clearTimeout);\n }\n\n /**\n * Determines which items are viewable based on the current metrics and config.\n */\n computeViewableItems(props, scrollOffset, viewportHeight, getFrameMetrics,\n // Optional optimization to reduce the scan size\n renderRange) {\n var itemCount = props.getItemCount(props.data);\n var _this$_config = this._config,\n itemVisiblePercentThreshold = _this$_config.itemVisiblePercentThreshold,\n viewAreaCoveragePercentThreshold = _this$_config.viewAreaCoveragePercentThreshold;\n var viewAreaMode = viewAreaCoveragePercentThreshold != null;\n var viewablePercentThreshold = viewAreaMode ? viewAreaCoveragePercentThreshold : itemVisiblePercentThreshold;\n invariant(viewablePercentThreshold != null && itemVisiblePercentThreshold != null !== (viewAreaCoveragePercentThreshold != null), 'Must set exactly one of itemVisiblePercentThreshold or viewAreaCoveragePercentThreshold');\n var viewableIndices = [];\n if (itemCount === 0) {\n return viewableIndices;\n }\n var firstVisible = -1;\n var _ref = renderRange || {\n first: 0,\n last: itemCount - 1\n },\n first = _ref.first,\n last = _ref.last;\n if (last >= itemCount) {\n console.warn('Invalid render range computing viewability ' + JSON.stringify({\n renderRange,\n itemCount\n }));\n return [];\n }\n for (var idx = first; idx <= last; idx++) {\n var metrics = getFrameMetrics(idx, props);\n if (!metrics) {\n continue;\n }\n var top = metrics.offset - scrollOffset;\n var bottom = top + metrics.length;\n if (top < viewportHeight && bottom > 0) {\n firstVisible = idx;\n if (_isViewable(viewAreaMode, viewablePercentThreshold, top, bottom, viewportHeight, metrics.length)) {\n viewableIndices.push(idx);\n }\n } else if (firstVisible >= 0) {\n break;\n }\n }\n return viewableIndices;\n }\n\n /**\n * Figures out which items are viewable and how that has changed from before and calls\n * `onViewableItemsChanged` as appropriate.\n */\n onUpdate(props, scrollOffset, viewportHeight, getFrameMetrics, createViewToken, onViewableItemsChanged,\n // Optional optimization to reduce the scan size\n renderRange) {\n var itemCount = props.getItemCount(props.data);\n if (this._config.waitForInteraction && !this._hasInteracted || itemCount === 0 || !getFrameMetrics(0, props)) {\n return;\n }\n var viewableIndices = [];\n if (itemCount) {\n viewableIndices = this.computeViewableItems(props, scrollOffset, viewportHeight, getFrameMetrics, renderRange);\n }\n if (this._viewableIndices.length === viewableIndices.length && this._viewableIndices.every((v, ii) => v === viewableIndices[ii])) {\n // We might get a lot of scroll events where visibility doesn't change and we don't want to do\n // extra work in those cases.\n return;\n }\n this._viewableIndices = viewableIndices;\n if (this._config.minimumViewTime) {\n var handle = setTimeout(() => {\n /* $FlowFixMe[incompatible-call] (>=0.63.0 site=react_native_fb) This\n * comment suppresses an error found when Flow v0.63 was deployed. To\n * see the error delete this comment and run Flow. */\n this._timers.delete(handle);\n this._onUpdateSync(props, viewableIndices, onViewableItemsChanged, createViewToken);\n }, this._config.minimumViewTime);\n /* $FlowFixMe[incompatible-call] (>=0.63.0 site=react_native_fb) This\n * comment suppresses an error found when Flow v0.63 was deployed. To see\n * the error delete this comment and run Flow. */\n this._timers.add(handle);\n } else {\n this._onUpdateSync(props, viewableIndices, onViewableItemsChanged, createViewToken);\n }\n }\n\n /**\n * clean-up cached _viewableIndices to evaluate changed items on next update\n */\n resetViewableIndices() {\n this._viewableIndices = [];\n }\n\n /**\n * Records that an interaction has happened even if there has been no scroll.\n */\n recordInteraction() {\n this._hasInteracted = true;\n }\n _onUpdateSync(props, viewableIndicesToCheck, onViewableItemsChanged, createViewToken) {\n // Filter out indices that have gone out of view since this call was scheduled.\n viewableIndicesToCheck = viewableIndicesToCheck.filter(ii => this._viewableIndices.includes(ii));\n var prevItems = this._viewableItems;\n var nextItems = new Map(viewableIndicesToCheck.map(ii => {\n var viewable = createViewToken(ii, true, props);\n return [viewable.key, viewable];\n }));\n var changed = [];\n for (var _iterator = _createForOfIteratorHelperLoose(nextItems), _step; !(_step = _iterator()).done;) {\n var _step$value = _step.value,\n key = _step$value[0],\n viewable = _step$value[1];\n if (!prevItems.has(key)) {\n changed.push(viewable);\n }\n }\n for (var _iterator2 = _createForOfIteratorHelperLoose(prevItems), _step2; !(_step2 = _iterator2()).done;) {\n var _step2$value = _step2.value,\n _key = _step2$value[0],\n _viewable = _step2$value[1];\n if (!nextItems.has(_key)) {\n changed.push(_objectSpread(_objectSpread({}, _viewable), {}, {\n isViewable: false\n }));\n }\n }\n if (changed.length > 0) {\n this._viewableItems = nextItems;\n onViewableItemsChanged({\n viewableItems: Array.from(nextItems.values()),\n changed,\n viewabilityConfig: this._config\n });\n }\n }\n}\nfunction _isViewable(viewAreaMode, viewablePercentThreshold, top, bottom, viewportHeight, itemLength) {\n if (_isEntirelyVisible(top, bottom, viewportHeight)) {\n return true;\n } else {\n var pixels = _getPixelsVisible(top, bottom, viewportHeight);\n var percent = 100 * (viewAreaMode ? pixels / viewportHeight : pixels / itemLength);\n return percent >= viewablePercentThreshold;\n }\n}\nfunction _getPixelsVisible(top, bottom, viewportHeight) {\n var visibleHeight = Math.min(bottom, viewportHeight) - Math.max(top, 0);\n return Math.max(0, visibleHeight);\n}\nfunction _isEntirelyVisible(top, bottom, viewportHeight) {\n return top >= 0 && bottom <= viewportHeight && bottom > top;\n}\nexport default ViewabilityHelper;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\n/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\nimport View from '../../../exports/View';\nimport StyleSheet from '../../../exports/StyleSheet';\nimport { VirtualizedListCellContextProvider } from './VirtualizedListContext.js';\nimport invariant from 'fbjs/lib/invariant';\nimport * as React from 'react';\nexport default class CellRenderer extends React.Component {\n constructor() {\n super(...arguments);\n this.state = {\n separatorProps: {\n highlighted: false,\n leadingItem: this.props.item\n }\n };\n this._separators = {\n highlight: () => {\n var _this$props = this.props,\n cellKey = _this$props.cellKey,\n prevCellKey = _this$props.prevCellKey;\n this.props.onUpdateSeparators([cellKey, prevCellKey], {\n highlighted: true\n });\n },\n unhighlight: () => {\n var _this$props2 = this.props,\n cellKey = _this$props2.cellKey,\n prevCellKey = _this$props2.prevCellKey;\n this.props.onUpdateSeparators([cellKey, prevCellKey], {\n highlighted: false\n });\n },\n updateProps: (select, newProps) => {\n var _this$props3 = this.props,\n cellKey = _this$props3.cellKey,\n prevCellKey = _this$props3.prevCellKey;\n this.props.onUpdateSeparators([select === 'leading' ? prevCellKey : cellKey], newProps);\n }\n };\n this._onLayout = nativeEvent => {\n this.props.onCellLayout && this.props.onCellLayout(nativeEvent, this.props.cellKey, this.props.index);\n };\n }\n static getDerivedStateFromProps(props, prevState) {\n return {\n separatorProps: _objectSpread(_objectSpread({}, prevState.separatorProps), {}, {\n leadingItem: props.item\n })\n };\n }\n\n // TODO: consider factoring separator stuff out of VirtualizedList into FlatList since it's not\n // reused by SectionList and we can keep VirtualizedList simpler.\n // $FlowFixMe[missing-local-annot]\n\n updateSeparatorProps(newProps) {\n this.setState(state => ({\n separatorProps: _objectSpread(_objectSpread({}, state.separatorProps), newProps)\n }));\n }\n componentWillUnmount() {\n this.props.onUnmount(this.props.cellKey);\n }\n _renderElement(renderItem, ListItemComponent, item, index) {\n if (renderItem && ListItemComponent) {\n console.warn('VirtualizedList: Both ListItemComponent and renderItem props are present. ListItemComponent will take' + ' precedence over renderItem.');\n }\n if (ListItemComponent) {\n /* $FlowFixMe[not-a-component] (>=0.108.0 site=react_native_fb) This\n * comment suppresses an error found when Flow v0.108 was deployed. To\n * see the error, delete this comment and run Flow. */\n /* $FlowFixMe[incompatible-type-arg] (>=0.108.0 site=react_native_fb)\n * This comment suppresses an error found when Flow v0.108 was deployed.\n * To see the error, delete this comment and run Flow. */\n return /*#__PURE__*/React.createElement(ListItemComponent, {\n item,\n index,\n separators: this._separators\n });\n }\n if (renderItem) {\n return renderItem({\n item,\n index,\n separators: this._separators\n });\n }\n invariant(false, 'VirtualizedList: Either ListItemComponent or renderItem props are required but none were found.');\n }\n render() {\n var _this$props4 = this.props,\n CellRendererComponent = _this$props4.CellRendererComponent,\n ItemSeparatorComponent = _this$props4.ItemSeparatorComponent,\n ListItemComponent = _this$props4.ListItemComponent,\n cellKey = _this$props4.cellKey,\n horizontal = _this$props4.horizontal,\n item = _this$props4.item,\n index = _this$props4.index,\n inversionStyle = _this$props4.inversionStyle,\n onCellFocusCapture = _this$props4.onCellFocusCapture,\n onCellLayout = _this$props4.onCellLayout,\n renderItem = _this$props4.renderItem;\n var element = this._renderElement(renderItem, ListItemComponent, item, index);\n\n // NOTE: that when this is a sticky header, `onLayout` will get automatically extracted and\n // called explicitly by `ScrollViewStickyHeader`.\n var itemSeparator = /*#__PURE__*/React.isValidElement(ItemSeparatorComponent) ?\n // $FlowFixMe[incompatible-type]\n ItemSeparatorComponent :\n // $FlowFixMe[incompatible-type]\n ItemSeparatorComponent && /*#__PURE__*/React.createElement(ItemSeparatorComponent, this.state.separatorProps);\n var cellStyle = inversionStyle ? horizontal ? [styles.rowReverse, inversionStyle] : [styles.columnReverse, inversionStyle] : horizontal ? [styles.row, inversionStyle] : inversionStyle;\n var result = !CellRendererComponent ? /*#__PURE__*/React.createElement(View, _extends({\n style: cellStyle,\n onFocusCapture: onCellFocusCapture\n }, onCellLayout && {\n onLayout: this._onLayout\n }), element, itemSeparator) : /*#__PURE__*/React.createElement(CellRendererComponent, _extends({\n cellKey: cellKey,\n index: index,\n item: item,\n style: cellStyle,\n onFocusCapture: onCellFocusCapture\n }, onCellLayout && {\n onLayout: this._onLayout\n }), element, itemSeparator);\n return /*#__PURE__*/React.createElement(VirtualizedListCellContextProvider, {\n cellKey: this.props.cellKey\n }, result);\n }\n}\nvar styles = StyleSheet.create({\n row: {\n flexDirection: 'row'\n },\n rowReverse: {\n flexDirection: 'row-reverse'\n },\n columnReverse: {\n flexDirection: 'column-reverse'\n }\n});","import _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\n/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\nimport * as React from 'react';\nimport { useContext, useMemo } from 'react';\nvar __DEV__ = process.env.NODE_ENV !== 'production';\nexport var VirtualizedListContext = /*#__PURE__*/React.createContext(null);\nif (__DEV__) {\n VirtualizedListContext.displayName = 'VirtualizedListContext';\n}\n\n/**\n * Resets the context. Intended for use by portal-like components (e.g. Modal).\n */\nexport function VirtualizedListContextResetter(_ref) {\n var children = _ref.children;\n return /*#__PURE__*/React.createElement(VirtualizedListContext.Provider, {\n value: null\n }, children);\n}\n\n/**\n * Sets the context with memoization. Intended to be used by `VirtualizedList`.\n */\nexport function VirtualizedListContextProvider(_ref2) {\n var children = _ref2.children,\n value = _ref2.value;\n // Avoid setting a newly created context object if the values are identical.\n var context = useMemo(() => ({\n cellKey: null,\n getScrollMetrics: value.getScrollMetrics,\n horizontal: value.horizontal,\n getOutermostParentListRef: value.getOutermostParentListRef,\n registerAsNestedChild: value.registerAsNestedChild,\n unregisterAsNestedChild: value.unregisterAsNestedChild\n }), [value.getScrollMetrics, value.horizontal, value.getOutermostParentListRef, value.registerAsNestedChild, value.unregisterAsNestedChild]);\n return /*#__PURE__*/React.createElement(VirtualizedListContext.Provider, {\n value: context\n }, children);\n}\n\n/**\n * Sets the `cellKey`. Intended to be used by `VirtualizedList` for each cell.\n */\nexport function VirtualizedListCellContextProvider(_ref3) {\n var cellKey = _ref3.cellKey,\n children = _ref3.children;\n // Avoid setting a newly created context object if the values are identical.\n var currContext = useContext(VirtualizedListContext);\n var context = useMemo(() => currContext == null ? null : _objectSpread(_objectSpread({}, currContext), {}, {\n cellKey\n }), [currContext, cellKey]);\n return /*#__PURE__*/React.createElement(VirtualizedListContext.Provider, {\n value: context\n }, children);\n}","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\n/**\n * Used to find the indices of the frames that overlap the given offsets. Useful for finding the\n * items that bound different windows of content, such as the visible area or the buffered overscan\n * area.\n */\nexport function elementsThatOverlapOffsets(offsets, props, getFrameMetrics, zoomScale) {\n if (zoomScale === void 0) {\n zoomScale = 1;\n }\n var itemCount = props.getItemCount(props.data);\n var result = [];\n for (var offsetIndex = 0; offsetIndex < offsets.length; offsetIndex++) {\n var currentOffset = offsets[offsetIndex];\n var left = 0;\n var right = itemCount - 1;\n while (left <= right) {\n // eslint-disable-next-line no-bitwise\n var mid = left + (right - left >>> 1);\n var frame = getFrameMetrics(mid, props);\n var scaledOffsetStart = frame.offset * zoomScale;\n var scaledOffsetEnd = (frame.offset + frame.length) * zoomScale;\n\n // We want the first frame that contains the offset, with inclusive bounds. Thus, for the\n // first frame the scaledOffsetStart is inclusive, while for other frames it is exclusive.\n if (mid === 0 && currentOffset < scaledOffsetStart || mid !== 0 && currentOffset <= scaledOffsetStart) {\n right = mid - 1;\n } else if (currentOffset > scaledOffsetEnd) {\n left = mid + 1;\n } else {\n result[offsetIndex] = mid;\n break;\n }\n }\n }\n return result;\n}\n\n/**\n * Computes the number of elements in the `next` range that are new compared to the `prev` range.\n * Handy for calculating how many new items will be rendered when the render window changes so we\n * can restrict the number of new items render at once so that content can appear on the screen\n * faster.\n */\nexport function newRangeCount(prev, next) {\n return next.last - next.first + 1 - Math.max(0, 1 + Math.min(next.last, prev.last) - Math.max(next.first, prev.first));\n}\n\n/**\n * Custom logic for determining which items should be rendered given the current frame and scroll\n * metrics, as well as the previous render state. The algorithm may evolve over time, but generally\n * prioritizes the visible area first, then expands that with overscan regions ahead and behind,\n * biased in the direction of scroll.\n */\nexport function computeWindowedRenderLimits(props, maxToRenderPerBatch, windowSize, prev, getFrameMetricsApprox, scrollMetrics) {\n var itemCount = props.getItemCount(props.data);\n if (itemCount === 0) {\n return {\n first: 0,\n last: -1\n };\n }\n var offset = scrollMetrics.offset,\n velocity = scrollMetrics.velocity,\n visibleLength = scrollMetrics.visibleLength,\n _scrollMetrics$zoomSc = scrollMetrics.zoomScale,\n zoomScale = _scrollMetrics$zoomSc === void 0 ? 1 : _scrollMetrics$zoomSc;\n\n // Start with visible area, then compute maximum overscan region by expanding from there, biased\n // in the direction of scroll. Total overscan area is capped, which should cap memory consumption\n // too.\n var visibleBegin = Math.max(0, offset);\n var visibleEnd = visibleBegin + visibleLength;\n var overscanLength = (windowSize - 1) * visibleLength;\n\n // Considering velocity seems to introduce more churn than it's worth.\n var leadFactor = 0.5; // Math.max(0, Math.min(1, velocity / 25 + 0.5));\n\n var fillPreference = velocity > 1 ? 'after' : velocity < -1 ? 'before' : 'none';\n var overscanBegin = Math.max(0, visibleBegin - (1 - leadFactor) * overscanLength);\n var overscanEnd = Math.max(0, visibleEnd + leadFactor * overscanLength);\n var lastItemOffset = getFrameMetricsApprox(itemCount - 1, props).offset * zoomScale;\n if (lastItemOffset < overscanBegin) {\n // Entire list is before our overscan window\n return {\n first: Math.max(0, itemCount - 1 - maxToRenderPerBatch),\n last: itemCount - 1\n };\n }\n\n // Find the indices that correspond to the items at the render boundaries we're targeting.\n var _elementsThatOverlapO = elementsThatOverlapOffsets([overscanBegin, visibleBegin, visibleEnd, overscanEnd], props, getFrameMetricsApprox, zoomScale),\n overscanFirst = _elementsThatOverlapO[0],\n first = _elementsThatOverlapO[1],\n last = _elementsThatOverlapO[2],\n overscanLast = _elementsThatOverlapO[3];\n overscanFirst = overscanFirst == null ? 0 : overscanFirst;\n first = first == null ? Math.max(0, overscanFirst) : first;\n overscanLast = overscanLast == null ? itemCount - 1 : overscanLast;\n last = last == null ? Math.min(overscanLast, first + maxToRenderPerBatch - 1) : last;\n var visible = {\n first,\n last\n };\n\n // We want to limit the number of new cells we're rendering per batch so that we can fill the\n // content on the screen quickly. If we rendered the entire overscan window at once, the user\n // could be staring at white space for a long time waiting for a bunch of offscreen content to\n // render.\n var newCellCount = newRangeCount(prev, visible);\n while (true) {\n if (first <= overscanFirst && last >= overscanLast) {\n // If we fill the entire overscan range, we're done.\n break;\n }\n var maxNewCells = newCellCount >= maxToRenderPerBatch;\n var firstWillAddMore = first <= prev.first || first > prev.last;\n var firstShouldIncrement = first > overscanFirst && (!maxNewCells || !firstWillAddMore);\n var lastWillAddMore = last >= prev.last || last < prev.first;\n var lastShouldIncrement = last < overscanLast && (!maxNewCells || !lastWillAddMore);\n if (maxNewCells && !firstShouldIncrement && !lastShouldIncrement) {\n // We only want to stop if we've hit maxNewCells AND we cannot increment first or last\n // without rendering new items. This let's us preserve as many already rendered items as\n // possible, reducing render churn and keeping the rendered overscan range as large as\n // possible.\n break;\n }\n if (firstShouldIncrement && !(fillPreference === 'after' && lastShouldIncrement && lastWillAddMore)) {\n if (firstWillAddMore) {\n newCellCount++;\n }\n first--;\n }\n if (lastShouldIncrement && !(fillPreference === 'before' && firstShouldIncrement && firstWillAddMore)) {\n if (lastWillAddMore) {\n newCellCount++;\n }\n last++;\n }\n }\n if (!(last >= first && first >= 0 && last < itemCount && first >= overscanFirst && last <= overscanLast && first <= visible.first && last >= visible.last)) {\n throw new Error('Bad window calculation ' + JSON.stringify({\n first,\n last,\n itemCount,\n overscanFirst,\n overscanLast,\n visible\n }));\n }\n return {\n first,\n last\n };\n}\nexport function keyExtractor(item, index) {\n if (typeof item === 'object' && (item == null ? void 0 : item.key) != null) {\n return item.key;\n }\n if (typeof item === 'object' && (item == null ? void 0 : item.id) != null) {\n return item.id;\n }\n return String(index);\n}","'use strict';\n\nfunction nullthrows(x, message) {\n if (x != null) {\n return x;\n }\n var error = new Error(message !== undefined ? message : 'Got unexpected ' + x);\n error.framesToPop = 1; // Skip nullthrows's own stack frame.\n throw error;\n}\n\nmodule.exports = nullthrows;\nmodule.exports.default = nullthrows;\n\nObject.defineProperty(module.exports, '__esModule', {value: true});\n","var safeIsNaN = Number.isNaN ||\n function ponyfill(value) {\n return typeof value === 'number' && value !== value;\n };\nfunction isEqual(first, second) {\n if (first === second) {\n return true;\n }\n if (safeIsNaN(first) && safeIsNaN(second)) {\n return true;\n }\n return false;\n}\nfunction areInputsEqual(newInputs, lastInputs) {\n if (newInputs.length !== lastInputs.length) {\n return false;\n }\n for (var i = 0; i < newInputs.length; i++) {\n if (!isEqual(newInputs[i], lastInputs[i])) {\n return false;\n }\n }\n return true;\n}\n\nfunction memoizeOne(resultFn, isEqual) {\n if (isEqual === void 0) { isEqual = areInputsEqual; }\n var cache = null;\n function memoized() {\n var newArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n newArgs[_i] = arguments[_i];\n }\n if (cache && cache.lastThis === this && isEqual(newArgs, cache.lastArgs)) {\n return cache.lastResult;\n }\n var lastResult = resultFn.apply(this, newArgs);\n cache = {\n lastResult: lastResult,\n lastArgs: newArgs,\n lastThis: this,\n };\n return lastResult;\n }\n memoized.clear = function clear() {\n cache = null;\n };\n return memoized;\n}\n\nexport { memoizeOne as default };\n","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"style\"];\n/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\nimport useAnimatedProps from './useAnimatedProps';\nimport useMergeRefs from '../Utilities/useMergeRefs';\nimport StyleSheet from '../../../exports/StyleSheet';\nimport View from '../../../exports/View';\nimport * as React from 'react';\n/**\n * Experimental implementation of `createAnimatedComponent` that is intended to\n * be compatible with concurrent rendering.\n */\nexport default function createAnimatedComponent(Component) {\n return /*#__PURE__*/React.forwardRef((props, forwardedRef) => {\n var _useAnimatedProps = useAnimatedProps(props),\n reducedProps = _useAnimatedProps[0],\n callbackRef = _useAnimatedProps[1];\n var ref = useMergeRefs(callbackRef, forwardedRef);\n\n // Some components require explicit passthrough values for animation\n // to work properly. For example, if an animated component is\n // transformed and Pressable, onPress will not work after transform\n // without these passthrough values.\n // $FlowFixMe[prop-missing]\n var passthroughAnimatedPropExplicitValues = reducedProps.passthroughAnimatedPropExplicitValues,\n style = reducedProps.style;\n var _ref = passthroughAnimatedPropExplicitValues !== null && passthroughAnimatedPropExplicitValues !== void 0 ? passthroughAnimatedPropExplicitValues : {},\n passthroughStyle = _ref.style,\n passthroughProps = _objectWithoutPropertiesLoose(_ref, _excluded);\n var mergedStyle = [style, passthroughStyle];\n return /*#__PURE__*/React.createElement(Component, _extends({}, reducedProps, passthroughProps, {\n style: mergedStyle,\n ref: ref\n }));\n });\n}","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport AnimatedProps from './nodes/AnimatedProps';\nimport { AnimatedEvent } from './AnimatedEvent';\nimport useRefEffect from '../Utilities/useRefEffect';\nimport NativeAnimatedHelper from './NativeAnimatedHelper';\nimport { useCallback, useEffect, useMemo, useReducer, useRef } from 'react';\nimport useLayoutEffect from '../../../modules/useLayoutEffect';\nexport default function useAnimatedProps(props) {\n var _useReducer = useReducer(count => count + 1, 0),\n scheduleUpdate = _useReducer[1];\n var onUpdateRef = useRef(null);\n\n // TODO: Only invalidate `node` if animated props or `style` change. In the\n // previous implementation, we permitted `style` to override props with the\n // same name property name as styles, so we can probably continue doing that.\n // The ordering of other props *should* not matter.\n var node = useMemo(() => new AnimatedProps(props, () => onUpdateRef.current == null ? void 0 : onUpdateRef.current()), [props]);\n useAnimatedPropsLifecycle(node);\n\n // TODO: This \"effect\" does three things:\n //\n // 1) Call `setNativeView`.\n // 2) Update `onUpdateRef`.\n // 3) Update listeners for `AnimatedEvent` props.\n //\n // Ideally, each of these would be separat \"effects\" so that they are not\n // unnecessarily re-run when irrelevant dependencies change. For example, we\n // should be able to hoist all `AnimatedEvent` props and only do #3 if either\n // the `AnimatedEvent` props change or `instance` changes.\n //\n // But there is no way to transparently compose three separate callback refs,\n // so we just combine them all into one for now.\n var refEffect = useCallback(instance => {\n // NOTE: This may be called more often than necessary (e.g. when `props`\n // changes), but `setNativeView` already optimizes for that.\n node.setNativeView(instance);\n\n // NOTE: This callback is only used by the JavaScript animation driver.\n onUpdateRef.current = () => {\n // Schedule an update for this component to update `reducedProps`,\n // but do not compute it immediately. If a parent also updated, we\n // need to merge those new props in before updating.\n scheduleUpdate();\n };\n var target = getEventTarget(instance);\n var events = [];\n for (var propName in props) {\n var propValue = props[propName];\n if (propValue instanceof AnimatedEvent && propValue.__isNative) {\n propValue.__attach(target, propName);\n events.push([propName, propValue]);\n }\n }\n return () => {\n onUpdateRef.current = null;\n for (var _i = 0, _events = events; _i < _events.length; _i++) {\n var _events$_i = _events[_i],\n _propName = _events$_i[0],\n _propValue = _events$_i[1];\n _propValue.__detach(target, _propName);\n }\n };\n }, [props, node]);\n var callbackRef = useRefEffect(refEffect);\n return [reduceAnimatedProps(node), callbackRef];\n}\nfunction reduceAnimatedProps(node) {\n // Force `collapsable` to be false so that the native view is not flattened.\n // Flattened views cannot be accurately referenced by the native driver.\n return _objectSpread(_objectSpread({}, node.__getValue()), {}, {\n collapsable: false\n });\n}\n\n/**\n * Manages the lifecycle of the supplied `AnimatedProps` by invoking `__attach`\n * and `__detach`. However, this is more complicated because `AnimatedProps`\n * uses reference counting to determine when to recursively detach its children\n * nodes. So in order to optimize this, we avoid detaching until the next attach\n * unless we are unmounting.\n */\nfunction useAnimatedPropsLifecycle(node) {\n var prevNodeRef = useRef(null);\n var isUnmountingRef = useRef(false);\n useEffect(() => {\n // It is ok for multiple components to call `flushQueue` because it noops\n // if the queue is empty. When multiple animated components are mounted at\n // the same time. Only first component flushes the queue and the others will noop.\n NativeAnimatedHelper.API.flushQueue();\n });\n useLayoutEffect(() => {\n isUnmountingRef.current = false;\n return () => {\n isUnmountingRef.current = true;\n };\n }, []);\n useLayoutEffect(() => {\n node.__attach();\n if (prevNodeRef.current != null) {\n var prevNode = prevNodeRef.current;\n // TODO: Stop restoring default values (unless `reset` is called).\n prevNode.__restoreDefaultValues();\n prevNode.__detach();\n prevNodeRef.current = null;\n }\n return () => {\n if (isUnmountingRef.current) {\n // NOTE: Do not restore default values on unmount, see D18197735.\n node.__detach();\n } else {\n prevNodeRef.current = node;\n }\n };\n }, [node]);\n}\nfunction getEventTarget(instance) {\n return typeof instance === 'object' && typeof (instance == null ? void 0 : instance.getScrollableNode) === 'function' ?\n // $FlowFixMe[incompatible-use] - Legacy instance assumptions.\n instance.getScrollableNode() : instance;\n}\n\n// $FlowFixMe[unclear-type] - Legacy instance assumptions.\nfunction isFabricInstance(instance) {\n var _instance$getScrollRe;\n return hasFabricHandle(instance) ||\n // Some components have a setNativeProps function but aren't a host component\n // such as lists like FlatList and SectionList. These should also use\n // forceUpdate in Fabric since setNativeProps doesn't exist on the underlying\n // host component. This crazy hack is essentially special casing those lists and\n // ScrollView itself to use forceUpdate in Fabric.\n // If these components end up using forwardRef then these hacks can go away\n // as instance would actually be the underlying host component and the above check\n // would be sufficient.\n hasFabricHandle(instance == null ? void 0 : instance.getNativeScrollRef == null ? void 0 : instance.getNativeScrollRef()) || hasFabricHandle(instance == null ? void 0 : instance.getScrollResponder == null ? void 0 : (_instance$getScrollRe = instance.getScrollResponder()) == null ? void 0 : _instance$getScrollRe.getNativeScrollRef == null ? void 0 : _instance$getScrollRe.getNativeScrollRef());\n}\n\n// $FlowFixMe[unclear-type] - Legacy instance assumptions.\nfunction hasFabricHandle(instance) {\n var _instance$_internalIn, _instance$_internalIn2;\n // eslint-disable-next-line dot-notation\n return (instance == null ? void 0 : (_instance$_internalIn = instance['_internalInstanceHandle']) == null ? void 0 : (_instance$_internalIn2 = _instance$_internalIn.stateNode) == null ? void 0 : _instance$_internalIn2.canonical) != null;\n}","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport { AnimatedEvent } from '../AnimatedEvent';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedStyle from './AnimatedStyle';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nimport invariant from 'fbjs/lib/invariant';\nclass AnimatedProps extends AnimatedNode {\n constructor(props, callback) {\n super();\n if (props.style) {\n props = _objectSpread(_objectSpread({}, props), {}, {\n style: new AnimatedStyle(props.style)\n });\n }\n this._props = props;\n this._callback = callback;\n this.__attach();\n }\n __getValue() {\n var props = {};\n for (var key in this._props) {\n var value = this._props[key];\n if (value instanceof AnimatedNode) {\n if (!value.__isNative || value instanceof AnimatedStyle) {\n // We cannot use value of natively driven nodes this way as the value we have access from\n // JS may not be up to date.\n props[key] = value.__getValue();\n }\n } else if (value instanceof AnimatedEvent) {\n props[key] = value.__getHandler();\n } else {\n props[key] = value;\n }\n }\n return props;\n }\n __getAnimatedValue() {\n var props = {};\n for (var key in this._props) {\n var value = this._props[key];\n if (value instanceof AnimatedNode) {\n props[key] = value.__getAnimatedValue();\n }\n }\n return props;\n }\n __attach() {\n for (var key in this._props) {\n var value = this._props[key];\n if (value instanceof AnimatedNode) {\n value.__addChild(this);\n }\n }\n }\n __detach() {\n if (this.__isNative && this._animatedView) {\n this.__disconnectAnimatedView();\n }\n for (var key in this._props) {\n var value = this._props[key];\n if (value instanceof AnimatedNode) {\n value.__removeChild(this);\n }\n }\n super.__detach();\n }\n update() {\n this._callback();\n }\n __makeNative() {\n if (!this.__isNative) {\n this.__isNative = true;\n for (var key in this._props) {\n var value = this._props[key];\n if (value instanceof AnimatedNode) {\n value.__makeNative();\n }\n }\n if (this._animatedView) {\n this.__connectAnimatedView();\n }\n }\n }\n setNativeView(animatedView) {\n if (this._animatedView === animatedView) {\n return;\n }\n this._animatedView = animatedView;\n if (this.__isNative) {\n this.__connectAnimatedView();\n }\n }\n __connectAnimatedView() {\n invariant(this.__isNative, 'Expected node to be marked as \"native\"');\n var nativeViewTag = this._animatedView;\n invariant(nativeViewTag != null, 'Unable to locate attached view in the native tree');\n NativeAnimatedHelper.API.connectAnimatedNodeToView(this.__getNativeTag(), nativeViewTag);\n }\n __disconnectAnimatedView() {\n invariant(this.__isNative, 'Expected node to be marked as \"native\"');\n var nativeViewTag = this._animatedView;\n invariant(nativeViewTag != null, 'Unable to locate attached view in the native tree');\n NativeAnimatedHelper.API.disconnectAnimatedNodeFromView(this.__getNativeTag(), nativeViewTag);\n }\n __restoreDefaultValues() {\n // When using the native driver, view properties need to be restored to\n // their default values manually since react no longer tracks them. This\n // is needed to handle cases where a prop driven by native animated is removed\n // after having been changed natively by an animation.\n if (this.__isNative) {\n NativeAnimatedHelper.API.restoreDefaultValues(this.__getNativeTag());\n }\n }\n __getNativeConfig() {\n var propsConfig = {};\n for (var propKey in this._props) {\n var value = this._props[propKey];\n if (value instanceof AnimatedNode) {\n value.__makeNative();\n propsConfig[propKey] = value.__getNativeTag();\n }\n }\n return {\n type: 'props',\n props: propsConfig\n };\n }\n}\nexport default AnimatedProps;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport AnimatedValue from './nodes/AnimatedValue';\nimport NativeAnimatedHelper from './NativeAnimatedHelper';\nimport invariant from 'fbjs/lib/invariant';\nimport { shouldUseNativeDriver } from './NativeAnimatedHelper';\nvar __DEV__ = process.env.NODE_ENV !== 'production';\nexport function attachNativeEvent(viewRef, eventName, argMapping) {\n // Find animated values in `argMapping` and create an array representing their\n // key path inside the `nativeEvent` object. Ex.: ['contentOffset', 'x'].\n var eventMappings = [];\n var traverse = (value, path) => {\n if (value instanceof AnimatedValue) {\n value.__makeNative();\n eventMappings.push({\n nativeEventPath: path,\n animatedValueTag: value.__getNativeTag()\n });\n } else if (typeof value === 'object') {\n for (var _key in value) {\n traverse(value[_key], path.concat(_key));\n }\n }\n };\n invariant(argMapping[0] && argMapping[0].nativeEvent, 'Native driven events only support animated values contained inside `nativeEvent`.');\n\n // Assume that the event containing `nativeEvent` is always the first argument.\n traverse(argMapping[0].nativeEvent, []);\n if (viewRef != null) {\n eventMappings.forEach(mapping => {\n NativeAnimatedHelper.API.addAnimatedEventToView(viewRef, eventName, mapping);\n });\n }\n return {\n detach() {\n if (viewRef != null) {\n eventMappings.forEach(mapping => {\n NativeAnimatedHelper.API.removeAnimatedEventFromView(viewRef, eventName,\n // $FlowFixMe[incompatible-call]\n mapping.animatedValueTag);\n });\n }\n }\n };\n}\nfunction validateMapping(argMapping, args) {\n var validate = (recMapping, recEvt, key) => {\n if (recMapping instanceof AnimatedValue) {\n invariant(typeof recEvt === 'number', 'Bad mapping of event key ' + key + ', should be number but got ' + typeof recEvt);\n return;\n }\n if (typeof recEvt === 'number') {\n invariant(recMapping instanceof AnimatedValue, 'Bad mapping of type ' + typeof recMapping + ' for key ' + key + ', event value must map to AnimatedValue');\n return;\n }\n invariant(typeof recMapping === 'object', 'Bad mapping of type ' + typeof recMapping + ' for key ' + key);\n invariant(typeof recEvt === 'object', 'Bad event of type ' + typeof recEvt + ' for key ' + key);\n for (var mappingKey in recMapping) {\n validate(recMapping[mappingKey], recEvt[mappingKey], mappingKey);\n }\n };\n invariant(args.length >= argMapping.length, 'Event has less arguments than mapping');\n argMapping.forEach((mapping, idx) => {\n validate(mapping, args[idx], 'arg' + idx);\n });\n}\nexport class AnimatedEvent {\n constructor(argMapping, config) {\n this._listeners = [];\n this._argMapping = argMapping;\n if (config == null) {\n console.warn('Animated.event now requires a second argument for options');\n config = {\n useNativeDriver: false\n };\n }\n if (config.listener) {\n this.__addListener(config.listener);\n }\n this._callListeners = this._callListeners.bind(this);\n this._attachedEvent = null;\n this.__isNative = shouldUseNativeDriver(config);\n }\n __addListener(callback) {\n this._listeners.push(callback);\n }\n __removeListener(callback) {\n this._listeners = this._listeners.filter(listener => listener !== callback);\n }\n __attach(viewRef, eventName) {\n invariant(this.__isNative, 'Only native driven events need to be attached.');\n this._attachedEvent = attachNativeEvent(viewRef, eventName, this._argMapping);\n }\n __detach(viewTag, eventName) {\n invariant(this.__isNative, 'Only native driven events need to be detached.');\n this._attachedEvent && this._attachedEvent.detach();\n }\n __getHandler() {\n var _this = this;\n if (this.__isNative) {\n if (__DEV__) {\n var _validatedMapping = false;\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key2 = 0; _key2 < _len; _key2++) {\n args[_key2] = arguments[_key2];\n }\n if (!_validatedMapping) {\n validateMapping(_this._argMapping, args);\n _validatedMapping = true;\n }\n _this._callListeners(...args);\n };\n } else {\n return this._callListeners;\n }\n }\n var validatedMapping = false;\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key3 = 0; _key3 < _len2; _key3++) {\n args[_key3] = arguments[_key3];\n }\n if (__DEV__ && !validatedMapping) {\n validateMapping(_this._argMapping, args);\n validatedMapping = true;\n }\n var traverse = (recMapping, recEvt, key) => {\n if (recMapping instanceof AnimatedValue) {\n if (typeof recEvt === 'number') {\n recMapping.setValue(recEvt);\n }\n } else if (typeof recMapping === 'object') {\n for (var mappingKey in recMapping) {\n /* $FlowFixMe(>=0.120.0) This comment suppresses an error found\n * when Flow v0.120 was deployed. To see the error, delete this\n * comment and run Flow. */\n traverse(recMapping[mappingKey], recEvt[mappingKey], mappingKey);\n }\n }\n };\n _this._argMapping.forEach((mapping, idx) => {\n traverse(mapping, args[idx], 'arg' + idx);\n });\n _this._callListeners(...args);\n };\n }\n _callListeners() {\n for (var _len3 = arguments.length, args = new Array(_len3), _key4 = 0; _key4 < _len3; _key4++) {\n args[_key4] = arguments[_key4];\n }\n this._listeners.forEach(listener => listener(...args));\n }\n}","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nimport InteractionManager from '../../../../exports/InteractionManager';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nvar NativeAnimatedAPI = NativeAnimatedHelper.API;\n\n/**\n * Animated works by building a directed acyclic graph of dependencies\n * transparently when you render your Animated components.\n *\n * new Animated.Value(0)\n * .interpolate() .interpolate() new Animated.Value(1)\n * opacity translateY scale\n * style transform\n * View#234 style\n * View#123\n *\n * A) Top Down phase\n * When an Animated.Value is updated, we recursively go down through this\n * graph in order to find leaf nodes: the views that we flag as needing\n * an update.\n *\n * B) Bottom Up phase\n * When a view is flagged as needing an update, we recursively go back up\n * in order to build the new value that it needs. The reason why we need\n * this two-phases process is to deal with composite props such as\n * transform which can receive values from multiple parents.\n */\nfunction _flush(rootNode) {\n var animatedStyles = new Set();\n function findAnimatedStyles(node) {\n /* $FlowFixMe[prop-missing] (>=0.68.0 site=react_native_fb) This comment\n * suppresses an error found when Flow v0.68 was deployed. To see the error\n * delete this comment and run Flow. */\n if (typeof node.update === 'function') {\n animatedStyles.add(node);\n } else {\n node.__getChildren().forEach(findAnimatedStyles);\n }\n }\n findAnimatedStyles(rootNode);\n // $FlowFixMe[prop-missing]\n animatedStyles.forEach(animatedStyle => animatedStyle.update());\n}\n\n/**\n * Some operations are executed only on batch end, which is _mostly_ scheduled when\n * Animated component props change. For some of the changes which require immediate execution\n * (e.g. setValue), we create a separate batch in case none is scheduled.\n */\nfunction _executeAsAnimatedBatch(id, operation) {\n NativeAnimatedAPI.setWaitingForIdentifier(id);\n operation();\n NativeAnimatedAPI.unsetWaitingForIdentifier(id);\n}\n\n/**\n * Standard value for driving animations. One `Animated.Value` can drive\n * multiple properties in a synchronized fashion, but can only be driven by one\n * mechanism at a time. Using a new mechanism (e.g. starting a new animation,\n * or calling `setValue`) will stop any previous ones.\n *\n * See https://reactnative.dev/docs/animatedvalue\n */\nclass AnimatedValue extends AnimatedWithChildren {\n constructor(value, config) {\n super();\n if (typeof value !== 'number') {\n throw new Error('AnimatedValue: Attempting to set value to undefined');\n }\n this._startingValue = this._value = value;\n this._offset = 0;\n this._animation = null;\n if (config && config.useNativeDriver) {\n this.__makeNative();\n }\n }\n __detach() {\n if (this.__isNative) {\n NativeAnimatedAPI.getValue(this.__getNativeTag(), value => {\n this._value = value - this._offset;\n });\n }\n this.stopAnimation();\n super.__detach();\n }\n __getValue() {\n return this._value + this._offset;\n }\n\n /**\n * Directly set the value. This will stop any animations running on the value\n * and update all the bound properties.\n *\n * See https://reactnative.dev/docs/animatedvalue#setvalue\n */\n setValue(value) {\n if (this._animation) {\n this._animation.stop();\n this._animation = null;\n }\n this._updateValue(value, !this.__isNative /* don't perform a flush for natively driven values */);\n if (this.__isNative) {\n _executeAsAnimatedBatch(this.__getNativeTag().toString(), () => NativeAnimatedAPI.setAnimatedNodeValue(this.__getNativeTag(), value));\n }\n }\n\n /**\n * Sets an offset that is applied on top of whatever value is set, whether via\n * `setValue`, an animation, or `Animated.event`. Useful for compensating\n * things like the start of a pan gesture.\n *\n * See https://reactnative.dev/docs/animatedvalue#setoffset\n */\n setOffset(offset) {\n this._offset = offset;\n if (this.__isNative) {\n NativeAnimatedAPI.setAnimatedNodeOffset(this.__getNativeTag(), offset);\n }\n }\n\n /**\n * Merges the offset value into the base value and resets the offset to zero.\n * The final output of the value is unchanged.\n *\n * See https://reactnative.dev/docs/animatedvalue#flattenoffset\n */\n flattenOffset() {\n this._value += this._offset;\n this._offset = 0;\n if (this.__isNative) {\n NativeAnimatedAPI.flattenAnimatedNodeOffset(this.__getNativeTag());\n }\n }\n\n /**\n * Sets the offset value to the base value, and resets the base value to zero.\n * The final output of the value is unchanged.\n *\n * See https://reactnative.dev/docs/animatedvalue#extractoffset\n */\n extractOffset() {\n this._offset += this._value;\n this._value = 0;\n if (this.__isNative) {\n NativeAnimatedAPI.extractAnimatedNodeOffset(this.__getNativeTag());\n }\n }\n\n /**\n * Stops any running animation or tracking. `callback` is invoked with the\n * final value after stopping the animation, which is useful for updating\n * state to match the animation position with layout.\n *\n * See https://reactnative.dev/docs/animatedvalue#stopanimation\n */\n stopAnimation(callback) {\n this.stopTracking();\n this._animation && this._animation.stop();\n this._animation = null;\n if (callback) {\n if (this.__isNative) {\n NativeAnimatedAPI.getValue(this.__getNativeTag(), callback);\n } else {\n callback(this.__getValue());\n }\n }\n }\n\n /**\n * Stops any animation and resets the value to its original.\n *\n * See https://reactnative.dev/docs/animatedvalue#resetanimation\n */\n resetAnimation(callback) {\n this.stopAnimation(callback);\n this._value = this._startingValue;\n if (this.__isNative) {\n NativeAnimatedAPI.setAnimatedNodeValue(this.__getNativeTag(), this._startingValue);\n }\n }\n __onAnimatedValueUpdateReceived(value) {\n this._updateValue(value, false /*flush*/);\n }\n\n /**\n * Interpolates the value before updating the property, e.g. mapping 0-1 to\n * 0-10.\n */\n interpolate(config) {\n return new AnimatedInterpolation(this, config);\n }\n\n /**\n * Typically only used internally, but could be used by a custom Animation\n * class.\n *\n * See https://reactnative.dev/docs/animatedvalue#animate\n */\n animate(animation, callback) {\n var handle = null;\n if (animation.__isInteraction) {\n handle = InteractionManager.createInteractionHandle();\n }\n var previousAnimation = this._animation;\n this._animation && this._animation.stop();\n this._animation = animation;\n animation.start(this._value, value => {\n // Natively driven animations will never call into that callback\n this._updateValue(value, true /* flush */);\n }, result => {\n this._animation = null;\n if (handle !== null) {\n InteractionManager.clearInteractionHandle(handle);\n }\n callback && callback(result);\n }, previousAnimation, this);\n }\n\n /**\n * Typically only used internally.\n */\n stopTracking() {\n this._tracking && this._tracking.__detach();\n this._tracking = null;\n }\n\n /**\n * Typically only used internally.\n */\n track(tracking) {\n this.stopTracking();\n this._tracking = tracking;\n // Make sure that the tracking animation starts executing\n this._tracking && this._tracking.update();\n }\n _updateValue(value, flush) {\n if (value === undefined) {\n throw new Error('AnimatedValue: Attempting to set value to undefined');\n }\n this._value = value;\n if (flush) {\n _flush(this);\n }\n super.__callListeners(this.__getValue());\n }\n __getNativeConfig() {\n return {\n type: 'value',\n value: this._value,\n offset: this._offset\n };\n }\n}\nexport default AnimatedValue;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n/* eslint no-bitwise: 0 */\n\n'use strict';\n\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport AnimatedWithChildren from './AnimatedWithChildren';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nimport invariant from 'fbjs/lib/invariant';\nimport normalizeColor from '@react-native/normalize-colors';\nvar __DEV__ = process.env.NODE_ENV !== 'production';\nvar linear = t => t;\n\n/**\n * Very handy helper to map input ranges to output ranges with an easing\n * function and custom behavior outside of the ranges.\n */\nfunction createInterpolation(config) {\n if (config.outputRange && typeof config.outputRange[0] === 'string') {\n return createInterpolationFromStringOutputRange(config);\n }\n var outputRange = config.outputRange;\n var inputRange = config.inputRange;\n if (__DEV__) {\n checkInfiniteRange('outputRange', outputRange);\n checkInfiniteRange('inputRange', inputRange);\n checkValidInputRange(inputRange);\n invariant(inputRange.length === outputRange.length, 'inputRange (' + inputRange.length + ') and outputRange (' + outputRange.length + ') must have the same length');\n }\n var easing = config.easing || linear;\n var extrapolateLeft = 'extend';\n if (config.extrapolateLeft !== undefined) {\n extrapolateLeft = config.extrapolateLeft;\n } else if (config.extrapolate !== undefined) {\n extrapolateLeft = config.extrapolate;\n }\n var extrapolateRight = 'extend';\n if (config.extrapolateRight !== undefined) {\n extrapolateRight = config.extrapolateRight;\n } else if (config.extrapolate !== undefined) {\n extrapolateRight = config.extrapolate;\n }\n return input => {\n invariant(typeof input === 'number', 'Cannot interpolation an input which is not a number');\n var range = findRange(input, inputRange);\n return interpolate(input, inputRange[range], inputRange[range + 1], outputRange[range], outputRange[range + 1], easing, extrapolateLeft, extrapolateRight);\n };\n}\nfunction interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight) {\n var result = input;\n\n // Extrapolate\n if (result < inputMin) {\n if (extrapolateLeft === 'identity') {\n return result;\n } else if (extrapolateLeft === 'clamp') {\n result = inputMin;\n } else if (extrapolateLeft === 'extend') {\n // noop\n }\n }\n if (result > inputMax) {\n if (extrapolateRight === 'identity') {\n return result;\n } else if (extrapolateRight === 'clamp') {\n result = inputMax;\n } else if (extrapolateRight === 'extend') {\n // noop\n }\n }\n if (outputMin === outputMax) {\n return outputMin;\n }\n if (inputMin === inputMax) {\n if (input <= inputMin) {\n return outputMin;\n }\n return outputMax;\n }\n\n // Input Range\n if (inputMin === -Infinity) {\n result = -result;\n } else if (inputMax === Infinity) {\n result = result - inputMin;\n } else {\n result = (result - inputMin) / (inputMax - inputMin);\n }\n\n // Easing\n result = easing(result);\n\n // Output Range\n if (outputMin === -Infinity) {\n result = -result;\n } else if (outputMax === Infinity) {\n result = result + outputMin;\n } else {\n result = result * (outputMax - outputMin) + outputMin;\n }\n return result;\n}\nfunction colorToRgba(input) {\n var normalizedColor = normalizeColor(input);\n if (normalizedColor === null || typeof normalizedColor !== 'number') {\n return input;\n }\n normalizedColor = normalizedColor || 0;\n var r = (normalizedColor & 0xff000000) >>> 24;\n var g = (normalizedColor & 0x00ff0000) >>> 16;\n var b = (normalizedColor & 0x0000ff00) >>> 8;\n var a = (normalizedColor & 0x000000ff) / 255;\n return \"rgba(\" + r + \", \" + g + \", \" + b + \", \" + a + \")\";\n}\nvar stringShapeRegex = /[+-]?(?:\\d+\\.?\\d*|\\.\\d+)(?:[eE][+-]?\\d+)?/g;\n\n/**\n * Supports string shapes by extracting numbers so new values can be computed,\n * and recombines those values into new strings of the same shape. Supports\n * things like:\n *\n * rgba(123, 42, 99, 0.36) // colors\n * -45deg // values with units\n */\nfunction createInterpolationFromStringOutputRange(config) {\n var outputRange = config.outputRange;\n invariant(outputRange.length >= 2, 'Bad output range');\n outputRange = outputRange.map(colorToRgba);\n checkPattern(outputRange);\n\n // ['rgba(0, 100, 200, 0)', 'rgba(50, 150, 250, 0.5)']\n // ->\n // [\n // [0, 50],\n // [100, 150],\n // [200, 250],\n // [0, 0.5],\n // ]\n /* $FlowFixMe[incompatible-use] (>=0.18.0): `outputRange[0].match()` can\n * return `null`. Need to guard against this possibility. */\n var outputRanges = outputRange[0].match(stringShapeRegex).map(() => []);\n outputRange.forEach(value => {\n /* $FlowFixMe[incompatible-use] (>=0.18.0): `value.match()` can return\n * `null`. Need to guard against this possibility. */\n value.match(stringShapeRegex).forEach((number, i) => {\n outputRanges[i].push(+number);\n });\n });\n var interpolations = outputRange[0].match(stringShapeRegex)\n /* $FlowFixMe[incompatible-use] (>=0.18.0): `outputRange[0].match()` can\n * return `null`. Need to guard against this possibility. */\n /* $FlowFixMe[incompatible-call] (>=0.18.0): `outputRange[0].match()` can\n * return `null`. Need to guard against this possibility. */.map((value, i) => {\n return createInterpolation(_objectSpread(_objectSpread({}, config), {}, {\n outputRange: outputRanges[i]\n }));\n });\n\n // rgba requires that the r,g,b are integers.... so we want to round them, but we *dont* want to\n // round the opacity (4th column).\n var shouldRound = isRgbOrRgba(outputRange[0]);\n return input => {\n var i = 0;\n // 'rgba(0, 100, 200, 0)'\n // ->\n // 'rgba(${interpolations[0](input)}, ${interpolations[1](input)}, ...'\n return outputRange[0].replace(stringShapeRegex, () => {\n var val = +interpolations[i++](input);\n if (shouldRound) {\n val = i < 4 ? Math.round(val) : Math.round(val * 1000) / 1000;\n }\n return String(val);\n });\n };\n}\nfunction isRgbOrRgba(range) {\n return typeof range === 'string' && range.startsWith('rgb');\n}\nfunction checkPattern(arr) {\n var pattern = arr[0].replace(stringShapeRegex, '');\n for (var i = 1; i < arr.length; ++i) {\n invariant(pattern === arr[i].replace(stringShapeRegex, ''), 'invalid pattern ' + arr[0] + ' and ' + arr[i]);\n }\n}\nfunction findRange(input, inputRange) {\n var i;\n for (i = 1; i < inputRange.length - 1; ++i) {\n if (inputRange[i] >= input) {\n break;\n }\n }\n return i - 1;\n}\nfunction checkValidInputRange(arr) {\n invariant(arr.length >= 2, 'inputRange must have at least 2 elements');\n var message = 'inputRange must be monotonically non-decreasing ' + String(arr);\n for (var i = 1; i < arr.length; ++i) {\n invariant(arr[i] >= arr[i - 1], message);\n }\n}\nfunction checkInfiniteRange(name, arr) {\n invariant(arr.length >= 2, name + ' must have at least 2 elements');\n invariant(arr.length !== 2 || arr[0] !== -Infinity || arr[1] !== Infinity,\n /* $FlowFixMe[incompatible-type] (>=0.13.0) - In the addition expression\n * below this comment, one or both of the operands may be something that\n * doesn't cleanly convert to a string, like undefined, null, and object,\n * etc. If you really mean this implicit string conversion, you can do\n * something like String(myThing) */\n name + 'cannot be ]-infinity;+infinity[ ' + arr);\n}\nclass AnimatedInterpolation extends AnimatedWithChildren {\n // Export for testing.\n\n constructor(parent, config) {\n super();\n this._parent = parent;\n this._config = config;\n this._interpolation = createInterpolation(config);\n }\n __makeNative(platformConfig) {\n this._parent.__makeNative(platformConfig);\n super.__makeNative(platformConfig);\n }\n __getValue() {\n var parentValue = this._parent.__getValue();\n invariant(typeof parentValue === 'number', 'Cannot interpolate an input which is not a number.');\n return this._interpolation(parentValue);\n }\n interpolate(config) {\n return new AnimatedInterpolation(this, config);\n }\n __attach() {\n this._parent.__addChild(this);\n }\n __detach() {\n this._parent.__removeChild(this);\n super.__detach();\n }\n __transformDataType(range) {\n return range.map(NativeAnimatedHelper.transformDataType);\n }\n __getNativeConfig() {\n if (__DEV__) {\n NativeAnimatedHelper.validateInterpolation(this._config);\n }\n return {\n inputRange: this._config.inputRange,\n // Only the `outputRange` can contain strings so we don't need to transform `inputRange` here\n outputRange: this.__transformDataType(this._config.outputRange),\n extrapolateLeft: this._config.extrapolateLeft || this._config.extrapolate || 'extend',\n extrapolateRight: this._config.extrapolateRight || this._config.extrapolate || 'extend',\n type: 'interpolation'\n };\n }\n}\nAnimatedInterpolation.__createInterpolation = createInterpolation;\nexport default AnimatedInterpolation;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport _createForOfIteratorHelperLoose from \"@babel/runtime/helpers/createForOfIteratorHelperLoose\";\nimport AnimatedNode from './AnimatedNode';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nclass AnimatedWithChildren extends AnimatedNode {\n constructor() {\n super();\n this._children = [];\n }\n __makeNative(platformConfig) {\n if (!this.__isNative) {\n this.__isNative = true;\n for (var _iterator = _createForOfIteratorHelperLoose(this._children), _step; !(_step = _iterator()).done;) {\n var child = _step.value;\n child.__makeNative(platformConfig);\n NativeAnimatedHelper.API.connectAnimatedNodes(this.__getNativeTag(), child.__getNativeTag());\n }\n }\n super.__makeNative(platformConfig);\n }\n __addChild(child) {\n if (this._children.length === 0) {\n this.__attach();\n }\n this._children.push(child);\n if (this.__isNative) {\n // Only accept \"native\" animated nodes as children\n child.__makeNative(this.__getPlatformConfig());\n NativeAnimatedHelper.API.connectAnimatedNodes(this.__getNativeTag(), child.__getNativeTag());\n }\n }\n __removeChild(child) {\n var index = this._children.indexOf(child);\n if (index === -1) {\n console.warn(\"Trying to remove a child that doesn't exist\");\n return;\n }\n if (this.__isNative && child.__isNative) {\n NativeAnimatedHelper.API.disconnectAnimatedNodes(this.__getNativeTag(), child.__getNativeTag());\n }\n this._children.splice(index, 1);\n if (this._children.length === 0) {\n this.__detach();\n }\n }\n __getChildren() {\n return this._children;\n }\n __callListeners(value) {\n super.__callListeners(value);\n if (!this.__isNative) {\n for (var _iterator2 = _createForOfIteratorHelperLoose(this._children), _step2; !(_step2 = _iterator2()).done;) {\n var child = _step2.value;\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n if (child.__getValue) {\n child.__callListeners(child.__getValue());\n }\n }\n }\n }\n}\nexport default AnimatedWithChildren;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nvar NativeAnimatedAPI = NativeAnimatedHelper.API;\nimport invariant from 'fbjs/lib/invariant';\nvar _uniqueId = 1;\n\n// Note(vjeux): this would be better as an interface but flow doesn't\n// support them yet\nclass AnimatedNode {\n __attach() {}\n __detach() {\n if (this.__isNative && this.__nativeTag != null) {\n NativeAnimatedHelper.API.dropAnimatedNode(this.__nativeTag);\n this.__nativeTag = undefined;\n }\n }\n __getValue() {}\n __getAnimatedValue() {\n return this.__getValue();\n }\n __addChild(child) {}\n __removeChild(child) {}\n __getChildren() {\n return [];\n }\n\n /* Methods and props used by native Animated impl */\n\n constructor() {\n this._listeners = {};\n }\n __makeNative(platformConfig) {\n if (!this.__isNative) {\n throw new Error('This node cannot be made a \"native\" animated node');\n }\n this._platformConfig = platformConfig;\n if (this.hasListeners()) {\n this._startListeningToNativeValueUpdates();\n }\n }\n\n /**\n * Adds an asynchronous listener to the value so you can observe updates from\n * animations. This is useful because there is no way to\n * synchronously read the value because it might be driven natively.\n *\n * See https://reactnative.dev/docs/animatedvalue#addlistener\n */\n addListener(callback) {\n var id = String(_uniqueId++);\n this._listeners[id] = callback;\n if (this.__isNative) {\n this._startListeningToNativeValueUpdates();\n }\n return id;\n }\n\n /**\n * Unregister a listener. The `id` param shall match the identifier\n * previously returned by `addListener()`.\n *\n * See https://reactnative.dev/docs/animatedvalue#removelistener\n */\n removeListener(id) {\n delete this._listeners[id];\n if (this.__isNative && !this.hasListeners()) {\n this._stopListeningForNativeValueUpdates();\n }\n }\n\n /**\n * Remove all registered listeners.\n *\n * See https://reactnative.dev/docs/animatedvalue#removealllisteners\n */\n removeAllListeners() {\n this._listeners = {};\n if (this.__isNative) {\n this._stopListeningForNativeValueUpdates();\n }\n }\n hasListeners() {\n return !!Object.keys(this._listeners).length;\n }\n _startListeningToNativeValueUpdates() {\n if (this.__nativeAnimatedValueListener && !this.__shouldUpdateListenersForNewNativeTag) {\n return;\n }\n if (this.__shouldUpdateListenersForNewNativeTag) {\n this.__shouldUpdateListenersForNewNativeTag = false;\n this._stopListeningForNativeValueUpdates();\n }\n NativeAnimatedAPI.startListeningToAnimatedNodeValue(this.__getNativeTag());\n this.__nativeAnimatedValueListener = NativeAnimatedHelper.nativeEventEmitter.addListener('onAnimatedValueUpdate', data => {\n if (data.tag !== this.__getNativeTag()) {\n return;\n }\n this.__onAnimatedValueUpdateReceived(data.value);\n });\n }\n __onAnimatedValueUpdateReceived(value) {\n this.__callListeners(value);\n }\n __callListeners(value) {\n for (var _key in this._listeners) {\n this._listeners[_key]({\n value\n });\n }\n }\n _stopListeningForNativeValueUpdates() {\n if (!this.__nativeAnimatedValueListener) {\n return;\n }\n this.__nativeAnimatedValueListener.remove();\n this.__nativeAnimatedValueListener = null;\n NativeAnimatedAPI.stopListeningToAnimatedNodeValue(this.__getNativeTag());\n }\n __getNativeTag() {\n var _this$__nativeTag;\n NativeAnimatedHelper.assertNativeAnimatedModule();\n invariant(this.__isNative, 'Attempt to get native tag from node not marked as \"native\"');\n var nativeTag = (_this$__nativeTag = this.__nativeTag) !== null && _this$__nativeTag !== void 0 ? _this$__nativeTag : NativeAnimatedHelper.generateNewNodeTag();\n if (this.__nativeTag == null) {\n this.__nativeTag = nativeTag;\n var config = this.__getNativeConfig();\n if (this._platformConfig) {\n config.platformConfig = this._platformConfig;\n }\n NativeAnimatedHelper.API.createAnimatedNode(nativeTag, config);\n this.__shouldUpdateListenersForNewNativeTag = true;\n }\n return nativeTag;\n }\n __getNativeConfig() {\n throw new Error('This JS animated node type cannot be used as native animated node');\n }\n toJSON() {\n return this.__getValue();\n }\n __getPlatformConfig() {\n return this._platformConfig;\n }\n __setPlatformConfig(platformConfig) {\n this._platformConfig = platformConfig;\n }\n}\nexport default AnimatedNode;","import _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\n/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\nimport NativeAnimatedNonTurboModule from './NativeAnimatedModule';\nimport NativeAnimatedTurboModule from './NativeAnimatedTurboModule';\nimport NativeEventEmitter from '../EventEmitter/NativeEventEmitter';\nimport Platform from '../Utilities/Platform';\nimport ReactNativeFeatureFlags from '../ReactNative/ReactNativeFeatureFlags';\nimport invariant from 'fbjs/lib/invariant';\nimport RCTDeviceEventEmitter from '../EventEmitter/RCTDeviceEventEmitter';\n// TODO T69437152 @petetheheat - Delete this fork when Fabric ships to 100%.\nvar NativeAnimatedModule = Platform.OS === 'ios' && global.RN$Bridgeless === true ? NativeAnimatedTurboModule : NativeAnimatedNonTurboModule;\nvar __nativeAnimatedNodeTagCount = 1; /* used for animated nodes */\nvar __nativeAnimationIdCount = 1; /* used for started animations */\n\nvar nativeEventEmitter;\nvar waitingForQueuedOperations = new Set();\nvar queueOperations = false;\nvar queue = [];\n// $FlowFixMe\nvar singleOpQueue = [];\nvar useSingleOpBatching = false;\nPlatform.OS === 'android' && !!(NativeAnimatedModule != null && NativeAnimatedModule.queueAndExecuteBatchedOperations) && ReactNativeFeatureFlags.animatedShouldUseSingleOp();\nvar flushQueueTimeout = null;\nvar eventListenerGetValueCallbacks = {};\nvar eventListenerAnimationFinishedCallbacks = {};\nvar globalEventEmitterGetValueListener = null;\nvar globalEventEmitterAnimationFinishedListener = null;\nvar nativeOps = useSingleOpBatching ? function () {\n var apis = ['createAnimatedNode',\n // 1\n 'updateAnimatedNodeConfig',\n // 2\n 'getValue',\n // 3\n 'startListeningToAnimatedNodeValue',\n // 4\n 'stopListeningToAnimatedNodeValue',\n // 5\n 'connectAnimatedNodes',\n // 6\n 'disconnectAnimatedNodes',\n // 7\n 'startAnimatingNode',\n // 8\n 'stopAnimation',\n // 9\n 'setAnimatedNodeValue',\n // 10\n 'setAnimatedNodeOffset',\n // 11\n 'flattenAnimatedNodeOffset',\n // 12\n 'extractAnimatedNodeOffset',\n // 13\n 'connectAnimatedNodeToView',\n // 14\n 'disconnectAnimatedNodeFromView',\n // 15\n 'restoreDefaultValues',\n // 16\n 'dropAnimatedNode',\n // 17\n 'addAnimatedEventToView',\n // 18\n 'removeAnimatedEventFromView',\n // 19\n 'addListener',\n // 20\n 'removeListener' // 21\n ];\n return apis.reduce((acc, functionName, i) => {\n // These indices need to be kept in sync with the indices in native (see NativeAnimatedModule in Java, or the equivalent for any other native platform).\n // $FlowFixMe[prop-missing]\n acc[functionName] = i + 1;\n return acc;\n }, {});\n}() : NativeAnimatedModule;\n\n/**\n * Wrappers around NativeAnimatedModule to provide flow and autocomplete support for\n * the native module methods, and automatic queue management on Android\n */\nvar API = {\n getValue: function getValue(tag, saveValueCallback) {\n invariant(nativeOps, 'Native animated module is not available');\n if (useSingleOpBatching) {\n if (saveValueCallback) {\n eventListenerGetValueCallbacks[tag] = saveValueCallback;\n }\n // $FlowFixMe\n API.queueOperation(nativeOps.getValue, tag);\n } else {\n API.queueOperation(nativeOps.getValue, tag, saveValueCallback);\n }\n },\n setWaitingForIdentifier: function setWaitingForIdentifier(id) {\n waitingForQueuedOperations.add(id);\n queueOperations = true;\n if (ReactNativeFeatureFlags.animatedShouldDebounceQueueFlush() && flushQueueTimeout) {\n clearTimeout(flushQueueTimeout);\n }\n },\n unsetWaitingForIdentifier: function unsetWaitingForIdentifier(id) {\n waitingForQueuedOperations.delete(id);\n if (waitingForQueuedOperations.size === 0) {\n queueOperations = false;\n API.disableQueue();\n }\n },\n disableQueue: function disableQueue() {\n invariant(nativeOps, 'Native animated module is not available');\n if (ReactNativeFeatureFlags.animatedShouldDebounceQueueFlush()) {\n var prevTimeout = flushQueueTimeout;\n clearImmediate(prevTimeout);\n flushQueueTimeout = setImmediate(API.flushQueue);\n } else {\n API.flushQueue();\n }\n },\n flushQueue: function flushQueue() {\n /*\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n flushQueueTimeout = null;\n // Early returns before calling any APIs\n if (useSingleOpBatching && singleOpQueue.length === 0) {\n return;\n }\n if (!useSingleOpBatching && queue.length === 0) {\n return;\n }\n if (useSingleOpBatching) {\n // Set up event listener for callbacks if it's not set up\n if (\n !globalEventEmitterGetValueListener ||\n !globalEventEmitterAnimationFinishedListener\n ) {\n setupGlobalEventEmitterListeners();\n }\n // Single op batching doesn't use callback functions, instead we\n // use RCTDeviceEventEmitter. This reduces overhead of sending lots of\n // JSI functions across to native code; but also, TM infrastructure currently\n // does not support packing a function into native arrays.\n NativeAnimatedModule.queueAndExecuteBatchedOperations?.(singleOpQueue);\n singleOpQueue.length = 0;\n } else {\n Platform.OS === 'android' && NativeAnimatedModule.startOperationBatch?.();\n for (let q = 0, l = queue.length; q < l; q++) {\n queue[q]();\n }\n queue.length = 0;\n Platform.OS === 'android' &&\n NativeAnimatedModule.finishOperationBatch?.();\n }\n */\n },\n queueOperation: function queueOperation(fn) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n if (useSingleOpBatching) {\n // Get the command ID from the queued function, and push that ID and any arguments needed to execute the operation\n // $FlowFixMe: surprise, fn is actually a number\n singleOpQueue.push(fn, ...args);\n return;\n }\n\n // If queueing is explicitly on, *or* the queue has not yet\n // been flushed, use the queue. This is to prevent operations\n // from being executed out of order.\n if (queueOperations || queue.length !== 0) {\n queue.push(() => fn(...args));\n } else {\n fn(...args);\n }\n },\n createAnimatedNode: function createAnimatedNode(tag, config) {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.createAnimatedNode, tag, config);\n },\n updateAnimatedNodeConfig: function updateAnimatedNodeConfig(tag, config) {\n invariant(nativeOps, 'Native animated module is not available');\n //if (nativeOps.updateAnimatedNodeConfig) {\n // API.queueOperation(nativeOps.updateAnimatedNodeConfig, tag, config);\n //}\n },\n startListeningToAnimatedNodeValue: function startListeningToAnimatedNodeValue(tag) {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.startListeningToAnimatedNodeValue, tag);\n },\n stopListeningToAnimatedNodeValue: function stopListeningToAnimatedNodeValue(tag) {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.stopListeningToAnimatedNodeValue, tag);\n },\n connectAnimatedNodes: function connectAnimatedNodes(parentTag, childTag) {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.connectAnimatedNodes, parentTag, childTag);\n },\n disconnectAnimatedNodes: function disconnectAnimatedNodes(parentTag, childTag) {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.disconnectAnimatedNodes, parentTag, childTag);\n },\n startAnimatingNode: function startAnimatingNode(animationId, nodeTag, config, endCallback) {\n invariant(nativeOps, 'Native animated module is not available');\n if (useSingleOpBatching) {\n if (endCallback) {\n eventListenerAnimationFinishedCallbacks[animationId] = endCallback;\n }\n // $FlowFixMe\n API.queueOperation(nativeOps.startAnimatingNode, animationId, nodeTag, config);\n } else {\n API.queueOperation(nativeOps.startAnimatingNode, animationId, nodeTag, config, endCallback);\n }\n },\n stopAnimation: function stopAnimation(animationId) {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.stopAnimation, animationId);\n },\n setAnimatedNodeValue: function setAnimatedNodeValue(nodeTag, value) {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.setAnimatedNodeValue, nodeTag, value);\n },\n setAnimatedNodeOffset: function setAnimatedNodeOffset(nodeTag, offset) {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.setAnimatedNodeOffset, nodeTag, offset);\n },\n flattenAnimatedNodeOffset: function flattenAnimatedNodeOffset(nodeTag) {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.flattenAnimatedNodeOffset, nodeTag);\n },\n extractAnimatedNodeOffset: function extractAnimatedNodeOffset(nodeTag) {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.extractAnimatedNodeOffset, nodeTag);\n },\n connectAnimatedNodeToView: function connectAnimatedNodeToView(nodeTag, viewTag) {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.connectAnimatedNodeToView, nodeTag, viewTag);\n },\n disconnectAnimatedNodeFromView: function disconnectAnimatedNodeFromView(nodeTag, viewTag) {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.disconnectAnimatedNodeFromView, nodeTag, viewTag);\n },\n restoreDefaultValues: function restoreDefaultValues(nodeTag) {\n invariant(nativeOps, 'Native animated module is not available');\n // Backwards compat with older native runtimes, can be removed later.\n if (nativeOps.restoreDefaultValues != null) {\n API.queueOperation(nativeOps.restoreDefaultValues, nodeTag);\n }\n },\n dropAnimatedNode: function dropAnimatedNode(tag) {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.dropAnimatedNode, tag);\n },\n addAnimatedEventToView: function addAnimatedEventToView(viewTag, eventName, eventMapping) {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.addAnimatedEventToView, viewTag, eventName, eventMapping);\n },\n removeAnimatedEventFromView(viewTag, eventName, animatedNodeTag) {\n invariant(nativeOps, 'Native animated module is not available');\n API.queueOperation(nativeOps.removeAnimatedEventFromView, viewTag, eventName, animatedNodeTag);\n }\n};\nfunction setupGlobalEventEmitterListeners() {\n globalEventEmitterGetValueListener = RCTDeviceEventEmitter.addListener('onNativeAnimatedModuleGetValue', function (params) {\n var tag = params.tag;\n var callback = eventListenerGetValueCallbacks[tag];\n if (!callback) {\n return;\n }\n callback(params.value);\n delete eventListenerGetValueCallbacks[tag];\n });\n globalEventEmitterAnimationFinishedListener = RCTDeviceEventEmitter.addListener('onNativeAnimatedModuleAnimationFinished', function (params) {\n var animationId = params.animationId;\n var callback = eventListenerAnimationFinishedCallbacks[animationId];\n if (!callback) {\n return;\n }\n callback(params);\n delete eventListenerAnimationFinishedCallbacks[animationId];\n });\n}\n\n/**\n * Styles allowed by the native animated implementation.\n *\n * In general native animated implementation should support any numeric or color property that\n * doesn't need to be updated through the shadow view hierarchy (all non-layout properties).\n */\nvar SUPPORTED_COLOR_STYLES = {\n backgroundColor: true,\n borderBottomColor: true,\n borderColor: true,\n borderEndColor: true,\n borderLeftColor: true,\n borderRightColor: true,\n borderStartColor: true,\n borderTopColor: true,\n color: true,\n tintColor: true\n};\nvar SUPPORTED_STYLES = _objectSpread(_objectSpread({}, SUPPORTED_COLOR_STYLES), {}, {\n borderBottomEndRadius: true,\n borderBottomLeftRadius: true,\n borderBottomRightRadius: true,\n borderBottomStartRadius: true,\n borderRadius: true,\n borderTopEndRadius: true,\n borderTopLeftRadius: true,\n borderTopRightRadius: true,\n borderTopStartRadius: true,\n elevation: true,\n opacity: true,\n transform: true,\n zIndex: true,\n /* ios styles */\n shadowOpacity: true,\n shadowRadius: true,\n /* legacy android transform properties */\n scaleX: true,\n scaleY: true,\n translateX: true,\n translateY: true\n});\nvar SUPPORTED_TRANSFORMS = {\n translateX: true,\n translateY: true,\n scale: true,\n scaleX: true,\n scaleY: true,\n rotate: true,\n rotateX: true,\n rotateY: true,\n rotateZ: true,\n perspective: true\n};\nvar SUPPORTED_INTERPOLATION_PARAMS = {\n inputRange: true,\n outputRange: true,\n extrapolate: true,\n extrapolateRight: true,\n extrapolateLeft: true\n};\nfunction addWhitelistedStyleProp(prop) {\n SUPPORTED_STYLES[prop] = true;\n}\nfunction addWhitelistedTransformProp(prop) {\n SUPPORTED_TRANSFORMS[prop] = true;\n}\nfunction addWhitelistedInterpolationParam(param) {\n SUPPORTED_INTERPOLATION_PARAMS[param] = true;\n}\nfunction isSupportedColorStyleProp(prop) {\n return SUPPORTED_COLOR_STYLES.hasOwnProperty(prop);\n}\nfunction isSupportedStyleProp(prop) {\n return SUPPORTED_STYLES.hasOwnProperty(prop);\n}\nfunction isSupportedTransformProp(prop) {\n return SUPPORTED_TRANSFORMS.hasOwnProperty(prop);\n}\nfunction isSupportedInterpolationParam(param) {\n return SUPPORTED_INTERPOLATION_PARAMS.hasOwnProperty(param);\n}\nfunction validateTransform(configs) {\n configs.forEach(config => {\n if (!isSupportedTransformProp(config.property)) {\n throw new Error(\"Property '\" + config.property + \"' is not supported by native animated module\");\n }\n });\n}\nfunction validateStyles(styles) {\n for (var _key2 in styles) {\n if (!isSupportedStyleProp(_key2)) {\n throw new Error(\"Style property '\" + _key2 + \"' is not supported by native animated module\");\n }\n }\n}\nfunction validateInterpolation(config) {\n for (var _key3 in config) {\n if (!isSupportedInterpolationParam(_key3)) {\n throw new Error(\"Interpolation property '\" + _key3 + \"' is not supported by native animated module\");\n }\n }\n}\nfunction generateNewNodeTag() {\n return __nativeAnimatedNodeTagCount++;\n}\nfunction generateNewAnimationId() {\n return __nativeAnimationIdCount++;\n}\nfunction assertNativeAnimatedModule() {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n}\nvar _warnedMissingNativeAnimated = false;\nfunction shouldUseNativeDriver(config) {\n if (config.useNativeDriver == null) {\n console.warn('Animated: `useNativeDriver` was not specified. This is a required ' + 'option and must be explicitly set to `true` or `false`');\n }\n if (config.useNativeDriver === true && !NativeAnimatedModule) {\n if (!_warnedMissingNativeAnimated) {\n console.warn('Animated: `useNativeDriver` is not supported because the native ' + 'animated module is missing. Falling back to JS-based animation. To ' + 'resolve this, add `RCTAnimation` module to this app, or remove ' + '`useNativeDriver`. ' + 'Make sure to run `bundle exec pod install` first. Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md');\n _warnedMissingNativeAnimated = true;\n }\n return false;\n }\n return config.useNativeDriver || false;\n}\nfunction transformDataType(value) {\n // Change the string type to number type so we can reuse the same logic in\n // iOS and Android platform\n if (typeof value !== 'string') {\n return value;\n }\n if (/deg$/.test(value)) {\n var degrees = parseFloat(value) || 0;\n var radians = degrees * Math.PI / 180.0;\n return radians;\n } else {\n return value;\n }\n}\nexport { API, isSupportedColorStyleProp, isSupportedStyleProp, isSupportedTransformProp, isSupportedInterpolationParam, addWhitelistedStyleProp, addWhitelistedTransformProp, addWhitelistedInterpolationParam, validateStyles, validateTransform, validateInterpolation, generateNewNodeTag, generateNewAnimationId, assertNativeAnimatedModule, shouldUseNativeDriver, transformDataType };\nexport default {\n API,\n isSupportedColorStyleProp,\n isSupportedStyleProp,\n isSupportedTransformProp,\n isSupportedInterpolationParam,\n addWhitelistedStyleProp,\n addWhitelistedTransformProp,\n addWhitelistedInterpolationParam,\n validateStyles,\n validateTransform,\n validateInterpolation,\n generateNewNodeTag,\n generateNewAnimationId,\n assertNativeAnimatedModule,\n shouldUseNativeDriver,\n transformDataType,\n // $FlowExpectedError[unsafe-getters-setters] - unsafe getter lint suppresion\n // $FlowExpectedError[missing-type-arg] - unsafe getter lint suppresion\n get nativeEventEmitter() {\n if (!nativeEventEmitter) {\n nativeEventEmitter = new NativeEventEmitter(\n // T88715063: NativeEventEmitter only used this parameter on iOS. Now it uses it on all platforms, so this code was modified automatically to preserve its behavior\n // If you want to use the native module on other platforms, please remove this condition and test its behavior\n Platform.OS !== 'ios' ? null : NativeAnimatedModule);\n }\n return nativeEventEmitter;\n }\n};","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\nimport * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry';\n\n// The config has different keys depending on the type of the Node\n// TODO(T54896888): Make these types strict\n\nexport default TurboModuleRegistry.get('NativeAnimatedModule');","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport invariant from 'fbjs/lib/invariant';\nexport function get(name) {\n return null;\n}\nexport function getEnforcing(name) {\n var module = get(name);\n invariant(module != null, \"TurboModuleRegistry.getEnforcing(...): '\" + name + \"' could not be found. \" + 'Verify that a module by this name is registered in the native binary.');\n return module;\n}","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\nimport * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry';\n\n// The config has different keys depending on the type of the Node\n// TODO(T54896888): Make these types strict\n\nexport default TurboModuleRegistry.get('NativeAnimatedTurboModule');","import Platform from '../../../exports/Platform';\nexport default Platform;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nvar ReactNativeFeatureFlags = {\n isLayoutAnimationEnabled: () => true,\n shouldEmitW3CPointerEvents: () => false,\n shouldPressibilityUseW3CPointerEventsForHover: () => false,\n animatedShouldDebounceQueueFlush: () => false,\n animatedShouldUseSingleOp: () => false\n};\nexport default ReactNativeFeatureFlags;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedTransform from './AnimatedTransform';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nimport StyleSheet from '../../../../exports/StyleSheet';\nvar flattenStyle = StyleSheet.flatten;\nfunction createAnimatedStyle(inputStyle) {\n var style = flattenStyle(inputStyle);\n var animatedStyles = {};\n for (var key in style) {\n var value = style[key];\n if (key === 'transform' && Array.isArray(value)) {\n animatedStyles[key] = new AnimatedTransform(value);\n } else if (value instanceof AnimatedNode) {\n animatedStyles[key] = value;\n } else if (value && !Array.isArray(value) && typeof value === 'object') {\n animatedStyles[key] = createAnimatedStyle(value);\n }\n }\n return animatedStyles;\n}\nclass AnimatedStyle extends AnimatedWithChildren {\n constructor(style) {\n super();\n this._inputStyle = style;\n this._style = createAnimatedStyle(style);\n }\n\n // Recursively get values for nested styles (like iOS's shadowOffset)\n _walkStyleAndGetValues(style) {\n var updatedStyle = {};\n for (var key in style) {\n var value = style[key];\n if (value instanceof AnimatedNode) {\n if (!value.__isNative) {\n // We cannot use value of natively driven nodes this way as the value we have access from\n // JS may not be up to date.\n updatedStyle[key] = value.__getValue();\n }\n } else if (value && !Array.isArray(value) && typeof value === 'object') {\n // Support animating nested values (for example: shadowOffset.height)\n updatedStyle[key] = this._walkStyleAndGetValues(value);\n } else {\n updatedStyle[key] = value;\n }\n }\n return updatedStyle;\n }\n __getValue() {\n return [this._inputStyle, this._walkStyleAndGetValues(this._style)];\n }\n\n // Recursively get animated values for nested styles (like iOS's shadowOffset)\n _walkStyleAndGetAnimatedValues(style) {\n var updatedStyle = {};\n for (var key in style) {\n var value = style[key];\n if (value instanceof AnimatedNode) {\n updatedStyle[key] = value.__getAnimatedValue();\n } else if (value && !Array.isArray(value) && typeof value === 'object') {\n // Support animating nested values (for example: shadowOffset.height)\n updatedStyle[key] = this._walkStyleAndGetAnimatedValues(value);\n }\n }\n return updatedStyle;\n }\n __getAnimatedValue() {\n return this._walkStyleAndGetAnimatedValues(this._style);\n }\n __attach() {\n for (var key in this._style) {\n var value = this._style[key];\n if (value instanceof AnimatedNode) {\n value.__addChild(this);\n }\n }\n }\n __detach() {\n for (var key in this._style) {\n var value = this._style[key];\n if (value instanceof AnimatedNode) {\n value.__removeChild(this);\n }\n }\n super.__detach();\n }\n __makeNative() {\n for (var key in this._style) {\n var value = this._style[key];\n if (value instanceof AnimatedNode) {\n value.__makeNative();\n }\n }\n super.__makeNative();\n }\n __getNativeConfig() {\n var styleConfig = {};\n for (var styleKey in this._style) {\n if (this._style[styleKey] instanceof AnimatedNode) {\n var style = this._style[styleKey];\n style.__makeNative();\n styleConfig[styleKey] = style.__getNativeTag();\n }\n }\n NativeAnimatedHelper.validateStyles(styleConfig);\n return {\n type: 'style',\n style: styleConfig\n };\n }\n}\nexport default AnimatedStyle;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nclass AnimatedTransform extends AnimatedWithChildren {\n constructor(transforms) {\n super();\n this._transforms = transforms;\n }\n __makeNative() {\n this._transforms.forEach(transform => {\n for (var key in transform) {\n var value = transform[key];\n if (value instanceof AnimatedNode) {\n value.__makeNative();\n }\n }\n });\n super.__makeNative();\n }\n __getValue() {\n return this._transforms.map(transform => {\n var result = {};\n for (var key in transform) {\n var value = transform[key];\n if (value instanceof AnimatedNode) {\n result[key] = value.__getValue();\n } else {\n result[key] = value;\n }\n }\n return result;\n });\n }\n __getAnimatedValue() {\n return this._transforms.map(transform => {\n var result = {};\n for (var key in transform) {\n var value = transform[key];\n if (value instanceof AnimatedNode) {\n result[key] = value.__getAnimatedValue();\n } else {\n // All transform components needed to recompose matrix\n result[key] = value;\n }\n }\n return result;\n });\n }\n __attach() {\n this._transforms.forEach(transform => {\n for (var key in transform) {\n var value = transform[key];\n if (value instanceof AnimatedNode) {\n value.__addChild(this);\n }\n }\n });\n }\n __detach() {\n this._transforms.forEach(transform => {\n for (var key in transform) {\n var value = transform[key];\n if (value instanceof AnimatedNode) {\n value.__removeChild(this);\n }\n }\n });\n super.__detach();\n }\n __getNativeConfig() {\n var transConfigs = [];\n this._transforms.forEach(transform => {\n for (var key in transform) {\n var value = transform[key];\n if (value instanceof AnimatedNode) {\n transConfigs.push({\n type: 'animated',\n property: key,\n nodeTag: value.__getNativeTag()\n });\n } else {\n transConfigs.push({\n type: 'static',\n property: key,\n value: NativeAnimatedHelper.transformDataType(value)\n });\n }\n }\n });\n NativeAnimatedHelper.validateTransform(transConfigs);\n return {\n type: 'transform',\n transforms: transConfigs\n };\n }\n}\nexport default AnimatedTransform;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\nimport { useCallback, useRef } from 'react';\n/**\n * Constructs a callback ref that provides similar semantics as `useEffect`. The\n * supplied `effect` callback will be called with non-null component instances.\n * The `effect` callback can also optionally return a cleanup function.\n *\n * When a component is updated or unmounted, the cleanup function is called. The\n * `effect` callback will then be called again, if applicable.\n *\n * When a new `effect` callback is supplied, the previously returned cleanup\n * function will be called before the new `effect` callback is called with the\n * same instance.\n *\n * WARNING: The `effect` callback should be stable (e.g. using `useCallback`).\n */\nexport default function useRefEffect(effect) {\n var cleanupRef = useRef(undefined);\n return useCallback(instance => {\n if (cleanupRef.current) {\n cleanupRef.current();\n cleanupRef.current = undefined;\n }\n if (instance != null) {\n cleanupRef.current = effect(instance);\n }\n }, [effect]);\n}","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\nimport { useCallback } from 'react';\n/**\n * Constructs a new ref that forwards new values to each of the given refs. The\n * given refs will always be invoked in the order that they are supplied.\n *\n * WARNING: A known problem of merging refs using this approach is that if any\n * of the given refs change, the returned callback ref will also be changed. If\n * the returned callback ref is supplied as a `ref` to a React element, this may\n * lead to problems with the given refs being invoked more times than desired.\n */\nexport default function useMergeRefs() {\n for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n refs[_key] = arguments[_key];\n }\n return useCallback(current => {\n for (var _i = 0, _refs = refs; _i < _refs.length; _i++) {\n var ref = _refs[_i];\n if (ref != null) {\n if (typeof ref === 'function') {\n ref(current);\n } else {\n ref.current = current;\n }\n }\n }\n }, [...refs] // eslint-disable-line react-hooks/exhaustive-deps\n );\n}","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\nimport * as React from 'react';\nimport Image from '../../../../exports/Image';\nimport createAnimatedComponent from '../createAnimatedComponent';\nexport default createAnimatedComponent(Image);","import _extends from \"@babel/runtime/helpers/extends\";\n/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\nimport * as React from 'react';\nimport ScrollView from '../../../../exports/ScrollView';\nimport createAnimatedComponent from '../createAnimatedComponent';\n/**\n * @see https://github.com/facebook/react-native/commit/b8c8562\n */\nvar ScrollViewWithEventThrottle = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(ScrollView, _extends({\n scrollEventThrottle: 0.0001\n}, props, {\n ref: ref\n})));\nexport default createAnimatedComponent(ScrollViewWithEventThrottle);","import _extends from \"@babel/runtime/helpers/extends\";\n/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\nimport * as React from 'react';\nimport SectionList from '../../../../exports/SectionList';\nimport createAnimatedComponent from '../createAnimatedComponent';\n/**\n * @see https://github.com/facebook/react-native/commit/b8c8562\n */\nvar SectionListWithEventThrottle = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(SectionList, _extends({\n scrollEventThrottle: 0.0001\n}, props, {\n ref: ref\n})));\nexport default createAnimatedComponent(SectionListWithEventThrottle);","/**\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\n'use client';\n\nimport SectionList from '../../vendor/react-native/SectionList';\nexport default SectionList;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"stickySectionHeadersEnabled\"];\nimport Platform from '../../../exports/Platform';\nimport * as React from 'react';\nimport VirtualizedSectionList from '../VirtualizedSectionList';\n/**\n * A performant interface for rendering sectioned lists, supporting the most handy features:\n *\n * - Fully cross-platform.\n * - Configurable viewability callbacks.\n * - List header support.\n * - List footer support.\n * - Item separator support.\n * - Section header support.\n * - Section separator support.\n * - Heterogeneous data and item rendering support.\n * - Pull to Refresh.\n * - Scroll loading.\n *\n * If you don't need section support and want a simpler interface, use\n * [``](https://reactnative.dev/docs/flatlist).\n *\n * Simple Examples:\n *\n * }\n * renderSectionHeader={({section}) =>
}\n * sections={[ // homogeneous rendering between sections\n * {data: [...], title: ...},\n * {data: [...], title: ...},\n * {data: [...], title: ...},\n * ]}\n * />\n *\n * \n *\n * This is a convenience wrapper around [``](docs/virtualizedlist),\n * and thus inherits its props (as well as those of `ScrollView`) that aren't explicitly listed\n * here, along with the following caveats:\n *\n * - Internal state is not preserved when content scrolls out of the render window. Make sure all\n * your data is captured in the item data or external stores like Flux, Redux, or Relay.\n * - This is a `PureComponent` which means that it will not re-render if `props` remain shallow-\n * equal. Make sure that everything your `renderItem` function depends on is passed as a prop\n * (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on\n * changes. This includes the `data` prop and parent component state.\n * - In order to constrain memory and enable smooth scrolling, content is rendered asynchronously\n * offscreen. This means it's possible to scroll faster than the fill rate and momentarily see\n * blank content. This is a tradeoff that can be adjusted to suit the needs of each application,\n * and we are working on improving it behind the scenes.\n * - By default, the list looks for a `key` prop on each item and uses that for the React key.\n * Alternatively, you can provide a custom `keyExtractor` prop.\n *\n */\nexport default class SectionList extends React.PureComponent {\n constructor() {\n super(...arguments);\n this._captureRef = ref => {\n this._wrapperListRef = ref;\n };\n }\n /**\n * Scrolls to the item at the specified `sectionIndex` and `itemIndex` (within the section)\n * positioned in the viewable area such that `viewPosition` 0 places it at the top (and may be\n * covered by a sticky header), 1 at the bottom, and 0.5 centered in the middle. `viewOffset` is a\n * fixed number of pixels to offset the final target position, e.g. to compensate for sticky\n * headers.\n *\n * Note: cannot scroll to locations outside the render window without specifying the\n * `getItemLayout` prop.\n */\n scrollToLocation(params) {\n if (this._wrapperListRef != null) {\n this._wrapperListRef.scrollToLocation(params);\n }\n }\n\n /**\n * Tells the list an interaction has occurred, which should trigger viewability calculations, e.g.\n * if `waitForInteractions` is true and the user has not scrolled. This is typically called by\n * taps on items or by navigation actions.\n */\n recordInteraction() {\n var listRef = this._wrapperListRef && this._wrapperListRef.getListRef();\n listRef && listRef.recordInteraction();\n }\n\n /**\n * Displays the scroll indicators momentarily.\n *\n * @platform ios\n */\n flashScrollIndicators() {\n var listRef = this._wrapperListRef && this._wrapperListRef.getListRef();\n listRef && listRef.flashScrollIndicators();\n }\n\n /**\n * Provides a handle to the underlying scroll responder.\n */\n getScrollResponder() {\n var listRef = this._wrapperListRef && this._wrapperListRef.getListRef();\n if (listRef) {\n return listRef.getScrollResponder();\n }\n }\n getScrollableNode() {\n var listRef = this._wrapperListRef && this._wrapperListRef.getListRef();\n if (listRef) {\n return listRef.getScrollableNode();\n }\n }\n render() {\n var _this$props = this.props,\n _stickySectionHeadersEnabled = _this$props.stickySectionHeadersEnabled,\n restProps = _objectWithoutPropertiesLoose(_this$props, _excluded);\n var stickySectionHeadersEnabled = _stickySectionHeadersEnabled !== null && _stickySectionHeadersEnabled !== void 0 ? _stickySectionHeadersEnabled : Platform.OS === 'ios';\n return /*#__PURE__*/React.createElement(VirtualizedSectionList, _extends({}, restProps, {\n stickySectionHeadersEnabled: stickySectionHeadersEnabled,\n ref: this._captureRef,\n getItemCount: items => items.length,\n getItem: (items, index) => items[index]\n }));\n }\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport _createForOfIteratorHelperLoose from \"@babel/runtime/helpers/createForOfIteratorHelperLoose\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nvar _excluded = [\"ItemSeparatorComponent\", \"SectionSeparatorComponent\", \"renderItem\", \"renderSectionFooter\", \"renderSectionHeader\", \"sections\", \"stickySectionHeadersEnabled\"];\n/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\nimport View from '../../../exports/View';\nimport VirtualizedList from '../VirtualizedList';\nimport { keyExtractor as defaultKeyExtractor } from '../VirtualizeUtils';\nimport invariant from 'fbjs/lib/invariant';\nimport * as React from 'react';\n/**\n * Right now this just flattens everything into one list and uses VirtualizedList under the\n * hood. The only operation that might not scale well is concatting the data arrays of all the\n * sections when new props are received, which should be plenty fast for up to ~10,000 items.\n */\nclass VirtualizedSectionList extends React.PureComponent {\n constructor() {\n super(...arguments);\n this._keyExtractor = (item, index) => {\n var info = this._subExtractor(index);\n return info && info.key || String(index);\n };\n this._convertViewable = viewable => {\n var _info$index;\n invariant(viewable.index != null, 'Received a broken ViewToken');\n var info = this._subExtractor(viewable.index);\n if (!info) {\n return null;\n }\n var keyExtractorWithNullableIndex = info.section.keyExtractor;\n var keyExtractorWithNonNullableIndex = this.props.keyExtractor || defaultKeyExtractor;\n var key = keyExtractorWithNullableIndex != null ? keyExtractorWithNullableIndex(viewable.item, info.index) : keyExtractorWithNonNullableIndex(viewable.item, (_info$index = info.index) !== null && _info$index !== void 0 ? _info$index : 0);\n return _objectSpread(_objectSpread({}, viewable), {}, {\n index: info.index,\n key,\n section: info.section\n });\n };\n this._onViewableItemsChanged = _ref => {\n var viewableItems = _ref.viewableItems,\n changed = _ref.changed;\n var onViewableItemsChanged = this.props.onViewableItemsChanged;\n if (onViewableItemsChanged != null) {\n onViewableItemsChanged({\n viewableItems: viewableItems.map(this._convertViewable, this).filter(Boolean),\n changed: changed.map(this._convertViewable, this).filter(Boolean)\n });\n }\n };\n this._renderItem = listItemCount =>\n // eslint-disable-next-line react/no-unstable-nested-components\n _ref2 => {\n var item = _ref2.item,\n index = _ref2.index;\n var info = this._subExtractor(index);\n if (!info) {\n return null;\n }\n var infoIndex = info.index;\n if (infoIndex == null) {\n var section = info.section;\n if (info.header === true) {\n var renderSectionHeader = this.props.renderSectionHeader;\n return renderSectionHeader ? renderSectionHeader({\n section\n }) : null;\n } else {\n var renderSectionFooter = this.props.renderSectionFooter;\n return renderSectionFooter ? renderSectionFooter({\n section\n }) : null;\n }\n } else {\n var renderItem = info.section.renderItem || this.props.renderItem;\n var SeparatorComponent = this._getSeparatorComponent(index, info, listItemCount);\n invariant(renderItem, 'no renderItem!');\n return /*#__PURE__*/React.createElement(ItemWithSeparator, {\n SeparatorComponent: SeparatorComponent,\n LeadingSeparatorComponent: infoIndex === 0 ? this.props.SectionSeparatorComponent : undefined,\n cellKey: info.key,\n index: infoIndex,\n item: item,\n leadingItem: info.leadingItem,\n leadingSection: info.leadingSection,\n prevCellKey: (this._subExtractor(index - 1) || {}).key\n // Callback to provide updateHighlight for this item\n ,\n setSelfHighlightCallback: this._setUpdateHighlightFor,\n setSelfUpdatePropsCallback: this._setUpdatePropsFor\n // Provide child ability to set highlight/updateProps for previous item using prevCellKey\n ,\n updateHighlightFor: this._updateHighlightFor,\n updatePropsFor: this._updatePropsFor,\n renderItem: renderItem,\n section: info.section,\n trailingItem: info.trailingItem,\n trailingSection: info.trailingSection,\n inverted: !!this.props.inverted\n });\n }\n };\n this._updatePropsFor = (cellKey, value) => {\n var updateProps = this._updatePropsMap[cellKey];\n if (updateProps != null) {\n updateProps(value);\n }\n };\n this._updateHighlightFor = (cellKey, value) => {\n var updateHighlight = this._updateHighlightMap[cellKey];\n if (updateHighlight != null) {\n updateHighlight(value);\n }\n };\n this._setUpdateHighlightFor = (cellKey, updateHighlightFn) => {\n if (updateHighlightFn != null) {\n this._updateHighlightMap[cellKey] = updateHighlightFn;\n } else {\n // $FlowFixMe[prop-missing]\n delete this._updateHighlightFor[cellKey];\n }\n };\n this._setUpdatePropsFor = (cellKey, updatePropsFn) => {\n if (updatePropsFn != null) {\n this._updatePropsMap[cellKey] = updatePropsFn;\n } else {\n delete this._updatePropsMap[cellKey];\n }\n };\n this._updateHighlightMap = {};\n this._updatePropsMap = {};\n this._captureRef = ref => {\n this._listRef = ref;\n };\n }\n scrollToLocation(params) {\n var index = params.itemIndex;\n for (var i = 0; i < params.sectionIndex; i++) {\n index += this.props.getItemCount(this.props.sections[i].data) + 2;\n }\n var viewOffset = params.viewOffset || 0;\n if (this._listRef == null) {\n return;\n }\n if (params.itemIndex > 0 && this.props.stickySectionHeadersEnabled) {\n var frame = this._listRef.__getFrameMetricsApprox(index - params.itemIndex, this._listRef.props);\n viewOffset += frame.length;\n }\n var toIndexParams = _objectSpread(_objectSpread({}, params), {}, {\n viewOffset,\n index\n });\n // $FlowFixMe[incompatible-use]\n this._listRef.scrollToIndex(toIndexParams);\n }\n getListRef() {\n return this._listRef;\n }\n render() {\n var _this$props = this.props,\n ItemSeparatorComponent = _this$props.ItemSeparatorComponent,\n SectionSeparatorComponent = _this$props.SectionSeparatorComponent,\n _renderItem = _this$props.renderItem,\n renderSectionFooter = _this$props.renderSectionFooter,\n renderSectionHeader = _this$props.renderSectionHeader,\n _sections = _this$props.sections,\n stickySectionHeadersEnabled = _this$props.stickySectionHeadersEnabled,\n passThroughProps = _objectWithoutPropertiesLoose(_this$props, _excluded);\n var listHeaderOffset = this.props.ListHeaderComponent ? 1 : 0;\n var stickyHeaderIndices = this.props.stickySectionHeadersEnabled ? [] : undefined;\n var itemCount = 0;\n for (var _iterator = _createForOfIteratorHelperLoose(this.props.sections), _step; !(_step = _iterator()).done;) {\n var section = _step.value;\n // Track the section header indices\n if (stickyHeaderIndices != null) {\n stickyHeaderIndices.push(itemCount + listHeaderOffset);\n }\n\n // Add two for the section header and footer.\n itemCount += 2;\n itemCount += this.props.getItemCount(section.data);\n }\n var renderItem = this._renderItem(itemCount);\n return /*#__PURE__*/React.createElement(VirtualizedList, _extends({}, passThroughProps, {\n keyExtractor: this._keyExtractor,\n stickyHeaderIndices: stickyHeaderIndices,\n renderItem: renderItem,\n data: this.props.sections,\n getItem: (sections, index) => this._getItem(this.props, sections, index),\n getItemCount: () => itemCount,\n onViewableItemsChanged: this.props.onViewableItemsChanged ? this._onViewableItemsChanged : undefined,\n ref: this._captureRef\n }));\n }\n _getItem(props, sections, index) {\n if (!sections) {\n return null;\n }\n var itemIdx = index - 1;\n for (var i = 0; i < sections.length; i++) {\n var section = sections[i];\n var sectionData = section.data;\n var itemCount = props.getItemCount(sectionData);\n if (itemIdx === -1 || itemIdx === itemCount) {\n // We intend for there to be overflow by one on both ends of the list.\n // This will be for headers and footers. When returning a header or footer\n // item the section itself is the item.\n return section;\n } else if (itemIdx < itemCount) {\n // If we are in the bounds of the list's data then return the item.\n return props.getItem(sectionData, itemIdx);\n } else {\n itemIdx -= itemCount + 2; // Add two for the header and footer\n }\n }\n return null;\n }\n\n // $FlowFixMe[missing-local-annot]\n\n _subExtractor(index) {\n var itemIndex = index;\n var _this$props2 = this.props,\n getItem = _this$props2.getItem,\n getItemCount = _this$props2.getItemCount,\n keyExtractor = _this$props2.keyExtractor,\n sections = _this$props2.sections;\n for (var i = 0; i < sections.length; i++) {\n var section = sections[i];\n var sectionData = section.data;\n var key = section.key || String(i);\n itemIndex -= 1; // The section adds an item for the header\n if (itemIndex >= getItemCount(sectionData) + 1) {\n itemIndex -= getItemCount(sectionData) + 1; // The section adds an item for the footer.\n } else if (itemIndex === -1) {\n return {\n section,\n key: key + ':header',\n index: null,\n header: true,\n trailingSection: sections[i + 1]\n };\n } else if (itemIndex === getItemCount(sectionData)) {\n return {\n section,\n key: key + ':footer',\n index: null,\n header: false,\n trailingSection: sections[i + 1]\n };\n } else {\n var extractor = section.keyExtractor || keyExtractor || defaultKeyExtractor;\n return {\n section,\n key: key + ':' + extractor(getItem(sectionData, itemIndex), itemIndex),\n index: itemIndex,\n leadingItem: getItem(sectionData, itemIndex - 1),\n leadingSection: sections[i - 1],\n trailingItem: getItem(sectionData, itemIndex + 1),\n trailingSection: sections[i + 1]\n };\n }\n }\n }\n _getSeparatorComponent(index, info, listItemCount) {\n info = info || this._subExtractor(index);\n if (!info) {\n return null;\n }\n var ItemSeparatorComponent = info.section.ItemSeparatorComponent || this.props.ItemSeparatorComponent;\n var SectionSeparatorComponent = this.props.SectionSeparatorComponent;\n var isLastItemInList = index === listItemCount - 1;\n var isLastItemInSection = info.index === this.props.getItemCount(info.section.data) - 1;\n if (SectionSeparatorComponent && isLastItemInSection) {\n return SectionSeparatorComponent;\n }\n if (ItemSeparatorComponent && !isLastItemInSection && !isLastItemInList) {\n return ItemSeparatorComponent;\n }\n return null;\n }\n}\nfunction ItemWithSeparator(props) {\n var LeadingSeparatorComponent = props.LeadingSeparatorComponent,\n SeparatorComponent = props.SeparatorComponent,\n cellKey = props.cellKey,\n prevCellKey = props.prevCellKey,\n setSelfHighlightCallback = props.setSelfHighlightCallback,\n updateHighlightFor = props.updateHighlightFor,\n setSelfUpdatePropsCallback = props.setSelfUpdatePropsCallback,\n updatePropsFor = props.updatePropsFor,\n item = props.item,\n index = props.index,\n section = props.section,\n inverted = props.inverted;\n var _React$useState = React.useState(false),\n leadingSeparatorHiglighted = _React$useState[0],\n setLeadingSeparatorHighlighted = _React$useState[1];\n var _React$useState2 = React.useState(false),\n separatorHighlighted = _React$useState2[0],\n setSeparatorHighlighted = _React$useState2[1];\n var _React$useState3 = React.useState({\n leadingItem: props.leadingItem,\n leadingSection: props.leadingSection,\n section: props.section,\n trailingItem: props.item,\n trailingSection: props.trailingSection\n }),\n leadingSeparatorProps = _React$useState3[0],\n setLeadingSeparatorProps = _React$useState3[1];\n var _React$useState4 = React.useState({\n leadingItem: props.item,\n leadingSection: props.leadingSection,\n section: props.section,\n trailingItem: props.trailingItem,\n trailingSection: props.trailingSection\n }),\n separatorProps = _React$useState4[0],\n setSeparatorProps = _React$useState4[1];\n React.useEffect(() => {\n setSelfHighlightCallback(cellKey, setSeparatorHighlighted);\n // $FlowFixMe[incompatible-call]\n setSelfUpdatePropsCallback(cellKey, setSeparatorProps);\n return () => {\n setSelfUpdatePropsCallback(cellKey, null);\n setSelfHighlightCallback(cellKey, null);\n };\n }, [cellKey, setSelfHighlightCallback, setSeparatorProps, setSelfUpdatePropsCallback]);\n var separators = {\n highlight: () => {\n setLeadingSeparatorHighlighted(true);\n setSeparatorHighlighted(true);\n if (prevCellKey != null) {\n updateHighlightFor(prevCellKey, true);\n }\n },\n unhighlight: () => {\n setLeadingSeparatorHighlighted(false);\n setSeparatorHighlighted(false);\n if (prevCellKey != null) {\n updateHighlightFor(prevCellKey, false);\n }\n },\n updateProps: (select, newProps) => {\n if (select === 'leading') {\n if (LeadingSeparatorComponent != null) {\n setLeadingSeparatorProps(_objectSpread(_objectSpread({}, leadingSeparatorProps), newProps));\n } else if (prevCellKey != null) {\n // update the previous item's separator\n updatePropsFor(prevCellKey, _objectSpread(_objectSpread({}, leadingSeparatorProps), newProps));\n }\n } else if (select === 'trailing' && SeparatorComponent != null) {\n setSeparatorProps(_objectSpread(_objectSpread({}, separatorProps), newProps));\n }\n }\n };\n var element = props.renderItem({\n item,\n index,\n section,\n separators\n });\n var leadingSeparator = LeadingSeparatorComponent != null && /*#__PURE__*/React.createElement(LeadingSeparatorComponent, _extends({\n highlighted: leadingSeparatorHiglighted\n }, leadingSeparatorProps));\n var separator = SeparatorComponent != null && /*#__PURE__*/React.createElement(SeparatorComponent, _extends({\n highlighted: separatorHighlighted\n }, separatorProps));\n return leadingSeparator || separator ? /*#__PURE__*/React.createElement(View, null, inverted === false ? leadingSeparator : separator, element, inverted === false ? separator : leadingSeparator) : element;\n}\n\n/* $FlowFixMe[class-object-subtyping] added when improving typing for this\n * parameters */\n// $FlowFixMe[method-unbinding]\nexport default VirtualizedSectionList;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\nimport * as React from 'react';\nimport Text from '../../../../exports/Text';\nimport createAnimatedComponent from '../createAnimatedComponent';\nexport default createAnimatedComponent(Text);","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\nimport * as React from 'react';\nimport View from '../../../../exports/View';\nimport createAnimatedComponent from '../createAnimatedComponent';\nexport default createAnimatedComponent(View);","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport { AnimatedEvent, attachNativeEvent } from './AnimatedEvent';\nimport AnimatedImplementation from './AnimatedImplementation';\nimport AnimatedInterpolation from './nodes/AnimatedInterpolation';\nimport AnimatedNode from './nodes/AnimatedNode';\nimport AnimatedValue from './nodes/AnimatedValue';\nimport AnimatedValueXY from './nodes/AnimatedValueXY';\nimport createAnimatedComponent from './createAnimatedComponent';\nimport AnimatedColor from './nodes/AnimatedColor';\n\n/**\n * Animations are a source of flakiness in snapshot testing. This mock replaces\n * animation functions from AnimatedImplementation with empty animations for\n * predictability in tests. When possible the animation will run immediately\n * to the final state.\n */\n\n// Prevent any callback invocation from recursively triggering another\n// callback, which may trigger another animation\nvar inAnimationCallback = false;\nfunction mockAnimationStart(start) {\n return callback => {\n var guardedCallback = callback == null ? callback : function () {\n if (inAnimationCallback) {\n console.warn('Ignoring recursive animation callback when running mock animations');\n return;\n }\n inAnimationCallback = true;\n try {\n callback(...arguments);\n } finally {\n inAnimationCallback = false;\n }\n };\n start(guardedCallback);\n };\n}\nvar emptyAnimation = {\n start: () => {},\n stop: () => {},\n reset: () => {},\n _startNativeLoop: () => {},\n _isUsingNativeDriver: () => {\n return false;\n }\n};\nvar mockCompositeAnimation = animations => _objectSpread(_objectSpread({}, emptyAnimation), {}, {\n start: mockAnimationStart(callback => {\n animations.forEach(animation => animation.start());\n callback == null ? void 0 : callback({\n finished: true\n });\n })\n});\nvar spring = function spring(value, config) {\n var anyValue = value;\n return _objectSpread(_objectSpread({}, emptyAnimation), {}, {\n start: mockAnimationStart(callback => {\n anyValue.setValue(config.toValue);\n callback == null ? void 0 : callback({\n finished: true\n });\n })\n });\n};\nvar timing = function timing(value, config) {\n var anyValue = value;\n return _objectSpread(_objectSpread({}, emptyAnimation), {}, {\n start: mockAnimationStart(callback => {\n anyValue.setValue(config.toValue);\n callback == null ? void 0 : callback({\n finished: true\n });\n })\n });\n};\nvar decay = function decay(value, config) {\n return emptyAnimation;\n};\nvar sequence = function sequence(animations) {\n return mockCompositeAnimation(animations);\n};\nvar parallel = function parallel(animations, config) {\n return mockCompositeAnimation(animations);\n};\nvar delay = function delay(time) {\n return emptyAnimation;\n};\nvar stagger = function stagger(time, animations) {\n return mockCompositeAnimation(animations);\n};\nvar loop = function loop(animation, // $FlowFixMe[prop-missing]\n_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$iterations = _ref.iterations,\n iterations = _ref$iterations === void 0 ? -1 : _ref$iterations;\n return emptyAnimation;\n};\nexport default {\n Value: AnimatedValue,\n ValueXY: AnimatedValueXY,\n Color: AnimatedColor,\n Interpolation: AnimatedInterpolation,\n Node: AnimatedNode,\n decay,\n timing,\n spring,\n add: AnimatedImplementation.add,\n subtract: AnimatedImplementation.subtract,\n divide: AnimatedImplementation.divide,\n multiply: AnimatedImplementation.multiply,\n modulo: AnimatedImplementation.modulo,\n diffClamp: AnimatedImplementation.diffClamp,\n delay,\n sequence,\n parallel,\n stagger,\n loop,\n event: AnimatedImplementation.event,\n createAnimatedComponent,\n attachNativeEvent,\n forkEvent: AnimatedImplementation.forkEvent,\n unforkEvent: AnimatedImplementation.unforkEvent,\n Event: AnimatedEvent\n};","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport { AnimatedEvent, attachNativeEvent } from './AnimatedEvent';\nimport AnimatedAddition from './nodes/AnimatedAddition';\nimport AnimatedDiffClamp from './nodes/AnimatedDiffClamp';\nimport AnimatedDivision from './nodes/AnimatedDivision';\nimport AnimatedInterpolation from './nodes/AnimatedInterpolation';\nimport AnimatedModulo from './nodes/AnimatedModulo';\nimport AnimatedMultiplication from './nodes/AnimatedMultiplication';\nimport AnimatedNode from './nodes/AnimatedNode';\nimport AnimatedProps from './nodes/AnimatedProps';\nimport AnimatedSubtraction from './nodes/AnimatedSubtraction';\nimport AnimatedTracking from './nodes/AnimatedTracking';\nimport AnimatedValue from './nodes/AnimatedValue';\nimport AnimatedValueXY from './nodes/AnimatedValueXY';\nimport DecayAnimation from './animations/DecayAnimation';\nimport SpringAnimation from './animations/SpringAnimation';\nimport TimingAnimation from './animations/TimingAnimation';\nimport createAnimatedComponent from './createAnimatedComponent';\nimport AnimatedColor from './nodes/AnimatedColor';\nvar add = function add(a, b) {\n return new AnimatedAddition(a, b);\n};\nvar subtract = function subtract(a, b) {\n return new AnimatedSubtraction(a, b);\n};\nvar divide = function divide(a, b) {\n return new AnimatedDivision(a, b);\n};\nvar multiply = function multiply(a, b) {\n return new AnimatedMultiplication(a, b);\n};\nvar modulo = function modulo(a, modulus) {\n return new AnimatedModulo(a, modulus);\n};\nvar diffClamp = function diffClamp(a, min, max) {\n return new AnimatedDiffClamp(a, min, max);\n};\nvar _combineCallbacks = function _combineCallbacks(callback, config) {\n if (callback && config.onComplete) {\n return function () {\n config.onComplete && config.onComplete(...arguments);\n callback && callback(...arguments);\n };\n } else {\n return callback || config.onComplete;\n }\n};\nvar maybeVectorAnim = function maybeVectorAnim(value, config, anim) {\n if (value instanceof AnimatedValueXY) {\n var configX = _objectSpread({}, config);\n var configY = _objectSpread({}, config);\n for (var key in config) {\n var _config$key = config[key],\n x = _config$key.x,\n y = _config$key.y;\n if (x !== undefined && y !== undefined) {\n configX[key] = x;\n configY[key] = y;\n }\n }\n var aX = anim(value.x, configX);\n var aY = anim(value.y, configY);\n // We use `stopTogether: false` here because otherwise tracking will break\n // because the second animation will get stopped before it can update.\n return parallel([aX, aY], {\n stopTogether: false\n });\n } else if (value instanceof AnimatedColor) {\n var configR = _objectSpread({}, config);\n var configG = _objectSpread({}, config);\n var configB = _objectSpread({}, config);\n var configA = _objectSpread({}, config);\n for (var _key in config) {\n var _config$_key = config[_key],\n r = _config$_key.r,\n g = _config$_key.g,\n b = _config$_key.b,\n a = _config$_key.a;\n if (r !== undefined && g !== undefined && b !== undefined && a !== undefined) {\n configR[_key] = r;\n configG[_key] = g;\n configB[_key] = b;\n configA[_key] = a;\n }\n }\n var aR = anim(value.r, configR);\n var aG = anim(value.g, configG);\n var aB = anim(value.b, configB);\n var aA = anim(value.a, configA);\n // We use `stopTogether: false` here because otherwise tracking will break\n // because the second animation will get stopped before it can update.\n return parallel([aR, aG, aB, aA], {\n stopTogether: false\n });\n }\n return null;\n};\nvar spring = function spring(value, config) {\n var _start = function start(animatedValue, configuration, callback) {\n callback = _combineCallbacks(callback, configuration);\n var singleValue = animatedValue;\n var singleConfig = configuration;\n singleValue.stopTracking();\n if (configuration.toValue instanceof AnimatedNode) {\n singleValue.track(new AnimatedTracking(singleValue, configuration.toValue, SpringAnimation, singleConfig, callback));\n } else {\n singleValue.animate(new SpringAnimation(singleConfig), callback);\n }\n };\n return maybeVectorAnim(value, config, spring) || {\n start: function start(callback) {\n _start(value, config, callback);\n },\n stop: function stop() {\n value.stopAnimation();\n },\n reset: function reset() {\n value.resetAnimation();\n },\n _startNativeLoop: function _startNativeLoop(iterations) {\n var singleConfig = _objectSpread(_objectSpread({}, config), {}, {\n iterations\n });\n _start(value, singleConfig);\n },\n _isUsingNativeDriver: function _isUsingNativeDriver() {\n return config.useNativeDriver || false;\n }\n };\n};\nvar timing = function timing(value, config) {\n var _start2 = function start(animatedValue, configuration, callback) {\n callback = _combineCallbacks(callback, configuration);\n var singleValue = animatedValue;\n var singleConfig = configuration;\n singleValue.stopTracking();\n if (configuration.toValue instanceof AnimatedNode) {\n singleValue.track(new AnimatedTracking(singleValue, configuration.toValue, TimingAnimation, singleConfig, callback));\n } else {\n singleValue.animate(new TimingAnimation(singleConfig), callback);\n }\n };\n return maybeVectorAnim(value, config, timing) || {\n start: function start(callback) {\n _start2(value, config, callback);\n },\n stop: function stop() {\n value.stopAnimation();\n },\n reset: function reset() {\n value.resetAnimation();\n },\n _startNativeLoop: function _startNativeLoop(iterations) {\n var singleConfig = _objectSpread(_objectSpread({}, config), {}, {\n iterations\n });\n _start2(value, singleConfig);\n },\n _isUsingNativeDriver: function _isUsingNativeDriver() {\n return config.useNativeDriver || false;\n }\n };\n};\nvar decay = function decay(value, config) {\n var _start3 = function start(animatedValue, configuration, callback) {\n callback = _combineCallbacks(callback, configuration);\n var singleValue = animatedValue;\n var singleConfig = configuration;\n singleValue.stopTracking();\n singleValue.animate(new DecayAnimation(singleConfig), callback);\n };\n return maybeVectorAnim(value, config, decay) || {\n start: function start(callback) {\n _start3(value, config, callback);\n },\n stop: function stop() {\n value.stopAnimation();\n },\n reset: function reset() {\n value.resetAnimation();\n },\n _startNativeLoop: function _startNativeLoop(iterations) {\n var singleConfig = _objectSpread(_objectSpread({}, config), {}, {\n iterations\n });\n _start3(value, singleConfig);\n },\n _isUsingNativeDriver: function _isUsingNativeDriver() {\n return config.useNativeDriver || false;\n }\n };\n};\nvar sequence = function sequence(animations) {\n var current = 0;\n return {\n start: function start(callback) {\n var onComplete = function onComplete(result) {\n if (!result.finished) {\n callback && callback(result);\n return;\n }\n current++;\n if (current === animations.length) {\n callback && callback(result);\n return;\n }\n animations[current].start(onComplete);\n };\n if (animations.length === 0) {\n callback && callback({\n finished: true\n });\n } else {\n animations[current].start(onComplete);\n }\n },\n stop: function stop() {\n if (current < animations.length) {\n animations[current].stop();\n }\n },\n reset: function reset() {\n animations.forEach((animation, idx) => {\n if (idx <= current) {\n animation.reset();\n }\n });\n current = 0;\n },\n _startNativeLoop: function _startNativeLoop() {\n throw new Error('Loops run using the native driver cannot contain Animated.sequence animations');\n },\n _isUsingNativeDriver: function _isUsingNativeDriver() {\n return false;\n }\n };\n};\nvar parallel = function parallel(animations, config) {\n var doneCount = 0;\n // Make sure we only call stop() at most once for each animation\n var hasEnded = {};\n var stopTogether = !(config && config.stopTogether === false);\n var result = {\n start: function start(callback) {\n if (doneCount === animations.length) {\n callback && callback({\n finished: true\n });\n return;\n }\n animations.forEach((animation, idx) => {\n var cb = function cb(endResult) {\n hasEnded[idx] = true;\n doneCount++;\n if (doneCount === animations.length) {\n doneCount = 0;\n callback && callback(endResult);\n return;\n }\n if (!endResult.finished && stopTogether) {\n result.stop();\n }\n };\n if (!animation) {\n cb({\n finished: true\n });\n } else {\n animation.start(cb);\n }\n });\n },\n stop: function stop() {\n animations.forEach((animation, idx) => {\n !hasEnded[idx] && animation.stop();\n hasEnded[idx] = true;\n });\n },\n reset: function reset() {\n animations.forEach((animation, idx) => {\n animation.reset();\n hasEnded[idx] = false;\n doneCount = 0;\n });\n },\n _startNativeLoop: function _startNativeLoop() {\n throw new Error('Loops run using the native driver cannot contain Animated.parallel animations');\n },\n _isUsingNativeDriver: function _isUsingNativeDriver() {\n return false;\n }\n };\n return result;\n};\nvar delay = function delay(time) {\n // Would be nice to make a specialized implementation\n return timing(new AnimatedValue(0), {\n toValue: 0,\n delay: time,\n duration: 0,\n useNativeDriver: false\n });\n};\nvar stagger = function stagger(time, animations) {\n return parallel(animations.map((animation, i) => {\n return sequence([delay(time * i), animation]);\n }));\n};\nvar loop = function loop(animation, // $FlowFixMe[prop-missing]\n_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$iterations = _ref.iterations,\n iterations = _ref$iterations === void 0 ? -1 : _ref$iterations,\n _ref$resetBeforeItera = _ref.resetBeforeIteration,\n resetBeforeIteration = _ref$resetBeforeItera === void 0 ? true : _ref$resetBeforeItera;\n var isFinished = false;\n var iterationsSoFar = 0;\n return {\n start: function start(callback) {\n var restart = function restart(result) {\n if (result === void 0) {\n result = {\n finished: true\n };\n }\n if (isFinished || iterationsSoFar === iterations || result.finished === false) {\n callback && callback(result);\n } else {\n iterationsSoFar++;\n resetBeforeIteration && animation.reset();\n animation.start(restart);\n }\n };\n if (!animation || iterations === 0) {\n callback && callback({\n finished: true\n });\n } else {\n if (animation._isUsingNativeDriver()) {\n animation._startNativeLoop(iterations);\n } else {\n restart(); // Start looping recursively on the js thread\n }\n }\n },\n stop: function stop() {\n isFinished = true;\n animation.stop();\n },\n reset: function reset() {\n iterationsSoFar = 0;\n isFinished = false;\n animation.reset();\n },\n _startNativeLoop: function _startNativeLoop() {\n throw new Error('Loops run using the native driver cannot contain Animated.loop animations');\n },\n _isUsingNativeDriver: function _isUsingNativeDriver() {\n return animation._isUsingNativeDriver();\n }\n };\n};\nfunction forkEvent(event, listener) {\n if (!event) {\n return listener;\n } else if (event instanceof AnimatedEvent) {\n event.__addListener(listener);\n return event;\n } else {\n return function () {\n typeof event === 'function' && event(...arguments);\n listener(...arguments);\n };\n }\n}\nfunction unforkEvent(event, listener) {\n if (event && event instanceof AnimatedEvent) {\n event.__removeListener(listener);\n }\n}\nvar event = function event(argMapping, config) {\n var animatedEvent = new AnimatedEvent(argMapping, config);\n if (animatedEvent.__isNative) {\n return animatedEvent;\n } else {\n return animatedEvent.__getHandler();\n }\n};\n\n// All types of animated nodes that represent scalar numbers and can be interpolated (etc)\n\n/**\n * The `Animated` library is designed to make animations fluid, powerful, and\n * easy to build and maintain. `Animated` focuses on declarative relationships\n * between inputs and outputs, with configurable transforms in between, and\n * simple `start`/`stop` methods to control time-based animation execution.\n * If additional transforms are added, be sure to include them in\n * AnimatedMock.js as well.\n *\n * See https://reactnative.dev/docs/animated\n */\nexport default {\n /**\n * Standard value class for driving animations. Typically initialized with\n * `new Animated.Value(0);`\n *\n * See https://reactnative.dev/docs/animated#value\n */\n Value: AnimatedValue,\n /**\n * 2D value class for driving 2D animations, such as pan gestures.\n *\n * See https://reactnative.dev/docs/animatedvaluexy\n */\n ValueXY: AnimatedValueXY,\n /**\n * Value class for driving color animations.\n */\n Color: AnimatedColor,\n /**\n * Exported to use the Interpolation type in flow.\n *\n * See https://reactnative.dev/docs/animated#interpolation\n */\n Interpolation: AnimatedInterpolation,\n /**\n * Exported for ease of type checking. All animated values derive from this\n * class.\n *\n * See https://reactnative.dev/docs/animated#node\n */\n Node: AnimatedNode,\n /**\n * Animates a value from an initial velocity to zero based on a decay\n * coefficient.\n *\n * See https://reactnative.dev/docs/animated#decay\n */\n decay,\n /**\n * Animates a value along a timed easing curve. The Easing module has tons of\n * predefined curves, or you can use your own function.\n *\n * See https://reactnative.dev/docs/animated#timing\n */\n timing,\n /**\n * Animates a value according to an analytical spring model based on\n * damped harmonic oscillation.\n *\n * See https://reactnative.dev/docs/animated#spring\n */\n spring,\n /**\n * Creates a new Animated value composed from two Animated values added\n * together.\n *\n * See https://reactnative.dev/docs/animated#add\n */\n add,\n /**\n * Creates a new Animated value composed by subtracting the second Animated\n * value from the first Animated value.\n *\n * See https://reactnative.dev/docs/animated#subtract\n */\n subtract,\n /**\n * Creates a new Animated value composed by dividing the first Animated value\n * by the second Animated value.\n *\n * See https://reactnative.dev/docs/animated#divide\n */\n divide,\n /**\n * Creates a new Animated value composed from two Animated values multiplied\n * together.\n *\n * See https://reactnative.dev/docs/animated#multiply\n */\n multiply,\n /**\n * Creates a new Animated value that is the (non-negative) modulo of the\n * provided Animated value.\n *\n * See https://reactnative.dev/docs/animated#modulo\n */\n modulo,\n /**\n * Create a new Animated value that is limited between 2 values. It uses the\n * difference between the last value so even if the value is far from the\n * bounds it will start changing when the value starts getting closer again.\n *\n * See https://reactnative.dev/docs/animated#diffclamp\n */\n diffClamp,\n /**\n * Starts an animation after the given delay.\n *\n * See https://reactnative.dev/docs/animated#delay\n */\n delay,\n /**\n * Starts an array of animations in order, waiting for each to complete\n * before starting the next. If the current running animation is stopped, no\n * following animations will be started.\n *\n * See https://reactnative.dev/docs/animated#sequence\n */\n sequence,\n /**\n * Starts an array of animations all at the same time. By default, if one\n * of the animations is stopped, they will all be stopped. You can override\n * this with the `stopTogether` flag.\n *\n * See https://reactnative.dev/docs/animated#parallel\n */\n parallel,\n /**\n * Array of animations may run in parallel (overlap), but are started in\n * sequence with successive delays. Nice for doing trailing effects.\n *\n * See https://reactnative.dev/docs/animated#stagger\n */\n stagger,\n /**\n * Loops a given animation continuously, so that each time it reaches the\n * end, it resets and begins again from the start.\n *\n * See https://reactnative.dev/docs/animated#loop\n */\n loop,\n /**\n * Takes an array of mappings and extracts values from each arg accordingly,\n * then calls `setValue` on the mapped outputs.\n *\n * See https://reactnative.dev/docs/animated#event\n */\n event,\n /**\n * Make any React component Animatable. Used to create `Animated.View`, etc.\n *\n * See https://reactnative.dev/docs/animated#createanimatedcomponent\n */\n createAnimatedComponent,\n /**\n * Imperative API to attach an animated value to an event on a view. Prefer\n * using `Animated.event` with `useNativeDrive: true` if possible.\n *\n * See https://reactnative.dev/docs/animated#attachnativeevent\n */\n attachNativeEvent,\n /**\n * Advanced imperative API for snooping on animated events that are passed in\n * through props. Use values directly where possible.\n *\n * See https://reactnative.dev/docs/animated#forkevent\n */\n forkEvent,\n unforkEvent,\n /**\n * Expose Event class, so it can be used as a type for type checkers.\n */\n Event: AnimatedEvent\n};","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nclass AnimatedAddition extends AnimatedWithChildren {\n constructor(a, b) {\n super();\n this._a = typeof a === 'number' ? new AnimatedValue(a) : a;\n this._b = typeof b === 'number' ? new AnimatedValue(b) : b;\n }\n __makeNative(platformConfig) {\n this._a.__makeNative(platformConfig);\n this._b.__makeNative(platformConfig);\n super.__makeNative(platformConfig);\n }\n __getValue() {\n return this._a.__getValue() + this._b.__getValue();\n }\n interpolate(config) {\n return new AnimatedInterpolation(this, config);\n }\n __attach() {\n this._a.__addChild(this);\n this._b.__addChild(this);\n }\n __detach() {\n this._a.__removeChild(this);\n this._b.__removeChild(this);\n super.__detach();\n }\n __getNativeConfig() {\n return {\n type: 'addition',\n input: [this._a.__getNativeTag(), this._b.__getNativeTag()]\n };\n }\n}\nexport default AnimatedAddition;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nclass AnimatedDiffClamp extends AnimatedWithChildren {\n constructor(a, min, max) {\n super();\n this._a = a;\n this._min = min;\n this._max = max;\n this._value = this._lastValue = this._a.__getValue();\n }\n __makeNative(platformConfig) {\n this._a.__makeNative(platformConfig);\n super.__makeNative(platformConfig);\n }\n interpolate(config) {\n return new AnimatedInterpolation(this, config);\n }\n __getValue() {\n var value = this._a.__getValue();\n var diff = value - this._lastValue;\n this._lastValue = value;\n this._value = Math.min(Math.max(this._value + diff, this._min), this._max);\n return this._value;\n }\n __attach() {\n this._a.__addChild(this);\n }\n __detach() {\n this._a.__removeChild(this);\n super.__detach();\n }\n __getNativeConfig() {\n return {\n type: 'diffclamp',\n input: this._a.__getNativeTag(),\n min: this._min,\n max: this._max\n };\n }\n}\nexport default AnimatedDiffClamp;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nclass AnimatedDivision extends AnimatedWithChildren {\n constructor(a, b) {\n super();\n this._warnedAboutDivideByZero = false;\n if (b === 0 || b instanceof AnimatedNode && b.__getValue() === 0) {\n console.error('Detected potential division by zero in AnimatedDivision');\n }\n this._a = typeof a === 'number' ? new AnimatedValue(a) : a;\n this._b = typeof b === 'number' ? new AnimatedValue(b) : b;\n }\n __makeNative(platformConfig) {\n this._a.__makeNative(platformConfig);\n this._b.__makeNative(platformConfig);\n super.__makeNative(platformConfig);\n }\n __getValue() {\n var a = this._a.__getValue();\n var b = this._b.__getValue();\n if (b === 0) {\n // Prevent spamming the console/LogBox\n if (!this._warnedAboutDivideByZero) {\n console.error('Detected division by zero in AnimatedDivision');\n this._warnedAboutDivideByZero = true;\n }\n // Passing infinity/NaN to Fabric will cause a native crash\n return 0;\n }\n this._warnedAboutDivideByZero = false;\n return a / b;\n }\n interpolate(config) {\n return new AnimatedInterpolation(this, config);\n }\n __attach() {\n this._a.__addChild(this);\n this._b.__addChild(this);\n }\n __detach() {\n this._a.__removeChild(this);\n this._b.__removeChild(this);\n super.__detach();\n }\n __getNativeConfig() {\n return {\n type: 'division',\n input: [this._a.__getNativeTag(), this._b.__getNativeTag()]\n };\n }\n}\nexport default AnimatedDivision;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nclass AnimatedModulo extends AnimatedWithChildren {\n constructor(a, modulus) {\n super();\n this._a = a;\n this._modulus = modulus;\n }\n __makeNative(platformConfig) {\n this._a.__makeNative(platformConfig);\n super.__makeNative(platformConfig);\n }\n __getValue() {\n return (this._a.__getValue() % this._modulus + this._modulus) % this._modulus;\n }\n interpolate(config) {\n return new AnimatedInterpolation(this, config);\n }\n __attach() {\n this._a.__addChild(this);\n }\n __detach() {\n this._a.__removeChild(this);\n super.__detach();\n }\n __getNativeConfig() {\n return {\n type: 'modulus',\n input: this._a.__getNativeTag(),\n modulus: this._modulus\n };\n }\n}\nexport default AnimatedModulo;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nclass AnimatedMultiplication extends AnimatedWithChildren {\n constructor(a, b) {\n super();\n this._a = typeof a === 'number' ? new AnimatedValue(a) : a;\n this._b = typeof b === 'number' ? new AnimatedValue(b) : b;\n }\n __makeNative(platformConfig) {\n this._a.__makeNative(platformConfig);\n this._b.__makeNative(platformConfig);\n super.__makeNative(platformConfig);\n }\n __getValue() {\n return this._a.__getValue() * this._b.__getValue();\n }\n interpolate(config) {\n return new AnimatedInterpolation(this, config);\n }\n __attach() {\n this._a.__addChild(this);\n this._b.__addChild(this);\n }\n __detach() {\n this._a.__removeChild(this);\n this._b.__removeChild(this);\n super.__detach();\n }\n __getNativeConfig() {\n return {\n type: 'multiplication',\n input: [this._a.__getNativeTag(), this._b.__getNativeTag()]\n };\n }\n}\nexport default AnimatedMultiplication;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nclass AnimatedSubtraction extends AnimatedWithChildren {\n constructor(a, b) {\n super();\n this._a = typeof a === 'number' ? new AnimatedValue(a) : a;\n this._b = typeof b === 'number' ? new AnimatedValue(b) : b;\n }\n __makeNative(platformConfig) {\n this._a.__makeNative(platformConfig);\n this._b.__makeNative(platformConfig);\n super.__makeNative(platformConfig);\n }\n __getValue() {\n return this._a.__getValue() - this._b.__getValue();\n }\n interpolate(config) {\n return new AnimatedInterpolation(this, config);\n }\n __attach() {\n this._a.__addChild(this);\n this._b.__addChild(this);\n }\n __detach() {\n this._a.__removeChild(this);\n this._b.__removeChild(this);\n super.__detach();\n }\n __getNativeConfig() {\n return {\n type: 'subtraction',\n input: [this._a.__getNativeTag(), this._b.__getNativeTag()]\n };\n }\n}\nexport default AnimatedSubtraction;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedNode from './AnimatedNode';\nimport { generateNewAnimationId, shouldUseNativeDriver } from '../NativeAnimatedHelper';\nclass AnimatedTracking extends AnimatedNode {\n constructor(value, parent, animationClass, animationConfig, callback) {\n super();\n this._value = value;\n this._parent = parent;\n this._animationClass = animationClass;\n this._animationConfig = animationConfig;\n this._useNativeDriver = shouldUseNativeDriver(animationConfig);\n this._callback = callback;\n this.__attach();\n }\n __makeNative() {\n this.__isNative = true;\n this._parent.__makeNative();\n super.__makeNative();\n this._value.__makeNative();\n }\n __getValue() {\n return this._parent.__getValue();\n }\n __attach() {\n this._parent.__addChild(this);\n if (this._useNativeDriver) {\n // when the tracking starts we need to convert this node to a \"native node\"\n // so that the parent node will be made \"native\" too. This is necessary as\n // if we don't do this `update` method will get called. At that point it\n // may be too late as it would mean the JS driver has already started\n // updating node values\n this.__makeNative();\n }\n }\n __detach() {\n this._parent.__removeChild(this);\n super.__detach();\n }\n update() {\n this._value.animate(new this._animationClass(_objectSpread(_objectSpread({}, this._animationConfig), {}, {\n toValue: this._animationConfig.toValue.__getValue()\n })), this._callback);\n }\n __getNativeConfig() {\n var animation = new this._animationClass(_objectSpread(_objectSpread({}, this._animationConfig), {}, {\n // remove toValue from the config as it's a ref to Animated.Value\n toValue: undefined\n }));\n var animationConfig = animation.__getNativeAnimationConfig();\n return {\n type: 'tracking',\n animationId: generateNewAnimationId(),\n animationConfig,\n toValue: this._parent.__getNativeTag(),\n value: this._value.__getNativeTag()\n };\n }\n}\nexport default AnimatedTracking;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nimport invariant from 'fbjs/lib/invariant';\nvar _uniqueId = 1;\n\n/**\n * 2D Value for driving 2D animations, such as pan gestures. Almost identical\n * API to normal `Animated.Value`, but multiplexed.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html\n */\nclass AnimatedValueXY extends AnimatedWithChildren {\n constructor(valueIn) {\n super();\n var value = valueIn || {\n x: 0,\n y: 0\n }; // fixme: shouldn't need `: any`\n if (typeof value.x === 'number' && typeof value.y === 'number') {\n this.x = new AnimatedValue(value.x);\n this.y = new AnimatedValue(value.y);\n } else {\n invariant(value.x instanceof AnimatedValue && value.y instanceof AnimatedValue, 'AnimatedValueXY must be initialized with an object of numbers or ' + 'AnimatedValues.');\n this.x = value.x;\n this.y = value.y;\n }\n this._listeners = {};\n }\n\n /**\n * Directly set the value. This will stop any animations running on the value\n * and update all the bound properties.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#setvalue\n */\n setValue(value) {\n this.x.setValue(value.x);\n this.y.setValue(value.y);\n }\n\n /**\n * Sets an offset that is applied on top of whatever value is set, whether\n * via `setValue`, an animation, or `Animated.event`. Useful for compensating\n * things like the start of a pan gesture.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#setoffset\n */\n setOffset(offset) {\n this.x.setOffset(offset.x);\n this.y.setOffset(offset.y);\n }\n\n /**\n * Merges the offset value into the base value and resets the offset to zero.\n * The final output of the value is unchanged.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#flattenoffset\n */\n flattenOffset() {\n this.x.flattenOffset();\n this.y.flattenOffset();\n }\n\n /**\n * Sets the offset value to the base value, and resets the base value to\n * zero. The final output of the value is unchanged.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#extractoffset\n */\n extractOffset() {\n this.x.extractOffset();\n this.y.extractOffset();\n }\n __getValue() {\n return {\n x: this.x.__getValue(),\n y: this.y.__getValue()\n };\n }\n\n /**\n * Stops any animation and resets the value to its original.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#resetanimation\n */\n resetAnimation(callback) {\n this.x.resetAnimation();\n this.y.resetAnimation();\n callback && callback(this.__getValue());\n }\n\n /**\n * Stops any running animation or tracking. `callback` is invoked with the\n * final value after stopping the animation, which is useful for updating\n * state to match the animation position with layout.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#stopanimation\n */\n stopAnimation(callback) {\n this.x.stopAnimation();\n this.y.stopAnimation();\n callback && callback(this.__getValue());\n }\n\n /**\n * Adds an asynchronous listener to the value so you can observe updates from\n * animations. This is useful because there is no way to synchronously read\n * the value because it might be driven natively.\n *\n * Returns a string that serves as an identifier for the listener.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#addlistener\n */\n addListener(callback) {\n var id = String(_uniqueId++);\n var jointCallback = _ref => {\n var number = _ref.value;\n callback(this.__getValue());\n };\n this._listeners[id] = {\n x: this.x.addListener(jointCallback),\n y: this.y.addListener(jointCallback)\n };\n return id;\n }\n\n /**\n * Unregister a listener. The `id` param shall match the identifier\n * previously returned by `addListener()`.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#removelistener\n */\n removeListener(id) {\n this.x.removeListener(this._listeners[id].x);\n this.y.removeListener(this._listeners[id].y);\n delete this._listeners[id];\n }\n\n /**\n * Remove all registered listeners.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#removealllisteners\n */\n removeAllListeners() {\n this.x.removeAllListeners();\n this.y.removeAllListeners();\n this._listeners = {};\n }\n\n /**\n * Converts `{x, y}` into `{left, top}` for use in style.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#getlayout\n */\n getLayout() {\n return {\n left: this.x,\n top: this.y\n };\n }\n\n /**\n * Converts `{x, y}` into a useable translation transform.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#gettranslatetransform\n */\n getTranslateTransform() {\n return [{\n translateX: this.x\n }, {\n translateY: this.y\n }];\n }\n}\nexport default AnimatedValueXY;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport Animation from './Animation';\nimport { shouldUseNativeDriver } from '../NativeAnimatedHelper';\nclass DecayAnimation extends Animation {\n constructor(config) {\n var _config$deceleration, _config$isInteraction, _config$iterations;\n super();\n this._deceleration = (_config$deceleration = config.deceleration) !== null && _config$deceleration !== void 0 ? _config$deceleration : 0.998;\n this._velocity = config.velocity;\n this._useNativeDriver = shouldUseNativeDriver(config);\n this.__isInteraction = (_config$isInteraction = config.isInteraction) !== null && _config$isInteraction !== void 0 ? _config$isInteraction : !this._useNativeDriver;\n this.__iterations = (_config$iterations = config.iterations) !== null && _config$iterations !== void 0 ? _config$iterations : 1;\n }\n __getNativeAnimationConfig() {\n return {\n type: 'decay',\n deceleration: this._deceleration,\n velocity: this._velocity,\n iterations: this.__iterations\n };\n }\n start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {\n this.__active = true;\n this._lastValue = fromValue;\n this._fromValue = fromValue;\n this._onUpdate = onUpdate;\n this.__onEnd = onEnd;\n this._startTime = Date.now();\n if (this._useNativeDriver) {\n this.__startNativeAnimation(animatedValue);\n } else {\n this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));\n }\n }\n onUpdate() {\n var now = Date.now();\n var value = this._fromValue + this._velocity / (1 - this._deceleration) * (1 - Math.exp(-(1 - this._deceleration) * (now - this._startTime)));\n this._onUpdate(value);\n if (Math.abs(this._lastValue - value) < 0.1) {\n this.__debouncedOnEnd({\n finished: true\n });\n return;\n }\n this._lastValue = value;\n if (this.__active) {\n this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));\n }\n }\n stop() {\n super.stop();\n this.__active = false;\n global.cancelAnimationFrame(this._animationFrame);\n this.__debouncedOnEnd({\n finished: false\n });\n }\n}\nexport default DecayAnimation;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nvar startNativeAnimationNextId = 1;\n\n// Important note: start() and stop() will only be called at most once.\n// Once an animation has been stopped or finished its course, it will\n// not be reused.\nclass Animation {\n start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {}\n stop() {\n if (this.__nativeId) {\n NativeAnimatedHelper.API.stopAnimation(this.__nativeId);\n }\n }\n __getNativeAnimationConfig() {\n // Subclasses that have corresponding animation implementation done in native\n // should override this method\n throw new Error('This animation type cannot be offloaded to native');\n }\n // Helper function for subclasses to make sure onEnd is only called once.\n __debouncedOnEnd(result) {\n var onEnd = this.__onEnd;\n this.__onEnd = null;\n onEnd && onEnd(result);\n }\n __startNativeAnimation(animatedValue) {\n var startNativeAnimationWaitId = startNativeAnimationNextId + \":startAnimation\";\n startNativeAnimationNextId += 1;\n NativeAnimatedHelper.API.setWaitingForIdentifier(startNativeAnimationWaitId);\n try {\n var config = this.__getNativeAnimationConfig();\n animatedValue.__makeNative(config.platformConfig);\n this.__nativeId = NativeAnimatedHelper.generateNewAnimationId();\n NativeAnimatedHelper.API.startAnimatingNode(this.__nativeId, animatedValue.__getNativeTag(), config,\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n this.__debouncedOnEnd.bind(this));\n } catch (e) {\n throw e;\n } finally {\n NativeAnimatedHelper.API.unsetWaitingForIdentifier(startNativeAnimationWaitId);\n }\n }\n}\nexport default Animation;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport Animation from './Animation';\nimport SpringConfig from '../SpringConfig';\nimport invariant from 'fbjs/lib/invariant';\nimport { shouldUseNativeDriver } from '../NativeAnimatedHelper';\nimport AnimatedColor from '../nodes/AnimatedColor';\nclass SpringAnimation extends Animation {\n constructor(config) {\n var _config$overshootClam, _config$restDisplacem, _config$restSpeedThre, _config$velocity, _config$velocity2, _config$delay, _config$isInteraction, _config$iterations;\n super();\n this._overshootClamping = (_config$overshootClam = config.overshootClamping) !== null && _config$overshootClam !== void 0 ? _config$overshootClam : false;\n this._restDisplacementThreshold = (_config$restDisplacem = config.restDisplacementThreshold) !== null && _config$restDisplacem !== void 0 ? _config$restDisplacem : 0.001;\n this._restSpeedThreshold = (_config$restSpeedThre = config.restSpeedThreshold) !== null && _config$restSpeedThre !== void 0 ? _config$restSpeedThre : 0.001;\n this._initialVelocity = (_config$velocity = config.velocity) !== null && _config$velocity !== void 0 ? _config$velocity : 0;\n this._lastVelocity = (_config$velocity2 = config.velocity) !== null && _config$velocity2 !== void 0 ? _config$velocity2 : 0;\n this._toValue = config.toValue;\n this._delay = (_config$delay = config.delay) !== null && _config$delay !== void 0 ? _config$delay : 0;\n this._useNativeDriver = shouldUseNativeDriver(config);\n this._platformConfig = config.platformConfig;\n this.__isInteraction = (_config$isInteraction = config.isInteraction) !== null && _config$isInteraction !== void 0 ? _config$isInteraction : !this._useNativeDriver;\n this.__iterations = (_config$iterations = config.iterations) !== null && _config$iterations !== void 0 ? _config$iterations : 1;\n if (config.stiffness !== undefined || config.damping !== undefined || config.mass !== undefined) {\n var _config$stiffness, _config$damping, _config$mass;\n invariant(config.bounciness === undefined && config.speed === undefined && config.tension === undefined && config.friction === undefined, 'You can define one of bounciness/speed, tension/friction, or stiffness/damping/mass, but not more than one');\n this._stiffness = (_config$stiffness = config.stiffness) !== null && _config$stiffness !== void 0 ? _config$stiffness : 100;\n this._damping = (_config$damping = config.damping) !== null && _config$damping !== void 0 ? _config$damping : 10;\n this._mass = (_config$mass = config.mass) !== null && _config$mass !== void 0 ? _config$mass : 1;\n } else if (config.bounciness !== undefined || config.speed !== undefined) {\n var _config$bounciness, _config$speed;\n // Convert the origami bounciness/speed values to stiffness/damping\n // We assume mass is 1.\n invariant(config.tension === undefined && config.friction === undefined && config.stiffness === undefined && config.damping === undefined && config.mass === undefined, 'You can define one of bounciness/speed, tension/friction, or stiffness/damping/mass, but not more than one');\n var springConfig = SpringConfig.fromBouncinessAndSpeed((_config$bounciness = config.bounciness) !== null && _config$bounciness !== void 0 ? _config$bounciness : 8, (_config$speed = config.speed) !== null && _config$speed !== void 0 ? _config$speed : 12);\n this._stiffness = springConfig.stiffness;\n this._damping = springConfig.damping;\n this._mass = 1;\n } else {\n var _config$tension, _config$friction;\n // Convert the origami tension/friction values to stiffness/damping\n // We assume mass is 1.\n var _springConfig = SpringConfig.fromOrigamiTensionAndFriction((_config$tension = config.tension) !== null && _config$tension !== void 0 ? _config$tension : 40, (_config$friction = config.friction) !== null && _config$friction !== void 0 ? _config$friction : 7);\n this._stiffness = _springConfig.stiffness;\n this._damping = _springConfig.damping;\n this._mass = 1;\n }\n invariant(this._stiffness > 0, 'Stiffness value must be greater than 0');\n invariant(this._damping > 0, 'Damping value must be greater than 0');\n invariant(this._mass > 0, 'Mass value must be greater than 0');\n }\n __getNativeAnimationConfig() {\n var _this$_initialVelocit;\n return {\n type: 'spring',\n overshootClamping: this._overshootClamping,\n restDisplacementThreshold: this._restDisplacementThreshold,\n restSpeedThreshold: this._restSpeedThreshold,\n stiffness: this._stiffness,\n damping: this._damping,\n mass: this._mass,\n initialVelocity: (_this$_initialVelocit = this._initialVelocity) !== null && _this$_initialVelocit !== void 0 ? _this$_initialVelocit : this._lastVelocity,\n toValue: this._toValue,\n iterations: this.__iterations,\n platformConfig: this._platformConfig\n };\n }\n start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {\n this.__active = true;\n this._startPosition = fromValue;\n this._lastPosition = this._startPosition;\n this._onUpdate = onUpdate;\n this.__onEnd = onEnd;\n this._lastTime = Date.now();\n this._frameTime = 0.0;\n if (previousAnimation instanceof SpringAnimation) {\n var internalState = previousAnimation.getInternalState();\n this._lastPosition = internalState.lastPosition;\n this._lastVelocity = internalState.lastVelocity;\n // Set the initial velocity to the last velocity\n this._initialVelocity = this._lastVelocity;\n this._lastTime = internalState.lastTime;\n }\n var start = () => {\n if (this._useNativeDriver) {\n this.__startNativeAnimation(animatedValue);\n } else {\n this.onUpdate();\n }\n };\n\n // If this._delay is more than 0, we start after the timeout.\n if (this._delay) {\n this._timeout = setTimeout(start, this._delay);\n } else {\n start();\n }\n }\n getInternalState() {\n return {\n lastPosition: this._lastPosition,\n lastVelocity: this._lastVelocity,\n lastTime: this._lastTime\n };\n }\n\n /**\n * This spring model is based off of a damped harmonic oscillator\n * (https://en.wikipedia.org/wiki/Harmonic_oscillator#Damped_harmonic_oscillator).\n *\n * We use the closed form of the second order differential equation:\n *\n * x'' + (2ζ⍵_0)x' + ⍵^2x = 0\n *\n * where\n * ⍵_0 = √(k / m) (undamped angular frequency of the oscillator),\n * ζ = c / 2√mk (damping ratio),\n * c = damping constant\n * k = stiffness\n * m = mass\n *\n * The derivation of the closed form is described in detail here:\n * http://planetmath.org/sites/default/files/texpdf/39745.pdf\n *\n * This algorithm happens to match the algorithm used by CASpringAnimation,\n * a QuartzCore (iOS) API that creates spring animations.\n */\n onUpdate() {\n // If for some reason we lost a lot of frames (e.g. process large payload or\n // stopped in the debugger), we only advance by 4 frames worth of\n // computation and will continue on the next frame. It's better to have it\n // running at faster speed than jumping to the end.\n var MAX_STEPS = 64;\n var now = Date.now();\n if (now > this._lastTime + MAX_STEPS) {\n now = this._lastTime + MAX_STEPS;\n }\n var deltaTime = (now - this._lastTime) / 1000;\n this._frameTime += deltaTime;\n var c = this._damping;\n var m = this._mass;\n var k = this._stiffness;\n var v0 = -this._initialVelocity;\n var zeta = c / (2 * Math.sqrt(k * m)); // damping ratio\n var omega0 = Math.sqrt(k / m); // undamped angular frequency of the oscillator (rad/ms)\n var omega1 = omega0 * Math.sqrt(1.0 - zeta * zeta); // exponential decay\n var x0 = this._toValue - this._startPosition; // calculate the oscillation from x0 = 1 to x = 0\n\n var position = 0.0;\n var velocity = 0.0;\n var t = this._frameTime;\n if (zeta < 1) {\n // Under damped\n var envelope = Math.exp(-zeta * omega0 * t);\n position = this._toValue - envelope * ((v0 + zeta * omega0 * x0) / omega1 * Math.sin(omega1 * t) + x0 * Math.cos(omega1 * t));\n // This looks crazy -- it's actually just the derivative of the\n // oscillation function\n velocity = zeta * omega0 * envelope * (Math.sin(omega1 * t) * (v0 + zeta * omega0 * x0) / omega1 + x0 * Math.cos(omega1 * t)) - envelope * (Math.cos(omega1 * t) * (v0 + zeta * omega0 * x0) - omega1 * x0 * Math.sin(omega1 * t));\n } else {\n // Critically damped\n var _envelope = Math.exp(-omega0 * t);\n position = this._toValue - _envelope * (x0 + (v0 + omega0 * x0) * t);\n velocity = _envelope * (v0 * (t * omega0 - 1) + t * x0 * (omega0 * omega0));\n }\n this._lastTime = now;\n this._lastPosition = position;\n this._lastVelocity = velocity;\n this._onUpdate(position);\n if (!this.__active) {\n // a listener might have stopped us in _onUpdate\n return;\n }\n\n // Conditions for stopping the spring animation\n var isOvershooting = false;\n if (this._overshootClamping && this._stiffness !== 0) {\n if (this._startPosition < this._toValue) {\n isOvershooting = position > this._toValue;\n } else {\n isOvershooting = position < this._toValue;\n }\n }\n var isVelocity = Math.abs(velocity) <= this._restSpeedThreshold;\n var isDisplacement = true;\n if (this._stiffness !== 0) {\n isDisplacement = Math.abs(this._toValue - position) <= this._restDisplacementThreshold;\n }\n if (isOvershooting || isVelocity && isDisplacement) {\n if (this._stiffness !== 0) {\n // Ensure that we end up with a round value\n this._lastPosition = this._toValue;\n this._lastVelocity = 0;\n this._onUpdate(this._toValue);\n }\n this.__debouncedOnEnd({\n finished: true\n });\n return;\n }\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));\n }\n stop() {\n super.stop();\n this.__active = false;\n clearTimeout(this._timeout);\n global.cancelAnimationFrame(this._animationFrame);\n this.__debouncedOnEnd({\n finished: false\n });\n }\n}\nexport default SpringAnimation;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n * \n */\n\n'use strict';\n\nfunction stiffnessFromOrigamiValue(oValue) {\n return (oValue - 30) * 3.62 + 194;\n}\nfunction dampingFromOrigamiValue(oValue) {\n return (oValue - 8) * 3 + 25;\n}\nfunction fromOrigamiTensionAndFriction(tension, friction) {\n return {\n stiffness: stiffnessFromOrigamiValue(tension),\n damping: dampingFromOrigamiValue(friction)\n };\n}\nfunction fromBouncinessAndSpeed(bounciness, speed) {\n function normalize(value, startValue, endValue) {\n return (value - startValue) / (endValue - startValue);\n }\n function projectNormal(n, start, end) {\n return start + n * (end - start);\n }\n function linearInterpolation(t, start, end) {\n return t * end + (1 - t) * start;\n }\n function quadraticOutInterpolation(t, start, end) {\n return linearInterpolation(2 * t - t * t, start, end);\n }\n function b3Friction1(x) {\n return 0.0007 * Math.pow(x, 3) - 0.031 * Math.pow(x, 2) + 0.64 * x + 1.28;\n }\n function b3Friction2(x) {\n return 0.000044 * Math.pow(x, 3) - 0.006 * Math.pow(x, 2) + 0.36 * x + 2;\n }\n function b3Friction3(x) {\n return 0.00000045 * Math.pow(x, 3) - 0.000332 * Math.pow(x, 2) + 0.1078 * x + 5.84;\n }\n function b3Nobounce(tension) {\n if (tension <= 18) {\n return b3Friction1(tension);\n } else if (tension > 18 && tension <= 44) {\n return b3Friction2(tension);\n } else {\n return b3Friction3(tension);\n }\n }\n var b = normalize(bounciness / 1.7, 0, 20);\n b = projectNormal(b, 0, 0.8);\n var s = normalize(speed / 1.7, 0, 20);\n var bouncyTension = projectNormal(s, 0.5, 200);\n var bouncyFriction = quadraticOutInterpolation(b, b3Nobounce(bouncyTension), 0.01);\n return {\n stiffness: stiffnessFromOrigamiValue(bouncyTension),\n damping: dampingFromOrigamiValue(bouncyFriction)\n };\n}\nexport default {\n fromOrigamiTensionAndFriction,\n fromBouncinessAndSpeed\n};","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nimport normalizeColor from '@react-native/normalize-colors';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nvar NativeAnimatedAPI = NativeAnimatedHelper.API;\nvar defaultColor = {\n r: 0,\n g: 0,\n b: 0,\n a: 1.0\n};\nvar _uniqueId = 1;\nvar processColorObject = color => {\n return color;\n};\n\n/* eslint no-bitwise: 0 */\nfunction processColor(color) {\n if (color === undefined || color === null) {\n return null;\n }\n if (isRgbaValue(color)) {\n // $FlowIgnore[incompatible-cast] - Type is verified above\n return color;\n }\n var normalizedColor = normalizeColor(\n // $FlowIgnore[incompatible-cast] - Type is verified above\n color);\n if (normalizedColor === undefined || normalizedColor === null) {\n return null;\n }\n if (typeof normalizedColor === 'object') {\n var processedColorObj = processColorObject(normalizedColor);\n if (processedColorObj != null) {\n return processedColorObj;\n }\n } else if (typeof normalizedColor === 'number') {\n var r = (normalizedColor & 0xff000000) >>> 24;\n var g = (normalizedColor & 0x00ff0000) >>> 16;\n var b = (normalizedColor & 0x0000ff00) >>> 8;\n var a = (normalizedColor & 0x000000ff) / 255;\n return {\n r,\n g,\n b,\n a\n };\n }\n return null;\n}\nfunction isRgbaValue(value) {\n return value && typeof value.r === 'number' && typeof value.g === 'number' && typeof value.b === 'number' && typeof value.a === 'number';\n}\nfunction isRgbaAnimatedValue(value) {\n return value && value.r instanceof AnimatedValue && value.g instanceof AnimatedValue && value.b instanceof AnimatedValue && value.a instanceof AnimatedValue;\n}\nexport default class AnimatedColor extends AnimatedWithChildren {\n constructor(valueIn, config) {\n super();\n this._listeners = {};\n var value = valueIn !== null && valueIn !== void 0 ? valueIn : defaultColor;\n if (isRgbaAnimatedValue(value)) {\n // $FlowIgnore[incompatible-cast] - Type is verified above\n var rgbaAnimatedValue = value;\n this.r = rgbaAnimatedValue.r;\n this.g = rgbaAnimatedValue.g;\n this.b = rgbaAnimatedValue.b;\n this.a = rgbaAnimatedValue.a;\n } else {\n var _processColor;\n var processedColor = // $FlowIgnore[incompatible-cast] - Type is verified above\n (_processColor = processColor(value)) !== null && _processColor !== void 0 ? _processColor : defaultColor;\n var initColor = defaultColor;\n if (isRgbaValue(processedColor)) {\n // $FlowIgnore[incompatible-cast] - Type is verified above\n initColor = processedColor;\n } else {\n // $FlowIgnore[incompatible-cast] - Type is verified above\n this.nativeColor = processedColor;\n }\n this.r = new AnimatedValue(initColor.r);\n this.g = new AnimatedValue(initColor.g);\n this.b = new AnimatedValue(initColor.b);\n this.a = new AnimatedValue(initColor.a);\n }\n if (this.nativeColor || config && config.useNativeDriver) {\n this.__makeNative();\n }\n }\n\n /**\n * Directly set the value. This will stop any animations running on the value\n * and update all the bound properties.\n */\n setValue(value) {\n var _processColor2;\n var shouldUpdateNodeConfig = false;\n if (this.__isNative) {\n var nativeTag = this.__getNativeTag();\n NativeAnimatedAPI.setWaitingForIdentifier(nativeTag.toString());\n }\n var processedColor = (_processColor2 = processColor(value)) !== null && _processColor2 !== void 0 ? _processColor2 : defaultColor;\n if (isRgbaValue(processedColor)) {\n // $FlowIgnore[incompatible-type] - Type is verified above\n var rgbaValue = processedColor;\n this.r.setValue(rgbaValue.r);\n this.g.setValue(rgbaValue.g);\n this.b.setValue(rgbaValue.b);\n this.a.setValue(rgbaValue.a);\n if (this.nativeColor != null) {\n this.nativeColor = null;\n shouldUpdateNodeConfig = true;\n }\n } else {\n // $FlowIgnore[incompatible-type] - Type is verified above\n var nativeColor = processedColor;\n if (this.nativeColor !== nativeColor) {\n this.nativeColor = nativeColor;\n shouldUpdateNodeConfig = true;\n }\n }\n if (this.__isNative) {\n var _nativeTag = this.__getNativeTag();\n if (shouldUpdateNodeConfig) {\n NativeAnimatedAPI.updateAnimatedNodeConfig(_nativeTag, this.__getNativeConfig());\n }\n NativeAnimatedAPI.unsetWaitingForIdentifier(_nativeTag.toString());\n }\n }\n\n /**\n * Sets an offset that is applied on top of whatever value is set, whether\n * via `setValue`, an animation, or `Animated.event`. Useful for compensating\n * things like the start of a pan gesture.\n */\n setOffset(offset) {\n this.r.setOffset(offset.r);\n this.g.setOffset(offset.g);\n this.b.setOffset(offset.b);\n this.a.setOffset(offset.a);\n }\n\n /**\n * Merges the offset value into the base value and resets the offset to zero.\n * The final output of the value is unchanged.\n */\n flattenOffset() {\n this.r.flattenOffset();\n this.g.flattenOffset();\n this.b.flattenOffset();\n this.a.flattenOffset();\n }\n\n /**\n * Sets the offset value to the base value, and resets the base value to\n * zero. The final output of the value is unchanged.\n */\n extractOffset() {\n this.r.extractOffset();\n this.g.extractOffset();\n this.b.extractOffset();\n this.a.extractOffset();\n }\n\n /**\n * Adds an asynchronous listener to the value so you can observe updates from\n * animations. This is useful because there is no way to synchronously read\n * the value because it might be driven natively.\n *\n * Returns a string that serves as an identifier for the listener.\n */\n addListener(callback) {\n var id = String(_uniqueId++);\n var jointCallback = _ref => {\n var number = _ref.value;\n callback(this.__getValue());\n };\n this._listeners[id] = {\n r: this.r.addListener(jointCallback),\n g: this.g.addListener(jointCallback),\n b: this.b.addListener(jointCallback),\n a: this.a.addListener(jointCallback)\n };\n return id;\n }\n\n /**\n * Unregister a listener. The `id` param shall match the identifier\n * previously returned by `addListener()`.\n */\n removeListener(id) {\n this.r.removeListener(this._listeners[id].r);\n this.g.removeListener(this._listeners[id].g);\n this.b.removeListener(this._listeners[id].b);\n this.a.removeListener(this._listeners[id].a);\n delete this._listeners[id];\n }\n\n /**\n * Remove all registered listeners.\n */\n removeAllListeners() {\n this.r.removeAllListeners();\n this.g.removeAllListeners();\n this.b.removeAllListeners();\n this.a.removeAllListeners();\n this._listeners = {};\n }\n\n /**\n * Stops any running animation or tracking. `callback` is invoked with the\n * final value after stopping the animation, which is useful for updating\n * state to match the animation position with layout.\n */\n stopAnimation(callback) {\n this.r.stopAnimation();\n this.g.stopAnimation();\n this.b.stopAnimation();\n this.a.stopAnimation();\n callback && callback(this.__getValue());\n }\n\n /**\n * Stops any animation and resets the value to its original.\n */\n resetAnimation(callback) {\n this.r.resetAnimation();\n this.g.resetAnimation();\n this.b.resetAnimation();\n this.a.resetAnimation();\n callback && callback(this.__getValue());\n }\n __getValue() {\n if (this.nativeColor != null) {\n return this.nativeColor;\n } else {\n return \"rgba(\" + this.r.__getValue() + \", \" + this.g.__getValue() + \", \" + this.b.__getValue() + \", \" + this.a.__getValue() + \")\";\n }\n }\n __attach() {\n this.r.__addChild(this);\n this.g.__addChild(this);\n this.b.__addChild(this);\n this.a.__addChild(this);\n super.__attach();\n }\n __detach() {\n this.r.__removeChild(this);\n this.g.__removeChild(this);\n this.b.__removeChild(this);\n this.a.__removeChild(this);\n super.__detach();\n }\n __makeNative(platformConfig) {\n this.r.__makeNative(platformConfig);\n this.g.__makeNative(platformConfig);\n this.b.__makeNative(platformConfig);\n this.a.__makeNative(platformConfig);\n super.__makeNative(platformConfig);\n }\n __getNativeConfig() {\n return {\n type: 'color',\n r: this.r.__getNativeTag(),\n g: this.g.__getNativeTag(),\n b: this.b.__getNativeTag(),\n a: this.a.__getNativeTag(),\n nativeColor: this.nativeColor\n };\n }\n}","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport AnimatedValue from '../nodes/AnimatedValue';\nimport AnimatedValueXY from '../nodes/AnimatedValueXY';\nimport AnimatedInterpolation from '../nodes/AnimatedInterpolation';\nimport Easing from '../../../../exports/Easing';\nimport Animation from './Animation';\nimport { shouldUseNativeDriver } from '../NativeAnimatedHelper';\nimport AnimatedColor from '../nodes/AnimatedColor';\nvar _easeInOut;\nfunction easeInOut() {\n if (!_easeInOut) {\n _easeInOut = Easing.inOut(Easing.ease);\n }\n return _easeInOut;\n}\nclass TimingAnimation extends Animation {\n constructor(config) {\n var _config$easing, _config$duration, _config$delay, _config$iterations, _config$isInteraction;\n super();\n this._toValue = config.toValue;\n this._easing = (_config$easing = config.easing) !== null && _config$easing !== void 0 ? _config$easing : easeInOut();\n this._duration = (_config$duration = config.duration) !== null && _config$duration !== void 0 ? _config$duration : 500;\n this._delay = (_config$delay = config.delay) !== null && _config$delay !== void 0 ? _config$delay : 0;\n this.__iterations = (_config$iterations = config.iterations) !== null && _config$iterations !== void 0 ? _config$iterations : 1;\n this._useNativeDriver = shouldUseNativeDriver(config);\n this._platformConfig = config.platformConfig;\n this.__isInteraction = (_config$isInteraction = config.isInteraction) !== null && _config$isInteraction !== void 0 ? _config$isInteraction : !this._useNativeDriver;\n }\n __getNativeAnimationConfig() {\n var frameDuration = 1000.0 / 60.0;\n var frames = [];\n var numFrames = Math.round(this._duration / frameDuration);\n for (var frame = 0; frame < numFrames; frame++) {\n frames.push(this._easing(frame / numFrames));\n }\n frames.push(this._easing(1));\n return {\n type: 'frames',\n frames,\n toValue: this._toValue,\n iterations: this.__iterations,\n platformConfig: this._platformConfig\n };\n }\n start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {\n this.__active = true;\n this._fromValue = fromValue;\n this._onUpdate = onUpdate;\n this.__onEnd = onEnd;\n var start = () => {\n // Animations that sometimes have 0 duration and sometimes do not\n // still need to use the native driver when duration is 0 so as to\n // not cause intermixed JS and native animations.\n if (this._duration === 0 && !this._useNativeDriver) {\n this._onUpdate(this._toValue);\n this.__debouncedOnEnd({\n finished: true\n });\n } else {\n this._startTime = Date.now();\n if (this._useNativeDriver) {\n this.__startNativeAnimation(animatedValue);\n } else {\n this._animationFrame = requestAnimationFrame(\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n this.onUpdate.bind(this));\n }\n }\n };\n if (this._delay) {\n this._timeout = setTimeout(start, this._delay);\n } else {\n start();\n }\n }\n onUpdate() {\n var now = Date.now();\n if (now >= this._startTime + this._duration) {\n if (this._duration === 0) {\n this._onUpdate(this._toValue);\n } else {\n this._onUpdate(this._fromValue + this._easing(1) * (this._toValue - this._fromValue));\n }\n this.__debouncedOnEnd({\n finished: true\n });\n return;\n }\n this._onUpdate(this._fromValue + this._easing((now - this._startTime) / this._duration) * (this._toValue - this._fromValue));\n if (this.__active) {\n // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));\n }\n }\n stop() {\n super.stop();\n this.__active = false;\n clearTimeout(this._timeout);\n global.cancelAnimationFrame(this._animationFrame);\n this.__debouncedOnEnd({\n finished: false\n });\n }\n}\nexport default TimingAnimation;","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nimport Easing from '../../vendor/react-native/Animated/Easing';\nexport default Easing;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n * \n */\n\n'use strict';\n\nimport _bezier from './bezier';\nvar ease;\n\n/**\n * The `Easing` module implements common easing functions. This module is used\n * by [Animate.timing()](docs/animate.html#timing) to convey physically\n * believable motion in animations.\n *\n * You can find a visualization of some common easing functions at\n * http://easings.net/\n *\n * ### Predefined animations\n *\n * The `Easing` module provides several predefined animations through the\n * following methods:\n *\n * - [`back`](docs/easing.html#back) provides a simple animation where the\n * object goes slightly back before moving forward\n * - [`bounce`](docs/easing.html#bounce) provides a bouncing animation\n * - [`ease`](docs/easing.html#ease) provides a simple inertial animation\n * - [`elastic`](docs/easing.html#elastic) provides a simple spring interaction\n *\n * ### Standard functions\n *\n * Three standard easing functions are provided:\n *\n * - [`linear`](docs/easing.html#linear)\n * - [`quad`](docs/easing.html#quad)\n * - [`cubic`](docs/easing.html#cubic)\n *\n * The [`poly`](docs/easing.html#poly) function can be used to implement\n * quartic, quintic, and other higher power functions.\n *\n * ### Additional functions\n *\n * Additional mathematical functions are provided by the following methods:\n *\n * - [`bezier`](docs/easing.html#bezier) provides a cubic bezier curve\n * - [`circle`](docs/easing.html#circle) provides a circular function\n * - [`sin`](docs/easing.html#sin) provides a sinusoidal function\n * - [`exp`](docs/easing.html#exp) provides an exponential function\n *\n * The following helpers are used to modify other easing functions.\n *\n * - [`in`](docs/easing.html#in) runs an easing function forwards\n * - [`inOut`](docs/easing.html#inout) makes any easing function symmetrical\n * - [`out`](docs/easing.html#out) runs an easing function backwards\n */\nclass Easing {\n /**\n * A stepping function, returns 1 for any positive value of `n`.\n */\n static step0(n) {\n return n > 0 ? 1 : 0;\n }\n\n /**\n * A stepping function, returns 1 if `n` is greater than or equal to 1.\n */\n static step1(n) {\n return n >= 1 ? 1 : 0;\n }\n\n /**\n * A linear function, `f(t) = t`. Position correlates to elapsed time one to\n * one.\n *\n * http://cubic-bezier.com/#0,0,1,1\n */\n static linear(t) {\n return t;\n }\n\n /**\n * A simple inertial interaction, similar to an object slowly accelerating to\n * speed.\n *\n * http://cubic-bezier.com/#.42,0,1,1\n */\n static ease(t) {\n if (!ease) {\n ease = Easing.bezier(0.42, 0, 1, 1);\n }\n return ease(t);\n }\n\n /**\n * A quadratic function, `f(t) = t * t`. Position equals the square of elapsed\n * time.\n *\n * http://easings.net/#easeInQuad\n */\n static quad(t) {\n return t * t;\n }\n\n /**\n * A cubic function, `f(t) = t * t * t`. Position equals the cube of elapsed\n * time.\n *\n * http://easings.net/#easeInCubic\n */\n static cubic(t) {\n return t * t * t;\n }\n\n /**\n * A power function. Position is equal to the Nth power of elapsed time.\n *\n * n = 4: http://easings.net/#easeInQuart\n * n = 5: http://easings.net/#easeInQuint\n */\n static poly(n) {\n return t => Math.pow(t, n);\n }\n\n /**\n * A sinusoidal function.\n *\n * http://easings.net/#easeInSine\n */\n static sin(t) {\n return 1 - Math.cos(t * Math.PI / 2);\n }\n\n /**\n * A circular function.\n *\n * http://easings.net/#easeInCirc\n */\n static circle(t) {\n return 1 - Math.sqrt(1 - t * t);\n }\n\n /**\n * An exponential function.\n *\n * http://easings.net/#easeInExpo\n */\n static exp(t) {\n return Math.pow(2, 10 * (t - 1));\n }\n\n /**\n * A simple elastic interaction, similar to a spring oscillating back and\n * forth.\n *\n * Default bounciness is 1, which overshoots a little bit once. 0 bounciness\n * doesn't overshoot at all, and bounciness of N > 1 will overshoot about N\n * times.\n *\n * http://easings.net/#easeInElastic\n */\n static elastic(bounciness) {\n if (bounciness === void 0) {\n bounciness = 1;\n }\n var p = bounciness * Math.PI;\n return t => 1 - Math.pow(Math.cos(t * Math.PI / 2), 3) * Math.cos(t * p);\n }\n\n /**\n * Use with `Animated.parallel()` to create a simple effect where the object\n * animates back slightly as the animation starts.\n *\n * Wolfram Plot:\n *\n * - http://tiny.cc/back_default (s = 1.70158, default)\n */\n static back(s) {\n if (s === void 0) {\n s = 1.70158;\n }\n return t => t * t * ((s + 1) * t - s);\n }\n\n /**\n * Provides a simple bouncing effect.\n *\n * http://easings.net/#easeInBounce\n */\n static bounce(t) {\n if (t < 1 / 2.75) {\n return 7.5625 * t * t;\n }\n if (t < 2 / 2.75) {\n var _t = t - 1.5 / 2.75;\n return 7.5625 * _t * _t + 0.75;\n }\n if (t < 2.5 / 2.75) {\n var _t2 = t - 2.25 / 2.75;\n return 7.5625 * _t2 * _t2 + 0.9375;\n }\n var t2 = t - 2.625 / 2.75;\n return 7.5625 * t2 * t2 + 0.984375;\n }\n\n /**\n * Provides a cubic bezier curve, equivalent to CSS Transitions'\n * `transition-timing-function`.\n *\n * A useful tool to visualize cubic bezier curves can be found at\n * http://cubic-bezier.com/\n */\n static bezier(x1, y1, x2, y2) {\n return _bezier(x1, y1, x2, y2);\n }\n\n /**\n * Runs an easing function forwards.\n */\n static in(easing) {\n return easing;\n }\n\n /**\n * Runs an easing function backwards.\n */\n static out(easing) {\n return t => 1 - easing(1 - t);\n }\n\n /**\n * Makes any easing function symmetrical. The easing function will run\n * forwards for half of the duration, then backwards for the rest of the\n * duration.\n */\n static inOut(easing) {\n return t => {\n if (t < 0.5) {\n return easing(t * 2) / 2;\n }\n return 1 - easing((1 - t) * 2) / 2;\n };\n }\n}\nexport default Easing;","/**\n * Portions Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n/**\n * BezierEasing - use bezier curve for transition easing function\n * https://github.com/gre/bezier-easing\n * @copyright 2014-2015 Gaëtan Renaudeau. MIT License.\n */\n\n'use strict';\n\n// These values are established by empiricism with tests (tradeoff: performance VS precision)\nvar NEWTON_ITERATIONS = 4;\nvar NEWTON_MIN_SLOPE = 0.001;\nvar SUBDIVISION_PRECISION = 0.0000001;\nvar SUBDIVISION_MAX_ITERATIONS = 10;\nvar kSplineTableSize = 11;\nvar kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\nvar float32ArraySupported = typeof Float32Array === 'function';\nfunction A(aA1, aA2) {\n return 1.0 - 3.0 * aA2 + 3.0 * aA1;\n}\nfunction B(aA1, aA2) {\n return 3.0 * aA2 - 6.0 * aA1;\n}\nfunction C(aA1) {\n return 3.0 * aA1;\n}\n\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nfunction calcBezier(aT, aA1, aA2) {\n return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\n}\n\n// Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\nfunction getSlope(aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n}\nfunction binarySubdivide(aX, _aA, _aB, mX1, mX2) {\n var currentX,\n currentT,\n i = 0,\n aA = _aA,\n aB = _aB;\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if (currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n return currentT;\n}\nfunction newtonRaphsonIterate(aX, _aGuessT, mX1, mX2) {\n var aGuessT = _aGuessT;\n for (var i = 0; i < NEWTON_ITERATIONS; ++i) {\n var currentSlope = getSlope(aGuessT, mX1, mX2);\n if (currentSlope === 0.0) {\n return aGuessT;\n }\n var currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n}\nexport default function bezier(mX1, mY1, mX2, mY2) {\n if (!(mX1 >= 0 && mX1 <= 1 && mX2 >= 0 && mX2 <= 1)) {\n throw new Error('bezier x values must be in [0, 1] range');\n }\n\n // Precompute samples table\n var sampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n if (mX1 !== mY1 || mX2 !== mY2) {\n for (var i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n }\n function getTForX(aX) {\n var intervalStart = 0.0;\n var currentSample = 1;\n var lastSample = kSplineTableSize - 1;\n for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n --currentSample;\n\n // Interpolate to provide an initial guess for t\n var dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n var guessForT = intervalStart + dist * kSampleStepSize;\n var initialSlope = getSlope(guessForT, mX1, mX2);\n if (initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n } else if (initialSlope === 0.0) {\n return guessForT;\n } else {\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n }\n return function BezierEasing(x) {\n if (mX1 === mY1 && mX2 === mY2) {\n return x; // linear\n }\n // Because JavaScript number are imprecise, we should guarantee the extremes are right.\n if (x === 0) {\n return 0;\n }\n if (x === 1) {\n return 1;\n }\n return calcBezier(getTForX(x), mY1, mY2);\n };\n}\n;","import React, { forwardRef } from 'react';\nimport { LayoutChangeEvent, Platform, StyleProp, TextStyle, Text as RNText } from 'react-native';\nimport { colors } from '../../utils/theme';\nimport { FontWeight, fontWeightToFontFamilyName } from '../../hooks/useLoadAssets';\nimport getBrowser from '../../utils/getBrowser';\n\nexport type TextVariant =\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | 'bold-h4'\n | 'bold-h6'\n | 'bold-h5'\n | 'active-tab'\n | 'button'\n | 'card-title'\n | 'inactive-tab'\n | 'body-1'\n | 'bold-body-1'\n | 'card-body'\n | 'card-support'\n | 'input-field'\n | 'input-text'\n | 'input-label'\n | 'subtitle-1'\n | 'subtitle-2'\n | 'body-2'\n | 'caption-1'\n | 'bold-caption-1'\n | 'caption-2'\n | 'select-option'\n | 'selected-select-option'\n | 'input-error'\n | 'input-help-text'\n | 'input-warn-text'\n | 'avatar-fallback-xs'\n | 'avatar-fallback-sm'\n | 'avatar-fallback-md'\n | 'placeholder-text'\n | 'large-placeholder-text'\n | 'text-button-text'\n | 'labeled-value-label'\n | 'labeled-value-value'\n | 'note-title-value'\n | 'note-title-placeholder'\n | 'note-content-value'\n | 'note-content-placeholder'\n | 'header-breadcrumb-parent'\n | 'header-breadcrumb-leaf'\n | 'header-breadcrumb-divider'\n | 'profile-header-text'\n | 'header-breadcrumb-parent-non-clickable'\n | 'empty-state-hint-primary-sub-text'\n | 'empty-state-hint-header'\n | 'notification-title'\n | 'table-header'\n | 'table-content'\n | 'tab-text'\n | 'model-processing-dot'\n | 'profiles-section-header'\n | 'permissions-primary-header'\n | 'permissions-secondary-header'\n | 'micro'\n | 'base-header-title'\n | 'ai-search-input-placeholder-text'\n | 'ai-search-input-text';\n\ntype GetStyleArgs = {\n size: number;\n lineHeightMultiple?: number;\n letterSpacing?: number;\n color?:\n | 'Dark-Text'\n | 'Gray-Text'\n | 'Inactive-Text'\n | 'Alert'\n | 'White'\n | 'Grey'\n | 'Dark'\n | 'Grey-Light'\n | 'Primary'\n | 'Primary-Light'\n | 'Text-Link';\n bold?: 'Reg' | 'SemiBold' | 'Med';\n};\n\ntype TextStyleProps = {\n fontSize: number;\n fontFamily: string;\n fontWeight: '400' | '500' | '600';\n lineHeight: number;\n letterSpacing: number;\n color: string;\n};\n\nconst getStyleProps = ({\n size,\n lineHeightMultiple = 1.3,\n letterSpacing = -0.05,\n color = 'Dark-Text',\n bold = 'Reg',\n}: GetStyleArgs): TextStyleProps => {\n const loadedFontWeight: FontWeight = bold === 'Reg' ? 'regular' : bold === 'Med' ? 'medium' : 'semi-bold';\n return {\n fontSize: size,\n fontFamily: fontWeightToFontFamilyName.Overpass[loadedFontWeight],\n fontWeight: (\n {\n Reg: '400',\n Med: '500',\n SemiBold: '600',\n } as const\n )[bold],\n lineHeight: size * (lineHeightMultiple || 1.3),\n letterSpacing: letterSpacing,\n color: colors[color],\n };\n};\n\nexport type TextColor =\n | 'Dark-Text'\n | 'Gray-Text'\n | 'Light-Text'\n | 'Inactive-Text'\n | 'White-Text'\n | 'Alert'\n | 'White'\n | 'Dark'\n | 'Primary-Button-Default'\n | 'Primary-Button-Hover'\n | 'Primary-Button-Press'\n | 'Grey-Light'\n | 'Primary-Light'\n | 'Success'\n | 'Text-Link'\n | 'Primary'\n | 'Primary-Reg'\n | 'Grey';\n\nconst ellipsizeTextVariants: TextVariant[] = ['button', 'card-support', 'text-button-text', 'base-header-title'];\n\nexport const textVariantStyleMap: Record = {\n h1: getStyleProps({ size: 34, bold: 'SemiBold' }),\n h2: getStyleProps({ size: 28, bold: 'SemiBold' }),\n h3: getStyleProps({ size: 22, bold: 'SemiBold' }),\n h4: getStyleProps({ size: 18 }),\n h5: getStyleProps({ size: 16, letterSpacing: 0 }),\n h6: getStyleProps({ size: 14, letterSpacing: 0 }),\n 'bold-h6': getStyleProps({ size: 14, letterSpacing: 0, bold: 'SemiBold' }),\n 'bold-h4': getStyleProps({ size: 18, bold: 'SemiBold' }),\n 'bold-h5': getStyleProps({ size: 16, letterSpacing: 0, bold: 'SemiBold' }),\n 'permissions-primary-header': getStyleProps({ size: 18, bold: 'SemiBold', color: 'Dark-Text' }),\n 'permissions-secondary-header': getStyleProps({ size: 14, bold: 'SemiBold', color: 'Dark-Text' }),\n 'profiles-section-header': getStyleProps({ size: 16, bold: 'SemiBold', color: 'Dark-Text' }),\n 'model-processing-dot': getStyleProps({ size: 34, bold: 'SemiBold', lineHeightMultiple: 0.5 }),\n 'table-header': getStyleProps({ size: 14, bold: 'SemiBold', color: 'Dark-Text' }),\n 'table-content': getStyleProps({ size: 14, color: 'Dark-Text' }),\n 'empty-state-hint-header': getStyleProps({ size: 18, letterSpacing: -0.5, color: 'Gray-Text' }),\n 'empty-state-hint-primary-sub-text': getStyleProps({ size: 18, letterSpacing: -0.5, color: 'Dark-Text' }),\n 'profile-header-text': getStyleProps({ size: 18, letterSpacing: 0, color: 'Dark-Text', bold: 'SemiBold' }),\n 'header-breadcrumb-parent': getStyleProps({\n size: 16,\n lineHeightMultiple: 1.2,\n letterSpacing: 0,\n color: 'Text-Link',\n bold: 'SemiBold',\n }),\n 'header-breadcrumb-parent-non-clickable': getStyleProps({\n size: 16,\n lineHeightMultiple: 1.2,\n letterSpacing: 0,\n color: 'Gray-Text',\n bold: 'SemiBold',\n }),\n 'header-breadcrumb-leaf': getStyleProps({\n size: 16,\n lineHeightMultiple: 1.2,\n letterSpacing: 0,\n color: 'White',\n bold: 'SemiBold',\n }),\n 'header-breadcrumb-divider': getStyleProps({\n size: 16,\n lineHeightMultiple: 1.2,\n letterSpacing: 0,\n color: 'Gray-Text',\n bold: 'SemiBold',\n }),\n 'note-title-value': getStyleProps({ size: 18, letterSpacing: 0, color: 'Dark-Text', bold: 'SemiBold' }),\n 'note-title-placeholder': getStyleProps({ size: 18, letterSpacing: 0, color: 'Grey-Light' }),\n 'note-content-value': getStyleProps({ size: 14, letterSpacing: 0, color: 'Dark-Text' }),\n 'note-content-placeholder': getStyleProps({ size: 14, letterSpacing: 0, color: 'Grey-Light' }),\n 'text-button-text': getStyleProps({ size: 14, bold: 'SemiBold', letterSpacing: 0 }),\n 'active-tab': getStyleProps({ size: 14, bold: 'SemiBold', letterSpacing: 0 }),\n button: getStyleProps({ size: 14, bold: 'SemiBold', letterSpacing: 0 }),\n 'card-title': getStyleProps({ size: 14, bold: 'SemiBold', letterSpacing: 0 }),\n 'inactive-tab': getStyleProps({ size: 14, color: 'Gray-Text' }),\n 'body-1': getStyleProps({ size: 14, letterSpacing: 0 }),\n 'notification-title': getStyleProps({ size: 14, color: 'White', letterSpacing: 0 }),\n 'bold-body-1': getStyleProps({ size: 14, bold: 'SemiBold', letterSpacing: 0 }),\n 'input-text': getStyleProps({ size: 14, color: 'Dark-Text', bold: 'SemiBold', letterSpacing: 0 }),\n 'placeholder-text': getStyleProps({ size: 14, color: 'Gray-Text', letterSpacing: 0 }),\n 'large-placeholder-text': getStyleProps({ size: 18, color: 'Gray-Text', letterSpacing: 0 }),\n 'card-body': getStyleProps({ size: 14, color: 'Gray-Text', letterSpacing: 0 }),\n 'input-field': getStyleProps({ size: 14, color: 'Gray-Text', letterSpacing: 0 }),\n 'subtitle-1': getStyleProps({ size: 16, bold: 'SemiBold', letterSpacing: 0 }),\n 'subtitle-2': getStyleProps({ size: 14, bold: 'SemiBold', letterSpacing: 0 }),\n 'body-2': getStyleProps({ size: 12, letterSpacing: 0 }),\n 'card-support': getStyleProps({ size: 12, color: 'Gray-Text', bold: 'Med', letterSpacing: 0 }),\n 'caption-1': getStyleProps({ size: 12, letterSpacing: 0.5 }),\n 'bold-caption-1': getStyleProps({ size: 12, letterSpacing: 0.5, bold: 'SemiBold' }),\n 'input-label': getStyleProps({ size: 10, color: 'Gray-Text', letterSpacing: 0.5, bold: 'SemiBold' }),\n 'caption-2': getStyleProps({ size: 12, letterSpacing: 0.5 }),\n 'tab-text': getStyleProps({ size: 12, letterSpacing: 0.5 }),\n 'select-option': getStyleProps({ size: 16, letterSpacing: 0, color: 'Gray-Text' }),\n 'selected-select-option': getStyleProps({ size: 16, bold: 'SemiBold', color: 'Dark-Text', letterSpacing: 0 }),\n 'input-error': getStyleProps({ size: 12, color: 'Alert' }),\n 'input-help-text': getStyleProps({ size: 12, color: 'Gray-Text' }),\n 'input-warn-text': getStyleProps({ size: 12, color: 'Dark-Text', bold: 'SemiBold' }),\n 'avatar-fallback-xs': getStyleProps({ size: 12, bold: 'SemiBold', color: 'Dark-Text' }),\n 'avatar-fallback-sm': getStyleProps({ size: 14, bold: 'SemiBold', color: 'White' }),\n 'avatar-fallback-md': getStyleProps({ size: 18, bold: 'SemiBold', color: 'White' }),\n 'labeled-value-label': getStyleProps({ size: 12, color: 'Gray-Text', bold: 'SemiBold', letterSpacing: 0 }),\n 'labeled-value-value': getStyleProps({ size: 14, color: 'Dark-Text', letterSpacing: 0 }),\n micro: getStyleProps({ size: 7, color: 'Gray-Text', letterSpacing: 0 }),\n 'base-header-title': getStyleProps({ size: 18 }),\n 'ai-search-input-placeholder-text': getStyleProps({ size: 22, color: 'Gray-Text', letterSpacing: 0 }),\n 'ai-search-input-text': getStyleProps({ size: 22, color: 'Dark-Text', bold: 'SemiBold', letterSpacing: 0 }),\n};\n\nexport type TextOwnProps = {\n variant: TextVariant;\n children: string | number | undefined | null | React.ReactNode;\n color?: TextColor;\n onLayout?: (event: LayoutChangeEvent) => void;\n style?: StyleProp;\n alignText?: 'center' | 'left' | 'right';\n wrapText?: boolean;\n testID?: string;\n underline?: boolean;\n};\n\nexport type TextProps = TextOwnProps;\n\nexport const getTextStyle = (variant: TextVariant): StyleProp => {\n return textVariantStyleMap[variant];\n};\n\nconst Text: React.FC = forwardRef((props, ref) => {\n if (!props.children) return null;\n const browser = getBrowser(navigator.userAgent);\n\n const useEllipses = ellipsizeTextVariants.includes(props.variant);\n const numberOfLines = props.wrapText === false || useEllipses ? 1 : undefined;\n // selectable breaks ellipses on android\n const selectable = Platform.OS === 'web' || (Platform.OS === 'android' && useEllipses) ? undefined : true;\n\n return (\n \n {props.children}\n \n );\n});\n\nexport default React.memo(Text);\n","import { Platform } from 'react-native';\nimport { Theme } from '@aws-amplify/ui-react-native';\n\nexport const colors = {\n 'Primary-Reg': '#FFC319',\n 'Primary-Reg-Dark': '#F69301',\n Primary: '#4D6692',\n 'Primary-Light': '#9DA8B7',\n Background: '#E8ECEF',\n White: '#FFFFFF',\n Black: '#000000',\n Dividers: '#D5D5D5',\n Dark: '#171717',\n Grey: '#737373',\n 'Grey-Light': '#AAAAAA',\n 'Grey-Light2': '#F2F2F2',\n Alert: '#ED3C3C',\n Success: '#0B9442',\n 'Primary-Button-Default': '#FFC319',\n 'Primary-Button-Hover': '#FED560',\n 'Primary-Button-Press': '#DFA44E',\n 'Primary-Button-Inactive': '#8D8D8D',\n 'Secondary-Button-Default': '#FFFFFF',\n 'Secondary-Button-Hover': '#FFFFFF',\n 'Secondary-Button-Press': '#F3F3F3',\n 'Secondary-Button-Inactive': '#FFFFFF',\n 'Alert-Button-Default': '#ED3C3C',\n 'Alert-Button-Hover': '#FF725A',\n 'Alert-Button-Press': '#A12F1C',\n 'Alert-Button-Inactive': '#676767',\n 'Dark-Text': '#171717',\n 'Gray-Text': '#737373',\n 'Light-Text': '#FFFFFF',\n 'Inactive-Text': '#8D8D8D',\n 'White-Text': '#FFFFFF',\n 'Secondary-Button-Hover-Border': '#5E5E5E',\n 'Drag-Indicator': '#020202',\n 'Tab-Gradient-Start': '#CED2D6',\n 'Tab-Gradient-End': '#FCFCFD',\n 'Spinner-Gradient-1': '#F69301',\n 'Spinner-Gradient-2': '#FFC319',\n 'Progress-Bar-Gradient-1': '#F6B934',\n 'Progress-Bar-Gradient-2': '#F69504',\n 'Spinner-Track': '#ECECEC',\n 'Drawer-Background': '#2B2D38',\n 'Pro-Drawer-Background': '#23324C',\n 'Drawer-Item-Active': '#424551',\n 'Pro-Drawer-Item-Active': '#9DA8B7',\n 'Drawer-Button': '#1E202D',\n 'File-Picker-Border': '#D3D3D3',\n 'Chat-Divider': '#C3C3C3',\n 'Chat-Input-Button-Default': '#76C65B',\n 'Chat-Input-Button-Hover': '#08943F',\n 'Chat-Input-Button-Inactive': '#D9D9D9',\n 'Chat-User-Message': '#DEF8D5',\n 'Chat-Model-Message': '#DAF4FF',\n 'Avatar-border': '#D4D4D4',\n 'Paper-Border': '#D4D4D4',\n 'Text-Link': '#E79000',\n Shadow: '#000000',\n 'Event-Filter-All': '#F0F0F0',\n 'Event-Filter-Visit': '#FAC884',\n 'Event-Filter-Record-Update': '#98CCEA',\n 'Event-Filter-Collaboration': '#A3D9A5',\n 'Event-Filter-Profile': '#C5A1E6',\n};\n\nexport type Shadow = {\n shadowOffset: { width: number; height: number };\n shadowOpacity: number;\n shadowRadius: number;\n shadowColor: string;\n elevation?: number;\n};\n\nexport type ShadowType = 'hover' | 'default' | 'press' | 'card';\n\nexport const shadows: Record = {\n hover: {\n shadowOffset: { width: 0, height: 3 },\n shadowOpacity: 0.2, // 33 in hexadecimal is roughly 20% in decimal\n shadowRadius: 1,\n shadowColor: colors.Black,\n elevation: 3, // for Android\n },\n default: {\n shadowOffset: { width: 0, height: 2 },\n shadowOpacity: 0.14, // 24 in hexadecimal is roughly 14% in decimal\n shadowRadius: 2,\n shadowColor: colors.Black,\n elevation: 2, // for Android\n },\n press: {\n shadowOffset: { width: 0, height: 1 },\n shadowOpacity: 0.12, // 1F in hexadecimal is roughly 12% in decimal\n shadowRadius: 5,\n shadowColor: colors.Black,\n elevation: 1, // for Android\n },\n card: {\n shadowColor: colors['Primary-Light'],\n shadowOffset: { width: 0, height: 2 },\n shadowOpacity: 1,\n shadowRadius: 0,\n elevation: 2,\n },\n};\n\nexport type Color = keyof typeof colors;\n\nconst webTheme: Theme = {\n components: {\n textField: {\n container: {\n alignSelf: 'center',\n width: '100%',\n },\n fieldContainer: {\n width: '100%',\n },\n },\n label: {\n text: {\n fontFamily: 'OverpassRegular',\n fontSize: 14,\n lineHeight: 18.2,\n letterSpacing: 0,\n color: colors['Dark-Text'],\n },\n },\n button: {\n containerPrimary: {\n backgroundColor: colors['Primary-Button-Default'],\n width: '100%',\n alignSelf: 'center',\n opacity: 1,\n // color: colors['Dark-Text'],\n borderRadius: 5,\n ...shadows.default,\n },\n disabled: {\n backgroundColor: colors['Grey-Light'],\n opacity: 1,\n // color: colors['Grey'],\n shadowOpacity: 0,\n },\n pressed: {\n opacity: 0.8,\n ...shadows.press,\n },\n containerDefault: {\n width: '100%',\n alignSelf: 'center',\n borderRadius: 5,\n borderWidth: 1,\n borderColor: colors['Dark-Text'],\n backgroundColor: colors['White'],\n ...shadows.default,\n padding: 0,\n },\n containerLink: {\n width: '100%',\n paddingTop: 2,\n paddingBottom: 2,\n },\n textPrimary: {\n color: 'black',\n fontFamily: 'OverpassSemibold',\n fontSize: 14,\n lineHeight: 18.2,\n letterSpacing: 0,\n // fontSynthesis: 'style',\n },\n textLink: {\n fontFamily: 'OverpassSemibold',\n // fontSynthesis: 'style',\n },\n text: {\n color: colors['Dark-Text'],\n fontFamily: 'OverpassSemibold',\n fontSize: 14,\n lineHeight: 18.2,\n letterSpacing: 0,\n // fontSynthesis: 'style',\n },\n },\n errorMessage: {\n container: {\n marginLeft: 0,\n marginRight: 0,\n backgroundColor: colors['Alert'],\n borderRadius: 5,\n },\n label: {\n fontFamily: 'OverpassSemibold',\n fontSize: 14,\n lineHeight: 18.2,\n letterSpacing: 0,\n color: colors['White'],\n textAlign: 'center',\n },\n icon: {\n display: 'none',\n },\n },\n },\n};\n\nexport const amplifyUITheme: Theme = {\n components: Platform.select({\n web: webTheme.components,\n default: webTheme.components,\n }),\n tokens: {\n colors: {\n background: {\n primary: 'transparent',\n },\n /*\n border: {\n primary: primaryRecordTheme.colors.primaryRecordCustom.cardBorder,\n },\n */\n primaryRecordPrimary: {\n 10: '#293e5c',\n 20: '#243752',\n 40: '#1b293d',\n 60: '#121c29',\n 80: '#090e14',\n 90: '#04070a',\n 100: '#000000',\n },\n brand: {\n primary: {\n 10: '{colors.primaryRecordPrimary.10}',\n 20: '{colors.primaryRecordPrimary.20}',\n 40: '{colors.primaryRecordPrimary.40}',\n 60: '{colors.primaryRecordPrimary.60}',\n 80: '{colors.primaryRecordPrimary.80}',\n 90: '{colors.primaryRecordPrimary.90}',\n 100: '{colors.primaryRecordPrimary.100}',\n },\n },\n },\n },\n};\n\nexport const zIndex = {\n prompt: 1000,\n drawer: 900,\n drawerBackdrop: 899,\n notification: 1000000,\n};\n","// From MDN https://developer.mozilla.org/en-US/docs/Web/API/Window/navigator\n\nconst getBrowser = (userAgent: string | undefined) => {\n if (!userAgent) return 'unknown';\n // The order matters here, and this may report false positives for unlisted browsers.\n if (userAgent.includes('Firefox')) {\n return 'Firefox';\n } else if (userAgent.includes('SamsungBrowser')) {\n return 'Samsung';\n } else if (userAgent.includes('Opera') || userAgent.includes('OPR')) {\n return 'Opera';\n } else if (userAgent.includes('Edge') || userAgent.includes('Edg')) {\n return 'Edge';\n } else if (userAgent.includes('Chrome')) {\n return 'Chrome';\n } else if (userAgent.includes('Safari')) {\n return 'Safari';\n } else {\n return 'unknown';\n }\n};\n\nexport default getBrowser;\n","import { Portal, PortalHost } from '@gorhom/portal';\nimport React from 'react';\nimport { View } from 'react-native';\n\nconst fixedPositionPortalName = 'fixed-position-portal';\nconst notificationPortalHost = 'notification-portal';\n\nexport const FixedPositionPortalContainer: React.FC<{ children: any }> = (props) => (\n \n \n {props.children}\n \n \n \n \n);\n\nexport const FixedContentContainer: React.FC<{ children: any }> = ({ children }) => {\n return {children};\n};\n\nexport const NotificationPortalContainer: React.FC<{ children: any }> = ({ children }) => {\n return {children};\n};\n","export { Portal } from './components/portal/Portal';\nexport { PortalHost } from './components/portalHost/PortalHost';\nexport { PortalProvider } from './components/portalProvider/PortalProvider';\nexport { usePortal } from './hooks/usePortal';\nexport { enableLogging } from './utilities/logger';\n//# sourceMappingURL=index.js.map","import { memo, useCallback, useEffect, useMemo, useRef } from 'react';\nimport { nanoid } from 'nanoid/non-secure';\nimport { usePortal } from '../../hooks/usePortal';\n\nconst PortalComponent = ({\n name: _providedName,\n hostName,\n handleOnMount: _providedHandleOnMount,\n handleOnUnmount: _providedHandleOnUnmount,\n handleOnUpdate: _providedHandleOnUpdate,\n children\n}) => {\n //#region hooks\n const {\n addPortal: addUpdatePortal,\n removePortal\n } = usePortal(hostName); //#endregion\n //#region variables\n\n const name = useMemo(() => _providedName || nanoid(), [_providedName]); //#endregion\n //#region refs\n\n const handleOnMountRef = useRef();\n const handleOnUnmountRef = useRef();\n const handleOnUpdateRef = useRef(); //#endregion\n //#region callbacks\n\n const handleOnMount = useCallback(() => {\n if (_providedHandleOnMount) {\n _providedHandleOnMount(() => addUpdatePortal(name, children));\n } else {\n addUpdatePortal(name, children);\n } // eslint-disable-next-line react-hooks/exhaustive-deps\n\n }, [_providedHandleOnMount, addUpdatePortal]);\n handleOnMountRef.current = handleOnMount;\n const handleOnUnmount = useCallback(() => {\n if (_providedHandleOnUnmount) {\n _providedHandleOnUnmount(() => removePortal(name));\n } else {\n removePortal(name);\n } // eslint-disable-next-line react-hooks/exhaustive-deps\n\n }, [_providedHandleOnUnmount, removePortal]);\n handleOnUnmountRef.current = handleOnUnmount;\n const handleOnUpdate = useCallback(() => {\n if (_providedHandleOnUpdate) {\n _providedHandleOnUpdate(() => addUpdatePortal(name, children));\n } else {\n addUpdatePortal(name, children);\n } // eslint-disable-next-line react-hooks/exhaustive-deps\n\n }, [_providedHandleOnUpdate, addUpdatePortal, children]);\n handleOnUpdateRef.current = handleOnUpdate; //#endregion\n //#region effects\n\n useEffect(() => {\n var _handleOnMountRef$cur;\n\n (_handleOnMountRef$cur = handleOnMountRef.current) === null || _handleOnMountRef$cur === void 0 ? void 0 : _handleOnMountRef$cur.call(handleOnMountRef);\n return () => {\n var _handleOnUnmountRef$c;\n\n (_handleOnUnmountRef$c = handleOnUnmountRef.current) === null || _handleOnUnmountRef$c === void 0 ? void 0 : _handleOnUnmountRef$c.call(handleOnUnmountRef); // remove callbacks refs\n\n handleOnMountRef.current = undefined;\n handleOnUnmountRef.current = undefined;\n handleOnUpdateRef.current = undefined;\n };\n }, []);\n useEffect(() => {\n var _handleOnUpdateRef$cu;\n\n (_handleOnUpdateRef$cu = handleOnUpdateRef.current) === null || _handleOnUpdateRef$cu === void 0 ? void 0 : _handleOnUpdateRef$cu.call(handleOnUpdateRef);\n }, [children]); //#endregion\n\n return null;\n};\n\nexport const Portal = /*#__PURE__*/memo(PortalComponent);\nPortal.displayName = 'Portal';\n//# sourceMappingURL=Portal.js.map","import { useCallback, useContext } from 'react';\nimport { ACTIONS } from '../state/constants';\nimport { PortalDispatchContext } from '../contexts/portal';\nexport const usePortal = (hostName = 'root') => {\n const dispatch = useContext(PortalDispatchContext);\n\n if (dispatch === null) {\n throw new Error(\"'PortalDispatchContext' cannot be null, please add 'PortalProvider' to the root component.\");\n } //#region methods\n\n\n const registerHost = useCallback(() => {\n dispatch({\n type: ACTIONS.REGISTER_HOST,\n hostName: hostName\n }); // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n const deregisterHost = useCallback(() => {\n dispatch({\n type: ACTIONS.DEREGISTER_HOST,\n hostName: hostName\n }); // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n const addUpdatePortal = useCallback((name, node) => {\n dispatch({\n type: ACTIONS.ADD_UPDATE_PORTAL,\n hostName,\n portalName: name,\n node\n }); // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n const removePortal = useCallback(name => {\n dispatch({\n type: ACTIONS.REMOVE_PORTAL,\n hostName,\n portalName: name\n }); // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []); //#endregion\n\n return {\n registerHost,\n deregisterHost,\n addPortal: addUpdatePortal,\n updatePortal: addUpdatePortal,\n removePortal\n };\n};\n//# sourceMappingURL=usePortal.js.map","var ACTIONS;\n\n(function (ACTIONS) {\n ACTIONS[ACTIONS[\"REGISTER_HOST\"] = 0] = \"REGISTER_HOST\";\n ACTIONS[ACTIONS[\"DEREGISTER_HOST\"] = 1] = \"DEREGISTER_HOST\";\n ACTIONS[ACTIONS[\"ADD_UPDATE_PORTAL\"] = 2] = \"ADD_UPDATE_PORTAL\";\n ACTIONS[ACTIONS[\"REMOVE_PORTAL\"] = 3] = \"REMOVE_PORTAL\";\n})(ACTIONS || (ACTIONS = {}));\n\nconst INITIAL_STATE = {};\nexport { ACTIONS, INITIAL_STATE };\n//# sourceMappingURL=constants.js.map","import { createContext } from 'react';\nexport const PortalStateContext = /*#__PURE__*/createContext(null);\nexport const PortalDispatchContext = /*#__PURE__*/createContext(null);\n//# sourceMappingURL=portal.js.map","import React, { memo, useEffect } from 'react';\nimport { usePortalState } from '../../hooks/usePortalState';\nimport { usePortal } from '../../hooks/usePortal';\n\nconst PortalHostComponent = ({\n name\n}) => {\n //#region hooks\n const state = usePortalState(name);\n const {\n registerHost,\n deregisterHost\n } = usePortal(name); //#endregion\n //#region effects\n\n useEffect(() => {\n registerHost();\n return () => {\n deregisterHost();\n }; // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []); //#endregion\n //#region render\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, state.map(item => item.node)); //#endregion\n};\n\nexport const PortalHost = /*#__PURE__*/memo(PortalHostComponent);\nPortalHost.displayName = 'PortalHost';\n//# sourceMappingURL=PortalHost.js.map","import { useContext } from 'react';\nimport { PortalStateContext } from '../contexts/portal';\nexport const usePortalState = hostName => {\n const state = useContext(PortalStateContext);\n\n if (state === null) {\n throw new Error(\"'PortalStateContext' cannot be null, please add 'PortalProvider' to the root component.\");\n }\n\n return state[hostName] || [];\n};\n//# sourceMappingURL=usePortalState.js.map","import React, { memo, useReducer } from 'react';\nimport { PortalHost } from '../portalHost/PortalHost';\nimport { PortalDispatchContext, PortalStateContext } from '../../contexts/portal';\nimport { INITIAL_STATE } from '../../state/constants';\nimport { reducer } from '../../state/reducer';\n\nconst PortalProviderComponent = ({\n rootHostName = 'root',\n shouldAddRootHost = true,\n children\n}) => {\n const [state, dispatch] = useReducer(reducer, INITIAL_STATE);\n return /*#__PURE__*/React.createElement(PortalDispatchContext.Provider, {\n value: dispatch\n }, /*#__PURE__*/React.createElement(PortalStateContext.Provider, {\n value: state\n }, children, shouldAddRootHost && /*#__PURE__*/React.createElement(PortalHost, {\n name: rootHostName\n })));\n};\n\nexport const PortalProvider = /*#__PURE__*/memo(PortalProviderComponent);\nPortalProvider.displayName = 'PortalProvider';\n//# sourceMappingURL=PortalProvider.js.map","import { ACTIONS } from './constants';\nimport { print } from '../utilities/logger';\n\nconst registerHost = (state, hostName) => {\n if (!(hostName in state)) {\n state[hostName] = [];\n }\n\n return state;\n};\n\nconst deregisterHost = (state, hostName) => {\n delete state[hostName];\n return state;\n};\n\nconst addUpdatePortal = (state, hostName, portalName, node) => {\n if (!(hostName in state)) {\n state = registerHost(state, hostName);\n }\n /**\n * updated portal, if it was already added.\n */\n\n\n const index = state[hostName].findIndex(item => item.name === portalName);\n\n if (index !== -1) {\n state[hostName][index].node = node;\n } else {\n state[hostName].push({\n name: portalName,\n node\n });\n }\n\n return state;\n};\n\nconst removePortal = (state, hostName, portalName) => {\n if (!(hostName in state)) {\n print({\n component: reducer.name,\n method: removePortal.name,\n params: \"Failed to remove portal '\".concat(portalName, \"', '\").concat(hostName, \"' was not registered!\")\n });\n return state;\n }\n\n const index = state[hostName].findIndex(item => item.name === portalName);\n if (index !== -1) state[hostName].splice(index, 1);\n return state;\n};\n\nexport const reducer = (state, action) => {\n const {\n type\n } = action;\n let clonedState = { ...state\n };\n\n switch (type) {\n case ACTIONS.REGISTER_HOST:\n return registerHost(clonedState, action.hostName);\n\n case ACTIONS.DEREGISTER_HOST:\n return deregisterHost(clonedState, action.hostName);\n\n case ACTIONS.ADD_UPDATE_PORTAL:\n return addUpdatePortal(clonedState, action.hostName, action.portalName, action.node);\n\n case ACTIONS.REMOVE_PORTAL:\n return removePortal(clonedState, action.hostName, action.portalName);\n\n default:\n return state;\n }\n};\n//# sourceMappingURL=reducer.js.map","let isLoggingEnabled = false; // __DEV__ global is by default not defined in React Native Web builds\n\nconst isDev = Boolean(typeof __DEV__ !== 'undefined' && __DEV__);\n\nconst enableLogging = () => {\n if (!isDev) {\n console.warn('[Portal] could not enable logging on production!');\n return;\n }\n\n isLoggingEnabled = true;\n};\n\nlet print = () => {};\n\nif (isDev) {\n print = ({\n component,\n method,\n params\n }) => {\n if (!isLoggingEnabled) {\n return;\n }\n\n let message = '';\n\n if (typeof params === 'object') {\n message = Object.keys(params).map(key => \"\".concat(key, \":\").concat(params[key])).join(' ');\n } else {\n message = \"\".concat(params !== null && params !== void 0 ? params : '');\n }\n\n console.log(\"[Portal::\".concat([component, method].filter(Boolean).join('::'), \"]\"), message);\n };\n}\n\nObject.freeze(print);\nexport { print, enableLogging };\n//# sourceMappingURL=logger.js.map","export const TAB_BAR_HEIGHT = 62;\n","import React from 'react';\nimport { Dimensions, View } from 'react-native';\nimport Divider from '../Divider';\nimport Stack from '../Stack';\nimport Button, { MAX_BUTTON_WIDTH } from '../Button';\nimport { colors } from '../../../utils/theme';\nimport { getIntl } from '../../../utils/intl';\nimport Menu from '../Menu';\nimport { NestedScrollViewPortalHostContainer } from '../NestedScrollViewPortal';\nimport { Action } from './types';\nimport { mainContentPadding } from '../MainContentContainer';\nimport MaxWidthRestrictedContent, { RestrictedWidthVariant } from '../MaxWidthRestrictedContent';\nimport { useIsInSideTabContentContainer } from '../TabView/hooks';\nimport { PRScrollView } from '../../shared/Scroll';\n\nconst intl = getIntl('components.v2BaseComponents.ActionButtonLayout', {\n more: 'More',\n});\n\nexport type ActionButtonLayoutOwnProps = {\n actions?: Action[];\n children: React.ReactNode;\n scrollable?: boolean;\n header?: React.ReactNode;\n whiteBackground?: boolean;\n restrictedWidthVariant?: RestrictedWidthVariant;\n disableBackground?: boolean;\n};\n\nexport type ActionButtonLayoutProps = ActionButtonLayoutOwnProps;\n\nconst getActionsCharacterCount = (actions: Action[]) => {\n return actions.reduce((acc, action) => acc + action.title.length, 0);\n};\n\nconst getActionCount = (shownActions: Action[], initialCharacterCount: number) => {\n if (!shownActions.length) return 0;\n const screenWidth = Dimensions.get('window').width;\n const maxActions = screenWidth > 1000 ? 3 : 2;\n const maxActionCharacterCount = maxActions * 13; // this is a rough estimate. This prevents long text buttons from overflowing\n const displayedActions: Action[] = [];\n const getDisplayedActionsCharacterCount = () =>\n displayedActions.reduce((acc, action) => acc + action.title.length, initialCharacterCount);\n let index = 0;\n while (\n index < shownActions.length &&\n getDisplayedActionsCharacterCount() + shownActions[index].title.length < maxActionCharacterCount\n ) {\n displayedActions.push(shownActions[index]);\n index++;\n }\n\n return Math.max(Math.min(displayedActions.length, maxActions), 1);\n};\n\nexport const ACTION_BUTTON_LAYOUT_ACTION_BAR_HEIGHT = 67;\n\nconst ActionButtonLayout: React.FC = ({\n actions,\n children,\n scrollable,\n header,\n whiteBackground,\n restrictedWidthVariant,\n disableBackground,\n}) => {\n const isInSideTabContentContainer = useIsInSideTabContentContainer();\n const shownActions = (actions || []).filter((action) => action.show !== false);\n\n const hasPrimaryAction = shownActions.some((action) => action.isPrimary);\n if (hasPrimaryAction && shownActions.length > 1) {\n throw new Error('Primary action must be the only action');\n }\n\n const backgroundColor = disableBackground\n ? undefined\n : whiteBackground || isInSideTabContentContainer\n ? colors.White\n : colors.Background;\n\n const renderBottomActions = () => {\n if (shownActions.length === 0) {\n return null;\n }\n\n const forcedMoreActions = shownActions.filter((action) => action.displayInMoreMenu);\n const forcedPresentActions = shownActions.filter((action) => action.displayInMoreMenu === false);\n const remainingActions = shownActions.filter((action) => action.displayInMoreMenu === undefined);\n const directlyListedActions = [\n ...forcedPresentActions,\n ...remainingActions.splice(\n 0,\n getActionCount(remainingActions, getActionsCharacterCount(forcedPresentActions)),\n ),\n ];\n const popoverActions = [...forcedMoreActions, ...remainingActions];\n\n const renderE2EIndicator = (isInMenu: boolean, testID: string) => {\n const indicatorTestID = `action-button-indicator-${testID}-${isInMenu ? 'menu' : 'direct'}`;\n return (\n \n );\n };\n\n return (\n \n \n \n {directlyListedActions\n .filter((_) => _.testID)\n .map((action) => renderE2EIndicator(false, action.testID!))}\n {popoverActions.filter((_) => _.testID).map((action) => renderE2EIndicator(true, action.testID!))}\n \n \n {directlyListedActions.map((action, index) => (\n \n {}}\n />\n \n ))}\n {popoverActions.length > 0 && (\n (\n \n )}\n popoverPosition=\"bottom-right-align\"\n items={popoverActions.map((action) => ({\n title: action.title,\n onPress: action.onPress,\n isDisabled: action.isDisabled,\n icon: action.icon,\n testID: action.testID,\n }))}\n />\n )}\n \n \n \n \n );\n };\n\n const maybeRenderInScrollable = (content: React.ReactNode) => {\n if (scrollable) {\n return (\n \n {content}\n \n );\n } else {\n return {content};\n }\n };\n\n const renderHeader = () => {\n if (!header) {\n return null;\n }\n\n return (\n <>\n {}\n \n \n );\n };\n\n return (\n \n \n \n {maybeRenderInScrollable(\n <>\n {renderHeader()}\n {children}\n ,\n )}\n \n {renderBottomActions()}\n \n \n );\n};\n\nexport default React.memo(ActionButtonLayout);\n","import React from 'react';\nimport { StyleProp, View, ViewStyle } from 'react-native';\nimport { colors } from '../../../utils/theme';\n\nexport type DividerOwnProps = {\n style?: StyleProp;\n} & (\n | {\n horizontal: true;\n }\n | {\n vertical: true;\n }\n);\n\nexport type DividerProps = DividerOwnProps;\n\nconst Divider: React.FC = (props) => {\n const isHorizontal = 'horizontal' in props;\n return (\n \n );\n};\n\nexport default React.memo(Divider);\n","import React, { forwardRef, useContext } from 'react';\nimport { getSpacing } from '../../../utils/spacing';\nimport { View, StyleProp, ViewStyle, LayoutChangeEvent } from 'react-native';\nimport { useIsMobileLayout } from '../../../hooks/useIsMobileLayout';\nimport { ForceStackFieldsContext } from '../Form/ForcedStackFieldsContext';\n\nexport type Justify = 'flex-start' | 'center' | 'flex-end';\n\nexport type HorizontalProps = {\n horizontal: true;\n};\n\nexport type VerticalProps = {\n vertical: true;\n};\n\ntype FlattenedChildrenResultItem = {\n node: React.ReactNode;\n key: React.Key | null;\n};\n\n/**\n * Recursively flatten out children stripping fragments. This is so\n * \n * \n * {item1}\n * {item2}\n * \n * \n * {item3}\n * {item4}\n * \n * \n *\n * Will leave spacing between all items and not just between the fragments.\n *\n * The keys are tricky here. If we just render the default key, item1 and item3 with have conflicting keys of .0 (2 and 4 also conflict).\n * To work around this, we prepend the key of the parent fragment to the child key and the resulting item keys are:\n * .0.0, .0.1, .1.0, .1.1\n */\nconst flattenChildren = (children: React.ReactNode, baseKey?: React.Key): FlattenedChildrenResultItem[] => {\n return React.Children.toArray(children).flatMap((child) => {\n if (React.isValidElement(child) && child.type === React.Fragment) {\n return flattenChildren(child.props.children, child.key || undefined);\n }\n\n let childKey = React.isValidElement(child) ? child.key : null;\n if (baseKey !== undefined && childKey !== null) {\n childKey = String(baseKey) + String(childKey);\n }\n\n return [\n {\n node: child,\n key: childKey,\n },\n ];\n });\n};\n\nexport type StackProps = {\n children: React.ReactNode | React.ReactNode[];\n space?: number;\n justify?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';\n align?: 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';\n style?: StyleProp;\n fullHeight?: boolean;\n fullWidth?: boolean;\n testID?: string;\n flex?: number;\n padding?: number;\n onLayout?: (event: LayoutChangeEvent) => void;\n renderDivider?: () => React.ReactNode;\n logId?: string;\n} & (HorizontalProps | VerticalProps);\n\nconst Stack = forwardRef((props, ref) => {\n const isVertical = 'vertical' in props;\n const spacing = getSpacing(props.space || 0);\n\n const renderContent = () => {\n const asArray = flattenChildren(props.children);\n const validElements = asArray.filter((_) => React.isValidElement(_.node));\n const mapped = validElements.map((child, index) => {\n const isFirst = index === 0;\n const spacerStile = isVertical ? { height: spacing } : { width: spacing };\n const renderDivider = () => {\n if (isFirst) {\n return null;\n } else if (props.renderDivider) {\n return {props.renderDivider()};\n } else {\n return ;\n }\n };\n\n return (\n \n {renderDivider()}\n {child.node}\n \n );\n });\n return mapped;\n };\n\n return (\n \n {renderContent()}\n \n );\n});\n\nexport default Stack;\n\nexport const contentStackSpacing = 5;\n\nconst BaseContentStack = (props: Pick & { spacing: number }) => {\n return (\n \n {props.children}\n \n );\n};\n\n/**\n * Standard stack layout for screen contents\n */\nexport const ContentStack: React.FC> = (props) => {\n return ;\n};\n\nexport const FormStack: React.FC> = (props) => {\n const isMobile = useIsMobileLayout();\n const forceStackFields = useContext(ForceStackFieldsContext);\n return ;\n};\n","const BASE_SPACING = 2;\n\nexport const getSpacing = (space: number) => {\n return space * BASE_SPACING;\n};\n\nexport const spacingFromPx = (px: number) => {\n return px / BASE_SPACING;\n};\n","import React from 'react';\n\nexport const ForceStackFieldsContext = React.createContext(false);\n","import React, { forwardRef } from 'react';\nimport { Pressable, Button as RNButton } from 'react-native';\nimport Icon, { IconColorVariant, IconName, IconSize } from '../Icon';\nimport { Shadow, colors, shadows } from '../../../utils/theme';\nimport Text, { TextColor } from '../Text';\nimport Stack from '../Stack';\nimport {\n DimensionValue,\n GestureResponderEvent,\n LayoutChangeEvent,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from 'react-native';\nimport { StateStyles, useInteractionStateStyles } from '../../../hooks/useInteractionStateStyles';\nimport { useIsDisabledByParent } from '../IsDisabledProvider';\nimport { getSpacing } from '../../../utils/spacing';\nimport AppleLogo from './AppleLogo';\nimport GoogleLogo from './GoogleLogo';\nimport { getIntl } from '../../../utils/intl';\nimport { View } from 'react-native';\nimport { hexToRgbA } from '../../../utils/hexToRGBA';\n\nconst intl = getIntl('Button', {\n apple: 'Sign in with Apple',\n google: 'Sign in with Google',\n});\n\nexport type ButtonVariant =\n | 'primary'\n | 'secondary'\n | 'tertiary'\n | 'alert'\n | 'text'\n | 'text-dark'\n | 'select'\n | 'ghost'\n | 'list-button'\n | 'pro-header-button';\n\nexport type RenderButtonContentArgs = {\n left: React.ReactNode | null;\n right: React.ReactNode;\n center: React.ReactNode | null;\n};\n\nexport type RenderButtonContent = (args: RenderButtonContentArgs) => React.ReactNode;\n\nexport type ButtonOwnProps = {\n variant?: ButtonVariant;\n icon?: IconName;\n size?: 'lg' | 'sm';\n isDisabled?: boolean;\n onPress: (e: GestureResponderEvent) => void;\n testID?: string;\n onLayout?: (event: LayoutChangeEvent) => void;\n leftIcon?: IconName;\n leftContent?: React.ReactNode;\n justifyButtonContent?: 'center' | 'flex-start';\n textStyle?: StyleProp;\n iconColor?: IconColorVariant;\n width?: DimensionValue;\n renderButtonContent?: RenderButtonContent;\n style?: StyleProp;\n} & (\n | {\n title: string;\n }\n | {\n socialLogin: 'google' | 'apple';\n displayText: boolean;\n }\n | {\n title: string;\n customIcon: 'ai-chat';\n }\n);\n\nexport type ButtonProps = ButtonOwnProps & React.RefAttributes;\n\nexport type VariantColors = {\n defaultBackground: string;\n defaultText: TextColor;\n defaultBorderColor?: string;\n hoverBackground: string;\n hoverText: TextColor;\n hoverBorderColor?: string;\n pressBackground: string;\n pressText: TextColor;\n pressBorderColor?: string;\n inactiveBackground: string;\n inactiveText: TextColor;\n inactiveBorderColor?: string;\n};\n\nexport type StateStyle = {\n background: string;\n text: TextColor;\n borderColor?: string;\n shadow?: Shadow;\n textStyle?: StyleProp;\n};\n\nconst variantStateStyles: Record> = {\n primary: {\n default: {\n background: colors['Primary-Button-Default'],\n text: 'Dark-Text',\n shadow: shadows.default,\n },\n hovered: {\n background: colors['Primary-Button-Hover'],\n text: 'Dark-Text',\n shadow: shadows.hover,\n },\n pressed: {\n background: colors['Primary-Button-Press'],\n text: 'Dark-Text',\n shadow: shadows.press,\n },\n inactive: {\n background: colors['Primary-Button-Inactive'],\n text: 'Dark-Text',\n },\n },\n secondary: {\n default: {\n background: colors['Secondary-Button-Default'],\n text: 'Dark-Text',\n borderColor: colors['Dark-Text'],\n shadow: shadows.default,\n },\n hovered: {\n background: colors['Secondary-Button-Hover'],\n text: 'Gray-Text',\n borderColor: colors['Secondary-Button-Hover-Border'],\n },\n pressed: {\n background: colors['Secondary-Button-Press'],\n text: 'Dark-Text',\n borderColor: colors['Dark-Text'],\n },\n inactive: {\n background: colors['Secondary-Button-Inactive'],\n text: 'Inactive-Text',\n borderColor: colors['Grey-Light'],\n },\n },\n tertiary: {\n default: {\n background: 'transparent',\n text: 'Dark-Text',\n shadow: shadows.default,\n borderColor: colors['Primary-Button-Default'],\n },\n hovered: {\n background: 'transparent',\n text: 'Dark-Text',\n shadow: shadows.hover,\n borderColor: colors['Primary-Button-Hover'],\n },\n pressed: {\n background: 'transparent',\n text: 'Dark-Text',\n shadow: shadows.press,\n borderColor: colors['Primary-Button-Press'],\n },\n inactive: {\n background: 'transparent',\n text: 'Inactive-Text',\n borderColor: colors['Primary-Button-Inactive'],\n },\n },\n alert: {\n default: {\n background: colors['Alert-Button-Default'],\n text: 'White-Text',\n shadow: shadows.default,\n },\n hovered: {\n background: colors['Alert-Button-Hover'],\n text: 'White-Text',\n shadow: shadows.hover,\n },\n pressed: {\n background: colors['Alert-Button-Press'],\n text: 'White-Text',\n shadow: shadows.press,\n },\n inactive: {\n background: colors['Alert-Button-Inactive'],\n text: 'Inactive-Text',\n },\n },\n text: {\n default: {\n background: 'transparent',\n text: 'Primary-Button-Default',\n },\n hovered: {\n background: 'transparent',\n text: 'Primary-Button-Hover',\n },\n pressed: {\n background: 'transparent',\n text: 'Primary-Button-Press',\n },\n inactive: {\n background: 'transparent',\n text: 'Inactive-Text',\n },\n },\n 'text-dark': {\n default: {\n background: 'transparent',\n text: 'Dark-Text',\n },\n hovered: {\n background: 'transparent',\n text: 'Gray-Text',\n },\n pressed: {\n background: 'transparent',\n text: 'Dark-Text',\n },\n inactive: {\n background: 'transparent',\n text: 'Grey-Light',\n },\n },\n ghost: {\n default: {\n background: 'transparent',\n text: 'Gray-Text',\n },\n hovered: {\n background: 'transparent',\n text: 'Dark-Text',\n },\n pressed: {\n background: 'transparent',\n text: 'Gray-Text',\n },\n inactive: {\n background: 'transparent',\n text: 'Grey-Light',\n },\n },\n select: {\n default: {\n background: colors['Secondary-Button-Default'],\n text: 'Dark-Text',\n borderColor: colors['Dark-Text'],\n shadow: shadows.default,\n textStyle: { flex: 1 },\n },\n hovered: {\n background: colors['Secondary-Button-Hover'],\n text: 'Gray-Text',\n borderColor: colors['Secondary-Button-Hover-Border'],\n textStyle: { flex: 1 },\n },\n pressed: {\n background: colors['Secondary-Button-Press'],\n text: 'Dark-Text',\n borderColor: colors['Dark-Text'],\n textStyle: { flex: 1 },\n },\n inactive: {\n background: colors['Secondary-Button-Inactive'],\n text: 'Inactive-Text',\n borderColor: colors['Grey-Light'],\n textStyle: { flex: 1 },\n },\n },\n 'list-button': {\n default: {\n background: colors['Secondary-Button-Default'],\n text: 'Dark-Text',\n borderColor: colors['Dark-Text'],\n shadow: shadows.default,\n textStyle: { flex: 1 },\n },\n hovered: {\n background: colors['Secondary-Button-Hover'],\n text: 'Gray-Text',\n borderColor: colors['Secondary-Button-Hover-Border'],\n textStyle: { flex: 1 },\n },\n pressed: {\n background: colors['Secondary-Button-Press'],\n text: 'Dark-Text',\n borderColor: colors['Dark-Text'],\n textStyle: { flex: 1 },\n },\n inactive: {\n background: colors['Secondary-Button-Inactive'],\n text: 'Inactive-Text',\n borderColor: colors['Grey-Light'],\n textStyle: { flex: 1 },\n },\n },\n 'pro-header-button': {\n default: {\n background: hexToRgbA(colors['Pro-Drawer-Item-Active'], 0.1),\n text: 'White',\n },\n hovered: {\n background: hexToRgbA(colors['Pro-Drawer-Item-Active'], 0.2),\n text: 'Grey-Light',\n shadow: shadows.hover,\n },\n pressed: {\n background: hexToRgbA(colors['Pro-Drawer-Item-Active'], 0.2),\n text: 'White',\n shadow: shadows.press,\n },\n inactive: {\n background: hexToRgbA(colors['Pro-Drawer-Item-Active'], 0.08),\n text: 'Grey-Light',\n },\n },\n};\n\nexport const MAX_BUTTON_WIDTH = 335;\n\nconst Button: React.FC = forwardRef((props, ref) => {\n const isDisabledByParent = useIsDisabledByParent(props.isDisabled);\n const { styles, onPressIn, onPressOut, renderInHoverContainer } = useInteractionStateStyles({\n isDisabled: props.isDisabled,\n stateStyles: variantStateStyles[props.variant || 'primary'],\n });\n const iconSize: IconSize = props.variant === 'ghost' ? 'ghost-button-icon' : 'button-icon';\n const leftIcon = props.leftIcon ? : null;\n const icon = props.icon ? : null;\n\n const getContent = () => {\n if ('title' in props) {\n const left = props.leftContent || leftIcon || null;\n const center = (\n \n {props.title}\n \n );\n const right = icon ? (\n \n {icon}\n \n ) : props.variant === 'select' ? (\n \n ) : null;\n\n return (\n \n {props.renderButtonContent ? (\n props.renderButtonContent({ left, center, right })\n ) : (\n <>\n {left}\n {center}\n {right}\n \n )}\n \n );\n } else {\n return (\n \n {props.socialLogin === 'apple' ? (\n \n ) : (\n \n )}\n {props.displayText ? (\n \n {props.socialLogin === 'apple' ? intl('apple') : intl('google')}\n \n ) : null}\n \n );\n }\n };\n\n return (\n \n {renderInHoverContainer(\n {\n if (!isDisabledByParent) {\n props.onPress(e);\n }\n }}\n onPressIn={onPressIn}\n onPressOut={onPressOut}\n testID={props.testID}\n onLayout={props.onLayout}\n disabled={isDisabledByParent}\n collapsable={false}\n >\n {getContent()}\n ,\n )}\n \n );\n});\n\nexport default React.memo(Button);\n","/**\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\n'use client';\n\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"children\", \"delayLongPress\", \"delayPressIn\", \"delayPressOut\", \"disabled\", \"onBlur\", \"onContextMenu\", \"onFocus\", \"onHoverIn\", \"onHoverOut\", \"onKeyDown\", \"onLongPress\", \"onPress\", \"onPressMove\", \"onPressIn\", \"onPressOut\", \"style\", \"tabIndex\", \"testOnly_hovered\", \"testOnly_pressed\"];\nimport * as React from 'react';\nimport { forwardRef, memo, useMemo, useState, useRef } from 'react';\nimport useMergeRefs from '../../modules/useMergeRefs';\nimport useHover from '../../modules/useHover';\nimport usePressEvents from '../../modules/usePressEvents';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\n/**\n * Component used to build display components that should respond to whether the\n * component is currently pressed or not.\n */\nfunction Pressable(props, forwardedRef) {\n var children = props.children,\n delayLongPress = props.delayLongPress,\n delayPressIn = props.delayPressIn,\n delayPressOut = props.delayPressOut,\n disabled = props.disabled,\n onBlur = props.onBlur,\n onContextMenu = props.onContextMenu,\n onFocus = props.onFocus,\n onHoverIn = props.onHoverIn,\n onHoverOut = props.onHoverOut,\n onKeyDown = props.onKeyDown,\n onLongPress = props.onLongPress,\n onPress = props.onPress,\n onPressMove = props.onPressMove,\n onPressIn = props.onPressIn,\n onPressOut = props.onPressOut,\n style = props.style,\n tabIndex = props.tabIndex,\n testOnly_hovered = props.testOnly_hovered,\n testOnly_pressed = props.testOnly_pressed,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n var _useForceableState = useForceableState(testOnly_hovered === true),\n hovered = _useForceableState[0],\n setHovered = _useForceableState[1];\n var _useForceableState2 = useForceableState(false),\n focused = _useForceableState2[0],\n setFocused = _useForceableState2[1];\n var _useForceableState3 = useForceableState(testOnly_pressed === true),\n pressed = _useForceableState3[0],\n setPressed = _useForceableState3[1];\n var hostRef = useRef(null);\n var setRef = useMergeRefs(forwardedRef, hostRef);\n var pressConfig = useMemo(() => ({\n delayLongPress,\n delayPressStart: delayPressIn,\n delayPressEnd: delayPressOut,\n disabled,\n onLongPress,\n onPress,\n onPressChange: setPressed,\n onPressStart: onPressIn,\n onPressMove,\n onPressEnd: onPressOut\n }), [delayLongPress, delayPressIn, delayPressOut, disabled, onLongPress, onPress, onPressIn, onPressMove, onPressOut, setPressed]);\n var pressEventHandlers = usePressEvents(hostRef, pressConfig);\n var onContextMenuPress = pressEventHandlers.onContextMenu,\n onKeyDownPress = pressEventHandlers.onKeyDown;\n useHover(hostRef, {\n contain: true,\n disabled,\n onHoverChange: setHovered,\n onHoverStart: onHoverIn,\n onHoverEnd: onHoverOut\n });\n var interactionState = {\n hovered,\n focused,\n pressed\n };\n var blurHandler = React.useCallback(e => {\n if (e.nativeEvent.target === hostRef.current) {\n setFocused(false);\n if (onBlur != null) {\n onBlur(e);\n }\n }\n }, [hostRef, setFocused, onBlur]);\n var focusHandler = React.useCallback(e => {\n if (e.nativeEvent.target === hostRef.current) {\n setFocused(true);\n if (onFocus != null) {\n onFocus(e);\n }\n }\n }, [hostRef, setFocused, onFocus]);\n var contextMenuHandler = React.useCallback(e => {\n if (onContextMenuPress != null) {\n onContextMenuPress(e);\n }\n if (onContextMenu != null) {\n onContextMenu(e);\n }\n }, [onContextMenu, onContextMenuPress]);\n var keyDownHandler = React.useCallback(e => {\n if (onKeyDownPress != null) {\n onKeyDownPress(e);\n }\n if (onKeyDown != null) {\n onKeyDown(e);\n }\n }, [onKeyDown, onKeyDownPress]);\n var _tabIndex;\n if (tabIndex !== undefined) {\n _tabIndex = tabIndex;\n } else {\n _tabIndex = disabled ? -1 : 0;\n }\n return /*#__PURE__*/React.createElement(View, _extends({}, rest, pressEventHandlers, {\n \"aria-disabled\": disabled,\n onBlur: blurHandler,\n onContextMenu: contextMenuHandler,\n onFocus: focusHandler,\n onKeyDown: keyDownHandler,\n ref: setRef,\n style: [disabled ? styles.disabled : styles.active, typeof style === 'function' ? style(interactionState) : style],\n tabIndex: _tabIndex\n }), typeof children === 'function' ? children(interactionState) : children);\n}\nfunction useForceableState(forced) {\n var _useState = useState(false),\n bool = _useState[0],\n setBool = _useState[1];\n return [bool || forced, setBool];\n}\nvar styles = StyleSheet.create({\n active: {\n cursor: 'pointer',\n touchAction: 'manipulation'\n },\n disabled: {\n pointerEvents: 'box-none'\n }\n});\nvar MemoedPressable = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(Pressable));\nMemoedPressable.displayName = 'Pressable';\nexport default MemoedPressable;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nimport { getModality } from '../modality';\nimport useEvent from '../useEvent';\nimport useLayoutEffect from '../useLayoutEffect';\n\n/**\n * Types\n */\n\n/**\n * Implementation\n */\n\nvar emptyObject = {};\nvar opts = {\n passive: true\n};\nvar lockEventType = 'react-gui:hover:lock';\nvar unlockEventType = 'react-gui:hover:unlock';\nvar supportsPointerEvent = () => !!(typeof window !== 'undefined' && window.PointerEvent != null);\nfunction dispatchCustomEvent(target, type, payload) {\n var event = document.createEvent('CustomEvent');\n var _ref = payload || emptyObject,\n _ref$bubbles = _ref.bubbles,\n bubbles = _ref$bubbles === void 0 ? true : _ref$bubbles,\n _ref$cancelable = _ref.cancelable,\n cancelable = _ref$cancelable === void 0 ? true : _ref$cancelable,\n detail = _ref.detail;\n event.initCustomEvent(type, bubbles, cancelable, detail);\n target.dispatchEvent(event);\n}\n\n// This accounts for the non-PointerEvent fallback events.\nfunction getPointerType(event) {\n var pointerType = event.pointerType;\n return pointerType != null ? pointerType : getModality();\n}\nexport default function useHover(targetRef, config) {\n var contain = config.contain,\n disabled = config.disabled,\n onHoverStart = config.onHoverStart,\n onHoverChange = config.onHoverChange,\n onHoverUpdate = config.onHoverUpdate,\n onHoverEnd = config.onHoverEnd;\n var canUsePE = supportsPointerEvent();\n var addMoveListener = useEvent(canUsePE ? 'pointermove' : 'mousemove', opts);\n var addEnterListener = useEvent(canUsePE ? 'pointerenter' : 'mouseenter', opts);\n var addLeaveListener = useEvent(canUsePE ? 'pointerleave' : 'mouseleave', opts);\n // These custom events are used to implement the \"contain\" prop.\n var addLockListener = useEvent(lockEventType, opts);\n var addUnlockListener = useEvent(unlockEventType, opts);\n useLayoutEffect(() => {\n var target = targetRef.current;\n if (target !== null) {\n /**\n * End the hover gesture\n */\n var hoverEnd = function hoverEnd(e) {\n if (onHoverEnd != null) {\n onHoverEnd(e);\n }\n if (onHoverChange != null) {\n onHoverChange(false);\n }\n // Remove the listeners once finished.\n addMoveListener(target, null);\n addLeaveListener(target, null);\n };\n\n /**\n * Leave element\n */\n var leaveListener = function leaveListener(e) {\n var target = targetRef.current;\n if (target != null && getPointerType(e) !== 'touch') {\n if (contain) {\n dispatchCustomEvent(target, unlockEventType);\n }\n hoverEnd(e);\n }\n };\n\n /**\n * Move within element\n */\n var moveListener = function moveListener(e) {\n if (getPointerType(e) !== 'touch') {\n if (onHoverUpdate != null) {\n // Not all browsers have these properties\n if (e.x == null) {\n e.x = e.clientX;\n }\n if (e.y == null) {\n e.y = e.clientY;\n }\n onHoverUpdate(e);\n }\n }\n };\n\n /**\n * Start the hover gesture\n */\n var hoverStart = function hoverStart(e) {\n if (onHoverStart != null) {\n onHoverStart(e);\n }\n if (onHoverChange != null) {\n onHoverChange(true);\n }\n // Set the listeners needed for the rest of the hover gesture.\n if (onHoverUpdate != null) {\n addMoveListener(target, !disabled ? moveListener : null);\n }\n addLeaveListener(target, !disabled ? leaveListener : null);\n };\n\n /**\n * Enter element\n */\n var enterListener = function enterListener(e) {\n var target = targetRef.current;\n if (target != null && getPointerType(e) !== 'touch') {\n if (contain) {\n dispatchCustomEvent(target, lockEventType);\n }\n hoverStart(e);\n var lockListener = function lockListener(lockEvent) {\n if (lockEvent.target !== target) {\n hoverEnd(e);\n }\n };\n var unlockListener = function unlockListener(lockEvent) {\n if (lockEvent.target !== target) {\n hoverStart(e);\n }\n };\n addLockListener(target, !disabled ? lockListener : null);\n addUnlockListener(target, !disabled ? unlockListener : null);\n }\n };\n addEnterListener(target, !disabled ? enterListener : null);\n }\n }, [addEnterListener, addMoveListener, addLeaveListener, addLockListener, addUnlockListener, contain, disabled, onHoverStart, onHoverChange, onHoverUpdate, onHoverEnd, targetRef]);\n}","/**\n * Copyright (c) Nicolas Gallagher.\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 */\n\nimport { addEventListener } from '../addEventListener';\nimport canUseDOM from '../canUseDom';\nvar supportsPointerEvent = () => !!(typeof window !== 'undefined' && window.PointerEvent != null);\nvar activeModality = 'keyboard';\nvar modality = 'keyboard';\nvar previousModality;\nvar previousActiveModality;\nvar isEmulatingMouseEvents = false;\nvar listeners = new Set();\nvar KEYBOARD = 'keyboard';\nvar MOUSE = 'mouse';\nvar TOUCH = 'touch';\nvar BLUR = 'blur';\nvar CONTEXTMENU = 'contextmenu';\nvar FOCUS = 'focus';\nvar KEYDOWN = 'keydown';\nvar MOUSEDOWN = 'mousedown';\nvar MOUSEMOVE = 'mousemove';\nvar MOUSEUP = 'mouseup';\nvar POINTERDOWN = 'pointerdown';\nvar POINTERMOVE = 'pointermove';\nvar SCROLL = 'scroll';\nvar SELECTIONCHANGE = 'selectionchange';\nvar TOUCHCANCEL = 'touchcancel';\nvar TOUCHMOVE = 'touchmove';\nvar TOUCHSTART = 'touchstart';\nvar VISIBILITYCHANGE = 'visibilitychange';\nvar bubbleOptions = {\n passive: true\n};\nvar captureOptions = {\n capture: true,\n passive: true\n};\nfunction restoreModality() {\n if (previousModality != null || previousActiveModality != null) {\n if (previousModality != null) {\n modality = previousModality;\n previousModality = null;\n }\n if (previousActiveModality != null) {\n activeModality = previousActiveModality;\n previousActiveModality = null;\n }\n callListeners();\n }\n}\nfunction onBlurWindow() {\n previousModality = modality;\n previousActiveModality = activeModality;\n activeModality = KEYBOARD;\n modality = KEYBOARD;\n callListeners();\n // for fallback events\n isEmulatingMouseEvents = false;\n}\nfunction onFocusWindow() {\n restoreModality();\n}\nfunction onKeyDown(event) {\n if (event.metaKey || event.altKey || event.ctrlKey) {\n return;\n }\n if (modality !== KEYBOARD) {\n modality = KEYBOARD;\n activeModality = KEYBOARD;\n callListeners();\n }\n}\nfunction onVisibilityChange() {\n if (document.visibilityState !== 'hidden') {\n restoreModality();\n }\n}\nfunction onPointerish(event) {\n var eventType = event.type;\n if (supportsPointerEvent()) {\n if (eventType === POINTERDOWN) {\n if (activeModality !== event.pointerType) {\n modality = event.pointerType;\n activeModality = event.pointerType;\n callListeners();\n }\n return;\n }\n if (eventType === POINTERMOVE) {\n if (modality !== event.pointerType) {\n modality = event.pointerType;\n callListeners();\n }\n return;\n }\n }\n // Fallback for non-PointerEvent environment\n else {\n if (!isEmulatingMouseEvents) {\n if (eventType === MOUSEDOWN) {\n if (activeModality !== MOUSE) {\n modality = MOUSE;\n activeModality = MOUSE;\n callListeners();\n }\n }\n if (eventType === MOUSEMOVE) {\n if (modality !== MOUSE) {\n modality = MOUSE;\n callListeners();\n }\n }\n }\n\n // Flag when browser may produce emulated events\n if (eventType === TOUCHSTART) {\n isEmulatingMouseEvents = true;\n if (event.touches && event.touches.length > 1) {\n isEmulatingMouseEvents = false;\n }\n if (activeModality !== TOUCH) {\n modality = TOUCH;\n activeModality = TOUCH;\n callListeners();\n }\n return;\n }\n\n // Remove flag after emulated events are finished or cancelled, and if an\n // event occurs that cuts short a touch event sequence.\n if (eventType === CONTEXTMENU || eventType === MOUSEUP || eventType === SELECTIONCHANGE || eventType === SCROLL || eventType === TOUCHCANCEL || eventType === TOUCHMOVE) {\n isEmulatingMouseEvents = false;\n }\n }\n}\nif (canUseDOM) {\n // Window events\n addEventListener(window, BLUR, onBlurWindow, bubbleOptions);\n addEventListener(window, FOCUS, onFocusWindow, bubbleOptions);\n // Must be capture phase because 'stopPropagation' might prevent these\n // events bubbling to the document.\n addEventListener(document, KEYDOWN, onKeyDown, captureOptions);\n addEventListener(document, VISIBILITYCHANGE, onVisibilityChange, captureOptions);\n addEventListener(document, POINTERDOWN, onPointerish, captureOptions);\n addEventListener(document, POINTERMOVE, onPointerish, captureOptions);\n // Fallback events\n addEventListener(document, CONTEXTMENU, onPointerish, captureOptions);\n addEventListener(document, MOUSEDOWN, onPointerish, captureOptions);\n addEventListener(document, MOUSEMOVE, onPointerish, captureOptions);\n addEventListener(document, MOUSEUP, onPointerish, captureOptions);\n addEventListener(document, TOUCHCANCEL, onPointerish, captureOptions);\n addEventListener(document, TOUCHMOVE, onPointerish, captureOptions);\n addEventListener(document, TOUCHSTART, onPointerish, captureOptions);\n addEventListener(document, SELECTIONCHANGE, onPointerish, captureOptions);\n addEventListener(document, SCROLL, onPointerish, captureOptions);\n}\nfunction callListeners() {\n var value = {\n activeModality,\n modality\n };\n listeners.forEach(listener => {\n listener(value);\n });\n}\nexport function getActiveModality() {\n return activeModality;\n}\nexport function getModality() {\n return modality;\n}\nexport function addModalityListener(listener) {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n}\nexport function testOnly_resetActiveModality() {\n isEmulatingMouseEvents = false;\n activeModality = KEYBOARD;\n modality = KEYBOARD;\n}","/**\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\n'use strict';\n\nimport canUseDOM from '../canUseDom';\nvar emptyFunction = () => {};\nfunction supportsPassiveEvents() {\n var supported = false;\n // Check if browser supports event with passive listeners\n // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\n if (canUseDOM) {\n try {\n var options = {};\n Object.defineProperty(options, 'passive', {\n get() {\n supported = true;\n return false;\n }\n });\n window.addEventListener('test', null, options);\n window.removeEventListener('test', null, options);\n } catch (e) {}\n }\n return supported;\n}\nvar canUsePassiveEvents = supportsPassiveEvents();\nfunction getOptions(options) {\n if (options == null) {\n return false;\n }\n return canUsePassiveEvents ? options : Boolean(options.capture);\n}\n\n/**\n * Shim generic API compatibility with ReactDOM's synthetic events, without needing the\n * large amount of code ReactDOM uses to do this. Ideally we wouldn't use a synthetic\n * event wrapper at all.\n */\nfunction isPropagationStopped() {\n return this.cancelBubble;\n}\nfunction isDefaultPrevented() {\n return this.defaultPrevented;\n}\nfunction normalizeEvent(event) {\n event.nativeEvent = event;\n event.persist = emptyFunction;\n event.isDefaultPrevented = isDefaultPrevented;\n event.isPropagationStopped = isPropagationStopped;\n return event;\n}\n\n/**\n *\n */\nexport function addEventListener(target, type, listener, options) {\n var opts = getOptions(options);\n var compatListener = e => listener(normalizeEvent(e));\n target.addEventListener(type, compatListener, opts);\n return function removeEventListener() {\n if (target != null) {\n target.removeEventListener(type, compatListener, opts);\n }\n };\n}","/**\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nimport { addEventListener } from '../addEventListener';\nimport useLayoutEffect from '../useLayoutEffect';\nimport useStable from '../useStable';\n/**\n * This can be used with any event type include custom events.\n *\n * const click = useEvent('click', options);\n * useEffect(() => {\n * click.setListener(target, onClick);\n * return () => click.clear();\n * }).\n */\nexport default function useEvent(eventType, options) {\n var targetListeners = useStable(() => new Map());\n var addListener = useStable(() => {\n return (target, callback) => {\n var removeTargetListener = targetListeners.get(target);\n if (removeTargetListener != null) {\n removeTargetListener();\n }\n if (callback == null) {\n targetListeners.delete(target);\n callback = () => {};\n }\n var removeEventListener = addEventListener(target, eventType, callback, options);\n targetListeners.set(target, removeEventListener);\n return removeEventListener;\n };\n });\n useLayoutEffect(() => {\n return () => {\n targetListeners.forEach(removeListener => {\n removeListener();\n });\n targetListeners.clear();\n };\n }, [targetListeners]);\n return addListener;\n}","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport PressResponder from './PressResponder';\nimport { useDebugValue, useEffect, useRef } from 'react';\nexport default function usePressEvents(hostRef, config) {\n var pressResponderRef = useRef(null);\n if (pressResponderRef.current == null) {\n pressResponderRef.current = new PressResponder(config);\n }\n var pressResponder = pressResponderRef.current;\n\n // Re-configure to use the current node and configuration.\n useEffect(() => {\n pressResponder.configure(config);\n }, [config, pressResponder]);\n\n // Reset the `pressResponder` when cleanup needs to occur. This is\n // a separate effect because we do not want to rest the responder when `config` changes.\n useEffect(() => {\n return () => {\n pressResponder.reset();\n };\n }, [pressResponder]);\n useDebugValue(config);\n return pressResponder.getEventHandlers();\n}","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nvar DELAY = 'DELAY';\nvar ERROR = 'ERROR';\nvar LONG_PRESS_DETECTED = 'LONG_PRESS_DETECTED';\nvar NOT_RESPONDER = 'NOT_RESPONDER';\nvar RESPONDER_ACTIVE_LONG_PRESS_START = 'RESPONDER_ACTIVE_LONG_PRESS_START';\nvar RESPONDER_ACTIVE_PRESS_START = 'RESPONDER_ACTIVE_PRESS_START';\nvar RESPONDER_INACTIVE_PRESS_START = 'RESPONDER_INACTIVE_PRESS_START';\nvar RESPONDER_GRANT = 'RESPONDER_GRANT';\nvar RESPONDER_RELEASE = 'RESPONDER_RELEASE';\nvar RESPONDER_TERMINATED = 'RESPONDER_TERMINATED';\nvar Transitions = Object.freeze({\n NOT_RESPONDER: {\n DELAY: ERROR,\n RESPONDER_GRANT: RESPONDER_INACTIVE_PRESS_START,\n RESPONDER_RELEASE: ERROR,\n RESPONDER_TERMINATED: ERROR,\n LONG_PRESS_DETECTED: ERROR\n },\n RESPONDER_INACTIVE_PRESS_START: {\n DELAY: RESPONDER_ACTIVE_PRESS_START,\n RESPONDER_GRANT: ERROR,\n RESPONDER_RELEASE: NOT_RESPONDER,\n RESPONDER_TERMINATED: NOT_RESPONDER,\n LONG_PRESS_DETECTED: ERROR\n },\n RESPONDER_ACTIVE_PRESS_START: {\n DELAY: ERROR,\n RESPONDER_GRANT: ERROR,\n RESPONDER_RELEASE: NOT_RESPONDER,\n RESPONDER_TERMINATED: NOT_RESPONDER,\n LONG_PRESS_DETECTED: RESPONDER_ACTIVE_LONG_PRESS_START\n },\n RESPONDER_ACTIVE_LONG_PRESS_START: {\n DELAY: ERROR,\n RESPONDER_GRANT: ERROR,\n RESPONDER_RELEASE: NOT_RESPONDER,\n RESPONDER_TERMINATED: NOT_RESPONDER,\n LONG_PRESS_DETECTED: RESPONDER_ACTIVE_LONG_PRESS_START\n },\n ERROR: {\n DELAY: NOT_RESPONDER,\n RESPONDER_GRANT: RESPONDER_INACTIVE_PRESS_START,\n RESPONDER_RELEASE: NOT_RESPONDER,\n RESPONDER_TERMINATED: NOT_RESPONDER,\n LONG_PRESS_DETECTED: NOT_RESPONDER\n }\n});\nvar getElementRole = element => element.getAttribute('role');\nvar getElementType = element => element.tagName.toLowerCase();\nvar isActiveSignal = signal => signal === RESPONDER_ACTIVE_PRESS_START || signal === RESPONDER_ACTIVE_LONG_PRESS_START;\nvar isButtonRole = element => getElementRole(element) === 'button';\nvar isPressStartSignal = signal => signal === RESPONDER_INACTIVE_PRESS_START || signal === RESPONDER_ACTIVE_PRESS_START || signal === RESPONDER_ACTIVE_LONG_PRESS_START;\nvar isTerminalSignal = signal => signal === RESPONDER_TERMINATED || signal === RESPONDER_RELEASE;\nvar isValidKeyPress = event => {\n var key = event.key,\n target = event.target;\n var isSpacebar = key === ' ' || key === 'Spacebar';\n var isButtonish = getElementType(target) === 'button' || isButtonRole(target);\n return key === 'Enter' || isSpacebar && isButtonish;\n};\nvar DEFAULT_LONG_PRESS_DELAY_MS = 450; // 500 - 50\nvar DEFAULT_PRESS_DELAY_MS = 50;\n\n/**\n * =========================== PressResponder Tutorial ===========================\n *\n * The `PressResponder` class helps you create press interactions by analyzing the\n * geometry of elements and observing when another responder (e.g. ScrollView)\n * has stolen the touch lock. It offers hooks for your component to provide\n * interaction feedback to the user:\n *\n * - When a press has activated (e.g. highlight an element)\n * - When a press has deactivated (e.g. un-highlight an element)\n * - When a press sould trigger an action, meaning it activated and deactivated\n * while within the geometry of the element without the lock being stolen.\n *\n * A high quality interaction isn't as simple as you might think. There should\n * be a slight delay before activation. Moving your finger beyond an element's\n * bounds should trigger deactivation, but moving the same finger back within an\n * element's bounds should trigger reactivation.\n *\n * In order to use `PressResponder`, do the following:\n *\n * const pressResponder = new PressResponder(config);\n *\n * 2. Choose the rendered component who should collect the press events. On that\n * element, spread `pressability.getEventHandlers()` into its props.\n *\n * return (\n * \n * );\n *\n * 3. Reset `PressResponder` when your component unmounts.\n *\n * componentWillUnmount() {\n * this.state.pressResponder.reset();\n * }\n *\n * ==================== Implementation Details ====================\n *\n * `PressResponder` only assumes that there exists a `HitRect` node. The `PressRect`\n * is an abstract box that is extended beyond the `HitRect`.\n *\n * # Geometry\n *\n * ┌────────────────────────┐\n * │ ┌──────────────────┐ │ - Presses start anywhere within `HitRect`.\n * │ │ ┌────────────┐ │ │\n * │ │ │ VisualRect │ │ │\n * │ │ └────────────┘ │ │ - When pressed down for sufficient amount of time\n * │ │ HitRect │ │ before letting up, `VisualRect` activates.\n * │ └──────────────────┘ │\n * │ Out Region o │\n * └────────────────────│───┘\n * └────── When the press is released outside the `HitRect`,\n * the responder is NOT eligible for a \"press\".\n *\n * # State Machine\n *\n * ┌───────────────┐ ◀──── RESPONDER_RELEASE\n * │ NOT_RESPONDER │\n * └───┬───────────┘ ◀──── RESPONDER_TERMINATED\n * │\n * │ RESPONDER_GRANT (HitRect)\n * │\n * ▼\n * ┌─────────────────────┐ ┌───────────────────┐ ┌───────────────────┐\n * │ RESPONDER_INACTIVE_ │ DELAY │ RESPONDER_ACTIVE_ │ T + DELAY │ RESPONDER_ACTIVE_ │\n * │ PRESS_START ├────────▶ │ PRESS_START ├────────────▶ │ LONG_PRESS_START │\n * └─────────────────────┘ └───────────────────┘ └───────────────────┘\n *\n * T + DELAY => LONG_PRESS_DELAY + DELAY\n *\n * Not drawn are the side effects of each transition. The most important side\n * effect is the invocation of `onLongPress`. Only when the browser produces a\n * `click` event is `onPress` invoked.\n */\nexport default class PressResponder {\n constructor(config) {\n this._eventHandlers = null;\n this._isPointerTouch = false;\n this._longPressDelayTimeout = null;\n this._longPressDispatched = false;\n this._pressDelayTimeout = null;\n this._pressOutDelayTimeout = null;\n this._touchState = NOT_RESPONDER;\n this._responderElement = null;\n this.configure(config);\n }\n configure(config) {\n this._config = config;\n }\n\n /**\n * Resets any pending timers. This should be called on unmount.\n */\n reset() {\n this._cancelLongPressDelayTimeout();\n this._cancelPressDelayTimeout();\n this._cancelPressOutDelayTimeout();\n }\n\n /**\n * Returns a set of props to spread into the interactive element.\n */\n getEventHandlers() {\n if (this._eventHandlers == null) {\n this._eventHandlers = this._createEventHandlers();\n }\n return this._eventHandlers;\n }\n _createEventHandlers() {\n var start = (event, shouldDelay) => {\n event.persist();\n this._cancelPressOutDelayTimeout();\n this._longPressDispatched = false;\n this._selectionTerminated = false;\n this._touchState = NOT_RESPONDER;\n this._isPointerTouch = event.nativeEvent.type === 'touchstart';\n this._receiveSignal(RESPONDER_GRANT, event);\n var delayPressStart = normalizeDelay(this._config.delayPressStart, 0, DEFAULT_PRESS_DELAY_MS);\n if (shouldDelay !== false && delayPressStart > 0) {\n this._pressDelayTimeout = setTimeout(() => {\n this._receiveSignal(DELAY, event);\n }, delayPressStart);\n } else {\n this._receiveSignal(DELAY, event);\n }\n var delayLongPress = normalizeDelay(this._config.delayLongPress, 10, DEFAULT_LONG_PRESS_DELAY_MS);\n this._longPressDelayTimeout = setTimeout(() => {\n this._handleLongPress(event);\n }, delayLongPress + delayPressStart);\n };\n var end = event => {\n this._receiveSignal(RESPONDER_RELEASE, event);\n };\n var keyupHandler = event => {\n var onPress = this._config.onPress;\n var target = event.target;\n if (this._touchState !== NOT_RESPONDER && isValidKeyPress(event)) {\n end(event);\n document.removeEventListener('keyup', keyupHandler);\n var role = target.getAttribute('role');\n var elementType = getElementType(target);\n var isNativeInteractiveElement = role === 'link' || elementType === 'a' || elementType === 'button' || elementType === 'input' || elementType === 'select' || elementType === 'textarea';\n var isActiveElement = this._responderElement === target;\n if (onPress != null && !isNativeInteractiveElement && isActiveElement) {\n onPress(event);\n }\n this._responderElement = null;\n }\n };\n return {\n onStartShouldSetResponder: event => {\n var disabled = this._config.disabled;\n if (disabled && isButtonRole(event.currentTarget)) {\n event.stopPropagation();\n }\n if (disabled == null) {\n return true;\n }\n return !disabled;\n },\n onKeyDown: event => {\n var disabled = this._config.disabled;\n var key = event.key,\n target = event.target;\n if (!disabled && isValidKeyPress(event)) {\n if (this._touchState === NOT_RESPONDER) {\n start(event, false);\n this._responderElement = target;\n // Listen to 'keyup' on document to account for situations where\n // focus is moved to another element during 'keydown'.\n document.addEventListener('keyup', keyupHandler);\n }\n var isSpacebarKey = key === ' ' || key === 'Spacebar';\n var role = getElementRole(target);\n var isButtonLikeRole = role === 'button' || role === 'menuitem';\n if (isSpacebarKey && isButtonLikeRole && getElementType(target) !== 'button') {\n // Prevent spacebar scrolling the window if using non-native button\n event.preventDefault();\n }\n event.stopPropagation();\n }\n },\n onResponderGrant: event => start(event),\n onResponderMove: event => {\n if (this._config.onPressMove != null) {\n this._config.onPressMove(event);\n }\n var touch = getTouchFromResponderEvent(event);\n if (this._touchActivatePosition != null) {\n var deltaX = this._touchActivatePosition.pageX - touch.pageX;\n var deltaY = this._touchActivatePosition.pageY - touch.pageY;\n if (Math.hypot(deltaX, deltaY) > 10) {\n this._cancelLongPressDelayTimeout();\n }\n }\n },\n onResponderRelease: event => end(event),\n onResponderTerminate: event => {\n if (event.nativeEvent.type === 'selectionchange') {\n this._selectionTerminated = true;\n }\n this._receiveSignal(RESPONDER_TERMINATED, event);\n },\n onResponderTerminationRequest: event => {\n var _this$_config = this._config,\n cancelable = _this$_config.cancelable,\n disabled = _this$_config.disabled,\n onLongPress = _this$_config.onLongPress;\n // If `onLongPress` is provided, don't terminate on `contextmenu` as default\n // behavior will be prevented for non-mouse pointers.\n if (!disabled && onLongPress != null && this._isPointerTouch && event.nativeEvent.type === 'contextmenu') {\n return false;\n }\n if (cancelable == null) {\n return true;\n }\n return cancelable;\n },\n // NOTE: this diverges from react-native in 3 significant ways:\n // * The `onPress` callback is not connected to the responder system (the native\n // `click` event must be used but is dispatched in many scenarios where no pointers\n // are on the screen.) Therefore, it's possible for `onPress` to be called without\n // `onPress{Start,End}` being called first.\n // * The `onPress` callback is only be called on the first ancestor of the native\n // `click` target that is using the PressResponder.\n // * The event's `nativeEvent` is a `MouseEvent` not a `TouchEvent`.\n onClick: event => {\n var _this$_config2 = this._config,\n disabled = _this$_config2.disabled,\n onPress = _this$_config2.onPress;\n if (!disabled) {\n // If long press dispatched, cancel default click behavior.\n // If the responder terminated because text was selected during the gesture,\n // cancel the default click behavior.\n event.stopPropagation();\n if (this._longPressDispatched || this._selectionTerminated) {\n event.preventDefault();\n } else if (onPress != null && event.altKey === false) {\n onPress(event);\n }\n } else {\n if (isButtonRole(event.currentTarget)) {\n event.stopPropagation();\n }\n }\n },\n // If `onLongPress` is provided and a touch pointer is being used, prevent the\n // default context menu from opening.\n onContextMenu: event => {\n var _this$_config3 = this._config,\n disabled = _this$_config3.disabled,\n onLongPress = _this$_config3.onLongPress;\n if (!disabled) {\n if (onLongPress != null && this._isPointerTouch && !event.defaultPrevented) {\n event.preventDefault();\n event.stopPropagation();\n }\n } else {\n if (isButtonRole(event.currentTarget)) {\n event.stopPropagation();\n }\n }\n }\n };\n }\n\n /**\n * Receives a state machine signal, performs side effects of the transition\n * and stores the new state. Validates the transition as well.\n */\n _receiveSignal(signal, event) {\n var prevState = this._touchState;\n var nextState = null;\n if (Transitions[prevState] != null) {\n nextState = Transitions[prevState][signal];\n }\n if (this._touchState === NOT_RESPONDER && signal === RESPONDER_RELEASE) {\n return;\n }\n if (nextState == null || nextState === ERROR) {\n console.error(\"PressResponder: Invalid signal \" + signal + \" for state \" + prevState + \" on responder\");\n } else if (prevState !== nextState) {\n this._performTransitionSideEffects(prevState, nextState, signal, event);\n this._touchState = nextState;\n }\n }\n\n /**\n * Performs a transition between touchable states and identify any activations\n * or deactivations (and callback invocations).\n */\n _performTransitionSideEffects(prevState, nextState, signal, event) {\n if (isTerminalSignal(signal)) {\n // Pressable suppression of contextmenu on windows.\n // On Windows, the contextmenu is displayed after pointerup.\n // https://github.com/necolas/react-native-web/issues/2296\n setTimeout(() => {\n this._isPointerTouch = false;\n }, 0);\n this._touchActivatePosition = null;\n this._cancelLongPressDelayTimeout();\n }\n if (isPressStartSignal(prevState) && signal === LONG_PRESS_DETECTED) {\n var onLongPress = this._config.onLongPress;\n // Long press is not supported for keyboards because 'click' can be dispatched\n // immediately (and multiple times) after 'keydown'.\n if (onLongPress != null && event.nativeEvent.key == null) {\n onLongPress(event);\n this._longPressDispatched = true;\n }\n }\n var isPrevActive = isActiveSignal(prevState);\n var isNextActive = isActiveSignal(nextState);\n if (!isPrevActive && isNextActive) {\n this._activate(event);\n } else if (isPrevActive && !isNextActive) {\n this._deactivate(event);\n }\n if (isPressStartSignal(prevState) && signal === RESPONDER_RELEASE) {\n var _this$_config4 = this._config,\n _onLongPress = _this$_config4.onLongPress,\n onPress = _this$_config4.onPress;\n if (onPress != null) {\n var isPressCanceledByLongPress = _onLongPress != null && prevState === RESPONDER_ACTIVE_LONG_PRESS_START;\n if (!isPressCanceledByLongPress) {\n // If we never activated (due to delays), activate and deactivate now.\n if (!isNextActive && !isPrevActive) {\n this._activate(event);\n this._deactivate(event);\n }\n }\n }\n }\n this._cancelPressDelayTimeout();\n }\n _activate(event) {\n var _this$_config5 = this._config,\n onPressChange = _this$_config5.onPressChange,\n onPressStart = _this$_config5.onPressStart;\n var touch = getTouchFromResponderEvent(event);\n this._touchActivatePosition = {\n pageX: touch.pageX,\n pageY: touch.pageY\n };\n if (onPressStart != null) {\n onPressStart(event);\n }\n if (onPressChange != null) {\n onPressChange(true);\n }\n }\n _deactivate(event) {\n var _this$_config6 = this._config,\n onPressChange = _this$_config6.onPressChange,\n onPressEnd = _this$_config6.onPressEnd;\n function end() {\n if (onPressEnd != null) {\n onPressEnd(event);\n }\n if (onPressChange != null) {\n onPressChange(false);\n }\n }\n var delayPressEnd = normalizeDelay(this._config.delayPressEnd);\n if (delayPressEnd > 0) {\n this._pressOutDelayTimeout = setTimeout(() => {\n end();\n }, delayPressEnd);\n } else {\n end();\n }\n }\n _handleLongPress(event) {\n if (this._touchState === RESPONDER_ACTIVE_PRESS_START || this._touchState === RESPONDER_ACTIVE_LONG_PRESS_START) {\n this._receiveSignal(LONG_PRESS_DETECTED, event);\n }\n }\n _cancelLongPressDelayTimeout() {\n if (this._longPressDelayTimeout != null) {\n clearTimeout(this._longPressDelayTimeout);\n this._longPressDelayTimeout = null;\n }\n }\n _cancelPressDelayTimeout() {\n if (this._pressDelayTimeout != null) {\n clearTimeout(this._pressDelayTimeout);\n this._pressDelayTimeout = null;\n }\n }\n _cancelPressOutDelayTimeout() {\n if (this._pressOutDelayTimeout != null) {\n clearTimeout(this._pressOutDelayTimeout);\n this._pressOutDelayTimeout = null;\n }\n }\n}\nfunction normalizeDelay(delay, min, fallback) {\n if (min === void 0) {\n min = 0;\n }\n if (fallback === void 0) {\n fallback = 0;\n }\n return Math.max(min, delay !== null && delay !== void 0 ? delay : fallback);\n}\nfunction getTouchFromResponderEvent(event) {\n var _event$nativeEvent = event.nativeEvent,\n changedTouches = _event$nativeEvent.changedTouches,\n touches = _event$nativeEvent.touches;\n if (touches != null && touches.length > 0) {\n return touches[0];\n }\n if (changedTouches != null && changedTouches.length > 0) {\n return changedTouches[0];\n }\n return event.nativeEvent;\n}","import React from 'react';\nimport * as Icons from '@lifeomic/chromicons-native';\nimport * as CustomIcons from '../CustomIcons';\nimport { Color, colors } from '../../../utils/theme';\nimport { View } from 'react-native';\n\nexport type IconName = keyof typeof Icons | keyof typeof CustomIcons;\n\nexport type IconSize =\n | 'button-icon'\n | 'checkbox-icon'\n | 'tab-icon'\n | 'drawer-icon'\n | 'minimal-button-icon'\n | 'alert-icon'\n | 'large-record-button'\n | 'drawer-button-icon'\n | 'file-picker-icon'\n | 'chat-button-icon'\n | 'avatar-icon'\n | 'card-list-icon'\n | 'folder-picker-icon'\n | 'homepage-icon'\n | 'large-alert-paper-icon'\n | 'card-button-icon'\n | 'header-back-button'\n | 'sort-toggle-not-selected'\n | 'sort-toggle-selected'\n | 'table-action-icon'\n | 'selected-file-icon'\n | 'side-tab-icon'\n | 'ai-search-icon'\n | 'profile-search-result-icon'\n | 'profile-search-prompt-icon'\n | 'dashboard-list-icon'\n | 'ghost-button-icon';\nexport type IconColorVariant = 'Dark-Text' | 'Gray-Text' | 'Light-Text' | 'Primary' | 'White' | 'Success' | 'Alert';\n\nexport type IconProps = {\n name: IconName;\n size: IconSize;\n strokeWidth?: number;\n testID?: string;\n} & (\n | {\n colorVariant?: IconColorVariant;\n }\n | { color: Color }\n);\n\ntype SizeMapItem = {\n size: number;\n strokeWidth?: number;\n};\n\nconst sizeMap: Record = {\n 'button-icon': { size: 24 },\n 'ghost-button-icon': { size: 18 },\n 'checkbox-icon': { size: 12, strokeWidth: 2 },\n 'sort-toggle-not-selected': { size: 14 },\n 'sort-toggle-selected': { size: 14, strokeWidth: 3 },\n 'table-action-icon': { size: 14, strokeWidth: 2 },\n 'tab-icon': { size: 30, strokeWidth: 1 },\n 'drawer-icon': { size: 24 },\n 'minimal-button-icon': { size: 15, strokeWidth: 2 },\n 'large-record-button': { size: 40 },\n 'alert-icon': { size: 60 },\n 'avatar-icon': { size: 30 },\n 'drawer-button-icon': { size: 18, strokeWidth: 2 },\n 'card-list-icon': { size: 18 },\n 'file-picker-icon': { size: 26 },\n 'chat-button-icon': { size: 20 },\n 'folder-picker-icon': { size: 36 },\n 'homepage-icon': { size: 24, strokeWidth: 2 },\n 'large-alert-paper-icon': { size: 28 },\n 'card-button-icon': { size: 48 },\n 'header-back-button': { size: 40, strokeWidth: 1.3 },\n 'selected-file-icon': { size: 32 },\n 'side-tab-icon': { size: 16, strokeWidth: 2 },\n 'ai-search-icon': { size: 22, strokeWidth: 2 },\n 'profile-search-result-icon': { size: 28, strokeWidth: 2 },\n 'profile-search-prompt-icon': { size: 24, strokeWidth: 2 },\n 'dashboard-list-icon': { size: 18, strokeWidth: 2 },\n};\n\nconst Icon: React.FC = (props) => {\n const IconComponent = props.name in Icons ? (Icons as any)[props.name] : (CustomIcons as any)[props.name];\n const size = sizeMap[props.size];\n const color = 'color' in props ? colors[props.color] : colors[props.colorVariant || 'Dark-Text'];\n return (\n \n \n \n );\n};\n\nexport default React.memo(Icon);\n\nexport type AlertIconVariant = 'success' | 'error' | 'warning' | 'info';\n\nexport type AlertIconProps = {\n variant: AlertIconVariant;\n name: IconName;\n size?: AlertIconSize;\n};\n\nexport type AlertIconSize = 'xs' | 'lg';\n\ntype AlertIconVariantColors = {\n background: Color;\n icon: Color;\n};\n\nconst alertIconColors: Record = {\n success: {\n background: 'Success',\n icon: 'White',\n },\n error: {\n background: 'Alert',\n icon: 'White',\n },\n warning: {\n background: 'Primary-Reg',\n icon: 'Dark-Text',\n },\n info: {\n background: 'White',\n icon: 'Primary',\n },\n};\n\ntype SizeMapEntry = {\n width: number;\n height: number;\n borderRadius: number;\n iconSize: IconSize;\n};\n\nconst alertIconSizeMap: Record = {\n xs: {\n width: 18,\n height: 18,\n borderRadius: 9,\n iconSize: 'checkbox-icon',\n },\n lg: {\n width: 70,\n height: 70,\n borderRadius: 35,\n iconSize: 'alert-icon',\n },\n};\n\nexport const AlertIcon: React.FC = (props) => {\n const variantColors = alertIconColors[props.variant];\n const sizes = alertIconSizeMap[props.size || 'lg'];\n\n return (\n \n \n \n );\n};\n","import { memo, createElement } from 'react';\nimport Svg, { Path, Rect, Circle } from 'react-native-svg';\n\nvar SvgAccessPolicy = function SvgAccessPolicy(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n width: 24,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12.246 22H18a2.006 2.006 0 002-2V8l-6-6H6a2.006 2.006 0 00-2 2v4.523\"\n }), createElement(Path, {\n d: \"M14 2v6h6m-4 5h-3.246M16 17h-2.815M10 9h-.96m-1.295 9.6l.6 4.4h-4.9l.6-4.4h0a3.593 3.593 0 01-1.6-2.9 3.4 3.4 0 016.8 0 3.17 3.17 0 01-1.5 2.9h0\"\n }));\n};\n\nvar MemoSvgAccessPolicy = /*#__PURE__*/memo(SvgAccessPolicy);\n\nvar SvgActivityFolder = function SvgActivityFolder(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M22 19a2 2 0 01-2 2H4a2 2 0 01-2-2V5a2 2 0 012-2h5l2 3h9a2 2 0 012 2z\"\n }), createElement(Path, {\n d: \"M15.698 13.5h-1.479l-1.11 3.328-2.218-6.656-1.11 3.328H8.302\"\n }));\n};\n\nvar MemoSvgActivityFolder = /*#__PURE__*/memo(SvgActivityFolder);\n\nvar SvgActivityMonitor = function SvgActivityMonitor(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Rect, {\n x: 2,\n y: 3,\n width: 20,\n height: 14,\n rx: 2\n }), createElement(Path, {\n d: \"M8 21h8m-4-4v4m3.698-11h-1.479l-1.11 3.328-2.218-6.656L9.781 10H8.302\"\n }));\n};\n\nvar MemoSvgActivityMonitor = /*#__PURE__*/memo(SvgActivityMonitor);\n\nvar SvgActivity = function SvgActivity(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 12.3h3.3l.8-2.4.8-2.4 1.8 6.75L11.5 21l1.95-9 1.95-9 1 4.65 1 4.65H21\"\n }));\n};\n\nvar MemoSvgActivity = /*#__PURE__*/memo(SvgActivity);\n\nvar SvgAirplay = function SvgAirplay(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M5.7 15.6h-.9A1.8 1.8 0 013 13.8v-9A1.8 1.8 0 014.8 3h14.4A1.8 1.8 0 0121 4.8v9a1.8 1.8 0 01-1.8 1.8h-.9m-6.3-1l5.5 6.4h-11z\"\n }));\n};\n\nvar MemoSvgAirplay = /*#__PURE__*/memo(SvgAirplay);\n\nvar SvgAlcohol = function SvgAlcohol(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M17.509 16.848a2.991 2.991 0 01-2.99-2.991v-2.7H20.5v2.7a2.991 2.991 0 01-2.991 2.991m0 4.152h-1.434M9.276 6.886V3H5.869v4.8a2.861 2.861 0 01-1 2.177A3.889 3.889 0 003.5 12.931v.716M17.509 16.848V21m1.435 0h-1.435M5.869 6.886h3.407m2.369 6.761H3.5m0 0V21h8.145v-7.353m0 0v-.716a3.889 3.889 0 00-1.365-2.958 2.861 2.861 0 01-1-2.177v-.91\"\n }));\n};\n\nvar MemoSvgAlcohol = /*#__PURE__*/memo(SvgAlcohol);\n\nvar SvgAlertCircle = function SvgAlertCircle(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 3a9 9 0 11-6.364 2.636A8.972 8.972 0 0112 3zm0 4.7v5.2m0 3.39v.01\"\n }));\n};\n\nvar MemoSvgAlertCircle = /*#__PURE__*/memo(SvgAlertCircle);\n\nvar SvgAlertOctagon = function SvgAlertOctagon(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M8.274 3h7.452L21 8.274v7.452L15.726 21H8.274L3 15.726V8.274zM12 7.65v5.2m0 3.39v.01\"\n }));\n};\n\nvar MemoSvgAlertOctagon = /*#__PURE__*/memo(SvgAlertOctagon);\n\nvar SvgAlertTriangle = function SvgAlertTriangle(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M10.206 4.625l-3.5 6.4-3.5 6.4a2.04 2.04 0 00.038 1.987 2 2 0 001.762 1.013h14a2.007 2.007 0 001.725-.975 2.075 2.075 0 00.075-2.025l-3.5-6.4-3.5-6.4a2.068 2.068 0 00-3.6 0zM12.006 8.825v5.2M12.006 16.99v-.065h0\"\n }));\n};\n\nvar MemoSvgAlertTriangle = /*#__PURE__*/memo(SvgAlertTriangle);\n\nvar SvgAlignCenter = function SvgAlignCenter(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 3h18M6.669 8.75h10.662M6.669 21h10.662M3 14.875h18\"\n }));\n};\n\nvar MemoSvgAlignCenter = /*#__PURE__*/memo(SvgAlignCenter);\n\nvar SvgAlignJustify = function SvgAlignJustify(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 3h18M3 8.75h18M3 21h18M3 14.875h18\"\n }));\n};\n\nvar MemoSvgAlignJustify = /*#__PURE__*/memo(SvgAlignJustify);\n\nvar SvgAlignLeft = function SvgAlignLeft(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 3h18M3 8.75h10.662M3 21h10.662M3 14.875h18\"\n }));\n};\n\nvar MemoSvgAlignLeft = /*#__PURE__*/memo(SvgAlignLeft);\n\nvar SvgAlignRight = function SvgAlignRight(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 3h18M10.338 8.75H21M10.338 21H21M3 14.875h18\"\n }));\n};\n\nvar MemoSvgAlignRight = /*#__PURE__*/memo(SvgAlignRight);\n\nvar SvgAmbulance = function SvgAmbulance(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M9.354 8.82v3.7m-1.988-1.9l3.976-.048m4.345-3.636a1.584 1.584 0 00-1.58-1.581H4.6a1.583 1.583 0 00-1.579 1.581v7.473A1.584 1.584 0 004.6 15.988h9.507a1.585 1.585 0 001.58-1.579zm0 2.9h1.35a3.983 3.983 0 012.816 1.167h0a3.978 3.978 0 011.166 2.815v2.165h-8.806m5.279.017a2.061 2.061 0 11-2.064 2.061A2.061 2.061 0 0117.492 16zM7.258 16h0A2.061 2.061 0 115.2 18.061 2.061 2.061 0 017.26 16zM12 3.947v1.408\"\n }));\n};\n\nvar MemoSvgAmbulance = /*#__PURE__*/memo(SvgAmbulance);\n\nvar SvgAnchor = function SvgAnchor(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M7.5 19.792A9.23 9.23 0 013 12m9-4.835V21a9.081 9.081 0 009-9m-9-9a2.083 2.083 0 102.083 2.083A2.083 2.083 0 0012 3zm-2.5 9h5\"\n }));\n};\n\nvar MemoSvgAnchor = /*#__PURE__*/memo(SvgAnchor);\n\nvar SvgAperture = function SvgAperture(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 12a9 9 0 11-9-9 9 9 0 019 9zm-13.983-.014L12 3.355M4.541 7.7l4.953 8.578m4.206.022H4.907m12.076-4.289l-4.9 8.482m7.376-4.193l-4.953-8.575M9.8 7.7h9.289\"\n }));\n};\n\nvar MemoSvgAperture = /*#__PURE__*/memo(SvgAperture);\n\nvar SvgApple = function SvgApple(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M19.237 15.653a6.887 6.887 0 01-2.055 3.847 5.331 5.331 0 01-3.6 1.5h-.208c-.069 0-.137-.007-.205-.013a13.067 13.067 0 00-2.34 0c-.068.006-.137.01-.205.013s-.138 0-.208 0a5.331 5.331 0 01-3.6-1.5A7.033 7.033 0 015.6 10.9a5.1 5.1 0 013.674-2.53 4.568 4.568 0 01.925-.033 4.766 4.766 0 01.892.142 3.681 3.681 0 001.818 0 4.766 4.766 0 01.892-.142 4.568 4.568 0 01.925.033A5.1 5.1 0 0118.4 10.9a6.945 6.945 0 01.837 4.753zM12.871 8.21a4.072 4.072 0 003.854-.966 3.454 3.454 0 001.074-2.7 3.519 3.519 0 00-1.061-.669 3.389 3.389 0 00-1.274-.247A3.471 3.471 0 0012 6.983m-.058 1.439A5.911 5.911 0 009.8 3\"\n }));\n};\n\nvar MemoSvgApple = /*#__PURE__*/memo(SvgApple);\n\nvar SvgArchive = function SvgArchive(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3.6 7.1l1.3-1.75L6.2 3.6a1.065 1.065 0 01.387-.45A1.143 1.143 0 017.2 3h9.7a1.292 1.292 0 01.575.138 1.093 1.093 0 01.425.362l1.3 1.75L20.5 7a.667.667 0 01.175.35 1.771 1.771 0 01.025.35V21H3.3V7.8a.928.928 0 01.075-.387A1.036 1.036 0 013.6 7.1zm6.4 5.6h4M3.3 7.6h17.4\"\n }));\n};\n\nvar MemoSvgArchive = /*#__PURE__*/memo(SvgArchive);\n\nvar SvgArrowDown2 = function SvgArrowDown2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M6.556 13.089L12 19m0 0V5m0 14l5.444-5.911\"\n }));\n};\n\nvar MemoSvgArrowDown2 = /*#__PURE__*/memo(SvgArrowDown2);\n\nvar SvgArrowDown3 = function SvgArrowDown3(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M7.333 12.933L12 18m0 0V6m0 12l4.667-5.067\"\n }));\n};\n\nvar MemoSvgArrowDown3 = /*#__PURE__*/memo(SvgArrowDown3);\n\nvar SvgArrowDownCircle = function SvgArrowDownCircle(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 8.142v7.716l1.75-1.9 1.75-1.9m-7 0l1.75 1.9 1.75 1.9M21 12a9 9 0 11-9-9 9 9 0 019 9z\"\n }));\n};\n\nvar MemoSvgArrowDownCircle = /*#__PURE__*/memo(SvgArrowDownCircle);\n\nvar SvgArrowDownLeft = function SvgArrowDownLeft(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M18.364 5.636L5.636 18.364m0-9.09v9.09h9.09\"\n }));\n};\n\nvar MemoSvgArrowDownLeft = /*#__PURE__*/memo(SvgArrowDownLeft);\n\nvar SvgArrowDownRight = function SvgArrowDownRight(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M18.364 18.364L5.636 5.636m3.638 12.728h9.09v-9.09\"\n }));\n};\n\nvar MemoSvgArrowDownRight = /*#__PURE__*/memo(SvgArrowDownRight);\n\nvar SvgArrowDown = function SvgArrowDown(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 3v18m-6.427-6.427L12 21l6.427-6.427\"\n }));\n};\n\nvar MemoSvgArrowDown = /*#__PURE__*/memo(SvgArrowDown);\n\nvar SvgArrowLeft2 = function SvgArrowLeft2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M10.911 6.556L5 12m0 0h14M5 12l5.911 5.444\"\n }));\n};\n\nvar MemoSvgArrowLeft2 = /*#__PURE__*/memo(SvgArrowLeft2);\n\nvar SvgArrowLeft3 = function SvgArrowLeft3(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M11.067 7.333L6 12m0 0h12M6 12l5.067 4.667\"\n }));\n};\n\nvar MemoSvgArrowLeft3 = /*#__PURE__*/memo(SvgArrowLeft3);\n\nvar SvgArrowLeftCircle = function SvgArrowLeftCircle(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M15.858 12H8.142l1.9 1.75 1.9 1.75m0-7l-1.9 1.75-1.9 1.75M12 21a9 9 0 119-9 9 9 0 01-9 9z\"\n }));\n};\n\nvar MemoSvgArrowLeftCircle = /*#__PURE__*/memo(SvgArrowLeftCircle);\n\nvar SvgArrowLeft = function SvgArrowLeft(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 12H3m6.427-6.427L3 12l6.427 6.427\"\n }));\n};\n\nvar MemoSvgArrowLeft = /*#__PURE__*/memo(SvgArrowLeft);\n\nvar SvgArrowRight2 = function SvgArrowRight2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M13.089 17.445L19 12m0 0H5m14 0l-5.911-5.444\"\n }));\n};\n\nvar MemoSvgArrowRight2 = /*#__PURE__*/memo(SvgArrowRight2);\n\nvar SvgArrowRight3 = function SvgArrowRight3(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12.933 16.667L18 12m0 0H6m12 0l-5.067-4.667\"\n }));\n};\n\nvar MemoSvgArrowRight3 = /*#__PURE__*/memo(SvgArrowRight3);\n\nvar SvgArrowRightCircle = function SvgArrowRightCircle(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M8.142 12h7.716l-1.9-1.75-1.9-1.75m0 7l1.9-1.75 1.9-1.75M12 3a9 9 0 11-9 9 9 9 0 019-9z\"\n }));\n};\n\nvar MemoSvgArrowRightCircle = /*#__PURE__*/memo(SvgArrowRightCircle);\n\nvar SvgArrowRight = function SvgArrowRight(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 12H3m11.573 6.427L21 12l-6.427-6.427\"\n }));\n};\n\nvar MemoSvgArrowRight = /*#__PURE__*/memo(SvgArrowRight);\n\nvar SvgArrowUp2 = function SvgArrowUp2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M17.445 10.911L12 5m0 0v14m0-14l-5.444 5.911\"\n }));\n};\n\nvar MemoSvgArrowUp2 = /*#__PURE__*/memo(SvgArrowUp2);\n\nvar SvgArrowUp3 = function SvgArrowUp3(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M16.667 11.067L12 6m0 0v12m0-12l-4.667 5.067\"\n }));\n};\n\nvar MemoSvgArrowUp3 = /*#__PURE__*/memo(SvgArrowUp3);\n\nvar SvgArrowUpCircle = function SvgArrowUpCircle(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 15.858V8.142l-1.75 1.9-1.75 1.9m7 0l-1.75-1.9-1.75-1.9M3 12a9 9 0 119 9 9 9 0 01-9-9z\"\n }));\n};\n\nvar MemoSvgArrowUpCircle = /*#__PURE__*/memo(SvgArrowUpCircle);\n\nvar SvgArrowUpLeft = function SvgArrowUpLeft(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M5.636 5.636l12.728 12.728M14.726 5.636h-9.09v9.09\"\n }));\n};\n\nvar MemoSvgArrowUpLeft = /*#__PURE__*/memo(SvgArrowUpLeft);\n\nvar SvgArrowUpRight = function SvgArrowUpRight(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M5.636 18.364L18.364 5.636m0 9.09v-9.09h-9.09\"\n }));\n};\n\nvar MemoSvgArrowUpRight = /*#__PURE__*/memo(SvgArrowUpRight);\n\nvar SvgArrowUp = function SvgArrowUp(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 3v18m6.427-11.573L12 3 5.573 9.427\"\n }));\n};\n\nvar MemoSvgArrowUp = /*#__PURE__*/memo(SvgArrowUp);\n\nvar SvgAtSymbol = function SvgAtSymbol(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12.000000000000002 8.5a3.5 3.5 0 103.5 3.5A3.5 3.5 0 0012 8.5zm3.5 0v4.455a2.716 2.716 0 003.084 2.529 2.9 2.9 0 002.349-2.584A5.911 5.911 0 0021 12a9 9 0 10-3.935 7.44\"\n }));\n};\n\nvar MemoSvgAtSymbol = /*#__PURE__*/memo(SvgAtSymbol);\n\nvar SvgAward = function SvgAward(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M17.507 8.507a5.507 5.507 0 11-1.613-3.894 5.49 5.49 0 011.613 3.894zM8.8 12.985l-.465 4.008L7.87 21l2.168-1.608 2.167-1.608 2.168 1.608L16.54 21l-.584-4.007-.585-4.008\"\n }));\n};\n\nvar MemoSvgAward = /*#__PURE__*/memo(SvgAward);\n\nvar SvgBandAid = function SvgBandAid(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M4.505 19.586h0a4.883 4.883 0 010-6.828l8.213-8.344a4.7 4.7 0 016.721 0h0a4.883 4.883 0 010 6.828l-8.213 8.344a4.7 4.7 0 01-6.721 0zm13.309-6.913L11.062 6.1m1.792 11.836l-6.782-6.77m6.941 2.008l.005-.095m-2.27-2.158l.006-.095\"\n }));\n};\n\nvar MemoSvgBandAid = /*#__PURE__*/memo(SvgBandAid);\n\nvar SvgBank = function SvgBank(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 21h18m-9.06-7.853v4.836m-6.3-4.836v4.836m12.718-4.836v4.836M12 3l-9 7.13h18zm0 4.031v-.05h0\"\n }));\n};\n\nvar MemoSvgBank = /*#__PURE__*/memo(SvgBank);\n\nvar SvgBarChart2 = function SvgBarChart2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M15 21V9.1h6V21H3v-5.6h6V21m0 0V3h6v18\"\n }));\n};\n\nvar MemoSvgBarChart2 = /*#__PURE__*/memo(SvgBarChart2);\n\nvar SvgBarChart = function SvgBarChart(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M15 21V3h6v18H3v-5.6h6V21m0 0V9.1h6V21\"\n }));\n};\n\nvar MemoSvgBarChart = /*#__PURE__*/memo(SvgBarChart);\n\nvar SvgBatteryCharging = function SvgBatteryCharging(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M9.759 17.593H5a2 2 0 01-2-2V8.407a2 2 0 012-2h.746m5.017 0H15.3a2 2 0 012 2v7.186a2 2 0 01-2 2M21 10.506v2.988M9.3 19.5l3.8-7.35H7.5l4.349-7.65\"\n }));\n};\n\nvar MemoSvgBatteryCharging = /*#__PURE__*/memo(SvgBatteryCharging);\n\nvar SvgBattery = function SvgBattery(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M15.3 17.593H5a2 2 0 01-2-2V8.407a2 2 0 012-2h10.3a2 2 0 012 2v7.186a2 2 0 01-2 2zm5.7-7.087v2.988\"\n }));\n};\n\nvar MemoSvgBattery = /*#__PURE__*/memo(SvgBattery);\n\nvar SvgBeaker = function SvgBeaker(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M15.181 3v5.822a2 2 0 00.569 1.4l4.186 4.286A3.738 3.738 0 0121 17.117v.145A3.739 3.739 0 0117.262 21H6.738A3.739 3.739 0 013 17.262h0a3.737 3.737 0 011.041-2.588l4.221-4.4a2 2 0 00.557-1.384V3M6.378 3h11.244m-4.644 2.905h2.2m-2.2 2.905h2.2\"\n }));\n};\n\nvar MemoSvgBeaker = /*#__PURE__*/memo(SvgBeaker);\n\nvar SvgBellOff = function SvgBellOff(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M17.4 17.9H5.3m1.3 0v-7.5a5.364 5.364 0 01.8-2.8m3.4-2.5a3.355 3.355 0 01.6-.088C11.6 5 11.8 5 12 5a5.378 5.378 0 015.4 5.4v1.4m-7.488 6.8a2.508 2.508 0 00-.012.3 2.1 2.1 0 104.2 0 2.627 2.627 0 00-.013-.313M4.3 4.5l7.7 7.65 7.7 7.65M12 5V3\"\n }));\n};\n\nvar MemoSvgBellOff = /*#__PURE__*/memo(SvgBellOff);\n\nvar SvgBell = function SvgBell(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M18.7 17.9H5.3m1.3 0v-7.5a5.4 5.4 0 1110.8 0v7.5m-7.4.4a.924.924 0 00-.088.3 2.508 2.508 0 00-.012.3 2.1 2.1 0 104.2 0 2.627 2.627 0 00-.013-.313A1.817 1.817 0 0014 18.2M12 5V3\"\n }));\n};\n\nvar MemoSvgBell = /*#__PURE__*/memo(SvgBell);\n\nvar SvgBold = function SvgBold(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M8.561 3v18m.674-9h3.086a4.5 4.5 0 004.5-4.5h0a4.5 4.5 0 00-4.5-4.5H5.345m0 18h8.81a4.5 4.5 0 004.5-4.5h0a4.5 4.5 0 00-4.5-4.5H8.561\"\n }));\n};\n\nvar MemoSvgBold = /*#__PURE__*/memo(SvgBold);\n\nvar SvgBoneJoint = function SvgBoneJoint(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M5.38 17.46l1.47-1.47c.48-.48.76-1.14.76-1.83V12.5h0c.03-.97.88-1.74 1.92-1.74.15 0 .3.02.45.05 1.03.23 1.9 1.25 2.07 2.23h0c.22-.01.46 0 .69.06 1.36.31 2.22 1.67 1.91 3.03-.21.91-.85 1.81-1.83 1.9-.33.03-1.34 0-1.34 0-.68 0-1.34.27-1.83.76l-.96.96m6.62-15.68L14.29 5.6c-.38.57-.97.96-1.64 1.1 0 0-.99.16-1.31.26-.95.27-1.4 1.28-1.42 2.22a2.527 2.527 0 002.46 2.6c.24 0 .47-.02.68-.07h0c.36.93 1.41 1.76 2.46 1.79.15 0 .3-.01.45-.04 1.02-.2 1.7-1.13 1.54-2.08h0l-.32-1.63c-.13-.67 0-1.37.39-1.94l2.06-3.08m-9.51 12.29c.47.5.89.9 1.52 1.02m1.4-6.34c.24-.07.46-.17.67-.33M10.7 3.29c-1.89.62-3.73 1.88-5.18 3.69-1.7 2.11-2.54 4.58-2.52 6.84m12.66 6.89c1.02-.66 1.99-1.51 2.82-2.55 1.82-2.27 2.66-4.94 2.5-7.34\"\n }));\n};\n\nvar MemoSvgBoneJoint = /*#__PURE__*/memo(SvgBoneJoint);\n\nvar SvgBookOpen = function SvgBookOpen(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 17.95V7.65m0 0a6.307 6.307 0 00-2.075-1.263A7.251 7.251 0 007.4 5.95a7.064 7.064 0 00-2.425.425A6.008 6.008 0 003 7.55v10.4a6.008 6.008 0 011.975-1.175A7.064 7.064 0 017.4 16.35a6.978 6.978 0 012.525.475A7.457 7.457 0 0112 18.05m0-10.4a6.307 6.307 0 012.075-1.263A7.251 7.251 0 0116.6 5.95a7.064 7.064 0 012.425.425A6.008 6.008 0 0121 7.55v10.4a6.008 6.008 0 00-1.975-1.175 7.064 7.064 0 00-2.425-.425 6.978 6.978 0 00-2.525.475A7.457 7.457 0 0012 18.05\"\n }));\n};\n\nvar MemoSvgBookOpen = /*#__PURE__*/memo(SvgBookOpen);\n\nvar SvgBook = function SvgBook(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M18.259 21h-11.2a2.318 2.318 0 01-2.318-2.318V5.318A2.318 2.318 0 017.059 3h11.2a1 1 0 011 1v16a1 1 0 01-1 1zm1-4.438H6.96a2.22 2.22 0 00-2.219 2.219h0M8.936 3v5.659\"\n }));\n};\n\nvar MemoSvgBook = /*#__PURE__*/memo(SvgBook);\n\nvar SvgBookmark = function SvgBookmark(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M19 3v18l-7-5-7 5V3M3 3h18\"\n }));\n};\n\nvar MemoSvgBookmark = /*#__PURE__*/memo(SvgBookmark);\n\nvar SvgBowl = function SvgBowl(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 9.986C21 16.005 16.954 21 12 21S3 16 3 9.986m10.016 3.306L18.307 3m-5.989 3.664a2.81 2.81 0 00-.318 0c-4.962 0-9 1.486-9 3.322s4.038 3.327 9 3.327 9-1.491 9-3.327c0-1.339-1.638-2.517-4.719-3.044\"\n }));\n};\n\nvar MemoSvgBowl = /*#__PURE__*/memo(SvgBowl);\n\nvar SvgBox = function SvgBox(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 21l-4.2-1.8-4.2-1.8V6.6l4.2 1.8 4.2 1.8V21zm0 0l4.2-1.8 4.2-1.8V6.6l-4.2 1.8-4.2 1.8V21zm8.4-14.4l-4.2-1.8L12 3 7.8 4.8 3.6 6.6\"\n }));\n};\n\nvar MemoSvgBox = /*#__PURE__*/memo(SvgBox);\n\nvar SvgBrain = function SvgBrain(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M7.5 13.8c-1.49 0-2.7 1.21-2.7 2.7s1.21 2.7 2.7 2.7c.32 0 .62-.05.9-.15m-3.36-3.81A3.596 3.596 0 013 12c0-1.09.48-2.07 1.25-2.73m.03-.07a2.247 2.247 0 011.87-3.5c.51 0 .97.17 1.35.45m.21.06a2.21 2.21 0 01-.21-.96C7.5 4.01 8.51 3 9.75 3S12 4.01 12 5.25V19.2m-3.6 0c0 .99.81 1.8 1.8 1.8s1.8-.81 1.8-1.8m0-11.7c0 1.49 1.21 2.7 2.7 2.7m1.8 3.6c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7c-.32 0-.62-.05-.9-.15m3.36-3.81A3.596 3.596 0 0021 12c0-1.09-.48-2.07-1.25-2.73m-.03-.07a2.247 2.247 0 00-1.87-3.5c-.51 0-.97.17-1.35.45m-4.5-.9C12 4.01 13.01 3 14.25 3s2.25 1.01 2.25 2.25c0 .34-.08.67-.21.96M15.6 19.2c0 .99-.81 1.8-1.8 1.8s-1.8-.81-1.8-1.8\"\n }));\n};\n\nvar MemoSvgBrain = /*#__PURE__*/memo(SvgBrain);\n\nvar SvgBread = function SvgBread(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M20.4 10.25V21H3.634V10.31A3.528 3.528 0 013 8.347C3 5.394 7.029 3 12 3s9 2.394 9 5.347a3.5 3.5 0 01-.6 1.903zm-6.14 3.694v-.1m2.106 2.094l-.006.1m-3.2.63v-.1\"\n }));\n};\n\nvar MemoSvgBread = /*#__PURE__*/memo(SvgBread);\n\nvar SvgBriefcase = function SvgBriefcase(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 19a2.006 2.006 0 01-2 2H5a2.006 2.006 0 01-2-2v-8.793a2.006 2.006 0 012-2h14a2.006 2.006 0 012 2zM15.428 8.207V5a2.006 2.006 0 00-2-2h-2.856a2.006 2.006 0 00-2 2v3.207M3 13.62h18\"\n }));\n};\n\nvar MemoSvgBriefcase = /*#__PURE__*/memo(SvgBriefcase);\n\nvar SvgBroccoli = function SvgBroccoli(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n width: 24,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n \"data-name\": \"broccoli\",\n d: \"M13.837 17.055h-2.374c-.801 0-1.57.318-2.137.885L6.266 21l-3.265-3.265 3.06-3.06a3.02 3.02 0 00.885-2.137v-2.325m3.882.87v2.232h2.301m-2.628-8.723c-.512-.886-1.539-1.593-2.636-1.593a2.964 2.964 0 00-2.854 3.76h0c-1.072.446-2.01 1.701-2.01 2.935 0 .77.294 1.472.776 1.999m10.185 8.403a2.964 2.964 0 005.093-2.06l-.019-.679a2.963 2.963 0 001.966-2.791c0-.734-.364-1.605-.807-2.122h0c.506-.796.807-1.791.807-2.871 0-2.614-1.762-4.732-3.936-4.732-.192 0-.991.012-1.175.044h0a2.964 2.964 0 00-5.724 1.077m6.757 9.103h0v.127m.559-3.057h0v.127\"\n }));\n};\n\nvar MemoSvgBroccoli = /*#__PURE__*/memo(SvgBroccoli);\n\nvar SvgBurger = function SvgBurger(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 9.988H3A6.988 6.988 0 019.988 3h4.024A6.988 6.988 0 0121 9.988zM3.247 12.926H21M3.247 16.005H6.5l3.313 3.355 3.421-3.468H21M13.062 21h3.347a4.569 4.569 0 003.745-1.962m-16.066-.007a4.6 4.6 0 002.567 1.813\"\n }));\n};\n\nvar MemoSvgBurger = /*#__PURE__*/memo(SvgBurger);\n\nvar SvgCalculator = function SvgCalculator(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M19.648 21H4.352V3h15.3zM7.689 13.676v-.045h0m4.311.045v-.045h0m4.327.045v-.045h0m-8.638 3.811V17.4h0m4.311.042V17.4h0m4.327.045V17.4h0m-.008-10.981H7.681v3.329\"\n }));\n};\n\nvar MemoSvgCalculator = /*#__PURE__*/memo(SvgCalculator);\n\nvar SvgCalendar = function SvgCalendar(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M5 5h14a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V7a2 2 0 012-2zm11-2v4M8 3v4m-5 3h18M7.858 13.954h.1m4.342 0h.1m4.3 0h.1M7.827 17.4h.1m4.373 0h.1m4.269 0h.1\"\n }));\n};\n\nvar MemoSvgCalendar = /*#__PURE__*/memo(SvgCalendar);\n\nvar SvgCameraOff = function SvgCameraOff(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M7.5 7.6H5a2.008 2.008 0 00-2 2v7.7a2.008 2.008 0 002 2h14.031M21 15.4V9.6a2 2 0 00-2-2h-2.2a.945.945 0 01-1-1 1.914 1.914 0 00-.538-1.325A1.872 1.872 0 0013.9 4.7h-3.6m4 9.9a2.532 2.532 0 01-.962.813A3.06 3.06 0 0112 15.7a2.86 2.86 0 01-2.8-2.8 2.759 2.759 0 01.337-1.337 2.908 2.908 0 01.863-.963M3 3l8.875 8.875.981.981L21 21\"\n }));\n};\n\nvar MemoSvgCameraOff = /*#__PURE__*/memo(SvgCameraOff);\n\nvar SvgCamera = function SvgCamera(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M19 7.6h-2.2a.945.945 0 01-1-1h0a1.914 1.914 0 00-.538-1.325A1.872 1.872 0 0013.9 4.7h-3.8a1.914 1.914 0 00-1.325.538A1.872 1.872 0 008.2 6.6h0a.945.945 0 01-1 1H5a2.008 2.008 0 00-2 2v7.7a2.008 2.008 0 002 2h14a2.006 2.006 0 002-2V9.6a2.006 2.006 0 00-2-2zm-7 2.5a2.8 2.8 0 11-1.98.82A2.791 2.791 0 0112 10.1z\"\n }));\n};\n\nvar MemoSvgCamera = /*#__PURE__*/memo(SvgCamera);\n\nvar SvgCancer = function SvgCancer(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M14.58 19.3a2.701 2.701 0 004.64-1.88l-.02-.62a2.7 2.7 0 001.79-2.54c0-.67-.33-1.46-.74-1.93h0c.46-.73.74-1.63.74-2.62 0-2.38-1.61-4.31-3.59-4.31-.18 0-.9.01-1.07.04h0a2.694 2.694 0 00-2.52-1.72c-1.06 0-1.97.61-2.42 1.49-.18.36-.28.77-.28 1.21m.57 10.05h0v.12m-2.8-7.94h0v.12m-2.8 8.2c0 .14.03.28.06.41a2.695 2.695 0 003.95 1.7h0c.63.85 1.95 1.41 3.04 1.14.68-.17 1.24-.58 1.6-1.13m-8.65-2.12c-1.1-.2-2.12-.92-2.67-2.03-.86-1.72-.31-3.75 1.21-4.7m6.81-5.07c-.47-.81-1.4-1.45-2.4-1.45a2.701 2.701 0 00-2.6 3.43h0C5.45 7.56 4.6 8.7 4.6 9.83c0 .14.01.28.03.41m11.68-.16c0 1.13-.92 2.04-2.04 2.04s-2.04-.92-2.04-2.04.92-2.04 2.04-2.04 2.04.92 2.04 2.04zm-6.35 3.15a1.62 1.62 0 11-3.24 0 1.62 1.62 0 013.24 0zm4.46 1.94c.23.4.7.73 1.2.73a1.344 1.344 0 001.3-1.71\"\n }));\n};\n\nvar MemoSvgCancer = /*#__PURE__*/memo(SvgCancer);\n\nvar SvgCapsulePills = function SvgCapsulePills(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Circle, {\n cx: 20.25,\n cy: 7.825,\n r: 2.749\n }), createElement(Rect, {\n x: 4.239,\n y: -0.348,\n width: 7.893,\n height: 17.067,\n rx: 3.946,\n transform: \"rotate(45 8.185 8.185)\"\n }), createElement(Path, {\n d: \"M4.626 11.113l1.2-1.2m-.431-4.518l5.023 5.023\"\n }), createElement(Circle, {\n cx: 15.748,\n cy: 17.86,\n r: 5.14\n }), createElement(Path, {\n d: \"M13.567 16.601l6.632 3.828m-8.902-5.139l2.27 1.311\"\n }));\n};\n\nvar MemoSvgCapsulePills = /*#__PURE__*/memo(SvgCapsulePills);\n\nvar SvgCast = function SvgCast(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M16.666 20.962h2.472a2.006 2.006 0 002-2v-14a2.006 2.006 0 00-2-2H4.866a1.992 1.992 0 00-2 1.972v1.972m9.131 14.054l-.042-.018h0A10.471 10.471 0 003 11.583m4.116 9.456l.252-.078A5.11 5.11 0 003 16.43m0 4.488v.045\"\n }));\n};\n\nvar MemoSvgCast = /*#__PURE__*/memo(SvgCast);\n\nvar SvgCheck2 = function SvgCheck2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M5 14.1l4.2 3.811L19 6.09\"\n }));\n};\n\nvar MemoSvgCheck2 = /*#__PURE__*/memo(SvgCheck2);\n\nvar SvgCheck3 = function SvgCheck3(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M6 13.8l3.6 3.267L18 6.933\"\n }));\n};\n\nvar MemoSvgCheck3 = /*#__PURE__*/memo(SvgCheck3);\n\nvar SvgCheckCircle = function SvgCheckCircle(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M8.5 13.1l1.05.95 1.05.95 2.45-3 2.45-3M12 3a9 9 0 11-6.364 2.636A8.972 8.972 0 0112 3z\"\n }));\n};\n\nvar MemoSvgCheckCircle = /*#__PURE__*/memo(SvgCheckCircle);\n\nvar SvgCheckFile = function SvgCheckFile(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M20 8.5l-7.999 9L9 14.5\"\n }), createElement(Path, {\n d: \"M20 4.5V4a2 2 0 00-2-2h-8L4 8v12a2 2 0 002 2h12a2 2 0 002-2v-4\"\n }), createElement(Path, {\n d: \"M4 8h6V2\"\n }));\n};\n\nvar MemoSvgCheckFile = /*#__PURE__*/memo(SvgCheckFile);\n\nvar SvgCheckList = function SvgCheckList(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12.768 4.019L6.973 9.82 5.235 8.082\"\n }), createElement(Path, {\n d: \"M12.656 9.793a5.8 5.8 0 11-4.54-6.823l.04.008m8.112 5.165h6.554m-8.242 6h8.242m-18 6h18\"\n }));\n};\n\nvar MemoSvgCheckList = /*#__PURE__*/memo(SvgCheckList);\n\nvar SvgCheckSquare = function SvgCheckSquare(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M8.5 13.1l1.05.95 1.05.95 2.45-3 2.45-3M19 21H5a2.006 2.006 0 01-2-2V5a2.008 2.008 0 012-2h14a2.006 2.006 0 012 2v14a2 2 0 01-2 2z\"\n }));\n};\n\nvar MemoSvgCheckSquare = /*#__PURE__*/memo(SvgCheckSquare);\n\nvar SvgCheck = function SvgCheck(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 14.7l2.7 2.45 2.7 2.45 6.3-7.6L21 4.4\"\n }));\n};\n\nvar MemoSvgCheck = /*#__PURE__*/memo(SvgCheck);\n\nvar SvgChevronDown2 = function SvgChevronDown2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M16.51 9.873l-4.459 4.31-4.458-4.31\"\n }));\n};\n\nvar MemoSvgChevronDown2 = /*#__PURE__*/memo(SvgChevronDown2);\n\nvar SvgChevronDown = function SvgChevronDown(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M6 9.1L9 12l3 2.9 3-2.9 3-2.9\"\n }));\n};\n\nvar MemoSvgChevronDown = /*#__PURE__*/memo(SvgChevronDown);\n\nvar SvgChevronLeft2 = function SvgChevronLeft2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M14.29 16.51L9.98 12.05l4.31-4.458\"\n }));\n};\n\nvar MemoSvgChevronLeft2 = /*#__PURE__*/memo(SvgChevronLeft2);\n\nvar SvgChevronLeft = function SvgChevronLeft(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M14.9 6L12 9l-2.9 3 2.9 3 2.9 3\"\n }));\n};\n\nvar MemoSvgChevronLeft = /*#__PURE__*/memo(SvgChevronLeft);\n\nvar SvgChevronRight2 = function SvgChevronRight2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M9.873 7.49l4.31 4.458-4.31 4.459\"\n }));\n};\n\nvar MemoSvgChevronRight2 = /*#__PURE__*/memo(SvgChevronRight2);\n\nvar SvgChevronRight = function SvgChevronRight(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M9.1 18l2.9-3 2.9-3L12 9 9.1 6\"\n }));\n};\n\nvar MemoSvgChevronRight = /*#__PURE__*/memo(SvgChevronRight);\n\nvar SvgChevronUp2 = function SvgChevronUp2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M7.49 14.127l4.458-4.31 4.459 4.31\"\n }));\n};\n\nvar MemoSvgChevronUp2 = /*#__PURE__*/memo(SvgChevronUp2);\n\nvar SvgChevronUp = function SvgChevronUp(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M18 14.9L15 12l-3-2.9L9 12l-3 2.9\"\n }));\n};\n\nvar MemoSvgChevronUp = /*#__PURE__*/memo(SvgChevronUp);\n\nvar SvgChroma = function SvgChroma(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 7.8a6.6 6.6 0 11-4.667 1.933A6.58 6.58 0 0112 7.8zM5.4 3h13.2\"\n }));\n};\n\nvar MemoSvgChroma = /*#__PURE__*/memo(SvgChroma);\n\nvar SvgChrome = function SvgChrome(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 12a9 9 0 11-9-9 9 9 0 019 9zm-9-3.67A3.67 3.67 0 1015.67 12 3.67 3.67 0 0012 8.33zm7.977 0h-7.988m-3.171 5.494L4.835 6.9M11.2 20.748l3.983-6.924\"\n }));\n};\n\nvar MemoSvgChrome = /*#__PURE__*/memo(SvgChrome);\n\nvar SvgCircle = function SvgCircle(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 12a9 9 0 11-9-9 9 9 0 019 9z\"\n }));\n};\n\nvar MemoSvgCircle = /*#__PURE__*/memo(SvgCircle);\n\nvar SvgClearList = function SvgClearList(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 12h18M3 6h10.867M3 18h18m0-14l-4 4m0-4l4 4\"\n }));\n};\n\nvar MemoSvgClearList = /*#__PURE__*/memo(SvgClearList);\n\nvar SvgClipboard = function SvgClipboard(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M15.9 6.1a1.038 1.038 0 01-.65-.213.972.972 0 01-.35-.587A3 3 0 0012 3a3.031 3.031 0 00-1.862.65A2.886 2.886 0 009.1 5.2a.972.972 0 01-.35.587A1.038 1.038 0 018.1 6H6.7a.976.976 0 00-.725.313A1.017 1.017 0 005.7 7v13a.976.976 0 00.313.725A1.017 1.017 0 006.7 21h10.6a.979.979 0 00.725-.312A1.021 1.021 0 0018.3 20V7.1a.976.976 0 00-.313-.725A1.017 1.017 0 0017.3 6.1h-1.4zM12 6.05V6h0m-2.6 5.8V17h5.2\"\n }));\n};\n\nvar MemoSvgClipboard = /*#__PURE__*/memo(SvgClipboard);\n\nvar SvgClockForward = function SvgClockForward(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M17.128 8.372L21 8.4V4.288m0 8.412a9.038 9.038 0 01-9 8.3 9.011 9.011 0 117.5-14M12 9.183v4h4.2\"\n }));\n};\n\nvar MemoSvgClockForward = /*#__PURE__*/memo(SvgClockForward);\n\nvar SvgClockRewind = function SvgClockRewind(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M2.985 4.288V8.4l3.872-.028M4.485 7a8.989 8.989 0 11-1.5 5.7M12 9.183v4h4.2\"\n }));\n};\n\nvar MemoSvgClockRewind = /*#__PURE__*/memo(SvgClockRewind);\n\nvar SvgClock = function SvgClock(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M11.75 2.75a9 9 0 11-6.364 2.636A8.972 8.972 0 0111.75 2.75zm0 5.2v4h4.2\"\n }));\n};\n\nvar MemoSvgClock = /*#__PURE__*/memo(SvgClock);\n\nvar SvgCloudDrizzle = function SvgCloudDrizzle(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M20.2 14.925a3.677 3.677 0 00-1.308-5.612A5.551 5.551 0 107.88 7.919a4.158 4.158 0 00-.645-.065 4.234 4.234 0 00-3.094 7.126M8.2 18v1.614m0-6.966v2m3.788 4.738V21m0-6.966v2M15.8 18v1.614m0-6.966v2\"\n }));\n};\n\nvar MemoSvgCloudDrizzle = /*#__PURE__*/memo(SvgCloudDrizzle);\n\nvar SvgCloudLightning = function SvgCloudLightning(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M15.543 6.8a5.438 5.438 0 011.8 0 4.283 4.283 0 012.238 1.175 4.618 4.618 0 011.262 2.225 4.457 4.457 0 01-2.6 5.1m-12.2-.3a4.144 4.144 0 01-.587-.362 4.491 4.491 0 01-.513-.438 7.3 7.3 0 01-1.4-2.162 6.613 6.613 0 01-.5-2.538 6.54 6.54 0 011.888-4.561A6.32 6.32 0 019.443 3a6.351 6.351 0 014.65 1.863 6.527 6.527 0 011.95 4.637m-4.7 2.9l1.4 2.1 1.4 2.1h-4.2l1.5 2.2 1.5 2.2\"\n }));\n};\n\nvar MemoSvgCloudLightning = /*#__PURE__*/memo(SvgCloudLightning);\n\nvar SvgCloudOff = function SvgCloudOff(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M15.5 9.5a5.438 5.438 0 011.8 0 4.276 4.276 0 012.237 1.175A4.612 4.612 0 0120.8 12.9a3.6 3.6 0 01.1 1.137 5.138 5.138 0 01-.2 1.063m-2.7 3a4.1 4.1 0 01-.763.225 4.432 4.432 0 01-.837.075H8.8a6.049 6.049 0 01-2.137-.375A4.941 4.941 0 014.9 16.9a7.3 7.3 0 01-1.4-2.162A6.613 6.613 0 013 12.2a6.354 6.354 0 013.3-5.6m5.4-.5a6.293 6.293 0 013.9 3.9M3 3l9 9 9 9\"\n }));\n};\n\nvar MemoSvgCloudOff = /*#__PURE__*/memo(SvgCloudOff);\n\nvar SvgCloudRain = function SvgCloudRain(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M20.2 14.925a3.677 3.677 0 00-1.308-5.612A5.551 5.551 0 107.88 7.919a4.158 4.158 0 00-.645-.065 4.234 4.234 0 00-3.094 7.126M8.2 12.648v3.22m3.788-.888V21m3.812-7.652v5.04\"\n }));\n};\n\nvar MemoSvgCloudRain = /*#__PURE__*/memo(SvgCloudRain);\n\nvar SvgCloudSnow = function SvgCloudSnow(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M20.201999999999998 14.215A3.677 3.677 0 0018.894 8.6 5.551 5.551 0 107.88 7.2a4.158 4.158 0 00-.645-.065 4.234 4.234 0 00-3.094 7.126m4.045 4.45v.189m0-4.078v.188m3.788 5.09v.227m0-3.958v.19m3.814 2.155v.186m0-4.172v.188\"\n }));\n};\n\nvar MemoSvgCloudSnow = /*#__PURE__*/memo(SvgCloudSnow);\n\nvar SvgCloud = function SvgCloud(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M15.55 9.451a5.437 5.437 0 011.8 0 4.283 4.283 0 012.238 1.175 4.618 4.618 0 011.262 2.225 4.564 4.564 0 01-.925 3.838 4.477 4.477 0 01-3.475 1.662h-7.6a6.049 6.049 0 01-2.137-.375 4.941 4.941 0 01-1.763-1.125 7.3 7.3 0 01-1.4-2.162 6.613 6.613 0 01-.5-2.538 6.54 6.54 0 011.888-4.562A6.32 6.32 0 019.45 5.651a6.351 6.351 0 014.65 1.863 6.527 6.527 0 011.95 4.637\"\n }));\n};\n\nvar MemoSvgCloud = /*#__PURE__*/memo(SvgCloud);\n\nvar SvgCodeReview = function SvgCodeReview(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M20.102 23L23 20.101l-2.898-2.898m-3.865 0l-2.898 2.898L16.237 23\"\n }), createElement(Path, {\n d: \"M21.489 13.45l.33-2.15a2 2 0 00-1.678-2.278A2.034 2.034 0 0019.819 9h-5.66V5a3 3 0 00-3-3l-4 9v11h2.66m-2.66 0h-3a2 2 0 01-2-2v-7a2 2 0 012-2h3\"\n }));\n};\n\nvar MemoSvgCodeReview = /*#__PURE__*/memo(SvgCodeReview);\n\nvar SvgCode = function SvgCode(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M6.5 8.6l-1.75 1.75L3 12.1l1.65 1.65L6.3 15.4m11.2-6.8l1.75 1.75L21 12.1l-1.65 1.65-1.65 1.65m-3.5-9.6L12 12l-2.2 6.2\"\n }));\n};\n\nvar MemoSvgCode = /*#__PURE__*/memo(SvgCode);\n\nvar SvgCodepen = function SvgCodepen(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 21l-9-5.867V8.884L12 3v0l9 5.885v6.249L12 21zM3.041 8.845L12 15.151v0l8.959-6.306m-.115 6.1L12 8.718h0l-8.844 6.227M12 3v5.714m0 6.437V21\"\n }));\n};\n\nvar MemoSvgCodepen = /*#__PURE__*/memo(SvgCodepen);\n\nvar SvgCoffee = function SvgCoffee(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M16.718 9.778h.858a3.458 3.458 0 010 6.916h-.858M2.993 9.778h13.725v7.78a3.444 3.444 0 01-3.431 3.458H6.424a3.444 3.444 0 01-3.431-3.458zm3.243-6.794v1.707m3.619-1.707v3.487m3.62-1.954v1.2\"\n }));\n};\n\nvar MemoSvgCoffee = /*#__PURE__*/memo(SvgCoffee);\n\nvar SvgColumn = function SvgColumn(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 5v14a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h14a2 2 0 012 2zM8.819 3v18m6.362-18v18\"\n }));\n};\n\nvar MemoSvgColumn = /*#__PURE__*/memo(SvgColumn);\n\nvar SvgCommand = function SvgCommand(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 9.023H6a3 3 0 01-3-3V6a3 3 0 013-3h.023a3 3 0 013 3v8M12 9.023h6a3 3 0 003-3V6a3 3 0 00-3-3h-.023a3 3 0 00-3 3v8M12 14.977H6a3 3 0 00-3 3V18a3 3 0 003 3h.023a3 3 0 003-3v-8m5.954 0v8a3 3 0 003 3H18a3 3 0 003-3v-.023a3 3 0 00-3-3h-6\"\n }));\n};\n\nvar MemoSvgCommand = /*#__PURE__*/memo(SvgCommand);\n\nvar SvgCompass = function SvgCompass(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M8.142 16.005l1.928-5.636L15.858 8l-2.252 5.91zM12 3a9 9 0 109 9 9 9 0 00-9-9z\"\n }));\n};\n\nvar MemoSvgCompass = /*#__PURE__*/memo(SvgCompass);\n\nvar SvgContainer = function SvgContainer(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M5 8.5h14v7H5zm4.667 0v7m4.666-7v7\"\n }));\n};\n\nvar MemoSvgContainer = /*#__PURE__*/memo(SvgContainer);\n\nvar SvgControlPolicy = function SvgControlPolicy(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M13.25 22H18a2 2 0 002-2V8l-6-6H6a2 2 0 00-2 2v1.572\"\n }), createElement(Path, {\n d: \"M14 2v6h6M3.25 23v-5.25m0-3V9.5m6 13.5v-6.75m0-3V9.5M1 17.75h4.5m1.5-4.5h4.5\"\n }));\n};\n\nvar MemoSvgControlPolicy = /*#__PURE__*/memo(SvgControlPolicy);\n\nvar SvgCopy = function SvgCopy(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M19 21H9.4a2 2 0 01-2-2V9.4a2 2 0 012-2H19a2 2 0 012 2V19a2 2 0 01-2 2zM7.3 16.6H5a2.006 2.006 0 01-2-2V5a2.008 2.008 0 012-2h9.6a2.006 2.006 0 012 2v2.3\"\n }));\n};\n\nvar MemoSvgCopy = /*#__PURE__*/memo(SvgCopy);\n\nvar SvgCornerDownLeft2 = function SvgCornerDownLeft2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M19 5v5.526a3.889 3.889 0 01-3.889 3.889H5m0 0L9.589 19M5 14.415L9.589 9.83\"\n }));\n};\n\nvar MemoSvgCornerDownLeft2 = /*#__PURE__*/memo(SvgCornerDownLeft2);\n\nvar SvgCornerDownLeft = function SvgCornerDownLeft(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 3v7.105a5 5 0 01-5 5H3M8.9 21L3 15.105M8.9 9.21L3 15.105\"\n }));\n};\n\nvar MemoSvgCornerDownLeft = /*#__PURE__*/memo(SvgCornerDownLeft);\n\nvar SvgCornerLeftDown2 = function SvgCornerLeftDown2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M19 5h-5.526a3.889 3.889 0 00-3.889 3.889V19m0 0L5 14.411M9.585 19l4.585-4.589\"\n }));\n};\n\nvar MemoSvgCornerLeftDown2 = /*#__PURE__*/memo(SvgCornerLeftDown2);\n\nvar SvgCornerLeftDown = function SvgCornerLeftDown(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M8.9 21V8a5 5 0 015-5H21M8.9 21L3 15.105M8.9 21l5.9-5.895\"\n }));\n};\n\nvar MemoSvgCornerLeftDown = /*#__PURE__*/memo(SvgCornerLeftDown);\n\nvar SvgCornerLeftUp2 = function SvgCornerLeftUp2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M19 19h-5.526a3.889 3.889 0 01-3.889-3.889V5m0 0L5 9.589M9.585 5l4.585 4.589\"\n }));\n};\n\nvar MemoSvgCornerLeftUp2 = /*#__PURE__*/memo(SvgCornerLeftUp2);\n\nvar SvgCornerLeftUp = function SvgCornerLeftUp(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M13.7 8.8L11 5.9 8.3 3v12.3A5.7 5.7 0 0014 21h7M8.3 3L5.65 5.9 3 8.8\"\n }));\n};\n\nvar MemoSvgCornerLeftUp = /*#__PURE__*/memo(SvgCornerLeftUp);\n\nvar SvgCornerRightDown2 = function SvgCornerRightDown2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M5 5h5.526a3.889 3.889 0 013.889 3.889V19m0 0L19 14.411M14.415 19L9.83 14.411\"\n }));\n};\n\nvar MemoSvgCornerRightDown2 = /*#__PURE__*/memo(SvgCornerRightDown2);\n\nvar SvgCornerRightDown = function SvgCornerRightDown(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 3h7.105a5 5 0 015 5v13M21 15.105L15.105 21M9.21 15.105l5.9 5.9\"\n }));\n};\n\nvar MemoSvgCornerRightDown = /*#__PURE__*/memo(SvgCornerRightDown);\n\nvar SvgCornerRightUp2 = function SvgCornerRightUp2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M5 19h5.526a3.889 3.889 0 003.889-3.889V5m0 0L19 9.589M14.415 5L9.83 9.589\"\n }));\n};\n\nvar MemoSvgCornerRightUp2 = /*#__PURE__*/memo(SvgCornerRightUp2);\n\nvar SvgCornerRightUp = function SvgCornerRightUp(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M15.066 3v13a5 5 0 01-5 5h-7.1m12.1-18l5.973 5.816M15.066 3L9.092 8.974\"\n }));\n};\n\nvar MemoSvgCornerRightUp = /*#__PURE__*/memo(SvgCornerRightUp);\n\nvar SvgCornerUpRight2 = function SvgCornerUpRight2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M5 5v5.526a3.889 3.889 0 003.889 3.889H19m0 0L14.411 19M19 14.415L14.411 9.83\"\n }));\n};\n\nvar MemoSvgCornerUpRight2 = /*#__PURE__*/memo(SvgCornerUpRight2);\n\nvar SvgCornerUpRight = function SvgCornerUpRight(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 15.105H8a5 5 0 01-5-5V3m18 12.105L15.105 21M21 15.105L15.105 9.21\"\n }));\n};\n\nvar MemoSvgCornerUpRight = /*#__PURE__*/memo(SvgCornerUpRight);\n\nvar SvgCpu = function SvgCpu(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M15.7 17.7H8.3a2.006 2.006 0 01-2-2V8.3a2.008 2.008 0 012-2h7.4a2.006 2.006 0 012 2v7.4a2 2 0 01-2 2zM9.7 3v2.5M14.3 3v2.5m-4.6 13V21m4.6-2.5V21M5.5 9.7H3m2.5 4.6H3m18-4.6h-2.5m2.5 4.6h-2.5m-5.4.2h1.2\"\n }));\n};\n\nvar MemoSvgCpu = /*#__PURE__*/memo(SvgCpu);\n\nvar SvgCreditCard = function SvgCreditCard(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M19 18.811H5a2 2 0 01-2-2V7.189a2 2 0 012-2h14a2 2 0 012 2v9.622a2 2 0 01-2 2zm2-8.65H3\"\n }));\n};\n\nvar MemoSvgCreditCard = /*#__PURE__*/memo(SvgCreditCard);\n\nvar SvgCrop = function SvgCrop(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 16.926h-9.85a4 4 0 01-4-4V2.969m9.692 18.062v-9.957a4 4 0 00-4-4H3\"\n }));\n};\n\nvar MemoSvgCrop = /*#__PURE__*/memo(SvgCrop);\n\nvar SvgCrosshair = function SvgCrosshair(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 12a9 9 0 11-9-9 9 9 0 019 9zm-9-4.691V3m0 18v-4.309m-4.691-4.524H3m18 0h-4.309\"\n }));\n};\n\nvar MemoSvgCrosshair = /*#__PURE__*/memo(SvgCrosshair);\n\nvar SvgCryptoKey = function SvgCryptoKey(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Circle, {\n cx: 16.551,\n cy: 7.449,\n r: 2\n }), createElement(Path, {\n d: \"M19.552 14.74a7.451 7.451 0 10-10.939-3.547L1 18.789V23h4.211l1.759-1.82V18.8h.011l.99-1.025h2.432l2.371-2.4a6.856 6.856 0 00.656.227m3.121-6.153v10.744m0 0H19\"\n }), createElement(Circle, {\n cx: 21,\n cy: 20.193,\n r: 2\n }), createElement(Path, {\n d: \"M8.162 7.449H5\"\n }), createElement(Circle, {\n cx: 3,\n cy: 7.449,\n r: 2\n }));\n};\n\nvar MemoSvgCryptoKey = /*#__PURE__*/memo(SvgCryptoKey);\n\nvar SvgDatabase = function SvgDatabase(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 2.95a15.023 15.023 0 014.808.7c1.231.434 1.992 1.034 1.992 1.7s-.761 1.263-1.992 1.7a15.023 15.023 0 01-4.808.7 15.023 15.023 0 01-4.808-.7C5.961 6.613 5.2 6.013 5.2 5.35s.761-1.263 1.992-1.7A15.023 15.023 0 0112 2.95zm-6.8 2.4v13.2m13.6-13.2v13.3c0 .65-.75 1.25-1.975 1.688A14.909 14.909 0 0112 21.05a14.909 14.909 0 01-4.825-.712C5.95 19.9 5.2 19.3 5.2 18.65m13.6-6.9c0 .65-.75 1.25-1.975 1.688A14.909 14.909 0 0112 14.15a14.909 14.909 0 01-4.825-.712C5.95 13 5.2 12.4 5.2 11.75\"\n }));\n};\n\nvar MemoSvgDatabase = /*#__PURE__*/memo(SvgDatabase);\n\nvar SvgDelete = function SvgDelete(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M14 12l2.71 2.71m-5.42-5.42L14 12m2.71-2.71L14 12l-2.71 2.71M18 4.978H9.079L3 12.167l6.079 6.855H18a3 3 0 003-3V7.978a3 3 0 00-3-3z\"\n }));\n};\n\nvar MemoSvgDelete = /*#__PURE__*/memo(SvgDelete);\n\nvar SvgDice = function SvgDice(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 18.552A2.456 2.456 0 0118.55 21H5.448A2.456 2.456 0 013 18.552V5.454a2.456 2.456 0 012.448-2.449h13.1A2.456 2.456 0 0121 5.454zM16.378 6.521a1.01 1.01 0 101.009 1.01 1.01 1.01 0 00-1.009-1.01zm-8.85 8.816a1.01 1.01 0 101.009 1.01 1.01 1.01 0 00-1.009-1.01zm4.4-4.437a1.01 1.01 0 101.009 1.01 1.01 1.01 0 00-1.013-1.01z\"\n }));\n};\n\nvar MemoSvgDice = /*#__PURE__*/memo(SvgDice);\n\nvar SvgDisc = function SvgDisc(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 12a9 9 0 11-9-9 9 9 0 019 9zm-9-2.761A2.761 2.761 0 1014.761 12 2.761 2.761 0 0012 9.239z\"\n }));\n};\n\nvar MemoSvgDisc = /*#__PURE__*/memo(SvgDisc);\n\nvar SvgDisguise = function SvgDisguise(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Circle, {\n cx: 7,\n cy: 17.5,\n r: 4\n }), createElement(Circle, {\n cx: 17,\n cy: 17.5,\n r: 4\n }), createElement(Path, {\n d: \"M10.942 16.838a2.124 2.124 0 012.116-.069M1 11.051h22m-3.777-.077s-.834-6.693-.9-7.147-.085-1.718-1.8-1a9.938 9.938 0 01-4.336 1.224h-.5A9.936 9.936 0 017.358 2.83c-1.71-.721-1.728.542-1.8 1s-.9 7.147-.9 7.147M5.5 8.051h13m1.779 7.157a2.121 2.121 0 011.253-.252m-19.064 0a2.121 2.121 0 011.253.252\"\n }));\n};\n\nvar MemoSvgDisguise = /*#__PURE__*/memo(SvgDisguise);\n\nvar SvgDollarSign = function SvgDollarSign(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 3a9 9 0 11-6.364 2.636A8.972 8.972 0 0112 3zm2.1 6.1a2.083 2.083 0 00-.863-.813A2.7 2.7 0 0012 8a2.656 2.656 0 00-1.687.587 1.8 1.8 0 00-.363 2.5 2.045 2.045 0 00.95.712 4.255 4.255 0 001.35.312 3.318 3.318 0 011.35.388 2.3 2.3 0 01.588.675A1.693 1.693 0 0114.4 14a1.848 1.848 0 01-.712 1.413 2.743 2.743 0 01-3.013.25A2.325 2.325 0 019.8 14.8M12 16v1.7m0-11.4V8\"\n }));\n};\n\nvar MemoSvgDollarSign = /*#__PURE__*/memo(SvgDollarSign);\n\nvar SvgDomainRecord = function SvgDomainRecord(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 22a10 10 0 119.55-12.976M2 12h12.36\"\n }), createElement(Path, {\n d: \"M12 22a15.3 15.3 0 01-4-10 15.3 15.3 0 014-10 15.306 15.306 0 013.572 6.712m3.417 3.4L23 23l-4.011-2.292L14.977 23l4.012-10.888z\"\n }));\n};\n\nvar MemoSvgDomainRecord = /*#__PURE__*/memo(SvgDomainRecord);\n\nvar SvgDomain = function SvgDomain(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M20 10a2 2 0 002-2V4a2 2 0 00-2-2H4a2 2 0 00-2 2v4a2 2 0 002 2h8.315M9.388 22H4a2 2 0 01-2-2v-4a2 2 0 012-2h5.063M6 6h0m0 12h0\"\n }), createElement(Circle, {\n cx: 17.658,\n cy: 17.658,\n r: 5.341\n }), createElement(Path, {\n d: \"M12.316 17.658h10.683m-5.341-5.341a8.179 8.179 0 012.142 5.341A8.176 8.176 0 0117.658 23a8.178 8.178 0 01-2.137-5.342 8.178 8.178 0 012.137-5.341z\"\n }));\n};\n\nvar MemoSvgDomain = /*#__PURE__*/memo(SvgDomain);\n\nvar SvgDownloadCloud = function SvgDownloadCloud(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M20.2 14.925a3.677 3.677 0 00-1.308-5.612A5.551 5.551 0 107.88 7.919a4.158 4.158 0 00-.645-.065 4.234 4.234 0 00-3.094 7.126M12 11.35V21l1.75-1.9 1.75-1.9m-7 0l1.75 1.9L12 21\"\n }));\n};\n\nvar MemoSvgDownloadCloud = /*#__PURE__*/memo(SvgDownloadCloud);\n\nvar SvgDownload = function SvgDownload(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M7.8 11.5l2.1 2.3 2.1 2.3V3m0 13.1l2.1-2.3 2.1-2.3m4.8 3.6V19a2 2 0 01-2 2H5a2.006 2.006 0 01-2-2v-3.9\"\n }));\n};\n\nvar MemoSvgDownload = /*#__PURE__*/memo(SvgDownload);\n\nvar SvgDroplet = function SvgDroplet(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M17.116 10.609h0L12 3l-5.258 7.8q-.1.135-.186.276l-.027.04h0a6.459 6.459 0 1010.585-.505z\"\n }));\n};\n\nvar MemoSvgDroplet = /*#__PURE__*/memo(SvgDroplet);\n\nvar SvgEdit2 = function SvgEdit2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M20.477 3.523a1.747 1.747 0 00-1.024-.517 1.971 1.971 0 00-.266-.019 1.835 1.835 0 00-1.3.526l-3.8 3.8-3.8 3.8v2.6h2.6l3.8-3.8 3.8-3.8a1.59 1.59 0 00.526-1.225 1.961 1.961 0 00-.536-1.365zm-1.59 9.889v5.4a2.221 2.221 0 01-2.2 2.2h-11.5a2.221 2.221 0 01-2.2-2.2V7.313a2.22 2.22 0 012.2-2.2h5.4\"\n }));\n};\n\nvar MemoSvgEdit2 = /*#__PURE__*/memo(SvgEdit2);\n\nvar SvgEdit = function SvgEdit(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M20.1 3.9l-.085-.082a3.085 3.085 0 00-1.093-.65A3.2 3.2 0 0017.9 3a3.1 3.1 0 00-2.2.9l-6.35 6.35L3 16.6V21h4.4l6.35-6.35L20.1 8.3a3.1 3.1 0 00.9-2.2 3.173 3.173 0 00-.245-1.224A3.075 3.075 0 0020.1 3.9z\"\n }));\n};\n\nvar MemoSvgEdit = /*#__PURE__*/memo(SvgEdit);\n\nvar SvgExternalLink = function SvgExternalLink(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M17.2 12.45v6.6a2 2 0 01-2 2H5a2.006 2.006 0 01-2-2V8.75a2.008 2.008 0 012-2h6.6m9.1 2.4l.15-3.1.15-3.1-5.45 5.45-5.45 5.45M21 2.95l-3.1.15-3.1.15\"\n }));\n};\n\nvar MemoSvgExternalLink = /*#__PURE__*/memo(SvgExternalLink);\n\nvar SvgEyeGlasses = function SvgEyeGlasses(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3.1 14.679L4.916 4.47h.007a3.783 3.783 0 01.508-.045 3.928 3.928 0 01.7.049M20.9 14.685L19.127 4.469h0a3.717 3.717 0 00-.507-.047 3.883 3.883 0 00-.7.047M3 15.577a4 4 0 104-4 4 4 0 00-4 4zm10 0a4 4 0 104-4 4 4 0 00-4 4z\"\n }));\n};\n\nvar MemoSvgEyeGlasses = /*#__PURE__*/memo(SvgEyeGlasses);\n\nvar SvgEyeOff = function SvgEyeOff(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M13.2 14.2a2.931 2.931 0 01-.6.225 2.466 2.466 0 01-.6.075A2.476 2.476 0 019.5 12a2.575 2.575 0 01.15-.875 1.972 1.972 0 01.45-.725m1.2-4.8h.7a9.078 9.078 0 017.05 3.2A10.727 10.727 0 0121 12a5.332 5.332 0 01-.262.65 8.949 8.949 0 01-.938 1.55M16.9 17a9.48 9.48 0 01-2.188 1 9.154 9.154 0 01-2.712.4 9.078 9.078 0 01-7.05-3.2A10.727 10.727 0 013 12a10.076 10.076 0 01.912-1.788A10.572 10.572 0 017 7M3 3l9 9 9 9\"\n }));\n};\n\nvar MemoSvgEyeOff = /*#__PURE__*/memo(SvgEyeOff);\n\nvar SvgEye = function SvgEye(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 9.5a2.5 2.5 0 11-1.768.732A2.5 2.5 0 0112 9.5zm0-3.9a9.078 9.078 0 017.05 3.2A10.727 10.727 0 0121 12a10.727 10.727 0 01-1.95 3.2A9.078 9.078 0 0112 18.4a9.078 9.078 0 01-7.05-3.2A10.727 10.727 0 013 12a10.727 10.727 0 011.95-3.2A9.078 9.078 0 0112 5.6z\"\n }));\n};\n\nvar MemoSvgEye = /*#__PURE__*/memo(SvgEye);\n\nvar SvgFacebook = function SvgFacebook(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M16.95 3h-2.7a4.5 4.5 0 00-4.5 4.5v2.7h-2.7v3.6h2.7V21h3.6v-7.2h2.7l.9-3.6h-3.6V7.5a.9.9 0 01.9-.9h2.7z\"\n }));\n};\n\nvar MemoSvgFacebook = /*#__PURE__*/memo(SvgFacebook);\n\nvar SvgFastForward = function SvgFastForward(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M11 12.014l-8.014 6.124V5.837zm2-6.152v12.3l8.015-6.123z\"\n }));\n};\n\nvar MemoSvgFastForward = /*#__PURE__*/memo(SvgFastForward);\n\nvar SvgFemaleSymbol = function SvgFemaleSymbol(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M17.5 8.5A5.5 5.5 0 1112 3a5.5 5.5 0 015.5 5.5zM12 14v7m-2.94-2.943l5.88-.019\"\n }));\n};\n\nvar MemoSvgFemaleSymbol = /*#__PURE__*/memo(SvgFemaleSymbol);\n\nvar SvgFileText = function SvgFileText(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M13.15 2.75h-7.3a.945.945 0 00-1 1v16a.945.945 0 001 1h11.8a.945.945 0 001-1V8.25h-5.5v-5.5zm0 0L15.9 5.5l2.75 2.75m-9.9 4.3h6m-2.8 3.8h2.8m-6-7.86v.06\"\n }));\n};\n\nvar MemoSvgFileText = /*#__PURE__*/memo(SvgFileText);\n\nvar SvgFile = function SvgFile(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M13.15 2.75h-7.3a.945.945 0 00-1 1v16a.945.945 0 001 1h11.8a.945.945 0 001-1V8.25h-5.5v-5.5zm0 0L15.9 5.5l2.75 2.75\"\n }));\n};\n\nvar MemoSvgFile = /*#__PURE__*/memo(SvgFile);\n\nvar SvgFilter = function SvgFilter(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 4.879h18M5.152 9.433h13.7M7.6 14.277h8.8m-7.335 4.844h5.87\"\n }));\n};\n\nvar MemoSvgFilter = /*#__PURE__*/memo(SvgFilter);\n\nvar SvgFire = function SvgFire(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M13.76 12.99c2.4-1.86 2.46-3.74 2.56-4.64 4.69 3.93 2.33 12.07-3.83 12.62-4.68.42-8.78-4.29-6.73-8.83.78-1.73 2.2-3.08 3.08-4.76.36-.7.66-1.44.88-2.2.07-.26.22-.4.42-2.18 4.52 2.97 4.02 7.93 3.63 9.99h0zm-1.77 3.08s-3.45 2 0 4.92c2.6-2.35 1.35-3.79 0-4.92z\"\n }));\n};\n\nvar MemoSvgFire = /*#__PURE__*/memo(SvgFire);\n\nvar SvgFlag = function SvgFlag(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 21V3m0 1.9h9.9v7.5H3m9.9-5.2H21l-1.25 2.1-1.25 2.1 1.25 2.1L21 15.6H11v-3.2m1.9 0l-.95 1.6-.95 1.6\"\n }));\n};\n\nvar MemoSvgFlag = /*#__PURE__*/memo(SvgFlag);\n\nvar SvgFloss = function SvgFloss(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M14.5 21H3v-9.8h11.5zM3 15.3h3.6a2.112 2.112 0 002.1 2.1 2.051 2.051 0 002.1-2.1h3.5m6.7-9v.2a2.9 2.9 0 01-2.9 2.9H18a2.9 2.9 0 01-2.9-2.9v-.6A2.9 2.9 0 0012.2 3h0a3.372 3.372 0 00-3.4 3.4h0v4.8\"\n }));\n};\n\nvar MemoSvgFloss = /*#__PURE__*/memo(SvgFloss);\n\nvar SvgFolderMinus = function SvgFolderMinus(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M10.8 6.4h0a1.538 1.538 0 00-1.5-1.5H4a.945.945 0 00-1 .887A1.065 1.065 0 003 5.9v12.2a.945.945 0 00.887 1 1.065 1.065 0 00.113 0h16a.945.945 0 001-.887 1.065 1.065 0 000-.113V8.9a.945.945 0 00-.887-1 1.065 1.065 0 00-.113 0h-7.7a1.48 1.48 0 01-1.088-.45A1.516 1.516 0 0110.8 6.4zm-.623 6.948h3.646\"\n }));\n};\n\nvar MemoSvgFolderMinus = /*#__PURE__*/memo(SvgFolderMinus);\n\nvar SvgFolderPlus = function SvgFolderPlus(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M10.8 6.4h0a1.538 1.538 0 00-1.5-1.5H4a.945.945 0 00-1 .887A1.065 1.065 0 003 5.9v12.2a.945.945 0 00.887 1 1.065 1.065 0 00.113 0h16a.945.945 0 001-.887 1.065 1.065 0 000-.113V8.9a.945.945 0 00-.887-1 1.065 1.065 0 00-.113 0h-7.7a1.48 1.48 0 01-1.088-.45A1.516 1.516 0 0110.8 6.4zm-.623 6.948h3.646M12 15.171v-3.647\"\n }));\n};\n\nvar MemoSvgFolderPlus = /*#__PURE__*/memo(SvgFolderPlus);\n\nvar SvgFolder = function SvgFolder(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M10.8 6.4h0a1.538 1.538 0 00-1.5-1.5H4a.945.945 0 00-1 1v12.2a.945.945 0 001 1h16a.945.945 0 001-1V8.9a.945.945 0 00-1-1h-7.7a1.478 1.478 0 01-1.088-.45A1.519 1.519 0 0110.8 6.4z\"\n }));\n};\n\nvar MemoSvgFolder = /*#__PURE__*/memo(SvgFolder);\n\nvar SvgFontSize = function SvgFontSize(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M18.215 3v18M15.426 5.787L18.213 3 21 5.787m0 12.426L18.213 21l-2.787-2.787M7.468 6.032v11.936M3 7.224V6.032h8.936v1.192M5.284 17.968h4.368\"\n }));\n};\n\nvar MemoSvgFontSize = /*#__PURE__*/memo(SvgFontSize);\n\nvar SvgFork = function SvgFork(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M18 2v6a4.012 4.012 0 01-4 4h-4a4.012 4.012 0 01-4-4V2m6 0v20\"\n }));\n};\n\nvar MemoSvgFork = /*#__PURE__*/memo(SvgFork);\n\nvar SvgFunction = function SvgFunction(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M8 4a3 3 0 00-3 3v2a3 3 0 01-3 3 3 3 0 013 3v2a3 3 0 003 3m8 0a3 3 0 003-3v-2a3 3 0 013-3 3 3 0 01-3-3V7a3 3 0 00-3-3\"\n }));\n};\n\nvar MemoSvgFunction = /*#__PURE__*/memo(SvgFunction);\n\nvar SvgGauge2 = function SvgGauge2(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M5.63 19.22a9 9 0 1112.737 0M12 7.349a5.5 5.5 0 01.967.086M6.5 12.849a5.506 5.506 0 015.5-5.5\"\n }), createElement(Circle, {\n cx: 12,\n cy: 12.849,\n r: 2\n }), createElement(Path, {\n d: \"M13.414 11.435l2.388-2.388\"\n }));\n};\n\nvar MemoSvgGauge2 = /*#__PURE__*/memo(SvgGauge2);\n\nvar SvgGauge = function SvgGauge(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M11.032 17.8A2.286 2.286 0 019.8 16.56c-.483-1.169.45-2.091 1.241-2.991l1.979-2.359a.724.724 0 011.275.529l-.265 3.069c-.077 1.2-.07 2.508-1.238 2.992a2.28 2.28 0 01-1.749 0zM12 6.024v1.844M18.718 8.807l-1.304 1.304\"\n }), createElement(Path, {\n d: \"M4.344 15.524H2.5a9.5 9.5 0 0119 0h-1.844M5.282 8.807l1.304 1.304\"\n }));\n};\n\nvar MemoSvgGauge = /*#__PURE__*/memo(SvgGauge);\n\nvar SvgGif2 = function SvgGif2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M9.368 14.235a2.9 2.9 0 01-3.583-1.423 2.414 2.414 0 011.87-3.045 3.411 3.411 0 011.67-.067m.035 2.828v1.715m3.026-4.617v4.754m2.987 0l.02-4.759m0 0h2.454m-2.464 2.9h2.464M21 15.752V8.1a1.562 1.562 0 00-1.561-1.562H4.561A1.562 1.562 0 003 8.1v7.654a1.562 1.562 0 001.561 1.562h14.878A1.562 1.562 0 0021 15.752z\"\n }));\n};\n\nvar MemoSvgGif2 = /*#__PURE__*/memo(SvgGif2);\n\nvar SvgGif = function SvgGif(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M7.2 19.031V20a.945.945 0 00.887 1 1.065 1.065 0 00.113 0H20a.945.945 0 001-.887.71.71 0 000-.113V8.5h-5.5V3H8.2a.946.946 0 00-1 .887A1.065 1.065 0 007.2 4v4.336M15.5 3l2.75 2.75L21 8.5M6.714 16.038a2.9 2.9 0 01-3.582-1.423A2.414 2.414 0 015 11.57a3.41 3.41 0 011.67-.072m.035 2.828v1.715m3.026-4.617v4.759m3.007-4.759l-.02 4.759m.02-4.759h2.454m-2.464 2.9h2.464\"\n }));\n};\n\nvar MemoSvgGif = /*#__PURE__*/memo(SvgGif);\n\nvar SvgGift = function SvgGift(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M19.2 12v9H4.8v-9M3 7.5h18V12H3zM12 21V7.5m0 0H7.95a2.25 2.25 0 110-4.5C11.1 3 12 7.5 12 7.5zm0 0h4.05a2.25 2.25 0 000-4.5C12.9 3 12 7.5 12 7.5z\"\n }));\n};\n\nvar MemoSvgGift = /*#__PURE__*/memo(SvgGift);\n\nvar SvgGlassStraw = function SvgGlassStraw(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M18.536 14.4a15.41 15.41 0 01-6.9.446 20.031 20.031 0 00-3.772-.525 18.5 18.5 0 00-2.483.079m1.367-7.046l-1.989-.006L5.925 21h11.931l1.385-13.609-12.493-.037m8.4-.006l.035 7.646m-.035-7.646L19.822 3\"\n }));\n};\n\nvar MemoSvgGlassStraw = /*#__PURE__*/memo(SvgGlassStraw);\n\nvar SvgGlobe = function SvgGlobe(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 2.991A9.009 9.009 0 112.991 12 9.01 9.01 0 0112 2.991zM2.991 12h18.018M12 2.991A13.783 13.783 0 0115.6 12a13.783 13.783 0 01-3.6 9.009A13.783 13.783 0 018.4 12 13.783 13.783 0 0112 2.991z\"\n }));\n};\n\nvar MemoSvgGlobe = /*#__PURE__*/memo(SvgGlobe);\n\nvar SvgGrid = function SvgGrid(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 3h7v7H3zm11 0h7v7h-7zm0 11h7v7h-7zM3 14h7v7H3z\"\n }));\n};\n\nvar MemoSvgGrid = /*#__PURE__*/memo(SvgGrid);\n\nvar SvgHardDrive = function SvgHardDrive(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 15.664V13.8a2.007 2.007 0 00-2.015-2H5.015A2.007 2.007 0 003 13.8v1.7M7.727 4.806h8.561a1.8 1.8 0 011.61 1L21 12v5.4a1.8 1.8 0 01-1.8 1.8H4.814a1.8 1.8 0 01-1.8-1.8V12l3.1-6.2a1.8 1.8 0 011.613-.994zm-.85 10.857h.863\"\n }));\n};\n\nvar MemoSvgHardDrive = /*#__PURE__*/memo(SvgHardDrive);\n\nvar SvgHash = function SvgHash(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M10.45 2.75l-2 9-2 9m10.6-18l-2 9-2 9m7.7-12.1h-17m16 6.7h-17\"\n }));\n};\n\nvar MemoSvgHash = /*#__PURE__*/memo(SvgHash);\n\nvar SvgHeadphones = function SvgHeadphones(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 18v-6a9 9 0 0118 0v6m0 1a2 2 0 01-2 2h0a3 3 0 01-3-3v-1a3 3 0 013-3h2zM3 19a2 2 0 002 2h0a3 3 0 003-3v-1a3 3 0 00-3-3H3z\"\n }));\n};\n\nvar MemoSvgHeadphones = /*#__PURE__*/memo(SvgHeadphones);\n\nvar SvgHeartCheck = function SvgHeartCheck(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n fill: \"none\",\n stroke: \"currentColor\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M16.99 4.34c-1.44-.22-2.97.22-4.08 1.33l-.92.91-.91-.91c-1.89-1.81-4.89-1.73-6.7.16a4.75 4.75 0 000 6.54l.91.91 6.7 6.7 6.7-6.7.91-.91c.99-.99 1.45-2.31 1.38-3.61\"\n }), createElement(Path, {\n d: \"M9.64 10.86L12 13l8.98-8.24\"\n }));\n};\n\nvar MemoSvgHeartCheck = /*#__PURE__*/memo(SvgHeartCheck);\n\nvar SvgHeartCircle = function SvgHeartCircle(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 9.2a1.5 1.5 0 01-.9-.3 2.261 2.261 0 00-1.6-.4 2.028 2.028 0 00-1.1.7 1.841 1.841 0 00-.5 1.3 5.433 5.433 0 00.8 2.5 6.829 6.829 0 002.6 2.4c.2.1.5.209.7.3.216-.1.5-.2.7-.3a6.829 6.829 0 002.6-2.4 5.433 5.433 0 00.8-2.5 1.841 1.841 0 00-.5-1.3 2.028 2.028 0 00-1.1-.7 2.261 2.261 0 00-1.6.4 1.5 1.5 0 01-.9.3z\"\n }), createElement(Circle, {\n cx: 12,\n cy: 12,\n r: 9\n }));\n};\n\nvar MemoSvgHeartCircle = /*#__PURE__*/memo(SvgHeartCircle);\n\nvar SvgHeartFolder = function SvgHeartFolder(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M22 19a2 2 0 01-2 2H4a2 2 0 01-2-2V5a2 2 0 012-2h5l2 3h9a2 2 0 012 2z\"\n }), createElement(Path, {\n d: \"M12 10.8a1.541 1.541 0 01-.926-.309 2.319 2.319 0 00-1.645-.411 2.089 2.089 0 00-1.129.72 1.9 1.9 0 00-.514 1.337 5.58 5.58 0 00.823 2.571 7.018 7.018 0 002.674 2.469c.206.1.511.215.72.308.223-.1.514-.205.72-.308a7.018 7.018 0 002.674-2.469 5.58 5.58 0 00.823-2.571 1.9 1.9 0 00-.52-1.337 2.089 2.089 0 00-1.132-.72 2.319 2.319 0 00-1.645.411A1.541 1.541 0 0112 10.8z\"\n }));\n};\n\nvar MemoSvgHeartFolder = /*#__PURE__*/memo(SvgHeartFolder);\n\nvar SvgHeartHand = function SvgHeartHand(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n width: 24,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n \"data-name\": \"heart-hand\",\n d: \"M15.804 3.694a2.369 2.369 0 00-3.35 0l-.458.457-.52-.496a2.37 2.37 0 00-3.35.081c-.872.915-.808 2.394.064 3.309l.457.457 3.35 3.35 3.35-3.35.457-.457a2.369 2.369 0 000-3.35h.001zM9.748 17.073h2.587c.893 0 1.778-.167 2.609-.494l4.014-1.194a1.647 1.647 0 012.018 1.324h0a1.647 1.647 0 01-1.183 1.863l-6.236 1.888a7.109 7.109 0 01-3.608.135l-6.95-1.55m0-6.385h3.502c.666 0 1.319.182 1.889.525l.6.362c.57.344 1.223.525 1.889.525h1.049a1.7 1.7 0 011.699 1.699v1.183\"\n }));\n};\n\nvar MemoSvgHeartHand = /*#__PURE__*/memo(SvgHeartHand);\n\nvar SvgHeartList = function SvgHeartList(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M16.3 8.1h6.5m-9.2 6h9.2m-18 6h18M7.2 4.4c-.5 0-1-.2-1.4-.5-1-.8-2.4-.6-2.4-.6-.7.1-1.2.5-1.6 1.1-.5.5-.8 1-.8 1.9 0 1 .4 2.5 1.2 3.8 1 1.6 2.8 3.1 3.9 3.6.3.2.7.3 1.1.5.3-.1.8-.3 1.1-.5 1.1-.5 2.9-2 3.9-3.6.8-1.3 1.2-2.8 1.2-3.8 0-.9-.3-1.4-.8-2-.4-.5-1-.9-1.7-1.1 0 0-1.4-.2-2.4.6-.4.4-.9.6-1.3.6z\"\n }));\n};\n\nvar MemoSvgHeartList = /*#__PURE__*/memo(SvgHeartList);\n\nvar SvgHeart = function SvgHeart(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M19.616 5.673a4.738 4.738 0 00-6.7 0L12 6.586l-.913-.913a4.739 4.739 0 00-6.7 6.7l.913.913 6.7 6.7 6.7-6.7.913-.913a4.738 4.738 0 000-6.7z\"\n }));\n};\n\nvar MemoSvgHeart = /*#__PURE__*/memo(SvgHeart);\n\nvar SvgHeatmap = function SvgHeatmap(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 21h18M3 16.8h13.2m4.8 0h-.9M3 12h5.6m3.1 0h4m3.1 0H21M3 7.2h1.4m3.7 0h1.5m4.1 0h1.9m3.8 0H21M3 3.1V3h0m7 .1V3h0m11 .1V3h0\"\n }));\n};\n\nvar MemoSvgHeatmap = /*#__PURE__*/memo(SvgHeatmap);\n\nvar SvgHelix2 = function SvgHelix2(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n width: 24,\n height: 24,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M7.5 3.5a8.492 8.492 0 001.4 5.3M16 3.5c0 2.6-1.6 5.5-3.8 7.7S7.1 15 7.1 20m7.2-5.3a9.654 9.654 0 011.7 5.8\"\n }));\n};\n\nvar MemoSvgHelix2 = /*#__PURE__*/memo(SvgHelix2);\n\nvar SvgHelix = function SvgHelix(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M16.889 3.007a7.99 7.99 0 00-2.023 2.372m.092 7.885a2.979 2.979 0 01-.3.489 2.362 2.362 0 01-.391.4 4.4 4.4 0 01-1.848 1.005 5.23 5.23 0 01-2.074.1 16.557 16.557 0 01-2.162-.616 3.446 3.446 0 00-2.162-.088 4.956 4.956 0 00-1.622.968c-.49.415-.942.892-1.395 1.345M21 7.116a12.366 12.366 0 01-2.009 1.741 3.942 3.942 0 01-2.516.672 4.963 4.963 0 01-.742-.214 6.494 6.494 0 01-.666-.289 5.033 5.033 0 00-2.778-.44A4.306 4.306 0 009.737 9.73a3.534 3.534 0 00-.518.66 4.223 4.223 0 00-.36.758M9 18.9a7.281 7.281 0 01-.868 1.127 13.5 13.5 0 01-1.01.968\"\n }));\n};\n\nvar MemoSvgHelix = /*#__PURE__*/memo(SvgHelix);\n\nvar SvgHelpCircle = function SvgHelpCircle(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 3a9 9 0 11-6.364 2.636A8.972 8.972 0 0112 3zm0 13.7v-.1h0m-2.8-6.4a2.8 2.8 0 015.6 0 2.45 2.45 0 01-.95 1.813C13.3 12.525 12.6 13 12 13.6\"\n }));\n};\n\nvar MemoSvgHelpCircle = /*#__PURE__*/memo(SvgHelpCircle);\n\nvar SvgHexagon = function SvgHexagon(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M20.1 15.6V8.4a1.8 1.8 0 00-.9-1.557l-6.3-3.6a1.8 1.8 0 00-1.8 0l-6.3 3.6A1.8 1.8 0 003.9 8.4v7.2a1.8 1.8 0 00.9 1.557l6.3 3.6a1.8 1.8 0 001.8 0l6.3-3.6a1.8 1.8 0 00.9-1.557z\"\n }));\n};\n\nvar MemoSvgHexagon = /*#__PURE__*/memo(SvgHexagon);\n\nvar SvgHexagons2 = function SvgHexagons2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M11.15 9.2l1.58-2.81h3.28l1.71 2.8L16.14 12m-3.29 0h3.28m1.71 2.8l-1.71-2.81M11.15 9.2l1.71 2.81m-1.58 2.8L12.86 12m-1.58 2.81H8l-1.71-2.8L7.87 9.2h3.28m6.69 5.6l-1.58 2.81h-3.28l-1.71-2.8M3 12.02h3.28m.14 5.61L8 14.82m8.27 2.79l1.71 2.81M16.01 6.39l1.58-2.81m.12 5.61h3.28\"\n }));\n};\n\nvar MemoSvgHexagons2 = /*#__PURE__*/memo(SvgHexagons2);\n\nvar SvgHexagons = function SvgHexagons(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M6 17.911l-3-1.688v-3.378l3-1.688 3 1.688v3.378zm9-1.69v-3.377l-3-1.689-3 1.689v3.377l3 1.689zm-3-5.066V7.777L9 6.089 6 7.777v3.378l3 1.688zm6 0V7.777l-3-1.688-3 1.688v3.378l3 1.688zm3 5.065v-3.377l-3-1.689-3 1.689v3.377l3 1.689z\"\n }));\n};\n\nvar MemoSvgHexagons = /*#__PURE__*/memo(SvgHexagons);\n\nvar SvgHome = function SvgHome(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M4.75 10.75v9a1.16 1.16 0 00.213.725.717.717 0 00.587.275h12.4a.737.737 0 00.55-.275 1.1 1.1 0 00.25-.725v-9m-16 2l4.5-5 4.5-5 4.5 5 4.5 5m-11.5 8v-5a.945.945 0 011-1h3a.945.945 0 011 1v5\"\n }));\n};\n\nvar MemoSvgHome = /*#__PURE__*/memo(SvgHome);\n\nvar SvgHook = function SvgHook(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Circle, {\n cx: 12,\n cy: 5.1,\n r: 3\n }), createElement(Path, {\n d: \"M14.8 18c1-.6 1.5-2.2 1.5-2.2h0c.2.4.3.9.3 1.3 0 2-1.3 3.8-3.2 4.5-2.5.9-5.2-.3-6-2.8h0c-.2-.5-.3-1-.3-1.6 0-3.2 4.9-4.1 4.9-5.7V8.1\"\n }));\n};\n\nvar MemoSvgHook = /*#__PURE__*/memo(SvgHook);\n\nvar SvgHorizontalArrows2 = function SvgHorizontalArrows2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M16.941 6.981H3M6.982 3L3 6.982m3.982 3.981L3 6.982m3.982 10.037H21m-3.982-3.981L21 17.018M17.018 21L21 17.018\"\n }));\n};\n\nvar MemoSvgHorizontalArrows2 = /*#__PURE__*/memo(SvgHorizontalArrows2);\n\nvar SvgHorizontalArrows = function SvgHorizontalArrows(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3.009 12h17.982m-17.977.006L5.8 14.787m-2.795-2.781l2.78-2.793M20.982 12l-2.8-2.762M20.991 12l-2.76 2.812\"\n }));\n};\n\nvar MemoSvgHorizontalArrows = /*#__PURE__*/memo(SvgHorizontalArrows);\n\nvar SvgHospitalSign = function SvgHospitalSign(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M20.921 12a8.961 8.961 0 11-8.96-9 8.98 8.98 0 018.96 9zm-11.549-.016l5.178.032M9.278 7.989v8.359m5.365-8.359v8.359\"\n }));\n};\n\nvar MemoSvgHospitalSign = /*#__PURE__*/memo(SvgHospitalSign);\n\nvar SvgHostAgent = function SvgHostAgent(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M10.348 16H4a2 2 0 01-2-2v-4a2 2 0 012-2h16a2 2 0 012 2v4a1.982 1.982 0 01-.109.652M6 12h0\"\n }), createElement(Path, {\n d: \"M23 18.652h-1.932L19.619 23l-2.899-8.695-1.449 4.347h-1.932\"\n }));\n};\n\nvar MemoSvgHostAgent = /*#__PURE__*/memo(SvgHostAgent);\n\nvar SvgHost = function SvgHost(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Rect, {\n x: 2,\n y: 8,\n width: 20,\n height: 8,\n rx: 2\n }), createElement(Path, {\n d: \"M6 12h0\"\n }));\n};\n\nvar MemoSvgHost = /*#__PURE__*/memo(SvgHost);\n\nvar SvgImage = function SvgImage(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M19 21H5a2.006 2.006 0 01-2-2V5a2.008 2.008 0 012-2h14a2.006 2.006 0 012 2v14a2 2 0 01-2 2zM6.2 21l4.2-4.85 4.2-4.85 3.2 3.4 3.2 3.4M8.8 6.4a2.3 2.3 0 11-1.626.674A2.289 2.289 0 018.8 6.4z\"\n }));\n};\n\nvar MemoSvgImage = /*#__PURE__*/memo(SvgImage);\n\nvar SvgInbox = function SvgInbox(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M20.992 12H17.2a3 3 0 00-2.5 1.336l-.017.026a3 3 0 01-2.5 1.336h-.386a3 3 0 01-2.5-1.336l-.017-.026A3 3 0 006.8 12H3.008m3.1-6.2l-3.1 6.2v5.4a1.8 1.8 0 001.8 1.8h14.386a1.8 1.8 0 001.8-1.8V12l-3.1-6.2a1.8 1.8 0 00-1.61-1H7.72a1.8 1.8 0 00-1.61 1z\"\n }));\n};\n\nvar MemoSvgInbox = /*#__PURE__*/memo(SvgInbox);\n\nvar SvgInfo = function SvgInfo(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 3a9 9 0 11-6.364 2.636A8.972 8.972 0 0112 3zm-1.8 8h1.6v5.3h2m-2-8.51v.01\"\n }));\n};\n\nvar MemoSvgInfo = /*#__PURE__*/memo(SvgInfo);\n\nvar SvgInstagram = function SvgInstagram(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M7.5 3h9A4.5 4.5 0 0121 7.5v9a4.5 4.5 0 01-4.5 4.5h-9A4.5 4.5 0 013 16.5v-9A4.5 4.5 0 017.5 3zm8.1 8.433A3.6 3.6 0 1112.567 8.4a3.6 3.6 0 013.033 3.033zM16.95 6.9v.15h.009\"\n }));\n};\n\nvar MemoSvgInstagram = /*#__PURE__*/memo(SvgInstagram);\n\nvar SvgItalic = function SvgItalic(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M14.818 3L9.182 21m-3.364 0h6.729M11.453 3h6.729\"\n }));\n};\n\nvar MemoSvgItalic = /*#__PURE__*/memo(SvgItalic);\n\nvar SvgIv = function SvgIv(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12.005 15.14H3.324V3.935h8.681zm-4.34 0v2.321A3.645 3.645 0 0011.408 21h0a3.081 3.081 0 003.164-2.991v-.574a3.082 3.082 0 013.165-2.991h.1A3.081 3.081 0 0121 17.435V21M9.435 7.561h2.57M7.665 3v.935m.366 7.465H12\"\n }));\n};\n\nvar MemoSvgIv = /*#__PURE__*/memo(SvgIv);\n\nvar SvgKeyLock = function SvgKeyLock(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Circle, {\n cx: 16.551,\n cy: 7.449,\n r: 2\n }), createElement(Path, {\n d: \"M22.809 10.137a7.454 7.454 0 10-14.2 1.056L1 18.789V23h4.211l1.759-1.82V18.8h.011l.99-1.025H10.4l2.371-2.4c.129.052.26.1.393.145\"\n }), createElement(Path, {\n d: \"M21.434 18.551l.59 4.449h-4.879l.591-4.445h0a3.415 3.415 0 113.758-.04l-.059.039\"\n }));\n};\n\nvar MemoSvgKeyLock = /*#__PURE__*/memo(SvgKeyLock);\n\nvar SvgKey = function SvgKey(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M9.9 14.3a3.717 3.717 0 01.813 1.2A3.874 3.874 0 0111 17a4 4 0 11-7.263-2.3A3.77 3.77 0 015.6 13.3M21 3l-5.6 5.6-5.6 5.6m6.1-5.7l1.8 1.75L19.5 12m-1-6l1.25 1.25L21 8.5\"\n }));\n};\n\nvar MemoSvgKey = /*#__PURE__*/memo(SvgKey);\n\nvar SvgKidney = function SvgKidney(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M7.1 10.3h0c1.5 0 2.8 1.2 2.8 2.8V21m.4-13c.6-1.9-.3-3.4-1.8-3.8-4.1-1-6.6 4.9-5 8 .7 1.3 1.8 1.7 3 1.2m10.4-3h0c-1.5 0-2.8 1.2-2.8 2.8v7.9m3.4-7.6c1.2.5 2.3 0 3-1.2 1.7-3.2-.9-9-5-8-1.5.4-2.4 1.9-1.8 3.8\"\n }));\n};\n\nvar MemoSvgKidney = /*#__PURE__*/memo(SvgKidney);\n\nvar SvgLayers = function SvgLayers(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M11.106 3.211L3 7.264l8.106 4.053a2 2 0 001.788 0L21 7.264l-8.106-4.053a2 2 0 00-1.788 0zM3 16.736l8.106 4.053a2 2 0 001.788 0L21 16.736M3 12l8.106 4.053a2 2 0 001.788 0L21 12\"\n }));\n};\n\nvar MemoSvgLayers = /*#__PURE__*/memo(SvgLayers);\n\nvar SvgLayout = function SvgLayout(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M19 21H5a2.006 2.006 0 01-2-2V5a2.008 2.008 0 012-2h14a2.006 2.006 0 012 2v14a2 2 0 01-2 2zm2-12.3H3m6.5 0V21\"\n }));\n};\n\nvar MemoSvgLayout = /*#__PURE__*/memo(SvgLayout);\n\nvar SvgLeaf = function SvgLeaf(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12.031 3A8.952 8.952 0 1021 11.956L21.01 3s-8.97.013-8.979 0zM3.015 20.988l13.74-13.741m-1.666 8.505H8.251V8.914m8.909 2.692H12.4V6.843\"\n }));\n};\n\nvar MemoSvgLeaf = /*#__PURE__*/memo(SvgLeaf);\n\nvar SvgLibrary = function SvgLibrary(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M20.332 20L16.844 4M12 20V4M6 20V4\"\n }));\n};\n\nvar MemoSvgLibrary = /*#__PURE__*/memo(SvgLibrary);\n\nvar SvgLifeAscent = function SvgLifeAscent(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M7.775 16.431a12.35 12.35 0 01-3.134-5.415 12 12 0 018.817.984m3.815.014c-1.463-3.526-4.473-6.7-7.179-7.039a10.482 10.482 0 00.271 5.889m2.316 4.87C6.129 15.807 3 18.914 3 18.914c5.16 3.935 13.114 1.053 13.114 1.053a13.314 13.314 0 01-2.259-2.179 5.47 5.47 0 01-1.409-3.755A2.306 2.306 0 0115.1 11.72a4.6 4.6 0 011.335.588 1.386 1.386 0 001.442-.074A2.68 2.68 0 0121 12.152a15.152 15.152 0 00-1.542-7.236 6.1 6.1 0 00-.843-1.151c-.07-.074-.812-.809-.886-.746a9.6 9.6 0 00-2.856 4.9\"\n }));\n};\n\nvar MemoSvgLifeAscent = /*#__PURE__*/memo(SvgLifeAscent);\n\nvar SvgLifeBuoy = function SvgLifeBuoy(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 21a9 9 0 10-9-9 9 9 0 009 9zm0-5.4A3.6 3.6 0 108.4 12a3.6 3.6 0 003.6 3.6zM5.637 5.637l3.816 3.816m5.094 5.094l3.816 3.816m-3.816-8.91l3.816-3.816m-3.816 3.816l3.177-3.177M5.637 18.363l3.816-3.816\"\n }));\n};\n\nvar MemoSvgLifeBuoy = /*#__PURE__*/memo(SvgLifeBuoy);\n\nvar SvgLifeology = function SvgLifeology(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M14.6 20.6a7.806 7.806 0 01-1.275.312A7.207 7.207 0 0112.2 21c-3.4 0-5.525-1.275-6.8-2.863A7.885 7.885 0 013.7 13.4V7.3a4.89 4.89 0 01.85-2.75A3.765 3.765 0 017.8 3a3.645 3.645 0 013.162 1.55A4.966 4.966 0 0111.8 7.3v10c0 .15 0 .3.013.45a1.884 1.884 0 00.087.45 3.2 3.2 0 00.788 1.612 2.532 2.532 0 001.912.788zm0 0a8.543 8.543 0 003.75-2.287A7.723 7.723 0 0020.3 13.4m-8.5-2.8l2.85-1.9 2.85-1.9-3.25-1.1L11 4.6m1 9.972l8.3-5.1V13.4L16.15 16 12 18.6M7.747 6.9v-.009\"\n }));\n};\n\nvar MemoSvgLifeology = /*#__PURE__*/memo(SvgLifeology);\n\nvar SvgLightbulb = function SvgLightbulb(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M15.087 15.428v-.484a2.645 2.645 0 01.243-1.121 2.769 2.769 0 01.7-.931 5.633 5.633 0 001.789-2.9 5.437 5.437 0 00-.245-3.358 5.749 5.749 0 00-2.2-2.638 6.22 6.22 0 00-6.752 0 5.749 5.749 0 00-2.2 2.638 5.437 5.437 0 00-.245 3.358 5.633 5.633 0 001.789 2.9 2.805 2.805 0 01.7.937 2.667 2.667 0 01.243 1.124v.484m.885 2.59h4.46m-3.989 2.958H13.8\"\n }));\n};\n\nvar MemoSvgLightbulb = /*#__PURE__*/memo(SvgLightbulb);\n\nvar SvgLineHeight = function SvgLineHeight(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 5.6h8.01M3 12h8.01M3 18.4h8.01M18.217 3v18m-2.79-15.213L18.214 3 21 5.787m0 12.426L18.214 21l-2.787-2.787\"\n }));\n};\n\nvar MemoSvgLineHeight = /*#__PURE__*/memo(SvgLineHeight);\n\nvar SvgLink2 = function SvgLink2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M14.456 7.907h2.456a4.093 4.093 0 010 8.186h-2.456m-4.912 0H7.088a4.093 4.093 0 010-8.186h2.456M8.726 12h6.548\"\n }));\n};\n\nvar MemoSvgLink2 = /*#__PURE__*/memo(SvgLink2);\n\nvar SvgLinkBroken = function SvgLinkBroken(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12.086 16.538l-2.8 2.8-.688.687a3.2 3.2 0 01-4.6 0m0 0a3.2 3.2 0 010-4.6l2.45-2.45 1.022-1.021m3.989-3.99l3.352-3.351.587-.588a3.253 3.253 0 114.6 4.6l-2.45 2.45-1.448 1.454M4.886 4.861l.723.724.724.723M5.161 9.2H3.025M9.227 3v2.137m9.887 14l-.723-.724-.724-.723m1.172-2.89h2.136m-6.2 6.2v-2.137\"\n }));\n};\n\nvar MemoSvgLinkBroken = /*#__PURE__*/memo(SvgLinkBroken);\n\nvar SvgLink = function SvgLink(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M10.8 17.8l-1.512 1.513L8.6 20A3.2 3.2 0 014 20m0 0a3.2 3.2 0 010-4.6l2.45-2.45L8.9 10.5a3.284 3.284 0 012.112-.975 3.231 3.231 0 012.188.675m.2-4.2l1.413-1.412L15.4 4A3.253 3.253 0 1120 8.6l-2.45 2.45-2.45 2.45a3.143 3.143 0 01-2.012 1A3.2 3.2 0 0111 14\"\n }));\n};\n\nvar MemoSvgLink = /*#__PURE__*/memo(SvgLink);\n\nvar SvgLinkedin = function SvgLinkedin(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21.024 14.807v5.968h-3.553v-5.968a1.778 1.778 0 00-3.553 0v5.968h-3.552V9.691h3.509v.326a5.476 5.476 0 011.82-.326 5.226 5.226 0 015.329 5.116zM2.976 20.775h3.7V9.691h-3.7zm0-15.7a1.848 1.848 0 101.848-1.85 1.848 1.848 0 00-1.848 1.847z\"\n }));\n};\n\nvar MemoSvgLinkedin = /*#__PURE__*/memo(SvgLinkedin);\n\nvar SvgList = function SvgList(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M9.6 5.6H21M9.6 12H21M9.6 18.4H21M4.5 4.1a1.5 1.5 0 11-1.061.439A1.5 1.5 0 014.5 4.1zm0 6.4a1.5 1.5 0 11-1.061.439A1.5 1.5 0 014.5 10.5zm0 6.4a1.5 1.5 0 11-1.061.439A1.5 1.5 0 014.5 16.9z\"\n }));\n};\n\nvar MemoSvgList = /*#__PURE__*/memo(SvgList);\n\nvar SvgLiver2 = function SvgLiver2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M14.92 10.85c0 4.2-3.4 7.61-7.61 7.61L3 18.48V12c0-5.29 5.22-7.75 9.31-5.83 1.41.66 2.97.53 4.51.24 1.24-.24 3.41-.27 4.17-.2v1.67c0 3.07-2.32 5.91-6.56 5.65\"\n }));\n};\n\nvar MemoSvgLiver2 = /*#__PURE__*/memo(SvgLiver2);\n\nvar SvgLiver = function SvgLiver(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M14.9 9.3c0 4.2-3.4 7.6-7.6 7.6H3v-6.5c0-5.3 5.2-7.7 9.3-5.8 1.4.7 3 .5 4.5.2 1.2-.2 3.4-.3 4.2-.2v1.7c0 3.1-2.5 5.6-5.6 5.6m-3.2 3.3V21m-1.7-9.7h0c-1.6 1.2-2.9 2.8-2.9 8.9v.7m0-.6s.3-5-2-7\"\n }));\n};\n\nvar MemoSvgLiver = /*#__PURE__*/memo(SvgLiver);\n\nvar SvgLoader2 = function SvgLoader2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M5.7 5.7l1.05 1.05L7.8 7.8M6.1 12H3m9 9v-3.1M12 3v3.1M5.88 18.09l.95-.95.95-.95M16.2 7.8l1.05-1.05L18.3 5.7M21 12h-3.1M12 17.9V21m0-14.9V3m4.23 13.19l.95.95.95.95\"\n }));\n};\n\nvar MemoSvgLoader2 = /*#__PURE__*/memo(SvgLoader2);\n\nvar SvgLoader = function SvgLoader(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M5.95 5.7L7 6.75 8.05 7.8m8.4 8.4l.95.95.95.95m.2-12.4L17.5 6.75 16.45 7.8M6.35 12h-3.1m17.5 0h-2.6m-5.9 9v-3.1m0-14.9v3.1\"\n }));\n};\n\nvar MemoSvgLoader = /*#__PURE__*/memo(SvgLoader);\n\nvar SvgLock = function SvgLock(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M18.644 21h-13.2a.945.945 0 01-1-1v-7.2a.945.945 0 011-1h13.1a.945.945 0 011 1V20a.808.808 0 01-.225.725.966.966 0 01-.675.275zm-10.9-9.2V7.3a4.3 4.3 0 118.6 0v4.5m-4.3 3.7v2\"\n }));\n};\n\nvar MemoSvgLock = /*#__PURE__*/memo(SvgLock);\n\nvar SvgLogOut = function SvgLogOut(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M16.4 16.2l2.3-2.1L21 12H7.9M21 12l-2.3-2.1-2.3-2.1M8.9 21H5a2 2 0 01-2-2V5a2.006 2.006 0 012-2h3.9\"\n }));\n};\n\nvar MemoSvgLogOut = /*#__PURE__*/memo(SvgLogOut);\n\nvar SvgLogin = function SvgLogin(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M11.5 16.2l2.3-2.1 2.3-2.1H3m13.1 0l-2.3-2.1-2.3-2.1M15.1 3H19a2.006 2.006 0 012 2v14a2 2 0 01-2 2h-3.9\"\n }));\n};\n\nvar MemoSvgLogin = /*#__PURE__*/memo(SvgLogin);\n\nvar SvgMailOpen = function SvgMailOpen(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 21.438V8.937l-7.8 6a2.107 2.107 0 01-2.4 0l-3.9-3-3.9-3v12.5zM3 8.937l7.8-6a2.108 2.108 0 012.4 0l7.8 6\"\n }));\n};\n\nvar MemoSvgMailOpen = /*#__PURE__*/memo(SvgMailOpen);\n\nvar SvgMail = function SvgMail(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 5.75h18v12.5H3V5.75zm0 0l3.9 3 3.9 3a2.107 2.107 0 002.4 0l3.9-3 3.9-3\"\n }));\n};\n\nvar MemoSvgMail = /*#__PURE__*/memo(SvgMail);\n\nvar SvgMaleSymbol = function SvgMaleSymbol(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M16.972 14.014a6.986 6.986 0 11-6.986-6.986 6.986 6.986 0 016.986 6.986zm3.994-11.007l-6.087 6.012m1.951-6.005L20.959 3m0 0v4.143\"\n }));\n};\n\nvar MemoSvgMaleSymbol = /*#__PURE__*/memo(SvgMaleSymbol);\n\nvar SvgMapPin = function SvgMapPin(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M17.116 13.391h0L12 21l-5.258-7.8q-.1-.135-.186-.276l-.027-.04h0a6.459 6.459 0 1110.585.505zM12 7.175a2.3 2.3 0 102.3 2.3 2.3 2.3 0 00-2.3-2.3z\"\n }));\n};\n\nvar MemoSvgMapPin = /*#__PURE__*/memo(SvgMapPin);\n\nvar SvgMap = function SvgMap(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 7.091v13.091l5.727-3.273 6.546 3.273L21 16.909V3.818l-5.727 3.273-6.546-3.273zm5.727 1.727v8.091m6.546-9.818v12.091\"\n }));\n};\n\nvar MemoSvgMap = /*#__PURE__*/memo(SvgMap);\n\nvar SvgMask = function SvgMask(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M8.722 16.163l-1.356-.673a2 2 0 01-1.111-1.79v-2.754a1.854 1.854 0 011.35-1.784l3.155-.889a4.635 4.635 0 012.516 0l3.155.889a1.855 1.855 0 011.35 1.784v2.843a1.855 1.855 0 01-1.029 1.661l-1.438.713a7.411 7.411 0 01-6.592 0zM6.766 9.672c0-3.107-3.661-3.638-3.781-.5s4.158 6.274 4.05 6.111m9.982.006c-.108.163 4.119-2.862 4-5.993s-3.777-2.767-3.777.34m-5.22 7.287v-2.82\"\n }));\n};\n\nvar MemoSvgMask = /*#__PURE__*/memo(SvgMask);\n\nvar SvgMaxDate = function SvgMaxDate(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M7 5.8H3.8A1.793 1.793 0 002 7.6V20a1.793 1.793 0 001.8 1.8h12.4A1.793 1.793 0 0018 20v-7.3M6.4 4v3.6M2 11.1h8m5.2-2.6l-2.7-2.7h0L15.2 3m-2.7 2.8h9.9M19.6 3l2.8 2.8h0l-2.8 2.7\"\n }));\n};\n\nvar MemoSvgMaxDate = /*#__PURE__*/memo(SvgMaxDate);\n\nvar SvgMaximize2 = function SvgMaximize2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 3l-7 7M3 21l7-7m5-11h6v6M9 21H3v-6\"\n }));\n};\n\nvar MemoSvgMaximize2 = /*#__PURE__*/memo(SvgMaximize2);\n\nvar SvgMaximize = function SvgMaximize(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 8.3V3h5.3M3 15.7V21h5.3M21 8.3V3h-5.3m0 18H21v-5.3\"\n }));\n};\n\nvar MemoSvgMaximize = /*#__PURE__*/memo(SvgMaximize);\n\nvar SvgMedicalBriefcase = function SvgMedicalBriefcase(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12.009 12.184000000000001v5.287m2.4-2.561l-4.807-.024M21 10.207a2.006 2.006 0 00-2-2H5a2.006 2.006 0 00-2 2V19a2.006 2.006 0 002 2h14a2.006 2.006 0 002-2zm-12.428-2V5a2.006 2.006 0 012-2h2.856a2.006 2.006 0 012 2v3.207\"\n }));\n};\n\nvar MemoSvgMedicalBriefcase = /*#__PURE__*/memo(SvgMedicalBriefcase);\n\nvar SvgMenu = function SvgMenu(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 12h18M3 6h18M3 18h18\"\n }));\n};\n\nvar MemoSvgMenu = /*#__PURE__*/memo(SvgMenu);\n\nvar SvgMessageCircle = function SvgMessageCircle(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 11.5a8.386 8.386 0 01-.9 3.8 8.5 8.5 0 01-7.6 4.7 8.386 8.386 0 01-3.8-.9L3 21l1.9-5.7a8.386 8.386 0 01-.9-3.8 8.5 8.5 0 014.7-7.6 8.386 8.386 0 013.8-.9h.5a8.48 8.48 0 018 8z\"\n }));\n};\n\nvar MemoSvgMessageCircle = /*#__PURE__*/memo(SvgMessageCircle);\n\nvar SvgMessageSquare = function SvgMessageSquare(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 15a2 2 0 01-2 2H7l-2 2-2 2V5a2 2 0 012-2h14a2 2 0 012 2v10z\"\n }));\n};\n\nvar MemoSvgMessageSquare = /*#__PURE__*/memo(SvgMessageSquare);\n\nvar SvgMessageThumbsUp = function SvgMessageThumbsUp(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M18 15.57V16c0 .22-.04.44-.13.64s-.2.38-.36.54c-.16.16-.34.28-.54.36-.2.08-.42.13-.64.13h-10l-1.67 1.67-1.67 1.67V7.67c0-.22.04-.44.13-.64.08-.2.2-.38.36-.54.16-.16.34-.28.54-.36.2-.08.42-.13.64-.13h4.51m5.15 6.21h4.25c.72 0 1.35-.48 1.54-1.17l.85-3.1c.22-.8-.38-1.58-1.21-1.58h-1.77c.07-.51.25-1 .34-1.5.1-.59.1-1.36-.49-1.68-.5-.27-1.16-.2-1.63.11-.62.41-.83 1.32-1.18 1.95-.39.69-.82 1.38-1.34 1.98l-1.18.05c-.28 0-.5.22-.5.5v3.95c0 .28.22.5.5.5h1.82z\"\n }));\n};\n\nvar MemoSvgMessageThumbsUp = /*#__PURE__*/memo(SvgMessageThumbsUp);\n\nvar SvgMicOff = function SvgMicOff(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M10.13 3.8a2.816 2.816 0 011.962-.8h0a2.816 2.816 0 011.963.8 2.771 2.771 0 01.837 2v2.95m-1.07 5.122a2.759 2.759 0 01-1.73.628 2.816 2.816 0 01-1.962-.8 2.768 2.768 0 01-.838-2V9.334m6.748 6.846a5.9 5.9 0 01-9.848-4.38m11.8 0c0 .147-.005.293-.016.438M12.092 17.7V21m-2.8 0h5.6M3 3l8.875 8.875.981.981L21 21\"\n }));\n};\n\nvar MemoSvgMicOff = /*#__PURE__*/memo(SvgMicOff);\n\nvar SvgMic = function SvgMic(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 14.5h0a2.81 2.81 0 01-1.962-.8 2.769 2.769 0 01-.838-2V5.8a2.769 2.769 0 01.838-2A2.81 2.81 0 0112 3h0a2.814 2.814 0 011.963.8 2.773 2.773 0 01.837 2v5.9a2.86 2.86 0 01-2.8 2.8zm5.9-2.7a5.912 5.912 0 01-5.9 5.9h0a5.91 5.91 0 01-5.9-5.9m5.9 5.9V21m-2.8 0h5.6\"\n }));\n};\n\nvar MemoSvgMic = /*#__PURE__*/memo(SvgMic);\n\nvar SvgMicroscope = function SvgMicroscope(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M14.769 6.307a7.648 7.648 0 014.978 8.514c-.732 3.967-4.83 6.536-9.153 5.738a9.335 9.335 0 01-5.03-3.127M4 17.394h4.888M15.78 4.68l-2.642-1.67L8.98 9.586l2.641 1.67zm-7.67 7.506l1.149.727M4 21h16\"\n }));\n};\n\nvar MemoSvgMicroscope = /*#__PURE__*/memo(SvgMicroscope);\n\nvar SvgMinimize2 = function SvgMinimize2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M14 10l7-7M10 14l-7 7m17-11h-6V4M4 14h6v6\"\n }));\n};\n\nvar MemoSvgMinimize2 = /*#__PURE__*/memo(SvgMinimize2);\n\nvar SvgMinimize = function SvgMinimize(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M8.3 3v5.3H3M8.3 21v-5.3H3M15.7 3v5.3H21m0 7.4h-5.3V21\"\n }));\n};\n\nvar MemoSvgMinimize = /*#__PURE__*/memo(SvgMinimize);\n\nvar SvgMinus2 = function SvgMinus2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M18 12H6\"\n }));\n};\n\nvar MemoSvgMinus2 = /*#__PURE__*/memo(SvgMinus2);\n\nvar SvgMinus3 = function SvgMinus3(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M17 12H7\"\n }));\n};\n\nvar MemoSvgMinus3 = /*#__PURE__*/memo(SvgMinus3);\n\nvar SvgMinusCircle = function SvgMinusCircle(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 3a9 9 0 11-6.364 2.636A8.972 8.972 0 0112 3zm-3.7 9h7.4\"\n }));\n};\n\nvar MemoSvgMinusCircle = /*#__PURE__*/memo(SvgMinusCircle);\n\nvar SvgMinusSquare = function SvgMinusSquare(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M8.3 12h7.4m5.3 7a2.006 2.006 0 01-2 2H5a2.006 2.006 0 01-2-2V5a2.006 2.006 0 012-2h14a2.006 2.006 0 012 2z\"\n }));\n};\n\nvar MemoSvgMinusSquare = /*#__PURE__*/memo(SvgMinusSquare);\n\nvar SvgMinus = function SvgMinus(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M20 12H4\"\n }));\n};\n\nvar MemoSvgMinus = /*#__PURE__*/memo(SvgMinus);\n\nvar SvgMolecule = function SvgMolecule(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M9.654 6.327A3.327 3.327 0 116.327 3a3.328 3.328 0 013.327 3.327zM17.1 6.8a3.906 3.906 0 103.9 3.9 3.906 3.906 0 00-3.9-3.9zm-9.359 9.167a2.517 2.517 0 102.516 2.517 2.517 2.517 0 00-2.516-2.517zM9.38 7.649l3.809 1.374m-3.558 7.816l4.282-3.252\"\n }));\n};\n\nvar MemoSvgMolecule = /*#__PURE__*/memo(SvgMolecule);\n\nvar SvgMoneyBag = function SvgMoneyBag(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M13.606 11.978a1.569 1.569 0 00-.66-.6 2.112 2.112 0 00-.946-.214 2.073 2.073 0 00-1.29.435 1.3 1.3 0 00-.278 1.85 1.56 1.56 0 00.727.527 3.348 3.348 0 001.032.231 2.612 2.612 0 011.033.287 1.709 1.709 0 01.449.5 1.221 1.221 0 01.162.611 1.349 1.349 0 01-.545 1.045 2.073 2.073 0 01-1.29.435 2.1 2.1 0 01-1.013-.25 1.743 1.743 0 01-.669-.638m1.682.887v1.258m0-8.436v1.258m3.066-4.072l4.87 5.528A5.629 5.629 0 0121 15.99v.188C21 18.841 19.326 21 17.262 21H6.738C4.674 21 3 18.841 3 16.178h0a5.637 5.637 0 011.041-3.339l4.895-5.747M16.482 3A13.389 13.389 0 0112 3.536 13.786 13.786 0 017.518 3l1.224 4.092h6.533z\"\n }));\n};\n\nvar MemoSvgMoneyBag = /*#__PURE__*/memo(SvgMoneyBag);\n\nvar SvgMonitor = function SvgMonitor(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 21v-4.4H4.8A1.8 1.8 0 013 14.8v-10A1.8 1.8 0 014.8 3h14.4A1.8 1.8 0 0121 4.8v10a1.8 1.8 0 01-1.8 1.8h-2.768M8.95 21h6.15\"\n }));\n};\n\nvar MemoSvgMonitor = /*#__PURE__*/memo(SvgMonitor);\n\nvar SvgMood = function SvgMood(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M18.875 20.98v-.08m-2.13-6.26a2.13 2.13 0 014.26 0 2.046 2.046 0 01-.21.77 1.879 1.879 0 01-.51.61c-.42.39-.95.75-1.41 1.21m-5.27.38a7.512 7.512 0 01-3 .61A7.61 7.61 0 013 10.61v-.02a7.59 7.59 0 0114.611-2.853q.043.106.084.213m-10.19 4.21a3.882 3.882 0 001.34 1.08 4.03 4.03 0 001.67.43 4.071 4.071 0 003.01-1.51M8.255 8.4h0m4.51 0h0\"\n }));\n};\n\nvar MemoSvgMood = /*#__PURE__*/memo(SvgMood);\n\nvar SvgMoon = function SvgMoon(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M17.745 16.334a7.162 7.162 0 01-3.855-13.2c-.241-.04-.484-.073-.731-.1S12.664 3 12.412 3a9 9 0 104.917 16.535 9.063 9.063 0 003.259-3.79 7.144 7.144 0 01-2.843.589z\"\n }));\n};\n\nvar MemoSvgMoon = /*#__PURE__*/memo(SvgMoon);\n\nvar SvgMoreHorizontal = function SvgMoreHorizontal(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M4 11a1 1 0 11-.707.293A1 1 0 014 11zm8 0a1 1 0 11-.707.293A1 1 0 0112 11zm8 0a1 1 0 11-.707.293A1 1 0 0120 11z\"\n }));\n};\n\nvar MemoSvgMoreHorizontal = /*#__PURE__*/memo(SvgMoreHorizontal);\n\nvar SvgMoreVertical = function SvgMoreVertical(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M11 20a1 1 0 11.293.707A1 1 0 0111 20zm0-8a1 1 0 11.293.707A1 1 0 0111 12zm0-8a1 1 0 11.293.707A1 1 0 0111 4z\"\n }));\n};\n\nvar MemoSvgMoreVertical = /*#__PURE__*/memo(SvgMoreVertical);\n\nvar SvgMortarBoard = function SvgMortarBoard(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 4.5l-10 5 10 5 10-5-10-5z\"\n }), createElement(Path, {\n d: \"M16.998 19.472L16.999 12l-5.001-2.5\"\n }), createElement(Path, {\n d: \"M19.801 14.056v1.593L12 19.5l-7.801-3.87v-1.57\"\n }));\n};\n\nvar MemoSvgMortarBoard = /*#__PURE__*/memo(SvgMortarBoard);\n\nvar SvgMousePointer = function SvgMousePointer(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M15.755 11.322L21 9.518 3 3l6.936 18 2.5-6.427L19.35 21\"\n }));\n};\n\nvar MemoSvgMousePointer = /*#__PURE__*/memo(SvgMousePointer);\n\nvar SvgMove = function SvgMove(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 21V3M9 6l3-3 3 3m0 12l-3 3-3-3m-6-6h18M6 15l-3-3 3-3m12 0l3 3-3 3\"\n }));\n};\n\nvar MemoSvgMove = /*#__PURE__*/memo(SvgMove);\n\nvar SvgMusic = function SvgMusic(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M9 18V5l12-2v13M6 15a3 3 0 11-3 3 3 3 0 013-3zm12-2a3 3 0 11-3 3 3 3 0 013-3z\"\n }));\n};\n\nvar MemoSvgMusic = /*#__PURE__*/memo(SvgMusic);\n\nvar SvgNavigation2 = function SvgNavigation2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M5.5 21.1L12 2.9l6.5 18.2-6.5-3.9-6.5 3.9z\"\n }));\n};\n\nvar MemoSvgNavigation2 = /*#__PURE__*/memo(SvgNavigation2);\n\nvar SvgNavigation = function SvgNavigation(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 11.526L21 3l-8.526 18-1.895-7.579L3 11.526z\"\n }));\n};\n\nvar MemoSvgNavigation = /*#__PURE__*/memo(SvgNavigation);\n\nvar SvgNeedle = function SvgNeedle(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3.9 17l5.05-5.1L14 6.8l1.55 1.6L17.1 10l-5.05 5.05L7 20.1l-.75-.8-.75-.8-.8-.75zm6-9.2l3.1 3.1 3.1 3.1M3 21l1.25-1.25L5.5 18.5M15.8 8.2l.7-.7.7-.7M18.9 3a2.1 2.1 0 11-1.485.615A2.093 2.093 0 0118.9 3z\"\n }));\n};\n\nvar MemoSvgNeedle = /*#__PURE__*/memo(SvgNeedle);\n\nvar SvgNodeMesh = function SvgNodeMesh(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Circle, {\n cx: 4.5,\n cy: 4.5,\n r: 2.5\n }), createElement(Circle, {\n cx: 19.5,\n cy: 19.5,\n r: 2.5\n }), createElement(Circle, {\n cx: 19.5,\n cy: 4.5,\n r: 2.5\n }), createElement(Circle, {\n cx: 4.5,\n cy: 19.5,\n r: 2.5\n }), createElement(Circle, {\n cx: 12,\n cy: 12,\n r: 2.5\n }), createElement(Path, {\n d: \"M7.2 10.3A8.561 8.561 0 014.9 7m14.2 0a8.338 8.338 0 01-2.2 3.3m0 3.4a7.406 7.406 0 012.2 3.3M4.9 17a8.338 8.338 0 012.2-3.3\"\n }));\n};\n\nvar MemoSvgNodeMesh = /*#__PURE__*/memo(SvgNodeMesh);\n\nvar SvgNodeTree = function SvgNodeTree(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n strokeMiterlimit: 10,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Circle, {\n cx: 12,\n cy: 19.5,\n r: 2.5\n }), createElement(Circle, {\n cx: 12,\n cy: 4.5,\n r: 2.5\n }), createElement(Path, {\n d: \"M4.5 14.5V14a2.006 2.006 0 012-2h11a2.006 2.006 0 012 2v.5m-7.5-5v5\"\n }), createElement(Circle, {\n cx: 19.5,\n cy: 19.5,\n r: 2.5\n }), createElement(Circle, {\n cx: 4.5,\n cy: 19.5,\n r: 2.5\n }));\n};\n\nvar MemoSvgNodeTree = /*#__PURE__*/memo(SvgNodeTree);\n\nvar SvgNumberList = function SvgNumberList(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M8.653 5.6H21M8.653 12H21M8.653 18.4H21M4.228 6.972V2.991l-1.24.645m2.658 10.038H3.011s2.559-1.9 2.559-2.831a1.284 1.284 0 00-2.568 0m0 9.628a1.212 1.212 0 101-1.889l1.174-1.668H3\"\n }));\n};\n\nvar MemoSvgNumberList = /*#__PURE__*/memo(SvgNumberList);\n\nvar SvgOctagon = function SvgOctagon(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M8.274 3h7.452L21 8.274v7.452L15.726 21H8.274L3 15.726V8.274L8.274 3z\"\n }));\n};\n\nvar MemoSvgOctagon = /*#__PURE__*/memo(SvgOctagon);\n\nvar SvgOfficeBuilding = function SvgOfficeBuilding(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M9 15.25h0m3 0h0m3 0h0m-6-3h0m3 0h0m3 0h0m-6-3h0m3 0h0m3 0h0m-6-3h0m3 0h0m3 0h0m-3 13v2.656\"\n }), createElement(Rect, {\n x: 5,\n y: 2,\n width: 14,\n height: 20,\n rx: 2,\n ry: 2\n }));\n};\n\nvar MemoSvgOfficeBuilding = /*#__PURE__*/memo(SvgOfficeBuilding);\n\nvar SvgOncoprint = function SvgOncoprint(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M20 3H4a.945.945 0 00-1 1v16a.945.945 0 001 1h16a.945.945 0 001-1V4a.945.945 0 00-1-1zM6.8 6.4v4.3m6.8-4.3v4.3M17 6.4v4.3M6.8 13.6v4.2m3.3-4.2v4.2m6.9-4.2v4.2\"\n }));\n};\n\nvar MemoSvgOncoprint = /*#__PURE__*/memo(SvgOncoprint);\n\nvar SvgPackage = function SvgPackage(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 21l-4.2-1.8-4.2-1.8V6.6l4.2 1.8 4.2 1.8V21zm0 0l4.2-1.8 4.2-1.8V6.6l-4.2 1.8-4.2 1.8V21zm8.4-14.4l-2.25-.95-2.25-.95-1.95-.85L12 3 7.8 4.8 3.6 6.6m4.2 1.8l3.9-1.7L15.6 5\"\n }));\n};\n\nvar MemoSvgPackage = /*#__PURE__*/memo(SvgPackage);\n\nvar SvgPaintCan = function SvgPaintCan(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M13.033 4.418l7.256 10.086M13.033 4.418L2.65 12.348a1.739 1.739 0 00-.7 1.062 1.542 1.542 0 00.268 1.218l4.716 6.556a1.565 1.565 0 001.052.616 1.713 1.713 0 001.247-.3l10.383-7.931\"\n }), createElement(Path, {\n d: \"M13.674 1.053v11.365h0a2.086 2.086 0 11-3.559-1.476M20.29 18l1.419 2.111h0a1.792 1.792 0 11-2.936.14h0l.007-.011z\"\n }));\n};\n\nvar MemoSvgPaintCan = /*#__PURE__*/memo(SvgPaintCan);\n\nvar SvgPaperclip = function SvgPaperclip(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M4.08 11.947l7.488-7.488a4.892 4.892 0 016.919 0h0a4.893 4.893 0 010 6.92l-8.879 8.879a2.446 2.446 0 01-3.459 0h0a2.446 2.446 0 010-3.46l8.435-8.436\"\n }));\n};\n\nvar MemoSvgPaperclip = /*#__PURE__*/memo(SvgPaperclip);\n\nvar SvgPasswordPolicy = function SvgPasswordPolicy(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M14.66 22H18a2 2 0 002-2V8l-6-6H6a2 2 0 00-2 2v4.521\"\n }), createElement(Path, {\n d: \"M14 2v6h6m-4 5h-3.785M16 17h-1.476M10 9H8.87\"\n }), createElement(Rect, {\n x: 1,\n y: 17.096,\n width: 9.661,\n height: 5.904,\n rx: 1.073\n }), createElement(Path, {\n d: \"M3.147 17.1v-2.151a2.684 2.684 0 015.367 0V17.1\"\n }));\n};\n\nvar MemoSvgPasswordPolicy = /*#__PURE__*/memo(SvgPasswordPolicy);\n\nvar SvgPauseCircle = function SvgPauseCircle(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 12a9 9 0 11-9-9 9 9 0 019 9zm-6.955 3.409V8.864m-3.818 6.545V8.864\"\n }));\n};\n\nvar MemoSvgPauseCircle = /*#__PURE__*/memo(SvgPauseCircle);\n\nvar SvgPause = function SvgPause(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M10.205 19.033A1.973 1.973 0 018.238 21h-.9a1.973 1.973 0 01-1.967-1.967V4.967A1.973 1.973 0 017.335 3h.9a1.973 1.973 0 011.967 1.967zm8.427-14.066A1.973 1.973 0 0016.665 3h-.9A1.973 1.973 0 0013.8 4.967v14.066A1.973 1.973 0 0015.762 21h.9a1.973 1.973 0 001.967-1.967z\"\n }));\n};\n\nvar MemoSvgPause = /*#__PURE__*/memo(SvgPause);\n\nvar SvgPenTool = function SvgPenTool(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M17.783 13.232l-4.551 4.551-5.4-.952L3.016 3.016l13.815 4.819zm-4.089-2.26a1.925 1.925 0 100 2.722 1.924 1.924 0 000-2.722zM3.016 3.016l7.956 7.956m1 8.071l1.942 1.941 7.07-7.07-1.941-1.942z\"\n }));\n};\n\nvar MemoSvgPenTool = /*#__PURE__*/memo(SvgPenTool);\n\nvar SvgPercent = function SvgPercent(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 3L3 21m15.144-5.712A2.856 2.856 0 1021 18.144a2.855 2.855 0 00-2.856-2.856zM5.856 3a2.856 2.856 0 102.856 2.856A2.856 2.856 0 005.856 3z\"\n }));\n};\n\nvar MemoSvgPercent = /*#__PURE__*/memo(SvgPercent);\n\nvar SvgPhc = function SvgPhc(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M4.846 10.148A1.853 1.853 0 112.994 12a1.852 1.852 0 011.852-1.852zM15.58 4.082a1.843 1.843 0 00-1.222.46h0a3.561 3.561 0 01-4.713-.009h0a1.852 1.852 0 10.01 2.792 3.562 3.562 0 014.7 0 1.852 1.852 0 101.223-3.244zm3.561 6.066a1.845 1.845 0 00-1.222.46h0a3.561 3.561 0 01-4.713-.007h0a1.852 1.852 0 10.01 2.792 3.562 3.562 0 014.7 0 1.852 1.852 0 101.223-3.244zm-3.574 6.067a1.842 1.842 0 00-1.222.46h0a3.562 3.562 0 01-4.713-.01h0a1.852 1.852 0 10.011 2.792 3.561 3.561 0 014.7 0 1.852 1.852 0 101.222-3.242zM4.846 10.149A1.852 1.852 0 112.994 12a1.852 1.852 0 011.852-1.851z\"\n }));\n};\n\nvar MemoSvgPhc = /*#__PURE__*/memo(SvgPhc);\n\nvar SvgPhoneCall = function SvgPhoneCall(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M14.173 6.147a3.681 3.681 0 013.68 3.68M21 9.993A6.993 6.993 0 0014.007 3m-3.386 9.717A18.541 18.541 0 018.5 9.463l.987-.481a1.32 1.32 0 00.7-1.5c-.38-1.532-.5-2.06-.768-3.415a1.318 1.318 0 00-1.56-1.04l-3.186.655A2.067 2.067 0 003.014 5.9a17.054 17.054 0 0015.073 15.088 2.065 2.065 0 002.224-1.674l.662-3.352a1.319 1.319 0 00-1.063-1.55c-1.261-.225-2.071-.454-3.316-.781a1.315 1.315 0 00-1.535.741l-.7 1.576\"\n }));\n};\n\nvar MemoSvgPhoneCall = /*#__PURE__*/memo(SvgPhoneCall);\n\nvar SvgPhoneForwarded = function SvgPhoneForwarded(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M14.046 6.458L21 6.5m-3.458 3.454L21 6.5 17.5 3m-6.883 9.717A18.541 18.541 0 018.5 9.463l.987-.481a1.32 1.32 0 00.7-1.5c-.38-1.532-.5-2.06-.768-3.415a1.318 1.318 0 00-1.56-1.04l-3.186.655A2.067 2.067 0 003.014 5.9a17.054 17.054 0 0015.073 15.088 2.065 2.065 0 002.224-1.674l.662-3.352a1.319 1.319 0 00-1.063-1.55c-1.261-.225-2.071-.454-3.316-.781a1.315 1.315 0 00-1.535.741l-.7 1.576\"\n }));\n};\n\nvar MemoSvgPhoneForwarded = /*#__PURE__*/memo(SvgPhoneForwarded);\n\nvar SvgPhoneIncoming = function SvgPhoneIncoming(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 3l-6.08 6.015m0-6.015v6.015H21m-10.376 3.7A18.541 18.541 0 018.5 9.463l.987-.481a1.32 1.32 0 00.7-1.5c-.38-1.532-.5-2.06-.768-3.415a1.318 1.318 0 00-1.56-1.04l-3.186.655A2.067 2.067 0 003.014 5.9a17.054 17.054 0 0015.073 15.088 2.065 2.065 0 002.224-1.674l.662-3.352a1.319 1.319 0 00-1.063-1.55c-1.261-.225-2.071-.454-3.316-.781a1.315 1.315 0 00-1.535.741l-.7 1.576\"\n }));\n};\n\nvar MemoSvgPhoneIncoming = /*#__PURE__*/memo(SvgPhoneIncoming);\n\nvar SvgPhoneMissed = function SvgPhoneMissed(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M14.36 15.948l.7-1.576a1.315 1.315 0 011.535-.741c1.245.327 2.055.556 3.316.781a1.319 1.319 0 011.063 1.55l-.662 3.352a2.065 2.065 0 01-2.224 1.674A17.054 17.054 0 013.014 5.9a2.067 2.067 0 011.659-2.218l3.186-.655a1.318 1.318 0 011.557 1.037c.268 1.355.388 1.883.768 3.415a1.32 1.32 0 01-.7 1.5l-.984.484a18.541 18.541 0 002.123 3.254m4.286-3.624L21 3m-6.093 0L21 9.093\"\n }));\n};\n\nvar MemoSvgPhoneMissed = /*#__PURE__*/memo(SvgPhoneMissed);\n\nvar SvgPhoneOff = function SvgPhoneOff(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 3L3 21m7.956-7.98A12.109 12.109 0 018.5 9.463l.987-.481a1.32 1.32 0 00.7-1.5c-.38-1.532-.5-2.06-.768-3.415a1.318 1.318 0 00-1.56-1.04l-3.186.655A2.067 2.067 0 003.014 5.9a17.054 17.054 0 0015.073 15.088 2.065 2.065 0 002.224-1.674l.662-3.352a1.319 1.319 0 00-1.063-1.55c-1.261-.225-2.071-.454-3.316-.781a1.315 1.315 0 00-1.535.741l-.7 1.576\"\n }));\n};\n\nvar MemoSvgPhoneOff = /*#__PURE__*/memo(SvgPhoneOff);\n\nvar SvgPhoneOutgoing = function SvgPhoneOutgoing(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M14.36 15.948l.7-1.576a1.315 1.315 0 011.535-.741c1.245.327 2.055.556 3.316.781a1.319 1.319 0 011.063 1.55l-.662 3.352a2.065 2.065 0 01-2.224 1.674A17.054 17.054 0 013.014 5.9a2.067 2.067 0 011.659-2.218l3.186-.655a1.318 1.318 0 011.557 1.037c.268 1.355.388 1.883.768 3.415a1.32 1.32 0 01-.7 1.5l-.984.484a18.541 18.541 0 002.123 3.254m4.565-3.9L21 3m0 6.046V3h-6.046\"\n }));\n};\n\nvar MemoSvgPhoneOutgoing = /*#__PURE__*/memo(SvgPhoneOutgoing);\n\nvar SvgPhone = function SvgPhone(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M14.36 15.948l.7-1.576a1.315 1.315 0 011.535-.741c1.245.327 2.055.556 3.316.781a1.319 1.319 0 011.063 1.55l-.662 3.352a2.065 2.065 0 01-2.224 1.674A17.054 17.054 0 013.014 5.9a2.067 2.067 0 011.659-2.218l3.186-.655a1.318 1.318 0 011.557 1.037c.268 1.355.388 1.883.768 3.415a1.32 1.32 0 01-.7 1.5l-.984.484a18.541 18.541 0 002.123 3.254\"\n }));\n};\n\nvar MemoSvgPhone = /*#__PURE__*/memo(SvgPhone);\n\nvar SvgPieChart = function SvgPieChart(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M19.9 16.3a9.493 9.493 0 01-3.275 3.4A8.819 8.819 0 0112 21 8.989 8.989 0 014.288 7.375 9.544 9.544 0 017.6 4.1M21 12a8.963 8.963 0 00-9-9v8.9l4.5.05z\"\n }));\n};\n\nvar MemoSvgPieChart = /*#__PURE__*/memo(SvgPieChart);\n\nvar SvgPill = function SvgPill(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M4.424 19.576h0a4.822 4.822 0 010-6.819l8.333-8.333a4.822 4.822 0 016.819 0h0a4.822 4.822 0 010 6.819l-8.333 8.333a4.822 4.822 0 01-6.819 0zm11.009-4.19L8.614 8.567\"\n }));\n};\n\nvar MemoSvgPill = /*#__PURE__*/memo(SvgPill);\n\nvar SvgPlane = function SvgPlane(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M13.778 8.232L10.2 12.094 4.961 9.829l2.516-2.718zm6.585-4.167a2 2 0 00-2.766.054l-.006-.006-10.749 11.57-1.715-.43L3 17.631l4.921 2.819 5.58-6.029 4.207 6.015 2.516-2.718-2.594-7.756 2.9-3.13h-.007a2 2 0 00-.16-2.767z\"\n }));\n};\n\nvar MemoSvgPlane = /*#__PURE__*/memo(SvgPlane);\n\nvar SvgPlanet = function SvgPlanet(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Circle, {\n cx: 12,\n cy: 12,\n r: 10\n }), createElement(Path, {\n d: \"M12 6.063H4m3.439 3h-5m18.577-1h-6m6.871 5.437h-3.168a3.427 3.427 0 01-2.443-.912 3.856 3.856 0 00-2.662-.895 3.857 3.857 0 00-2.663.895 3.426 3.426 0 01-2.442.912H5.551m15.434 2.893h-2.427a3.427 3.427 0 00-2.443.912 3.856 3.856 0 01-2.662.895 3.857 3.857 0 01-2.663-.895 3.426 3.426 0 00-2.442-.912h-.676\"\n }));\n};\n\nvar MemoSvgPlanet = /*#__PURE__*/memo(SvgPlanet);\n\nvar SvgPlant = function SvgPlant(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12.2 20.99c-.066 0-.129.01-.2.01s-.132-.009-.2-.01m0 0a10.285 10.285 0 00.2-1.968m0-.064A10.264 10.264 0 003.562 8.893a8.973 8.973 0 008.24 12.1m.2-1.968v-.064m0 0v.064m0 0a10.285 10.285 0 00.2 1.968m0 0a8.971 8.971 0 008.242-12.1A10.267 10.267 0 0012 18.958m4.016-8.333a9.26 9.26 0 00-4-7.625 9.263 9.263 0 00-4 7.625\"\n }));\n};\n\nvar MemoSvgPlant = /*#__PURE__*/memo(SvgPlant);\n\nvar SvgPlayCircle = function SvgPlayCircle(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M15.149 12.418a.582.582 0 000-.9L12.5 9.351l-2.247-1.839a.581.581 0 00-.949.45v8.012a.581.581 0 00.949.449l2.247-1.839zM21 12a9 9 0 11-9-9 9 9 0 019 9z\"\n }));\n};\n\nvar MemoSvgPlayCircle = /*#__PURE__*/memo(SvgPlayCircle);\n\nvar SvgPlotCurve = function SvgPlotCurve(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M8.7 3c.7 4.8 3.5 10.5 12.3 11m0 7H3V3m0 2h1.6M3 9h1.6M3 13h1.6M3 17h1.6\"\n }));\n};\n\nvar MemoSvgPlotCurve = /*#__PURE__*/memo(SvgPlotCurve);\n\nvar SvgPlotNeedle = function SvgPlotNeedle(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 21H3V3m0 2h1.6M3 9h1.6M3 13h1.6M3 17h1.6m6.4 0v4\"\n }), createElement(Circle, {\n cx: 11,\n cy: 15,\n r: 2\n }), createElement(Path, {\n d: \"M17 9v12\"\n }), createElement(Circle, {\n cx: 17,\n cy: 7,\n r: 2\n }));\n};\n\nvar MemoSvgPlotNeedle = /*#__PURE__*/memo(SvgPlotNeedle);\n\nvar SvgPlus2 = function SvgPlus2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 6v12m6-6H6\"\n }));\n};\n\nvar MemoSvgPlus2 = /*#__PURE__*/memo(SvgPlus2);\n\nvar SvgPlus3 = function SvgPlus3(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 7v10m5-5H7\"\n }));\n};\n\nvar MemoSvgPlus3 = /*#__PURE__*/memo(SvgPlus3);\n\nvar SvgPlusCircle = function SvgPlusCircle(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 3a9 9 0 11-6.364 2.636A8.972 8.972 0 0112 3zm0 5v8m-4-4h8\"\n }));\n};\n\nvar MemoSvgPlusCircle = /*#__PURE__*/memo(SvgPlusCircle);\n\nvar SvgPlusSquare = function SvgPlusSquare(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M19 21H5a2.006 2.006 0 01-2-2V5a2.008 2.008 0 012-2h14a2.006 2.006 0 012 2v14a2 2 0 01-2 2zM12 8v8m-4-4h8\"\n }));\n};\n\nvar MemoSvgPlusSquare = /*#__PURE__*/memo(SvgPlusSquare);\n\nvar SvgPlus = function SvgPlus(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 4v16m8-8H4\"\n }));\n};\n\nvar MemoSvgPlus = /*#__PURE__*/memo(SvgPlus);\n\nvar SvgPocket = function SvgPocket(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 11.118c0 5.453-4.029 9.873-9 9.873s-9-4.42-9-9.873v-6.2a1.915 1.915 0 011.909-1.909h14.182A1.915 1.915 0 0121 4.918zM7.866 9.535L12 14.07l4.134-4.535\"\n }));\n};\n\nvar MemoSvgPocket = /*#__PURE__*/memo(SvgPocket);\n\nvar SvgPower = function SvgPower(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M18.236 5.594a8.969 8.969 0 11-12.472 0M12 3v8.272\"\n }));\n};\n\nvar MemoSvgPower = /*#__PURE__*/memo(SvgPower);\n\nvar SvgPrecisionWellness = function SvgPrecisionWellness(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeMiterlimit: 10,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Circle, {\n cx: 12,\n cy: 7.8,\n r: 2.54\n }), createElement(Path, {\n d: \"M20.99 12.73c.03 1.26-.96 2.3-2.22 2.35-1.94 0-3.76.97-4.83 2.59-.43.65-1.16 1.04-1.94 1.04-.79-.02-1.52-.41-1.96-1.07a5.742 5.742 0 00-4.79-2.56 2.307 2.307 0 01-2.21-1.9c-.19-1.07.36-2.14 1.35-2.59 1.01-.47 2.21-.15 2.86.75.6.89 1.41 1.62 2.37 2.1a5.5 5.5 0 006.82-1.74c.35-.58.9-1.02 1.55-1.23a2.354 2.354 0 012.99 2.25z\"\n }));\n};\n\nvar MemoSvgPrecisionWellness = /*#__PURE__*/memo(SvgPrecisionWellness);\n\nvar SvgPrint = function SvgPrint(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M6.717 14.12h10.566V21H6.717zm10.566-5.162V3H6.717v5.958m10.707 8.522h1.788A1.794 1.794 0 0021 15.692v-4.505A1.794 1.794 0 0019.212 9.4H4.788A1.794 1.794 0 003 11.187v4.505a1.777 1.777 0 001.755 1.788h1.756\"\n }));\n};\n\nvar MemoSvgPrint = /*#__PURE__*/memo(SvgPrint);\n\nvar SvgProcedure = function SvgProcedure(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M10 5H6m5.932 7H18.5a3.5 3.5 0 000-7H14m-4 14H5.5a3.5 3.5 0 010-7h3.408M18 19h-4\"\n }), createElement(Circle, {\n cx: 4,\n cy: 5,\n r: 2\n }), createElement(Circle, {\n cx: 12,\n cy: 5,\n r: 2\n }), createElement(Path, {\n d: \"M14.231 9.701L11.932 12l2.299 2.299\"\n }), createElement(Circle, {\n cx: 12,\n cy: 19,\n r: 2\n }), createElement(Circle, {\n cx: 20,\n cy: 19,\n r: 2\n }));\n};\n\nvar MemoSvgProcedure = /*#__PURE__*/memo(SvgProcedure);\n\nvar SvgProstate = function SvgProstate(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M10.4 12.4v3.7m0-3.7v-.6c0-2.9-1.7-3.2-3.8-4.4m3.8 8.7V21M3 3c.3 1 .6 2.5 2.6 3.8.4.2.7.4 1 .6M5 10.6c-.2.5-.4 1.3-.5 1.9-.2 2.6 2.7 5 5.9 3.7M3 9c.2.3.5.6.8.8l.9.6c.6.4 1.2.7 1.9 1 .7.3 1.4.5 2.1.7.6.2 1.2.3 1.9.4m3-.1v3.7m3.8-8.7c-2.1 1.2-3.8 1.5-3.8 4.4v.6m0 3.7V21m3.8-13.6c.3-.2.7-.4 1-.6C20.4 5.5 20.6 4 21 3m-7.4 13.2c3.2 1.3 6.1-1.1 5.9-3.7 0-.6-.3-1.4-.5-1.9m-5.4 1.8c.6 0 1.3-.2 1.9-.4.7-.2 1.4-.4 2.1-.7.6-.3 1.3-.6 1.9-1l.9-.6c.3-.2.5-.5.8-.8\"\n }));\n};\n\nvar MemoSvgProstate = /*#__PURE__*/memo(SvgProstate);\n\nvar SvgQuote = function SvgQuote(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M9.961 12H5.978A2.978 2.978 0 013 9.024V7.73a2.978 2.978 0 012.978-2.978h1.006A2.977 2.977 0 019.961 7.73zM3 19.248h1.639a5.322 5.322 0 005.322-5.322V9.535M21 7.73a2.978 2.978 0 00-2.978-2.978h-1.006a2.978 2.978 0 00-2.978 2.978v1.294A2.978 2.978 0 0017.016 12H21zm-6.961 11.518h1.639A5.322 5.322 0 0021 13.926V9.535\"\n }));\n};\n\nvar MemoSvgQuote = /*#__PURE__*/memo(SvgQuote);\n\nvar SvgRadar = function SvgRadar(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 19.4A7.4 7.4 0 104.6 12a7.383 7.383 0 007.4 7.4zM4.6 12H1.7m20.5 0h-2.8M12 19.4v2.8m0-20.5v2.9\"\n }), createElement(Path, {\n d: \"M15.7 12a3.75 3.75 0 11-7.5 0A3.864 3.864 0 0112 8.2m0 3.8h0\"\n }));\n};\n\nvar MemoSvgRadar = /*#__PURE__*/memo(SvgRadar);\n\nvar SvgRadio = function SvgRadio(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M11.969 14.01a2.01 2.01 0 112.01-2.01 2.01 2.01 0 01-2.01 2.01zm6.531 4.213a9 9 0 000-12.446M16.091 15.81a5.6 5.6 0 000-7.621M5.472 5.777a9 9 0 000 12.446M7.884 8.19a5.6 5.6 0 000 7.621\"\n }));\n};\n\nvar MemoSvgRadio = /*#__PURE__*/memo(SvgRadio);\n\nvar SvgRectangleH = function SvgRectangleH(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 7.607v8.786a1.367 1.367 0 01-1.368 1.368H4.368A1.367 1.367 0 013 16.393h0V7.607a1.367 1.367 0 011.368-1.368h15.264A1.367 1.367 0 0121 7.607z\"\n }));\n};\n\nvar MemoSvgRectangleH = /*#__PURE__*/memo(SvgRectangleH);\n\nvar SvgRectangleV = function SvgRectangleV(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M7.607 3h8.786a1.367 1.367 0 011.368 1.368h0v15.264A1.367 1.367 0 0116.393 21H7.607a1.367 1.367 0 01-1.368-1.368h0V4.368A1.367 1.367 0 017.607 3z\"\n }));\n};\n\nvar MemoSvgRectangleV = /*#__PURE__*/memo(SvgRectangleV);\n\nvar SvgRectanglesOverlay = function SvgRectanglesOverlay(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M10.478 16.361h-6.11A1.367 1.367 0 013 14.993h0V6.207a1.368 1.368 0 011.368-1.368h15.264A1.368 1.368 0 0121 6.207h0v.954\"\n }), createElement(Path, {\n d: \"M19.632 21.161h-3.786a1.368 1.368 0 01-1.368-1.368h0v-7.264a1.367 1.367 0 011.368-1.368h3.786A1.367 1.367 0 0121 12.529h0v7.264a1.368 1.368 0 01-1.368 1.368z\"\n }));\n};\n\nvar MemoSvgRectanglesOverlay = /*#__PURE__*/memo(SvgRectanglesOverlay);\n\nvar SvgRectangles = function SvgRectangles(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M6.459 20.449v-3.944a.614.614 0 01.614-.615h9.854a.614.614 0 01.614.615h0v3.944a.614.614 0 01-.614.615H7.073a.614.614 0 01-.614-.615zM13.972 12.082h-3.944a.615.615 0 01-.615-.615h0V3.614A.614.614 0 0110.028 3h3.944a.614.614 0 01.615.614h0v7.853a.615.615 0 01-.615.615z\"\n }));\n};\n\nvar MemoSvgRectangles = /*#__PURE__*/memo(SvgRectangles);\n\nvar SvgRefreshCcw = function SvgRefreshCcw(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M8.4 10.044H3v-5.4M18.973 9.07A7.557 7.557 0 007.439 5.876 35.482 35.482 0 003 10.044m18 9.282v-5.9h-5.3M5.306 14.488a7.472 7.472 0 006.876 5.148 6.913 6.913 0 004.457-1.654A36.616 36.616 0 0021 13.423\"\n }));\n};\n\nvar MemoSvgRefreshCcw = /*#__PURE__*/memo(SvgRefreshCcw);\n\nvar SvgRefreshCw = function SvgRefreshCw(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 12a9 9 0 01-17.11 3.9m16.22-7.8A9 9 0 003 12m17.11-3.9l.3-2.55.3-2.55m-.6 5.1l-2.7-.55-2.7-.55M3.29 21l.3-2.55.3-2.55 2.7.55 2.7.55\"\n }));\n};\n\nvar MemoSvgRefreshCw = /*#__PURE__*/memo(SvgRefreshCw);\n\nvar SvgRepeat = function SvgRepeat(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M17.251 3L21 6.752 17.251 10.5M21 6.759H5.805A2.807 2.807 0 003 9.566v1.628m3.751 2.35L3 17.3 6.7 21M3 17.289h15.2a2.807 2.807 0 002.8-2.808v-1.628\"\n }));\n};\n\nvar MemoSvgRepeat = /*#__PURE__*/memo(SvgRepeat);\n\nvar SvgRepository = function SvgRepository(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M22 16v4a2 2 0 01-2 2H4a2 2 0 01-2-2v-4M5.966 2.143h12v6h-12z\"\n }), createElement(Path, {\n d: \"M5.966 12h12v6h-12zm4-9.857v6m4-6v6m-4 3.857v6m4-6v6\"\n }));\n};\n\nvar MemoSvgRepository = /*#__PURE__*/memo(SvgRepository);\n\nvar SvgResetDate = function SvgResetDate(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M8 5.778H3.778A1.778 1.778 0 002 7.556V20a1.778 1.778 0 001.778 1.778h12.444A1.778 1.778 0 0018 20v-3.333M6.444 4v3.556M2 11.111h6m13.851-.652a5.2 5.2 0 11-.335-5.195\"\n }), createElement(Path, {\n d: \"M20.961 1.343l.555 3.921h0l-3.86.475\"\n }));\n};\n\nvar MemoSvgResetDate = /*#__PURE__*/memo(SvgResetDate);\n\nvar SvgRewind = function SvgRewind(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 18.6c0 .331-.211.432-.469.225L12.51 12.38a.465.465 0 010-.754l8.021-6.445c.258-.207.469-.106.469.225zM11.679 5.4c0-.331-.211-.432-.469-.225l-8.021 6.448a.464.464 0 000 .754l8.021 6.445c.258.207.469.106.469-.225z\"\n }));\n};\n\nvar MemoSvgRewind = /*#__PURE__*/memo(SvgRewind);\n\nvar SvgRoot = function SvgRoot(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Circle, {\n cx: 11.995,\n cy: 15.48,\n r: 4\n }), createElement(Path, {\n d: \"M1.045 15.48h6.95m8 0h6.96m-10.96-4V4.52\"\n }));\n};\n\nvar MemoSvgRoot = /*#__PURE__*/memo(SvgRoot);\n\nvar SvgRotateCcw = function SvgRotateCcw(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3.05 2.75l.3 2.55.3 2.55 2.7-.55 2.7-.55m-4.8 0a8.954 8.954 0 11-1.5 5.7\"\n }));\n};\n\nvar MemoSvgRotateCcw = /*#__PURE__*/memo(SvgRotateCcw);\n\nvar SvgRotateCw = function SvgRotateCw(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M14.7 7l2.7.55 2.7.55.3-2.55.3-2.55m.3 9.7a9.038 9.038 0 01-9 8.3 9.011 9.011 0 117.5-14\"\n }));\n};\n\nvar MemoSvgRotateCw = /*#__PURE__*/memo(SvgRotateCw);\n\nvar SvgRss = function SvgRss(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12.288 21.009a10.338 10.338 0 00-9.231-9.29M21 21A18 18 0 003 3m.036 17.964l-.08.061.088-.067\"\n }));\n};\n\nvar MemoSvgRss = /*#__PURE__*/memo(SvgRss);\n\nvar SvgRuler = function SvgRuler(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M16.384 2.984l4.632 4.632-13.4 13.4-4.632-4.632zm-10.9 11.3l1.686 1.693m1.247-4.625l.858.859m2.134-3.738l1.672 1.672m1.263-4.607l.856.862\"\n }));\n};\n\nvar MemoSvgRuler = /*#__PURE__*/memo(SvgRuler);\n\nvar SvgRunning = function SvgRunning(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M16.155 3A1.63 1.63 0 1115 3.477 1.623 1.623 0 0116.155 3zM21 8.336l-.605.637-.606.636a2.351 2.351 0 01-2.807.453l-2.356-1.255-2.356-1.256a4.045 4.045 0 00-4.523.486l-.56.475-.561.476M3 17.907h1.867A3.571 3.571 0 007.7 16.51l3.058-3.965 3.055-3.965M14.852 21v-2.434a3.673 3.673 0 00-1.474-2.943l-1.389-1.039-1.389-1.04\"\n }));\n};\n\nvar MemoSvgRunning = /*#__PURE__*/memo(SvgRunning);\n\nvar SvgSave = function SvgSave(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M7.356 20.852v-7.814h9.288v7.814M7.356 3.069V8.41h8.952M15.907 3H5.079A2.086 2.086 0 003 5.079v13.842A2.086 2.086 0 005.079 21h13.842A2.086 2.086 0 0021 18.921V8.093z\"\n }));\n};\n\nvar MemoSvgSave = /*#__PURE__*/memo(SvgSave);\n\nvar SvgScatter = function SvgScatter(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 3v18h18M9 6.5v-.1h0m4.5 2.4v-.1h0M12 12.1V12h0m4.9 1.5v-.1h0m-2.8 4.1v-.1h0\"\n }));\n};\n\nvar MemoSvgScatter = /*#__PURE__*/memo(SvgScatter);\n\nvar SvgScissors = function SvgScissors(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M9 18a3 3 0 11-3-3 3 3 0 013 3zM6 3a3 3 0 103 3 3 3 0 00-3-3zm2.065 12.747L21.006 3m-9.439 8.43L8.315 8.181m5.885 5.856l6.808 6.941\"\n }));\n};\n\nvar MemoSvgScissors = /*#__PURE__*/memo(SvgScissors);\n\nvar SvgScreenShareOff = function SvgScreenShareOff(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M11.96 14.131v6.876m.05-9l-2.787 2.782m5.574 0L12.01 12M3.019 7.5v6.87c0 1.1.668 2 1.484 2h1.484m14.567-.57A2.372 2.372 0 0021 14.37V5.009a2 2 0 00-2-2H7.4m-4.383 0l18.034 18.035\"\n }));\n};\n\nvar MemoSvgScreenShareOff = /*#__PURE__*/memo(SvgScreenShareOff);\n\nvar SvgScreenShare = function SvgScreenShare(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M5.976 16.355H4.491c-.816 0-1.484-.9-1.484-2V5a2 2 0 012-2h13.986a2 2 0 012 2v9.361c0 1.1-.667 2-1.484 2h-1.487m-6.073-2.242V21M12 12l-2.788 2.777M12 11.991l2.787 2.786\"\n }));\n};\n\nvar MemoSvgScreenShare = /*#__PURE__*/memo(SvgScreenShare);\n\nvar SvgSearch = function SvgSearch(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M10.1 3a7.1 7.1 0 11-5.02 2.08A7.074 7.074 0 0110.1 3zM21 21l-2.9-2.9-2.9-2.9\"\n }));\n};\n\nvar MemoSvgSearch = /*#__PURE__*/memo(SvgSearch);\n\nvar SvgSend = function SvgSend(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 3l-9 3-9 3 4.55 1.45 4.55 1.45 4.45-4.45zm0 0l-3 9-3 9-1.45-4.55-1.45-4.55 4.45-4.45z\"\n }));\n};\n\nvar MemoSvgSend = /*#__PURE__*/memo(SvgSend);\n\nvar SvgServer = function SvgServer(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M6.726 17.513v.009m0-10.884v.009M2.988 4.841A1.858 1.858 0 014.84 2.989h14.308A1.858 1.858 0 0121 4.841v3.273a1.858 1.858 0 01-1.852 1.852H4.84a1.858 1.858 0 01-1.852-1.852zm0 11.045a1.858 1.858 0 011.852-1.852h14.308A1.858 1.858 0 0121 15.886v3.273a1.858 1.858 0 01-1.852 1.852H4.84a1.858 1.858 0 01-1.852-1.852z\"\n }));\n};\n\nvar MemoSvgServer = /*#__PURE__*/memo(SvgServer);\n\nvar SvgSettings = function SvgSettings(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 11.95h0a1.967 1.967 0 00-1.9-1.9h-.6a1.923 1.923 0 01-1.675-.95 1.815 1.815 0 01-.025-1.85l.15-.25.15-.25a1.965 1.965 0 00.175-1.45 1.837 1.837 0 00-.875-1.15h0a1.965 1.965 0 00-1.45-.175 1.837 1.837 0 00-1.15.875l-.15.25-.15.25a1.809 1.809 0 01-1.613.975A1.982 1.982 0 0110.2 5.35l-.1-.2-.1-.2a1.808 1.808 0 00-1.1-.875 1.852 1.852 0 00-1.4.175h0a2.09 2.09 0 00-.875 1.188A1.876 1.876 0 006.8 6.85l.15.25.15.25a1.914 1.914 0 01-.012 1.888 1.82 1.82 0 01-1.588.912h-.6a1.967 1.967 0 00-1.9 1.9h0a1.967 1.967 0 001.9 1.9h.6a1.923 1.923 0 011.675.95 1.815 1.815 0 01.025 1.85l-.15.25-.15.25a1.965 1.965 0 00-.175 1.45 1.837 1.837 0 00.875 1.15h0a1.965 1.965 0 001.45.175 1.837 1.837 0 001.15-.875l.15-.25.15-.25a1.809 1.809 0 011.613-.975 1.982 1.982 0 011.687.975l.15.25.15.25a1.837 1.837 0 001.15.875 1.965 1.965 0 001.45-.175h0a1.837 1.837 0 00.875-1.15 1.965 1.965 0 00-.175-1.45l-.15-.25-.15-.25a1.912 1.912 0 01.013-1.888 1.817 1.817 0 011.587-.912h.6a1.886 1.886 0 001.188-.625A2.046 2.046 0 0021 11.95zm-9-1.9a2 2 0 11-1.414.586A1.994 1.994 0 0112 10.05z\"\n }));\n};\n\nvar MemoSvgSettings = /*#__PURE__*/memo(SvgSettings);\n\nvar SvgShare2 = function SvgShare2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 5.841a2.8 2.8 0 11-2.8-2.8 2.8 2.8 0 012.8 2.8zM18.2 15.4a2.8 2.8 0 102.8 2.8 2.8 2.8 0 00-2.8-2.8zM5.8 9.22a2.8 2.8 0 102.8 2.8 2.8 2.8 0 00-2.8-2.8zm9.6-2.2l-6.8 3.551m7 6.6l-7-3.8\"\n }));\n};\n\nvar MemoSvgShare2 = /*#__PURE__*/memo(SvgShare2);\n\nvar SvgShare = function SvgShare(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 14.183v4.862a2.266 2.266 0 01-2.449 2H5.449a2.266 2.266 0 01-2.449-2v-4.862m9 1.823v-6.98a2.786 2.786 0 012.786-2.786H21m-3.289-3.285L21 6.24m-3.289 3.285L21 6.237\"\n }));\n};\n\nvar MemoSvgShare = /*#__PURE__*/memo(SvgShare);\n\nvar SvgShieldOff = function SvgShieldOff(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3.117 3L21 21M5.454 5.606l-.616.241v4.966h0c.017 4.113 2.813 7.774 7.162 10.144a16.023 16.023 0 004.7-3.76m2.137-4a9.146 9.146 0 00.327-2.383h0V5.847L12 3.043l-2.5.977\"\n }));\n};\n\nvar MemoSvgShieldOff = /*#__PURE__*/memo(SvgShieldOff);\n\nvar SvgShield = function SvgShield(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 20.957c-4.347-2.37-7.143-6.031-7.158-10.144h0V5.847L12 3.043l7.162 2.8v4.966h0c-.021 4.117-2.816 7.778-7.162 10.148z\"\n }));\n};\n\nvar MemoSvgShield = /*#__PURE__*/memo(SvgShield);\n\nvar SvgShoppingBag = function SvgShoppingBag(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 8.675h18v8a4.354 4.354 0 01-4.342 4.341H7.342A4.354 4.354 0 013 16.679zm13.073 3.217V7.073a4.073 4.073 0 00-8.146 0v4.819\"\n }));\n};\n\nvar MemoSvgShoppingBag = /*#__PURE__*/memo(SvgShoppingBag);\n\nvar SvgShoppingCart = function SvgShoppingCart(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M20.112 19.4a1.629 1.629 0 11-1.629-1.629 1.63 1.63 0 011.629 1.629zM9.941 17.768a1.629 1.629 0 101.628 1.632 1.629 1.629 0 00-1.628-1.632zM3 3.006h1.678a2.113 2.113 0 011.965 1.573l2.051 9.152a2.114 2.114 0 001.965 1.574h6.788a2.153 2.153 0 001.989-1.568L20.957 8.8a1.233 1.233 0 00-1.236-1.588L11.4 7.064\"\n }));\n};\n\nvar MemoSvgShoppingCart = /*#__PURE__*/memo(SvgShoppingCart);\n\nvar SvgShuffle = function SvgShuffle(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 18h-2.969a6 6 0 01-3.585-1.181M9.341 6.965a6.006 6.006 0 00-3.372-1.03H3m0 12.1h2.969A6.031 6.031 0 0012 12h0a6.031 6.031 0 016.031-6.031H21M18 9l3-3-3-3m.107 18.031l3-3-3-3\"\n }));\n};\n\nvar MemoSvgShuffle = /*#__PURE__*/memo(SvgShuffle);\n\nvar SvgSidebar = function SvgSidebar(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 5c0-1.1.9-2 2-2h14.1c1.1 0 2 .9 2 2v14.1c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V5zm6.7-2v18.1\"\n }));\n};\n\nvar MemoSvgSidebar = /*#__PURE__*/memo(SvgSidebar);\n\nvar SvgSitting = function SvgSitting(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M11 3a1.792 1.792 0 11-1.268.525A1.792 1.792 0 0111 3zm2.622 8.693a2.223 2.223 0 00-2.193-1.862h0A2.1 2.1 0 009.2 12.053l.752 3.109h7.21l2.328 4.727M4.506 8.045c.245.98-.385-1.744 2.515 10.646h8.11M11.44 21v-2.309\"\n }));\n};\n\nvar MemoSvgSitting = /*#__PURE__*/memo(SvgSitting);\n\nvar SvgSkipBack = function SvgSkipBack(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M17.767 19.664a1 1 0 001.633-.774V5.11a1 1 0 00-1.633-.774L13.9 7.5l-4.554 3.726a1 1 0 000 1.548L13.9 16.5zM4.6 21V3\"\n }));\n};\n\nvar MemoSvgSkipBack = /*#__PURE__*/memo(SvgSkipBack);\n\nvar SvgSkipForward = function SvgSkipForward(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M14.4 12.524a1 1 0 000-1.548L9.85 7.25 5.983 4.086a1 1 0 00-1.633.774v13.78a1 1 0 001.633.774L9.85 16.25zm4.75-9.774v18\"\n }));\n};\n\nvar MemoSvgSkipForward = /*#__PURE__*/memo(SvgSkipForward);\n\nvar SvgSkull = function SvgSkull(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12.913 13.468h-1.691a1.732 1.732 0 01-1.732-1.732v-.693a1.732 1.732 0 011.732-1.732h1.691a1.731 1.731 0 011.732 1.732v.693a1.731 1.731 0 01-1.732 1.732zm4.933-1.732v-.693a1.731 1.731 0 011.731-1.732H21v-.155a6.143 6.143 0 00-6.143-6.143H9.4A6.314 6.314 0 003 8.964a6.141 6.141 0 002.989 5.467A6.184 6.184 0 019.132 19.7h0a1.291 1.291 0 001.29 1.29H19a2 2 0 002-2v-5.522h-1.423a1.731 1.731 0 01-1.731-1.732zM21 9.311v4.157m-4.474 1.8l-.613.613h1.164m-3.6 3.346v1.762m3.783-1.762v1.762m2.759 0\"\n }));\n};\n\nvar MemoSvgSkull = /*#__PURE__*/memo(SvgSkull);\n\nvar SvgSlack = function SvgSlack(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M13.743 13.068H21v2.468h-7.257zm5.781-5.588A1.476 1.476 0 1021 8.956a1.476 1.476 0 00-1.476-1.476zm-9.267.984H3v2.468h7.257zM4.476 16.52A1.476 1.476 0 103 15.044a1.476 1.476 0 001.476 1.476zm11.06-6.263V3h-2.468v7.257zM7.48 4.476A1.476 1.476 0 108.956 3 1.476 1.476 0 007.48 4.476zm.984 9.267V21h2.468v-7.257zm8.056 5.781A1.476 1.476 0 1015.044 21a1.476 1.476 0 001.476-1.476z\"\n }));\n};\n\nvar MemoSvgSlack = /*#__PURE__*/memo(SvgSlack);\n\nvar SvgSlash = function SvgSlash(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M20.991 11.986A8.991 8.991 0 1112 3a8.991 8.991 0 018.991 8.986zM5.808 5.794L18.216 18.2\"\n }));\n};\n\nvar MemoSvgSlash = /*#__PURE__*/memo(SvgSlash);\n\nvar SvgSliders = function SvgSliders(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M15.492 15.842H21m-2.754 0V21m0-18v9.16M3 13.871h5.508m-2.754 0V21m0-18v7.189m9-2.031H9.246m2.754 0V3m0 18v-9.16\"\n }));\n};\n\nvar MemoSvgSliders = /*#__PURE__*/memo(SvgSliders);\n\nvar SvgSmartphone = function SvgSmartphone(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M16.393 21H7.607a1.368 1.368 0 01-1.368-1.368V4.368A1.368 1.368 0 017.607 3h8.786a1.368 1.368 0 011.368 1.368v15.264A1.368 1.368 0 0116.393 21zM12 18.232v.068M10.708 6.1h2.584\"\n }));\n};\n\nvar MemoSvgSmartphone = /*#__PURE__*/memo(SvgSmartphone);\n\nvar SvgSmile = function SvgSmile(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 20.991a9.01 9.01 0 10-9.009-9.01A9.01 9.01 0 0012 20.991zm-3.658-7.04a4.86 4.86 0 003.6 1.8 4.86 4.86 0 003.6-1.8m-6.3-4.5h.009m5.391 0h.009\"\n }));\n};\n\nvar MemoSvgSmile = /*#__PURE__*/memo(SvgSmile);\n\nvar SvgSoda = function SvgSoda(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M17.107 3H6.893m2.086 0L6.925 5.432a2.252 2.252 0 00-.532 1.455v12.127A1.986 1.986 0 008.379 21h7.242a1.986 1.986 0 001.986-1.986V6.887a2.252 2.252 0 00-.532-1.455L15.021 3M6.393 6.887h7.128M6.5 16.831a3.478 3.478 0 10.354-6.4\"\n }));\n};\n\nvar MemoSvgSoda = /*#__PURE__*/memo(SvgSoda);\n\nvar SvgSpaceship = function SvgSpaceship(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21.457 1.14l-2.891.16a1.335 1.335 0 00-.871.389l-4.833 4.828a2.029 2.029 0 01-1.436.594H8.384c-1.531.041-2.068.96-3.055 1.946l-.613.613a.289.289 0 000 .409L6.05 11.41a1.883 1.883 0 01.408 2.031c-.078.2-.11.364-.038.436l1.852 1.851 1.851 1.852c.072.072.238.04.436-.038a1.883 1.883 0 012.031.408l1.334 1.334a.289.289 0 00.409 0l.613-.613c.986-.987 1.9-1.524 1.946-3.055v-3.042a2.029 2.029 0 01.594-1.436l4.833-4.833a1.335 1.335 0 00.389-.871l.155-2.891a1.333 1.333 0 00-1.406-1.403zM11.31 12.69l-3.038 3.038M19.08 4.92h0M6.795 22.862l2.121-2.121m-6.364.707l3.536-3.536m-4.95-.707l2.121-2.121\"\n }));\n};\n\nvar MemoSvgSpaceship = /*#__PURE__*/memo(SvgSpaceship);\n\nvar SvgSparkleCircle = function SvgSparkleCircle(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M15.77 14.08a6.199 6.199 0 11-12.4 0c0-3.42 2.78-6.2 6.2-6.2s6.2 2.78 6.2 6.2zm1.22-10.85v4.11m3.2 1.74v3.13m-.96-1.56h1.92m-5.46-5.37h2.59\"\n }));\n};\n\nvar MemoSvgSparkleCircle = /*#__PURE__*/memo(SvgSparkleCircle);\n\nvar SvgSparkleRefresh = function SvgSparkleRefresh(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M17.51 3.23v4.11m3.2 1.74v3.13m-.96-1.56h1.92m-5.46-5.37h2.59m-7.3 14.84A6.203 6.203 0 015.81 9.59m8.56 8.98a6.195 6.195 0 001.62-6.4 6.205 6.205 0 00-7.07-4.18m5.45 10.58l1.74-.35 1.74-.35m-3.48.7l-.21-1.89-.21-1.89M2.33 10.28l1.74-.35 1.74-.35.21 1.89.21 1.89\"\n }));\n};\n\nvar MemoSvgSparkleRefresh = /*#__PURE__*/memo(SvgSparkleRefresh);\n\nvar SvgSparkle = function SvgSparkle(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M19.36 16.71c-1.2.98-1.84 2.13-2.37 3.9-.1.34-.67.34-.78 0-.53-1.77-1.19-2.9-2.38-3.89a.35.35 0 010-.54c1.23-1.03 1.88-2.41 2.38-4.24.1-.35.67-.35.77 0 .49 1.74 1.13 3.14 2.39 4.24.17.14.16.39 0 .53h-.01zM4.71 9.85c-.27-.19-.27-.53 0-.72 1.95-1.38 2.98-3.22 3.78-5.66.15-.47 1.07-.47 1.23 0 .77 2.33 1.79 4.18 3.79 5.65.26.19.26.53-.01.71-1.91 1.3-2.93 2.84-3.77 5.2-.16.46-1.07.46-1.24 0-.84-2.37-1.88-3.87-3.78-5.19h0z\"\n }));\n};\n\nvar MemoSvgSparkle = /*#__PURE__*/memo(SvgSparkle);\n\nvar SvgSpeaker = function SvgSpeaker(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M19.33 19.394a1.623 1.623 0 01-1.618 1.619H6.288a1.623 1.623 0 01-1.618-1.619V4.62A1.623 1.623 0 016.288 3h11.424a1.623 1.623 0 011.618 1.62zM12 10.661a3.526 3.526 0 103.525 3.525A3.525 3.525 0 0012 10.661zm0-3.927v.009\"\n }));\n};\n\nvar MemoSvgSpeaker = /*#__PURE__*/memo(SvgSpeaker);\n\nvar SvgSplit = function SvgSplit(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 4.9c0-1.1.9-2 1.9-2H19c1.1 0 2 .9 2 2V19c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V4.9zM12 3v18\"\n }));\n};\n\nvar MemoSvgSplit = /*#__PURE__*/memo(SvgSplit);\n\nvar SvgSquare = function SvgSquare(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 19a2.006 2.006 0 01-2 2H5a2.006 2.006 0 01-2-2V5a2.006 2.006 0 012-2h14a2.006 2.006 0 012 2z\"\n }));\n};\n\nvar MemoSvgSquare = /*#__PURE__*/memo(SvgSquare);\n\nvar SvgStackedBar = function SvgStackedBar(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M18 14v-4m0 10v-2m-6-6V4m0 16v-4m-6-1v-1m0 6v-1\"\n }));\n};\n\nvar MemoSvgStackedBar = /*#__PURE__*/memo(SvgStackedBar);\n\nvar SvgStar = function SvgStar(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 3.44l2.781 5.636 6.219.9-4.5 4.387 1.062 6.194L12 17.635 6.438 20.56 7.5 14.366 3 9.979l6.219-.9z\"\n }));\n};\n\nvar MemoSvgStar = /*#__PURE__*/memo(SvgStar);\n\nvar SvgSteps = function SvgSteps(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M16.851 4.551v4.966H6.877v4.966H13.2V9.517h-2.674V4.551H21v14.9H9.325v-4.968H3v4.966h6.325\"\n }));\n};\n\nvar MemoSvgSteps = /*#__PURE__*/memo(SvgSteps);\n\nvar SvgStethoscope = function SvgStethoscope(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M20.455 19.591a1.409 1.409 0 11-1.409-1.41 1.409 1.409 0 011.409 1.41zm-1.409-1.41v-5.77a2.748 2.748 0 00-5.492 0v5.77M3 3v6.818c0 1.714 1.777 3.122 3.929 3.134 2.173.012 3.981-1.4 3.984-3.134V3m-3.869 9.952v5.458c0 1.372 1.462 2.5 3.232 2.509 1.788.009 3.276-1.124 3.278-2.509v-5.458\"\n }));\n};\n\nvar MemoSvgStethoscope = /*#__PURE__*/memo(SvgStethoscope);\n\nvar SvgStopCircle = function SvgStopCircle(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M15.087 13.333a1.79 1.79 0 01-1.787 1.784h-2.649a1.79 1.79 0 01-1.784-1.784v-2.651A1.79 1.79 0 0110.651 8.9H13.3a1.79 1.79 0 011.784 1.784zM11.977 3a9.008 9.008 0 109.008 9.008A9.008 9.008 0 0011.977 3z\"\n }));\n};\n\nvar MemoSvgStopCircle = /*#__PURE__*/memo(SvgStopCircle);\n\nvar SvgSun = function SvgSun(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 12h-2M5 12H3m15.4 6.4l-.75-.75-.75-.75M5.6 5.6l.75.75.75.75M12 21v-2m0-16v2m6.4.6l-.75.75-.75.75M5.6 18.4l.75-.75.75-.75M12 8a4 4 0 11-2.828 1.172A3.984 3.984 0 0112 8z\"\n }));\n};\n\nvar MemoSvgSun = /*#__PURE__*/memo(SvgSun);\n\nvar SvgSunrise = function SvgSunrise(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M15.988 7.4l-2.05-2.2-2.05-2.2v8.3m0-8.3l-2 2.2-2 2.2M3 21.02h18M3 17.958h1.75m14.546 0h1.75M16.906 12l1.381-1.382m-12.825-.112l1.381 1.381m1.069 6.071a4 4 0 018 0\"\n }));\n};\n\nvar MemoSvgSunrise = /*#__PURE__*/memo(SvgSunrise);\n\nvar SvgSunset = function SvgSunset(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M7.888 6.9l2.05 2.2 2.05 2.2V3m0 8.3l2-2.2 2-2.2M3 21.02h18M3 17.958h1.75m14.546 0h1.75M16.906 12l1.381-1.382m-12.825-.112l1.381 1.381m1.069 6.071a4 4 0 018 0\"\n }));\n};\n\nvar MemoSvgSunset = /*#__PURE__*/memo(SvgSunset);\n\nvar SvgSurvivalCurve = function SvgSurvivalCurve(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 3v18h18M3 16.9a6.526 6.526 0 001.813-.85A3.9 3.9 0 006.1 14.6c.3-.55.45-1.35.75-2.013A1.716 1.716 0 018.5 11.4c1.15 0 1.575.875 2.025 1.75s.925 1.75 2.175 1.75c.95 0 1.525-.725 1.887-1.625A11.843 11.843 0 0015.2 10.6a30.888 30.888 0 01.512-3.138A3.472 3.472 0 0117.5 5a1.987 1.987 0 012.2.275A4.4 4.4 0 0121 7.2\"\n }));\n};\n\nvar MemoSvgSurvivalCurve = /*#__PURE__*/memo(SvgSurvivalCurve);\n\nvar SvgTablet = function SvgTablet(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 17.276v.01m-7.834 1.841a1.87 1.87 0 001.864 1.864h11.94a1.87 1.87 0 001.864-1.864V4.864A1.87 1.87 0 0017.97 3H6.03a1.87 1.87 0 00-1.864 1.864z\"\n }));\n};\n\nvar MemoSvgTablet = /*#__PURE__*/memo(SvgTablet);\n\nvar SvgTag = function SvgTag(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M20.437 13.9L13.9 20.437a1.936 1.936 0 01-2.73 0L3 12.269V3h9.269l8.168 8.168a1.936 1.936 0 010 2.732zM7.45 7.164v-.01\"\n }));\n};\n\nvar MemoSvgTag = /*#__PURE__*/memo(SvgTag);\n\nvar SvgTarget = function SvgTarget(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M13.776 12A1.776 1.776 0 1112 10.224 1.776 1.776 0 0113.776 12zM12 6.736A5.264 5.264 0 1017.264 12 5.264 5.264 0 0012 6.736zM12 3a9 9 0 109 9 9 9 0 00-9-9z\"\n }));\n};\n\nvar MemoSvgTarget = /*#__PURE__*/memo(SvgTarget);\n\nvar SvgTerminal = function SvgTerminal(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 4.791l6.762 6.762L3 18.314m7.767.895H21\"\n }));\n};\n\nvar MemoSvgTerminal = /*#__PURE__*/memo(SvgTerminal);\n\nvar SvgThermometer = function SvgThermometer(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M16.232 16.768a4.232 4.232 0 11-6.554-3.518.96.96 0 00.411-.807V4.957a1.912 1.912 0 113.822 0v7.486a.958.958 0 00.41.806 4.2 4.2 0 011.911 3.519z\"\n }));\n};\n\nvar MemoSvgThermometer = /*#__PURE__*/memo(SvgThermometer);\n\nvar SvgThumbsDown = function SvgThumbsDown(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M7.643 3H4a1 1 0 00-1 1v7.9a1 1 0 001 1h3.643c1.554 1.8 2.046 5.02 2.9 7.133a1.542 1.542 0 002.91-.141c.463-1.6 0-5.192 0-5.192H18.5a2.5 2.5 0 002.414-3.164l-1.7-6.192A3.185 3.185 0 0016.141 3h-8.5v9.9\"\n }));\n};\n\nvar MemoSvgThumbsDown = /*#__PURE__*/memo(SvgThumbsDown);\n\nvar SvgThumbsUp = function SvgThumbsUp(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M7.643 21H4a1 1 0 01-1-1v-7.9a1 1 0 011-1h3.643c1.554-1.8 2.046-5.02 2.9-7.133a1.542 1.542 0 012.91.141c.463 1.6 0 5.192 0 5.192H18.5a2.5 2.5 0 012.414 3.164l-1.7 6.192A3.185 3.185 0 0116.141 21h-8.5v-9.9\"\n }));\n};\n\nvar MemoSvgThumbsUp = /*#__PURE__*/memo(SvgThumbsUp);\n\nvar SvgThyroid = function SvgThyroid(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 16.1c-1.24 0-2.28.94-2.69 2.27-.3.98-.89 1.48-2.01 1.48-3.02 0-4.3-4.73-4.3-8.31 0-1.68.32-3.65.96-5.15.5-1.16 1.3-2.43 2.76-2.21 2.87.43 1.17 4.39 2.39 6.13.79 1.12 1.58 1.73 2.89 1.73h0c1.32 0 2.11-.61 2.9-1.73 1.21-1.73-.48-5.7 2.39-6.13 1.46-.22 2.26 1.05 2.76 2.21.64 1.5.96 3.47.96 5.15 0 3.57-1.28 8.3-4.3 8.3-1.12 0-1.7-.5-2.01-1.48-.41-1.33-1.45-2.27-2.69-2.27 0 0 0 0 0 0z\"\n }));\n};\n\nvar MemoSvgThyroid = /*#__PURE__*/memo(SvgThyroid);\n\nvar SvgToggleLeft = function SvgToggleLeft(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M16.75 16.2h-9.6a4.227 4.227 0 01-4.2-4.2h0a4.225 4.225 0 014.2-4.2h9.7a4.225 4.225 0 014.2 4.2h0a4.432 4.432 0 01-1.325 2.962A4.238 4.238 0 0116.75 16.2zM6.95 8a4 4 0 11-2.828 1.172A3.984 3.984 0 016.95 8z\"\n }));\n};\n\nvar MemoSvgToggleLeft = /*#__PURE__*/memo(SvgToggleLeft);\n\nvar SvgToggleRight = function SvgToggleRight(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M16.75 16.2h-9.6a4.225 4.225 0 01-4.2-4.2h0a4.224 4.224 0 014.2-4.2h9.7a4.225 4.225 0 014.2 4.2h0a4.432 4.432 0 01-1.325 2.962A4.238 4.238 0 0116.75 16.2zm.3-8.2a4 4 0 11-2.828 1.172A3.984 3.984 0 0117.05 8z\"\n }));\n};\n\nvar MemoSvgToggleRight = /*#__PURE__*/memo(SvgToggleRight);\n\nvar SvgTool = function SvgTool(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M18.423 8.519l2.158-2.158a5.5 5.5 0 01-7.206 7.206l-7.094 7.094a1.19 1.19 0 01-1.677 0l-1.122-1.122a1.191 1.191 0 010-1.678l7.051-7.05a5.491 5.491 0 017.291-7.292L14.9 6.441a1.985 1.985 0 000 2.8h0a1.985 1.985 0 002.8 0l.721-.721\"\n }));\n};\n\nvar MemoSvgTool = /*#__PURE__*/memo(SvgTool);\n\nvar SvgTransaction = function SvgTransaction(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M7.54 5.86a2.109 2.109 0 00-.87-.83 2.688 2.688 0 00-1.249-.294 2.658 2.658 0 00-1.7.6 1.852 1.852 0 00-.366 2.553 2.066 2.066 0 00.958.728 4.278 4.278 0 001.362.319 3.311 3.311 0 011.362.4 2.337 2.337 0 01.593.689 1.739 1.739 0 01.214.843 1.892 1.892 0 01-.718 1.442 2.739 2.739 0 01-3.04.256 2.36 2.36 0 01-.882-.881m2.219 1.225v1.736M5.421 3v1.736m5.351 9.038H21m0-6H10.772M3 19.774h18\"\n }));\n};\n\nvar MemoSvgTransaction = /*#__PURE__*/memo(SvgTransaction);\n\nvar SvgTrash2 = function SvgTrash2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3.4 6.2h17.2m-15.3 0V19a2.063 2.063 0 00.538 1.413A1.836 1.836 0 007.2 21h9.6a1.861 1.861 0 001.325-.587A2.039 2.039 0 0018.7 19V6.2M10 15.6v-4m4 0v4M9.4 6.2V3.9a.98.98 0 01.212-.637A.746.746 0 0110.2 3h3.6a.743.743 0 01.587.263.975.975 0 01.213.637v2.3\"\n }));\n};\n\nvar MemoSvgTrash2 = /*#__PURE__*/memo(SvgTrash2);\n\nvar SvgTrash = function SvgTrash(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3.4 6.2h17.2m-15.3 0V19a2.063 2.063 0 00.538 1.413A1.836 1.836 0 007.2 21h9.6a1.861 1.861 0 001.325-.587A2.039 2.039 0 0018.7 19V6.2M10 11.6l2 2 2 2m0-4l-2 2-2 2m-.6-9.4V3.9a.98.98 0 01.212-.637A.746.746 0 0110.2 3h3.6a.743.743 0 01.587.263.975.975 0 01.213.637v2.3\"\n }));\n};\n\nvar MemoSvgTrash = /*#__PURE__*/memo(SvgTrash);\n\nvar SvgTrello = function SvgTrello(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 18.485a2.446 2.446 0 01-2.439 2.439H5.515a2.445 2.445 0 01-2.439-2.439V5.439A2.446 2.446 0 015.515 3h13.046A2.447 2.447 0 0121 5.439zM16.832 7.12a.545.545 0 00-.543-.543h-1.881a.545.545 0 00-.543.543v4.285a.544.544 0 00.543.543h1.881a.544.544 0 00.543-.543zm-6.469 0a.545.545 0 00-.543-.543H7.939a.545.545 0 00-.539.543v7.938a.545.545 0 00.543.543H9.82a.545.545 0 00.543-.543z\"\n }));\n};\n\nvar MemoSvgTrello = /*#__PURE__*/memo(SvgTrello);\n\nvar SvgTrendingDown = function SvgTrendingDown(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 14.6l-.8 3.2-.8 3.2-2.95-5.95L13.5 9.1l-2.65 2.1-2.65 2.1-2.6-5.15L3 3m16.4 18l-3.15-1.25-3.15-1.25\"\n }));\n};\n\nvar MemoSvgTrendingDown = /*#__PURE__*/memo(SvgTrendingDown);\n\nvar SvgTrendingUp = function SvgTrendingUp(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 21l2.6-5.15 2.6-5.15 2.65 2.1 2.65 2.1 2.95-5.95L19.4 3l.8 3.2.8 3.2m-7.9-3.9l3.15-1.25L19.4 3\"\n }));\n};\n\nvar MemoSvgTrendingUp = /*#__PURE__*/memo(SvgTrendingUp);\n\nvar SvgTriangle = function SvgTriangle(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M10.211 4.663L6.732 11.03 3.249 17.4a2.028 2.028 0 00.037 1.978 1.989 1.989 0 001.754 1.006h13.933a2 2 0 001.716-.97 2.061 2.061 0 00.075-2.015l-3.483-6.369L13.8 4.661a2.058 2.058 0 00-3.583 0z\"\n }));\n};\n\nvar MemoSvgTriangle = /*#__PURE__*/memo(SvgTriangle);\n\nvar SvgTrophy = function SvgTrophy(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M16.915 3v8.191a5.029 5.029 0 01-4.99 5.145 5.032 5.032 0 01-4.84-5.145V3m9.83 8.219h2.022A2.063 2.063 0 0021 9.156h0a2.064 2.064 0 00-2.063-2.064h-2.022m-9.83 0H5.063A2.064 2.064 0 003 9.156h0a2.063 2.063 0 002.063 2.063h2.022m4.927 5.155V21m-2.861 0h5.668M4.895 3h14.21\"\n }));\n};\n\nvar MemoSvgTrophy = /*#__PURE__*/memo(SvgTrophy);\n\nvar SvgTruck = function SvgTruck(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M15.666 13.673a1.584 1.584 0 01-1.58 1.579H4.579A1.584 1.584 0 013 13.673V6.2a1.584 1.584 0 011.579-1.581h9.507a1.584 1.584 0 011.58 1.581zm-3.474 1.579H21v-2.165a3.982 3.982 0 00-1.166-2.815h0a3.983 3.983 0 00-2.816-1.167h-1.35m1.8 6.154a2.061 2.061 0 102.061 2.061 2.061 2.061 0 00-2.058-2.061zm-10.234 0A2.061 2.061 0 109.3 17.32a2.061 2.061 0 00-2.063-2.061z\"\n }));\n};\n\nvar MemoSvgTruck = /*#__PURE__*/memo(SvgTruck);\n\nvar SvgTv = function SvgTv(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 18.9a2.108 2.108 0 01-2.1 2.1H5.1A2.108 2.108 0 013 18.9V9.85a2.107 2.107 0 012.1-2.1h13.8a2.107 2.107 0 012.1 2.1zM7.235 3L12 7.705 16.765 3\"\n }));\n};\n\nvar MemoSvgTv = /*#__PURE__*/memo(SvgTv);\n\nvar SvgTwitch = function SvgTwitch(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M17.981 17.746h-6.445L7.635 21v-3.254H2.921V3H21v11.832zm-1.8-10.509v4.4m-5.249-4.4v4.4\"\n }));\n};\n\nvar MemoSvgTwitch = /*#__PURE__*/memo(SvgTwitch);\n\nvar SvgTwitter = function SvgTwitter(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21 4.668a8.9 8.9 0 01-1.234.729 8.946 8.946 0 01-1.335.522A3.666 3.666 0 0012 8.374v.818a8.721 8.721 0 01-7.364-3.706s-3.272 7.363 4.091 10.636A9.521 9.521 0 013 17.759c7.056 3.92 15.615.327 16.317-8.259\"\n }));\n};\n\nvar MemoSvgTwitter = /*#__PURE__*/memo(SvgTwitter);\n\nvar SvgType = function SvgType(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 4v16M4 6.133V4h16v2.133M8.089 20h7.822\"\n }));\n};\n\nvar MemoSvgType = /*#__PURE__*/memo(SvgType);\n\nvar SvgUmbrella = function SvgUmbrella(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 15.088v3.838a2.085 2.085 0 004.169 0M21 12.583l-1.154-.707a2.993 2.993 0 00-3.195-.068l-.05.03a2.784 2.784 0 01-2.909-.014l-.209-.129a2.787 2.787 0 00-2.773-.095l-.661.35a2.784 2.784 0 01-2.824-.125h0a2.786 2.786 0 00-3.011-.016L3 12.583v-.734a9 9 0 0118 0z\"\n }));\n};\n\nvar MemoSvgUmbrella = /*#__PURE__*/memo(SvgUmbrella);\n\nvar SvgUnavailable = function SvgUnavailable(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21.778 23V3.444A2.445 2.445 0 0019.333 1H4.667a2.445 2.445 0 00-2.445 2.444V23m14.667-8.556H7.111m9.778 3.733H7.111m2.445 3.732H7.111\"\n }), createElement(Circle, {\n cx: 12,\n cy: 8.004,\n r: 2.892\n }), createElement(Path, {\n d: \"M9.956 5.96l4.088 4.089\"\n }));\n};\n\nvar MemoSvgUnavailable = /*#__PURE__*/memo(SvgUnavailable);\n\nvar SvgUnderline = function SvgUnderline(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M18.485 3v7.469a6.485 6.485 0 01-12.97 0V3m-.98 18h14.93\"\n }));\n};\n\nvar MemoSvgUnderline = /*#__PURE__*/memo(SvgUnderline);\n\nvar SvgUnlock = function SvgUnlock(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M18.644 21h-13.2a.945.945 0 01-1-1v-7.2a.945.945 0 011-1h13.1a.945.945 0 011 1V20a.808.808 0 01-.225.725.966.966 0 01-.675.275zm-10.9-9.2V7.3a4.3 4.3 0 118.6 0m-4.3 8.2v2\"\n }));\n};\n\nvar MemoSvgUnlock = /*#__PURE__*/memo(SvgUnlock);\n\nvar SvgUploadCloud = function SvgUploadCloud(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M15.588 7.8a5.437 5.437 0 011.8 0 4.276 4.276 0 012.237 1.175 4.612 4.612 0 011.263 2.225 4.478 4.478 0 01-.088 2.413 4.356 4.356 0 01-1.212 1.887m-15.4-1.1a7.176 7.176 0 01-.9-1.875 6.847 6.847 0 01-.3-2.025 6.544 6.544 0 011.887-4.561A6.324 6.324 0 019.388 4a6.351 6.351 0 014.65 1.863 6.527 6.527 0 011.95 4.637m.1 5.6l-2.05-2.2-2.05-2.2V20m0-8.3l-2 2.2-2 2.2\"\n }));\n};\n\nvar MemoSvgUploadCloud = /*#__PURE__*/memo(SvgUploadCloud);\n\nvar SvgUpload = function SvgUpload(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M16.2 7.6l-2.1-2.3L12 3v13.1M12 3L9.9 5.3 7.8 7.6M21 15.1V19a2 2 0 01-2 2H5a2.006 2.006 0 01-2-2v-3.9\"\n }));\n};\n\nvar MemoSvgUpload = /*#__PURE__*/memo(SvgUpload);\n\nvar SvgUserCheck = function SvgUserCheck(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M11.5 3a3.5 3.5 0 11-2.475 1.025A3.493 3.493 0 0111.5 3zm4.7 11.5a7.841 7.841 0 00-4.7-1.6 8.024 8.024 0 00-8 8h7.1m2.8-1.8l1.05.95 1.05.95 2.5-3 2.5-3\"\n }));\n};\n\nvar MemoSvgUserCheck = /*#__PURE__*/memo(SvgUserCheck);\n\nvar SvgUserKey = function SvgUserKey(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M11.5 13H5a4 4 0 00-4 4v2\"\n }), createElement(Circle, {\n cx: 9,\n cy: 5,\n r: 4\n }), createElement(Path, {\n d: \"M15.484 16.827L11.5 20.8V23h2.2l.92-.952V20.8h.005l.518-.536h1.277l1.239-1.255a3.9 3.9 0 10-2.178-2.188zm4.15-1.958h0\"\n }));\n};\n\nvar MemoSvgUserKey = /*#__PURE__*/memo(SvgUserKey);\n\nvar SvgUserMinus = function SvgUserMinus(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M11.5 3a3.5 3.5 0 11-2.475 1.025A3.493 3.493 0 0111.5 3zm4.3 11.2a6.9 6.9 0 00-2-.9 8.658 8.658 0 00-2.3-.3 8.024 8.024 0 00-8 8h16m-4.3-3.4h5.3\"\n }));\n};\n\nvar MemoSvgUserMinus = /*#__PURE__*/memo(SvgUserMinus);\n\nvar SvgUserPlus = function SvgUserPlus(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M11.5 3a3.5 3.5 0 11-2.475 1.025A3.493 3.493 0 0111.5 3zm2.3 10.3a7.623 7.623 0 00-1.112-.225A9.333 9.333 0 0011.5 13a8.024 8.024 0 00-8 8h10m3.7-6.7V21m3.3-3.3h-6.7\"\n }));\n};\n\nvar MemoSvgUserPlus = /*#__PURE__*/memo(SvgUserPlus);\n\nvar SvgUserShield = function SvgUserShield(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M7.619 19.992A10 10 0 012 11V5a2 2 0 012-2h16a2 2 0 012 2v2.927m-7.542 10.738h-.128a2.89 2.89 0 00-2.89 2.89V23m8.542-4.335h-5.524M23 23v-1.445a2.89 2.89 0 00-2.89-2.89h-.128\"\n }), createElement(Circle, {\n cx: 17.22,\n cy: 12.885,\n r: 2.89\n }));\n};\n\nvar MemoSvgUserShield = /*#__PURE__*/memo(SvgUserShield);\n\nvar SvgUserX = function SvgUserX(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M11.5 3a3.5 3.5 0 11-2.475 1.025A3.493 3.493 0 0111.5 3zM14 13.325a7.722 7.722 0 00-2.5-.425 8.024 8.024 0 00-8 8h9.4m5.583-2.418l1.259 1.259L21 21m-5.037 0l1.26-1.259 1.259-1.259m0 0l-1.259-1.259-1.26-1.26m5.037 0l-1.259 1.26-1.259 1.259\"\n }));\n};\n\nvar MemoSvgUserX = /*#__PURE__*/memo(SvgUserX);\n\nvar SvgUser = function SvgUser(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 3a3.5 3.5 0 11-2.475 1.025A3.493 3.493 0 0112 3zm6.2 18a9.257 9.257 0 00-1.825-5.65A5.593 5.593 0 0012 13h0a5.593 5.593 0 00-4.375 2.35A9.257 9.257 0 005.8 21h12.4z\"\n }));\n};\n\nvar MemoSvgUser = /*#__PURE__*/memo(SvgUser);\n\nvar SvgUsersShield = function SvgUsersShield(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M4.415 17.517A9.961 9.961 0 012 11V5a2 2 0 012-2h16a2 2 0 012 2v2.923M18.665 23v-1.445a2.89 2.89 0 00-2.89-2.89h-5.78a2.89 2.89 0 00-2.89 2.89V23\"\n }), createElement(Circle, {\n cx: 12.885,\n cy: 12.885,\n r: 2.89\n }), createElement(Path, {\n d: \"M23 23v-1.445a2.89 2.89 0 00-2.167-2.8m-2.891-8.666a2.89 2.89 0 010 5.6\"\n }));\n};\n\nvar MemoSvgUsersShield = /*#__PURE__*/memo(SvgUsersShield);\n\nvar SvgUsers = function SvgUsers(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12.1 3.8a3.4 3.4 0 011.037-.588A3.786 3.786 0 0114.4 3a3.5 3.5 0 010 7 3.761 3.761 0 01-1.263-.213A3.378 3.378 0 0112.1 9.2M16.2 21H21a8.881 8.881 0 00-1.95-5.65A6.074 6.074 0 0014.4 13a5.683 5.683 0 00-1.038.088 3.6 3.6 0 00-.962.312M9.6 3a3.5 3.5 0 11-2.475 1.025A3.493 3.493 0 019.6 3zm6.6 18a8.881 8.881 0 00-1.95-5.65A6.074 6.074 0 009.6 13h0a6.074 6.074 0 00-4.65 2.35A8.881 8.881 0 003 21h13.2z\"\n }));\n};\n\nvar MemoSvgUsers = /*#__PURE__*/memo(SvgUsers);\n\nvar SvgVersions = function SvgVersions(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Rect, {\n x: 2,\n y: 9,\n width: 20,\n height: 14,\n rx: 2\n }), createElement(Path, {\n d: \"M19 5H5m11-4H8\"\n }));\n};\n\nvar MemoSvgVersions = /*#__PURE__*/memo(SvgVersions);\n\nvar SvgVerticalArrows = function SvgVerticalArrows(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M11.988 20.989V3.007m.006 17.977l2.781-2.784m-2.781 2.791L9.2 18.213m2.786-15.2l-2.762 2.8m2.762-2.811L14.8 5.767\"\n }));\n};\n\nvar MemoSvgVerticalArrows = /*#__PURE__*/memo(SvgVerticalArrows);\n\nvar SvgVideo2Off = function SvgVideo2Off(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3.006 3l17.978 18m-4.893-4.625a2.27 2.27 0 01-2.241 1.915H5.269A2.269 2.269 0 013 16.02V7.98a2.269 2.269 0 012.269-2.27m6.092 0h2.489a2.269 2.269 0 012.269 2.27v2.314M21 15.706V8.294l-4.881 2\"\n }));\n};\n\nvar MemoSvgVideo2Off = /*#__PURE__*/memo(SvgVideo2Off);\n\nvar SvgVideo2 = function SvgVideo2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M13.85 18.29H5.269A2.269 2.269 0 013 16.02V7.98a2.269 2.269 0 012.269-2.27h8.581a2.269 2.269 0 012.269 2.27v8.04a2.269 2.269 0 01-2.269 2.27zm2.269-4.584l4.881 2V8.294l-4.881 2\"\n }));\n};\n\nvar MemoSvgVideo2 = /*#__PURE__*/memo(SvgVideo2);\n\nvar SvgVideo = function SvgVideo(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12.562 15.116H5a2 2 0 01-2-2V6.029a2 2 0 012-2h7.562a2 2 0 012 2v7.087a2 2 0 01-2 2zm0 4.855l-3.781-4.855L5 19.971m12.961-8.435H21V7.608h-3.039M6.868 7.74v.071\"\n }));\n};\n\nvar MemoSvgVideo = /*#__PURE__*/memo(SvgVideo);\n\nvar SvgVirus = function SvgVirus(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M18.7 12A6.7 6.7 0 1112 5.3a6.7 6.7 0 016.7 6.7zM12 3v2.3M7.248 7.248L5.621 5.62M3 12h2.3m6.8 9v-2.3m-6.483-.321l1.627-1.628M18.379 5.622l-1.627 1.627M18.7 12H21m-2.621 6.376l-1.627-1.627m-8.483-4.8v.1m3.209 3.43v.1m1.061-7.306v.1m2.75 6v.1\"\n }));\n};\n\nvar MemoSvgVirus = /*#__PURE__*/memo(SvgVirus);\n\nvar SvgVoicemail = function SvgVoicemail(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21.005 12a3.746 3.746 0 11-3.745-3.745A3.745 3.745 0 0121.005 12zM6.73 8.255A3.745 3.745 0 1010.476 12 3.745 3.745 0 006.73 8.255zm10.658 7.49H6.635\"\n }));\n};\n\nvar MemoSvgVoicemail = /*#__PURE__*/memo(SvgVoicemail);\n\nvar SvgVolume1 = function SvgVolume1(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M14.525 8.1a5.058 5.058 0 01-.237 7.325m-3-8.519c0-.859-.443-1.016-.985-.349L8.9 8.282a3.726 3.726 0 01-2.545 1.213H4.568a1.567 1.567 0 00-1.562 1.563v1.884a1.567 1.567 0 001.562 1.563h1.787A3.726 3.726 0 018.9 15.718l1.4 1.728c.542.667.985.51.985-.349z\"\n }));\n};\n\nvar MemoSvgVolume1 = /*#__PURE__*/memo(SvgVolume1);\n\nvar SvgVolume2 = function SvgVolume2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M18.089 4.532a10.112 10.112 0 01-.229 14.461m-3.572-3.571a5.058 5.058 0 00.237-7.322M11.29 6.9c0-.859-.443-1.016-.985-.349L8.9 8.282a3.726 3.726 0 01-2.545 1.213H4.568a1.567 1.567 0 00-1.562 1.563v1.884a1.567 1.567 0 001.562 1.563h1.787A3.726 3.726 0 018.9 15.718l1.4 1.728c.542.667.985.51.985-.349z\"\n }));\n};\n\nvar MemoSvgVolume2 = /*#__PURE__*/memo(SvgVolume2);\n\nvar SvgVolumeX = function SvgVolumeX(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M18.382 11.478l1.311 1.312 1.312 1.31m-5.246 0l1.311-1.31 1.312-1.312m0 0l-1.312-1.311-1.311-1.312m5.246 0l-1.312 1.312-1.311 1.311M11.29 17.1c0 .859-.443 1.016-.985.349L8.9 15.718a3.726 3.726 0 00-2.547-1.213H4.568a1.567 1.567 0 01-1.562-1.563v-1.884a1.567 1.567 0 011.562-1.563h1.787A3.726 3.726 0 008.9 8.282l1.4-1.728c.542-.667.985-.51.985.349z\"\n }));\n};\n\nvar MemoSvgVolumeX = /*#__PURE__*/memo(SvgVolumeX);\n\nvar SvgVolume = function SvgVolume(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M16.142 17.1c0 .859-.443 1.016-.985.349l-1.4-1.728a3.724 3.724 0 00-2.547-1.213H9.42a1.567 1.567 0 01-1.562-1.563v-1.887A1.567 1.567 0 019.42 9.495h1.787a3.724 3.724 0 002.547-1.213l1.4-1.728c.542-.667.985-.51.985.349z\"\n }));\n};\n\nvar MemoSvgVolume = /*#__PURE__*/memo(SvgVolume);\n\nvar SvgWatch2 = function SvgWatch2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M7.9 8.6a5.717 5.717 0 011.787-1.45 5.137 5.137 0 014.625 0A5.71 5.71 0 0116.1 8.6m0 6.8a4.587 4.587 0 00.9-1.55 5.628 5.628 0 00.3-1.85 5.084 5.084 0 00-.337-1.812A7.265 7.265 0 0016.1 8.6m0 6.8a5.71 5.71 0 01-1.788 1.45 5.137 5.137 0 01-4.625 0A5.717 5.717 0 017.9 15.4m0-6.8a5.453 5.453 0 00-.9 1.588A5.349 5.349 0 006.7 12a5.084 5.084 0 00.337 1.812A7.265 7.265 0 007.9 15.4m0-6.8l.25-1.95.25-1.95a2.057 2.057 0 01.537-1.225A1.474 1.474 0 0110 3h3.859a1.717 1.717 0 011.253.475A1.96 1.96 0 0115.7 4.7l.25 1.95.273 2.13M16.1 15.4l-.25 1.95-.25 1.95a1.993 1.993 0 01-.55 1.225A1.6 1.6 0 0113.9 21H10a1.632 1.632 0 01-1.113-.475A1.964 1.964 0 018.3 19.3l-.25-1.95-.273-2.13\"\n }));\n};\n\nvar MemoSvgWatch2 = /*#__PURE__*/memo(SvgWatch2);\n\nvar SvgWatch = function SvgWatch(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M7.9 8.6a5.717 5.717 0 011.787-1.45 5.137 5.137 0 014.625 0A5.71 5.71 0 0116.1 8.6m0 6.8a4.587 4.587 0 00.9-1.55 5.628 5.628 0 00.3-1.85 5.084 5.084 0 00-.337-1.812A7.265 7.265 0 0016.1 8.6m0 6.8a5.71 5.71 0 01-1.788 1.45 5.137 5.137 0 01-4.625 0A5.717 5.717 0 017.9 15.4m0-6.8a5.453 5.453 0 00-.9 1.588A5.349 5.349 0 006.7 12a5.084 5.084 0 00.337 1.812A7.265 7.265 0 007.9 15.4m0-6.8l.25-1.95.25-1.95a2.057 2.057 0 01.537-1.225A1.474 1.474 0 0110 3h4a1.627 1.627 0 011.112.475A1.96 1.96 0 0115.7 4.7l.25 1.95.25 1.95m-.1 6.8l-.25 1.95-.25 1.95a1.993 1.993 0 01-.55 1.225A1.6 1.6 0 0113.9 21H10a1.632 1.632 0 01-1.113-.475A1.964 1.964 0 018.3 19.3l-.25-1.95-.25-1.95M12 10v2l.85.6.85.6\"\n }));\n};\n\nvar MemoSvgWatch = /*#__PURE__*/memo(SvgWatch);\n\nvar SvgWebhook = function SvgWebhook(props) {\n return createElement(Svg, Object.assign({\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeMiterlimit: 10,\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M9.3 10.5C7.9 9.6 7 8.1 7 6.3c0-2.8 2.2-5 5-5s5 2.2 5 5c0 .4-.1.9-.2 1.3\"\n }), createElement(Circle, {\n cx: 12,\n cy: 6.3,\n r: 2\n }), createElement(Path, {\n d: \"M15.5 11.9c.7-.4 1.6-.7 2.5-.7 2.8 0 5 2.2 5 5s-2.2 5-5 5c-.4 0-.9-.1-1.3-.2\"\n }), createElement(Circle, {\n cx: 18,\n cy: 16.2,\n r: 2\n }), createElement(Path, {\n d: \"M15.5 11.9l-2.3-4M11 16.2h5m-6.7-5.7l-2.3 4m4 1.7c0 2.8-2.2 5-5 5s-5-2.2-5-5c0-2.3 1.6-4.3 3.7-4.8\"\n }), createElement(Circle, {\n cx: 6,\n cy: 16.2,\n r: 2\n }));\n};\n\nvar MemoSvgWebhook = /*#__PURE__*/memo(SvgWebhook);\n\nvar SvgWheelchair = function SvgWheelchair(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12.982 2.988a1.821 1.821 0 11-1.286.535 1.821 1.821 0 011.286-.535zm2.818 8.254a2.392 2.392 0 00-2.406-1.9h0a2.226 2.226 0 00-2.438 2.264l.825 3.168H17.8l1.206 5.381M8.16 10.173a5.917 5.917 0 00-1.226.307 5.39 5.39 0 00.533 10.277 5.985 5.985 0 007.117-3.021m6.285 1.8l-1.859.624M6.934 10.48L5.892 7.246H3.131\"\n }));\n};\n\nvar MemoSvgWheelchair = /*#__PURE__*/memo(SvgWheelchair);\n\nvar SvgWifiOff = function SvgWifiOff(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M15.892 10.787a8.536 8.536 0 012.155 1.645M6.485 6.832a12.682 12.682 0 00-3.479 2.45m18 .192a12.6 12.6 0 00-9.09-3.865m3.148 9.807a4.226 4.226 0 00-6.121-.2m.857-5.157a8.456 8.456 0 00-3.836 2.181m6.041 6.05v-.009M3 3.046l18 17.936\"\n }));\n};\n\nvar MemoSvgWifiOff = /*#__PURE__*/memo(SvgWifiOff);\n\nvar SvgWifi = function SvgWifi(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M3 9.3a12.635 12.635 0 0118 .191m-2.958 2.959a8.452 8.452 0 00-12.087-.192m9.1 3.177a4.226 4.226 0 00-6.122-.2M12 18.306V18.3\"\n }));\n};\n\nvar MemoSvgWifi = /*#__PURE__*/memo(SvgWifi);\n\nvar SvgWind = function SvgWind(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M8.126 5.514a2.514 2.514 0 112.514 2.513H3m9.331 10.459a2.514 2.514 0 102.513-2.513H3m0-3.457h15.185a2.826 2.826 0 10-2.826-2.826\"\n }));\n};\n\nvar MemoSvgWind = /*#__PURE__*/memo(SvgWind);\n\nvar SvgX2 = function SvgX2(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M7.757 7.757l8.486 8.486m0-8.486l-8.486 8.486\"\n }));\n};\n\nvar MemoSvgX2 = /*#__PURE__*/memo(SvgX2);\n\nvar SvgX3 = function SvgX3(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M8.464 8.464l7.072 7.072m0-7.072l-7.072 7.072\"\n }));\n};\n\nvar MemoSvgX3 = /*#__PURE__*/memo(SvgX3);\n\nvar SvgXCircle = function SvgXCircle(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 3a9 9 0 11-6.364 2.636A8.972 8.972 0 0112 3zM9 9l3 3 3 3m0-6l-3 3-3 3\"\n }));\n};\n\nvar MemoSvgXCircle = /*#__PURE__*/memo(SvgXCircle);\n\nvar SvgXOctogon = function SvgXOctogon(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 12l1.678 1.679 1.679 1.679m-6.715 0l1.679-1.679L12 12m0 0l-1.679-1.678-1.683-1.675m6.715 0l-1.679 1.679L12 12m3.723-8.983H8.281l-5.26 5.26v7.438l5.26 5.26h7.438l5.26-5.26V8.281z\"\n }));\n};\n\nvar MemoSvgXOctogon = /*#__PURE__*/memo(SvgXOctogon);\n\nvar SvgXSquare = function SvgXSquare(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12 12l1.678 1.679 1.679 1.679m-6.715 0l1.679-1.679L12 12m0 0l-1.679-1.678-1.683-1.675m6.715 0l-1.679 1.679L12 12m9-6.557A2.454 2.454 0 0018.551 3H5.447A2.454 2.454 0 003 5.446v13.1A2.454 2.454 0 005.447 21h13.108A2.452 2.452 0 0021 18.554z\"\n }));\n};\n\nvar MemoSvgXSquare = /*#__PURE__*/memo(SvgXSquare);\n\nvar SvgX = function SvgX(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M5.636 5.636l12.728 12.728m-12.728 0L18.364 5.636m0 0\"\n }));\n};\n\nvar MemoSvgX = /*#__PURE__*/memo(SvgX);\n\nvar SvgYouTube = function SvgYouTube(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M21.005 16.4a3 3 0 01-2.04 2.691 27.817 27.817 0 01-13.939 0 3 3 0 01-2.04-2.691V7.568a3 3 0 012.04-2.691 27.794 27.794 0 0113.939 0 3 3 0 012.04 2.691zM10.142 8.388v7.224L15.86 12z\"\n }));\n};\n\nvar MemoSvgYouTube = /*#__PURE__*/memo(SvgYouTube);\n\nvar SvgZapOff = function SvgZapOff(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12.456 6.6l.45-3.6m5.431 9.323l1.769-2.123h-4.05m-7.85-1.5l-2.15 2.55-2.15 2.55h8.1l-.45 3.6-.45 3.6 4.5-5.4M12.906 3l-1.744 2.118M3 3.012L21.008 21\"\n }));\n};\n\nvar MemoSvgZapOff = /*#__PURE__*/memo(SvgZapOff);\n\nvar SvgZap = function SvgZap(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M12.9 3l-2.35 2.85L8.2 8.7l-2.15 2.55L3.9 13.8H12l-.45 3.6-.45 3.6 4.5-5.4 4.5-5.4H12l.45-3.6.45-3.6\"\n }));\n};\n\nvar MemoSvgZap = /*#__PURE__*/memo(SvgZap);\n\nvar SvgZoomIn = function SvgZoomIn(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M10.1 3a7.1 7.1 0 11-5.02 2.08A7.074 7.074 0 0110.1 3zM21 21l-2.9-2.9-2.9-2.9m-5.1-8.1v6m3-3h-6\"\n }));\n};\n\nvar MemoSvgZoomIn = /*#__PURE__*/memo(SvgZoomIn);\n\nvar SvgZoomOut = function SvgZoomOut(props) {\n return createElement(Svg, Object.assign({\n width: 24,\n height: 24,\n stroke: \"currentColor\",\n fill: \"none\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n strokeWidth: 2,\n viewBox: \"0 0 24 24\"\n }, props), createElement(Path, {\n d: \"M10.1 3a7.1 7.1 0 11-5.02 2.08A7.074 7.074 0 0110.1 3zm3 7.1h-6M21 21l-2.9-2.9-2.9-2.9\"\n }));\n};\n\nvar MemoSvgZoomOut = /*#__PURE__*/memo(SvgZoomOut);\n\nexport { MemoSvgAccessPolicy as AccessPolicy, MemoSvgActivity as Activity, MemoSvgActivityFolder as ActivityFolder, MemoSvgActivityMonitor as ActivityMonitor, MemoSvgAirplay as Airplay, MemoSvgAlcohol as Alcohol, MemoSvgAlertCircle as AlertCircle, MemoSvgAlertOctagon as AlertOctagon, MemoSvgAlertTriangle as AlertTriangle, MemoSvgAlignCenter as AlignCenter, MemoSvgAlignJustify as AlignJustify, MemoSvgAlignLeft as AlignLeft, MemoSvgAlignRight as AlignRight, MemoSvgAmbulance as Ambulance, MemoSvgAnchor as Anchor, MemoSvgAperture as Aperture, MemoSvgApple as Apple, MemoSvgArchive as Archive, MemoSvgArrowDown as ArrowDown, MemoSvgArrowDown2 as ArrowDown2, MemoSvgArrowDown3 as ArrowDown3, MemoSvgArrowDownCircle as ArrowDownCircle, MemoSvgArrowDownLeft as ArrowDownLeft, MemoSvgArrowDownRight as ArrowDownRight, MemoSvgArrowLeft as ArrowLeft, MemoSvgArrowLeft2 as ArrowLeft2, MemoSvgArrowLeft3 as ArrowLeft3, MemoSvgArrowLeftCircle as ArrowLeftCircle, MemoSvgArrowRight as ArrowRight, MemoSvgArrowRight2 as ArrowRight2, MemoSvgArrowRight3 as ArrowRight3, MemoSvgArrowRightCircle as ArrowRightCircle, MemoSvgArrowUp as ArrowUp, MemoSvgArrowUp2 as ArrowUp2, MemoSvgArrowUp3 as ArrowUp3, MemoSvgArrowUpCircle as ArrowUpCircle, MemoSvgArrowUpLeft as ArrowUpLeft, MemoSvgArrowUpRight as ArrowUpRight, MemoSvgAtSymbol as AtSymbol, MemoSvgAward as Award, MemoSvgBandAid as BandAid, MemoSvgBank as Bank, MemoSvgBarChart as BarChart, MemoSvgBarChart2 as BarChart2, MemoSvgBattery as Battery, MemoSvgBatteryCharging as BatteryCharging, MemoSvgBeaker as Beaker, MemoSvgBell as Bell, MemoSvgBellOff as BellOff, MemoSvgBold as Bold, MemoSvgBoneJoint as BoneJoint, MemoSvgBook as Book, MemoSvgBookOpen as BookOpen, MemoSvgBookmark as Bookmark, MemoSvgBowl as Bowl, MemoSvgBox as Box, MemoSvgBrain as Brain, MemoSvgBread as Bread, MemoSvgBriefcase as Briefcase, MemoSvgBroccoli as Broccoli, MemoSvgBurger as Burger, MemoSvgCalculator as Calculator, MemoSvgCalendar as Calendar, MemoSvgCamera as Camera, MemoSvgCameraOff as CameraOff, MemoSvgCancer as Cancer, MemoSvgCapsulePills as CapsulePills, MemoSvgCast as Cast, MemoSvgCheck as Check, MemoSvgCheck2 as Check2, MemoSvgCheck3 as Check3, MemoSvgCheckCircle as CheckCircle, MemoSvgCheckFile as CheckFile, MemoSvgCheckList as CheckList, MemoSvgCheckSquare as CheckSquare, MemoSvgChevronDown as ChevronDown, MemoSvgChevronDown2 as ChevronDown2, MemoSvgChevronLeft as ChevronLeft, MemoSvgChevronLeft2 as ChevronLeft2, MemoSvgChevronRight as ChevronRight, MemoSvgChevronRight2 as ChevronRight2, MemoSvgChevronUp as ChevronUp, MemoSvgChevronUp2 as ChevronUp2, MemoSvgChroma as Chroma, MemoSvgChrome as Chrome, MemoSvgCircle as Circle, MemoSvgClearList as ClearList, MemoSvgClipboard as Clipboard, MemoSvgClock as Clock, MemoSvgClockForward as ClockForward, MemoSvgClockRewind as ClockRewind, MemoSvgCloud as Cloud, MemoSvgCloudDrizzle as CloudDrizzle, MemoSvgCloudLightning as CloudLightning, MemoSvgCloudOff as CloudOff, MemoSvgCloudRain as CloudRain, MemoSvgCloudSnow as CloudSnow, MemoSvgCode as Code, MemoSvgCodeReview as CodeReview, MemoSvgCodepen as Codepen, MemoSvgCoffee as Coffee, MemoSvgColumn as Column, MemoSvgCommand as Command, MemoSvgCompass as Compass, MemoSvgContainer as Container, MemoSvgControlPolicy as ControlPolicy, MemoSvgCopy as Copy, MemoSvgCornerDownLeft as CornerDownLeft, MemoSvgCornerDownLeft2 as CornerDownLeft2, MemoSvgCornerLeftDown as CornerLeftDown, MemoSvgCornerLeftDown2 as CornerLeftDown2, MemoSvgCornerLeftUp as CornerLeftUp, MemoSvgCornerLeftUp2 as CornerLeftUp2, MemoSvgCornerRightDown as CornerRightDown, MemoSvgCornerRightDown2 as CornerRightDown2, MemoSvgCornerRightUp as CornerRightUp, MemoSvgCornerRightUp2 as CornerRightUp2, MemoSvgCornerUpRight as CornerUpRight, MemoSvgCornerUpRight2 as CornerUpRight2, MemoSvgCpu as Cpu, MemoSvgCreditCard as CreditCard, MemoSvgCrop as Crop, MemoSvgCrosshair as Crosshair, MemoSvgCryptoKey as CryptoKey, MemoSvgDatabase as Database, MemoSvgDelete as Delete, MemoSvgDice as Dice, MemoSvgDisc as Disc, MemoSvgDisguise as Disguise, MemoSvgDollarSign as DollarSign, MemoSvgDomain as Domain, MemoSvgDomainRecord as DomainRecord, MemoSvgDownload as Download, MemoSvgDownloadCloud as DownloadCloud, MemoSvgDroplet as Droplet, MemoSvgEdit as Edit, MemoSvgEdit2 as Edit2, MemoSvgExternalLink as ExternalLink, MemoSvgEye as Eye, MemoSvgEyeGlasses as EyeGlasses, MemoSvgEyeOff as EyeOff, MemoSvgFacebook as Facebook, MemoSvgFastForward as FastForward, MemoSvgFemaleSymbol as FemaleSymbol, MemoSvgFile as File, MemoSvgFileText as FileText, MemoSvgFilter as Filter, MemoSvgFire as Fire, MemoSvgFlag as Flag, MemoSvgFloss as Floss, MemoSvgFolder as Folder, MemoSvgFolderMinus as FolderMinus, MemoSvgFolderPlus as FolderPlus, MemoSvgFontSize as FontSize, MemoSvgFork as Fork, MemoSvgFunction as Function, MemoSvgGauge as Gauge, MemoSvgGauge2 as Gauge2, MemoSvgGif as Gif, MemoSvgGif2 as Gif2, MemoSvgGift as Gift, MemoSvgGlassStraw as GlassStraw, MemoSvgGlobe as Globe, MemoSvgGrid as Grid, MemoSvgHardDrive as HardDrive, MemoSvgHash as Hash, MemoSvgHeadphones as Headphones, MemoSvgHeart as Heart, MemoSvgHeartCheck as HeartCheck, MemoSvgHeartCircle as HeartCircle, MemoSvgHeartFolder as HeartFolder, MemoSvgHeartHand as HeartHand, MemoSvgHeartList as HeartList, MemoSvgHeatmap as Heatmap, MemoSvgHelix as Helix, MemoSvgHelix2 as Helix2, MemoSvgHelpCircle as HelpCircle, MemoSvgHexagon as Hexagon, MemoSvgHexagons as Hexagons, MemoSvgHexagons2 as Hexagons2, MemoSvgHome as Home, MemoSvgHook as Hook, MemoSvgHorizontalArrows as HorizontalArrows, MemoSvgHorizontalArrows2 as HorizontalArrows2, MemoSvgHospitalSign as HospitalSign, MemoSvgHost as Host, MemoSvgHostAgent as HostAgent, MemoSvgImage as Image, MemoSvgInbox as Inbox, MemoSvgInfo as Info, MemoSvgInstagram as Instagram, MemoSvgItalic as Italic, MemoSvgIv as Iv, MemoSvgKey as Key, MemoSvgKeyLock as KeyLock, MemoSvgKidney as Kidney, MemoSvgLayers as Layers, MemoSvgLayout as Layout, MemoSvgLeaf as Leaf, MemoSvgLibrary as Library, MemoSvgLifeAscent as LifeAscent, MemoSvgLifeBuoy as LifeBuoy, MemoSvgLifeology as Lifeology, MemoSvgLightbulb as Lightbulb, MemoSvgLineHeight as LineHeight, MemoSvgLink as Link, MemoSvgLink2 as Link2, MemoSvgLinkBroken as LinkBroken, MemoSvgLinkedin as Linkedin, MemoSvgList as List, MemoSvgLiver as Liver, MemoSvgLiver2 as Liver2, MemoSvgLoader as Loader, MemoSvgLoader2 as Loader2, MemoSvgLock as Lock, MemoSvgLogOut as LogOut, MemoSvgLogin as Login, MemoSvgMail as Mail, MemoSvgMailOpen as MailOpen, MemoSvgMaleSymbol as MaleSymbol, MemoSvgMap as Map, MemoSvgMapPin as MapPin, MemoSvgMask as Mask, MemoSvgMaxDate as MaxDate, MemoSvgMaximize as Maximize, MemoSvgMaximize2 as Maximize2, MemoSvgMedicalBriefcase as MedicalBriefcase, MemoSvgMenu as Menu, MemoSvgMessageCircle as MessageCircle, MemoSvgMessageSquare as MessageSquare, MemoSvgMessageThumbsUp as MessageThumbsUp, MemoSvgMic as Mic, MemoSvgMicOff as MicOff, MemoSvgMicroscope as Microscope, MemoSvgMinimize as Minimize, MemoSvgMinimize2 as Minimize2, MemoSvgMinus as Minus, MemoSvgMinus2 as Minus2, MemoSvgMinus3 as Minus3, MemoSvgMinusCircle as MinusCircle, MemoSvgMinusSquare as MinusSquare, MemoSvgMolecule as Molecule, MemoSvgMoneyBag as MoneyBag, MemoSvgMonitor as Monitor, MemoSvgMood as Mood, MemoSvgMoon as Moon, MemoSvgMoreHorizontal as MoreHorizontal, MemoSvgMoreVertical as MoreVertical, MemoSvgMortarBoard as MortarBoard, MemoSvgMousePointer as MousePointer, MemoSvgMove as Move, MemoSvgMusic as Music, MemoSvgNavigation as Navigation, MemoSvgNavigation2 as Navigation2, MemoSvgNeedle as Needle, MemoSvgNodeMesh as NodeMesh, MemoSvgNodeTree as NodeTree, MemoSvgNumberList as NumberList, MemoSvgOctagon as Octagon, MemoSvgOfficeBuilding as OfficeBuilding, MemoSvgOncoprint as Oncoprint, MemoSvgPackage as Package, MemoSvgPaintCan as PaintCan, MemoSvgPaperclip as Paperclip, MemoSvgPasswordPolicy as PasswordPolicy, MemoSvgPause as Pause, MemoSvgPauseCircle as PauseCircle, MemoSvgPenTool as PenTool, MemoSvgPercent as Percent, MemoSvgPhc as Phc, MemoSvgPhone as Phone, MemoSvgPhoneCall as PhoneCall, MemoSvgPhoneForwarded as PhoneForwarded, MemoSvgPhoneIncoming as PhoneIncoming, MemoSvgPhoneMissed as PhoneMissed, MemoSvgPhoneOff as PhoneOff, MemoSvgPhoneOutgoing as PhoneOutgoing, MemoSvgPieChart as PieChart, MemoSvgPill as Pill, MemoSvgPlane as Plane, MemoSvgPlanet as Planet, MemoSvgPlant as Plant, MemoSvgPlayCircle as PlayCircle, MemoSvgPlotCurve as PlotCurve, MemoSvgPlotNeedle as PlotNeedle, MemoSvgPlus as Plus, MemoSvgPlus2 as Plus2, MemoSvgPlus3 as Plus3, MemoSvgPlusCircle as PlusCircle, MemoSvgPlusSquare as PlusSquare, MemoSvgPocket as Pocket, MemoSvgPower as Power, MemoSvgPrecisionWellness as PrecisionWellness, MemoSvgPrint as Print, MemoSvgProcedure as Procedure, MemoSvgProstate as Prostate, MemoSvgQuote as Quote, MemoSvgRadar as Radar, MemoSvgRadio as Radio, MemoSvgRectangleH as RectangleH, MemoSvgRectangleV as RectangleV, MemoSvgRectangles as Rectangles, MemoSvgRectanglesOverlay as RectanglesOverlay, MemoSvgRefreshCcw as RefreshCcw, MemoSvgRefreshCw as RefreshCw, MemoSvgRepeat as Repeat, MemoSvgRepository as Repository, MemoSvgResetDate as ResetDate, MemoSvgRewind as Rewind, MemoSvgRoot as Root, MemoSvgRotateCcw as RotateCcw, MemoSvgRotateCw as RotateCw, MemoSvgRss as Rss, MemoSvgRuler as Ruler, MemoSvgRunning as Running, MemoSvgSave as Save, MemoSvgScatter as Scatter, MemoSvgScissors as Scissors, MemoSvgScreenShare as ScreenShare, MemoSvgScreenShareOff as ScreenShareOff, MemoSvgSearch as Search, MemoSvgSend as Send, MemoSvgServer as Server, MemoSvgSettings as Settings, MemoSvgShare as Share, MemoSvgShare2 as Share2, MemoSvgShield as Shield, MemoSvgShieldOff as ShieldOff, MemoSvgShoppingBag as ShoppingBag, MemoSvgShoppingCart as ShoppingCart, MemoSvgShuffle as Shuffle, MemoSvgSidebar as Sidebar, MemoSvgSitting as Sitting, MemoSvgSkipBack as SkipBack, MemoSvgSkipForward as SkipForward, MemoSvgSkull as Skull, MemoSvgSlack as Slack, MemoSvgSlash as Slash, MemoSvgSliders as Sliders, MemoSvgSmartphone as Smartphone, MemoSvgSmile as Smile, MemoSvgSoda as Soda, MemoSvgSpaceship as Spaceship, MemoSvgSparkle as Sparkle, MemoSvgSparkleCircle as SparkleCircle, MemoSvgSparkleRefresh as SparkleRefresh, MemoSvgSpeaker as Speaker, MemoSvgSplit as Split, MemoSvgSquare as Square, MemoSvgStackedBar as StackedBar, MemoSvgStar as Star, MemoSvgSteps as Steps, MemoSvgStethoscope as Stethoscope, MemoSvgStopCircle as StopCircle, MemoSvgSun as Sun, MemoSvgSunrise as Sunrise, MemoSvgSunset as Sunset, MemoSvgSurvivalCurve as SurvivalCurve, MemoSvgTablet as Tablet, MemoSvgTag as Tag, MemoSvgTarget as Target, MemoSvgTerminal as Terminal, MemoSvgThermometer as Thermometer, MemoSvgThumbsDown as ThumbsDown, MemoSvgThumbsUp as ThumbsUp, MemoSvgThyroid as Thyroid, MemoSvgToggleLeft as ToggleLeft, MemoSvgToggleRight as ToggleRight, MemoSvgTool as Tool, MemoSvgTransaction as Transaction, MemoSvgTrash as Trash, MemoSvgTrash2 as Trash2, MemoSvgTrello as Trello, MemoSvgTrendingDown as TrendingDown, MemoSvgTrendingUp as TrendingUp, MemoSvgTriangle as Triangle, MemoSvgTrophy as Trophy, MemoSvgTruck as Truck, MemoSvgTv as Tv, MemoSvgTwitch as Twitch, MemoSvgTwitter as Twitter, MemoSvgType as Type, MemoSvgUmbrella as Umbrella, MemoSvgUnavailable as Unavailable, MemoSvgUnderline as Underline, MemoSvgUnlock as Unlock, MemoSvgUpload as Upload, MemoSvgUploadCloud as UploadCloud, MemoSvgUser as User, MemoSvgUserCheck as UserCheck, MemoSvgUserKey as UserKey, MemoSvgUserMinus as UserMinus, MemoSvgUserPlus as UserPlus, MemoSvgUserShield as UserShield, MemoSvgUserX as UserX, MemoSvgUsers as Users, MemoSvgUsersShield as UsersShield, MemoSvgVersions as Versions, MemoSvgVerticalArrows as VerticalArrows, MemoSvgVideo as Video, MemoSvgVideo2 as Video2, MemoSvgVideo2Off as Video2Off, MemoSvgVirus as Virus, MemoSvgVoicemail as Voicemail, MemoSvgVolume as Volume, MemoSvgVolume1 as Volume1, MemoSvgVolume2 as Volume2, MemoSvgVolumeX as VolumeX, MemoSvgWatch as Watch, MemoSvgWatch2 as Watch2, MemoSvgWebhook as Webhook, MemoSvgWheelchair as Wheelchair, MemoSvgWifi as Wifi, MemoSvgWifiOff as WifiOff, MemoSvgWind as Wind, MemoSvgX as X, MemoSvgX2 as X2, MemoSvgX3 as X3, MemoSvgXCircle as XCircle, MemoSvgXOctogon as XOctogon, MemoSvgXSquare as XSquare, MemoSvgYouTube as YouTube, MemoSvgZap as Zap, MemoSvgZapOff as ZapOff, MemoSvgZoomIn as ZoomIn, MemoSvgZoomOut as ZoomOut };\n//# sourceMappingURL=chromicons.esm.js.map\n","export * from './ReactNativeSVG';\nexport { default } from './ReactNativeSVG';\n//# sourceMappingURL=index.js.map","import { camelCase, parse, SvgAst, SvgFromUri, SvgFromXml, SvgUri, SvgXml } from './xml';\nimport { fetchText } from './utils/fetchData';\nexport { inlineStyles, loadLocalRawResource, LocalSvg, SvgCss, SvgCssUri, SvgWithCss, SvgWithCssUri, WithLocalSvg } from './deprecated';\nexport { camelCase, fetchText, parse, SvgAst, SvgFromUri, SvgFromXml, SvgUri, SvgXml };\nexport * from './lib/extract/types';\nexport * from './elements';\nexport { default } from './elements';\n//# sourceMappingURL=ReactNativeSVG.web.js.map","function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from 'react';\nimport { Component, useEffect, useMemo, useState } from 'react';\nimport { fetchText } from './utils/fetchData';\nimport { tags } from './xmlTags';\nfunction missingTag() {\n return null;\n}\nexport function SvgAst({\n ast,\n override\n}) {\n if (!ast) {\n return null;\n }\n const {\n props,\n children\n } = ast;\n const Svg = tags.svg;\n return /*#__PURE__*/React.createElement(Svg, _extends({}, props, override), children);\n}\nconst err = console.error.bind(console);\nexport function SvgXml(props) {\n const {\n onError = err,\n xml,\n override,\n fallback\n } = props;\n try {\n const ast = useMemo(() => xml !== null ? parse(xml) : null, [xml]);\n return /*#__PURE__*/React.createElement(SvgAst, {\n ast: ast,\n override: override || props\n });\n } catch (error) {\n onError(error);\n return fallback ?? null;\n }\n}\nexport function SvgUri(props) {\n const {\n onError = err,\n uri,\n onLoad,\n fallback\n } = props;\n const [xml, setXml] = useState(null);\n const [isError, setIsError] = useState(false);\n useEffect(() => {\n uri ? fetchText(uri).then(data => {\n setXml(data);\n isError && setIsError(false);\n onLoad === null || onLoad === void 0 || onLoad();\n }).catch(e => {\n onError(e);\n setIsError(true);\n }) : setXml(null);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [onError, uri, onLoad]);\n if (isError) {\n return fallback ?? null;\n }\n return /*#__PURE__*/React.createElement(SvgXml, {\n xml: xml,\n override: props,\n fallback: fallback\n });\n}\n\n// Extending Component is required for Animated support.\n\nexport class SvgFromXml extends Component {\n state = {\n ast: null\n };\n componentDidMount() {\n this.parse(this.props.xml);\n }\n componentDidUpdate(prevProps) {\n const {\n xml\n } = this.props;\n if (xml !== prevProps.xml) {\n this.parse(xml);\n }\n }\n parse(xml) {\n const {\n onError = err\n } = this.props;\n try {\n this.setState({\n ast: xml ? parse(xml) : null\n });\n } catch (e) {\n const error = e;\n onError({\n ...error,\n message: `[RNSVG] Couldn't parse SVG, reason: ${error.message}`\n });\n }\n }\n render() {\n const {\n props,\n state: {\n ast\n }\n } = this;\n return /*#__PURE__*/React.createElement(SvgAst, {\n ast: ast,\n override: props.override || props\n });\n }\n}\nexport class SvgFromUri extends Component {\n state = {\n xml: null\n };\n componentDidMount() {\n this.fetch(this.props.uri);\n }\n componentDidUpdate(prevProps) {\n const {\n uri\n } = this.props;\n if (uri !== prevProps.uri) {\n this.fetch(uri);\n }\n }\n async fetch(uri) {\n try {\n this.setState({\n xml: uri ? await fetchText(uri) : null\n });\n } catch (e) {\n console.error(e);\n }\n }\n render() {\n const {\n props,\n state: {\n xml\n }\n } = this;\n return /*#__PURE__*/React.createElement(SvgFromXml, {\n xml: xml,\n override: props,\n onError: props.onError\n });\n }\n}\nconst upperCase = (_match, letter) => letter.toUpperCase();\nexport const camelCase = phrase => phrase.replace(/[:-]([a-z])/g, upperCase);\nexport function getStyle(string) {\n const style = {};\n const declarations = string.split(';').filter(v => v.trim());\n const {\n length\n } = declarations;\n for (let i = 0; i < length; i++) {\n const declaration = declarations[i];\n if (declaration.length !== 0) {\n const split = declaration.split(':');\n const property = split[0];\n const value = split[1];\n style[camelCase(property.trim())] = value.trim();\n }\n }\n return style;\n}\nexport function astToReact(value, index) {\n if (typeof value === 'object') {\n const {\n Tag,\n props,\n children\n } = value;\n if (props !== null && props !== void 0 && props.class) {\n props.className = props.class;\n delete props.class;\n }\n return /*#__PURE__*/React.createElement(Tag, _extends({\n key: index\n }, props), children.map(astToReact));\n }\n return value;\n}\n\n// slimmed down parser based on https://github.com/Rich-Harris/svg-parser\n\nfunction repeat(str, i) {\n let result = '';\n while (i--) {\n result += str;\n }\n return result;\n}\nconst toSpaces = tabs => repeat(' ', tabs.length);\nfunction locate(source, i) {\n const lines = source.split('\\n');\n const nLines = lines.length;\n let column = i;\n let line = 0;\n for (; line < nLines; line++) {\n const {\n length\n } = lines[line];\n if (column >= length) {\n column -= length;\n } else {\n break;\n }\n }\n const before = source.slice(0, i).replace(/^\\t+/, toSpaces);\n const beforeExec = /(^|\\n).*$/.exec(before);\n const beforeLine = beforeExec && beforeExec[0] || '';\n const after = source.slice(i);\n const afterExec = /.*(\\n|$)/.exec(after);\n const afterLine = afterExec && afterExec[0];\n const pad = repeat(' ', beforeLine.length);\n const snippet = `${beforeLine}${afterLine}\\n${pad}^`;\n return {\n line,\n column,\n snippet\n };\n}\nconst validNameCharacters = /[a-zA-Z0-9:_-]/;\nconst commentStart = /', i);\n if (!~index) {\n error('expected -->');\n }\n i = index + 2;\n return neutral;\n }\n function cdata() {\n const index = source.indexOf(']]>', i);\n if (!~index) {\n error('expected ]]>');\n }\n children.push(source.slice(i + 7, index));\n i = index + 2;\n return neutral;\n }\n function closingTag() {\n const tag = getName();\n if (!tag) {\n error('Expected tag name');\n }\n if (currentElement && tag !== currentElement.tag) {\n error(`Expected closing tag to match opening tag <${currentElement.tag}>`);\n }\n allowSpaces();\n if (source[i] !== '>') {\n error('Expected >');\n }\n stack.pop();\n currentElement = stack[stack.length - 1];\n if (currentElement) {\n ({\n children\n } = currentElement);\n }\n return neutral;\n }\n function getName() {\n let name = '';\n let char;\n while (i < length && validNameCharacters.test(char = source[i])) {\n name += char;\n i += 1;\n }\n return name;\n }\n function getAttributes(props) {\n while (i < length) {\n if (!whitespace.test(source[i])) {\n return;\n }\n allowSpaces();\n const name = getName();\n if (!name) {\n return;\n }\n let value = true;\n allowSpaces();\n if (source[i] === '=') {\n i += 1;\n allowSpaces();\n value = getAttributeValue();\n if (!isNaN(+value) && value.trim() !== '') {\n value = +value;\n }\n }\n props[camelCase(name)] = value;\n }\n }\n function getAttributeValue() {\n return quotemarks.test(source[i]) ? getQuotedAttributeValue() : getUnquotedAttributeValue();\n }\n function getUnquotedAttributeValue() {\n let value = '';\n do {\n const char = source[i];\n if (char === ' ' || char === '>' || char === '/') {\n return value;\n }\n value += char;\n i += 1;\n } while (i < length);\n return value;\n }\n function getQuotedAttributeValue() {\n const quotemark = source[i++];\n let value = '';\n let escaped = false;\n while (i < length) {\n const char = source[i++];\n if (char === quotemark && !escaped) {\n return value;\n }\n if (char === '\\\\' && !escaped) {\n escaped = true;\n }\n value += escaped ? `\\\\${char}` : char;\n escaped = false;\n }\n return value;\n }\n function allowSpaces() {\n while (i < length && whitespace.test(source[i])) {\n i += 1;\n }\n }\n let i = 0;\n while (i < length) {\n if (!state) {\n error('Unexpected character');\n }\n state = state();\n i += 1;\n }\n if (state !== neutral) {\n error('Unexpected end of input');\n }\n if (root) {\n const xml = (middleware ? middleware(root) : root) || root;\n const ast = xml.children.map(astToReact);\n const jsx = xml;\n jsx.children = ast;\n return jsx;\n }\n return null;\n}\nexport { tags };\n//# sourceMappingURL=xml.js.map","import { Platform } from 'react-native';\nimport { Buffer } from 'buffer';\nexport async function fetchText(uri) {\n if (!uri) {\n return null;\n }\n if (uri.startsWith('data:image/svg+xml;utf8') && Platform.OS === 'android') {\n return dataUriToXml(uri);\n } else if (uri.startsWith('data:image/svg+xml;base64')) {\n return decodeBase64Image(uri);\n } else {\n return fetchUriData(uri);\n }\n}\nconst decodeBase64Image = uri => {\n const decoded = decodeURIComponent(uri);\n const splitContent = decoded.split(';')[1].split(',');\n const dataType = splitContent[0];\n const content = splitContent.slice(1).join(',');\n return Buffer.from(content, dataType).toString('utf-8');\n};\nfunction dataUriToXml(uri) {\n try {\n // decode and remove data:image/svg+xml;utf8, prefix\n return decodeURIComponent(uri).split(',').slice(1).join(',');\n } catch (error) {\n throw new Error(`Decoding ${uri} failed with error: ${error}`);\n }\n}\nasync function fetchUriData(uri) {\n const response = await fetch(uri);\n if (response.ok || response.status === 0 && uri.startsWith('file://')) {\n return await response.text();\n }\n throw new Error(`Fetching ${uri} failed with status ${response.status}`);\n}\n//# sourceMappingURL=fetchData.js.map","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\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\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // 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\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\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}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\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(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*! 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\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\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\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","import { Circle, ClipPath, Defs, Ellipse, FeBlend, FeColorMatrix, FeComponentTransfer, FeComposite, FeConvolveMatrix, FeDiffuseLighting, FeDisplacementMap, FeDistantLight, FeDropShadow, FeFlood, FeGaussianBlur, FeImage, FeMerge, FeMergeNode, FeMorphology, FeOffset, FePointLight, FeSpecularLighting, FeSpotLight, FeTile, FeTurbulence, Filter, ForeignObject, G, Image, Line, LinearGradient, Marker, Mask, Path, Pattern, Polygon, Polyline, RadialGradient, Rect, Stop, Svg, Symbol, Text, TextPath, TSpan, Use } from './elements';\nexport const tags = {\n circle: Circle,\n clipPath: ClipPath,\n defs: Defs,\n ellipse: Ellipse,\n filter: Filter,\n feBlend: FeBlend,\n feColorMatrix: FeColorMatrix,\n feComponentTransfer: FeComponentTransfer,\n feComposite: FeComposite,\n feConvolveMatrix: FeConvolveMatrix,\n feDiffuseLighting: FeDiffuseLighting,\n feDisplacementMap: FeDisplacementMap,\n feDistantLight: FeDistantLight,\n feDropShadow: FeDropShadow,\n feFlood: FeFlood,\n feGaussianBlur: FeGaussianBlur,\n feImage: FeImage,\n feMerge: FeMerge,\n feMergeNode: FeMergeNode,\n feMorphology: FeMorphology,\n feOffset: FeOffset,\n fePointLight: FePointLight,\n feSpecularLighting: FeSpecularLighting,\n feSpotLight: FeSpotLight,\n feTile: FeTile,\n feTurbulence: FeTurbulence,\n foreignObject: ForeignObject,\n g: G,\n image: Image,\n line: Line,\n linearGradient: LinearGradient,\n marker: Marker,\n mask: Mask,\n path: Path,\n pattern: Pattern,\n polygon: Polygon,\n polyline: Polyline,\n radialGradient: RadialGradient,\n rect: Rect,\n stop: Stop,\n svg: Svg,\n symbol: Symbol,\n text: Text,\n textPath: TextPath,\n tspan: TSpan,\n use: Use\n};\n//# sourceMappingURL=xmlTags.js.map","import { encodeSvg, getBoundingClientRect } from './web/utils';\nimport { WebShape } from './web/WebShape';\nexport class Circle extends WebShape {\n tag = 'circle';\n}\nexport class ClipPath extends WebShape {\n tag = 'clipPath';\n}\nexport class Defs extends WebShape {\n tag = 'defs';\n}\nexport class Ellipse extends WebShape {\n tag = 'ellipse';\n}\nexport class FeBlend extends WebShape {\n tag = 'feBlend';\n}\nexport class FeColorMatrix extends WebShape {\n tag = 'feColorMatrix';\n}\nexport class FeComponentTransfer extends WebShape {\n tag = 'feComponentTransfer';\n}\nexport class FeComposite extends WebShape {\n tag = 'feComposite';\n}\nexport class FeConvolveMatrix extends WebShape {\n tag = 'feConvolveMatrix';\n}\nexport class FeDiffuseLighting extends WebShape {\n tag = 'feDiffuseLighting';\n}\nexport class FeDisplacementMap extends WebShape {\n tag = 'feDisplacementMap';\n}\nexport class FeDistantLight extends WebShape {\n tag = 'feDistantLight';\n}\nexport class FeDropShadow extends WebShape {\n tag = 'feDropShadow';\n}\nexport class FeFlood extends WebShape {\n tag = 'feFlood';\n}\nexport class FeFuncA extends WebShape {\n tag = 'feFuncA';\n}\nexport class FeFuncB extends WebShape {\n tag = 'feFuncB';\n}\nexport class FeFuncG extends WebShape {\n tag = 'feFuncG';\n}\nexport class FeFuncR extends WebShape {\n tag = 'feFuncR';\n}\nexport class FeGaussianBlur extends WebShape {\n tag = 'feGaussianBlur';\n}\nexport class FeImage extends WebShape {\n tag = 'feImage';\n}\nexport class FeMerge extends WebShape {\n tag = 'feMerge';\n}\nexport class FeMergeNode extends WebShape {\n tag = 'feMergeNode';\n}\nexport class FeMorphology extends WebShape {\n tag = 'feMorphology';\n}\nexport class FeOffset extends WebShape {\n tag = 'feOffset';\n}\nexport class FePointLight extends WebShape {\n tag = 'fePointLight';\n}\nexport class FeSpecularLighting extends WebShape {\n tag = 'feSpecularLighting';\n}\nexport class FeSpotLight extends WebShape {\n tag = 'feSpotLight';\n}\nexport class FeTile extends WebShape {\n tag = 'feTile';\n}\nexport class FeTurbulence extends WebShape {\n tag = 'feTurbulence';\n}\nexport class Filter extends WebShape {\n tag = 'filter';\n}\nexport class ForeignObject extends WebShape {\n tag = 'foreignObject';\n}\nexport class G extends WebShape {\n tag = 'g';\n prepareProps(props) {\n const {\n x,\n y,\n ...rest\n } = props;\n if ((x || y) && !rest.translate) {\n rest.translate = `${x || 0}, ${y || 0}`;\n }\n return rest;\n }\n}\nexport class Image extends WebShape {\n tag = 'image';\n}\nexport class Line extends WebShape {\n tag = 'line';\n}\nexport class LinearGradient extends WebShape {\n tag = 'linearGradient';\n}\nexport class Marker extends WebShape {\n tag = 'marker';\n}\nexport class Mask extends WebShape {\n tag = 'mask';\n}\nexport class Path extends WebShape {\n tag = 'path';\n}\nexport class Pattern extends WebShape {\n tag = 'pattern';\n}\nexport class Polygon extends WebShape {\n tag = 'polygon';\n}\nexport class Polyline extends WebShape {\n tag = 'polyline';\n}\nexport class RadialGradient extends WebShape {\n tag = 'radialGradient';\n}\nexport class Rect extends WebShape {\n tag = 'rect';\n}\nexport class Stop extends WebShape {\n tag = 'stop';\n}\nexport class Svg extends WebShape {\n tag = 'svg';\n toDataURL(callback, options = {}) {\n const ref = this.elementRef.current;\n if (ref === null) {\n return;\n }\n const rect = getBoundingClientRect(ref);\n const width = Number(options.width) || rect.width;\n const height = Number(options.height) || rect.height;\n const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n svg.setAttribute('viewBox', `0 0 ${rect.width} ${rect.height}`);\n svg.setAttribute('width', String(width));\n svg.setAttribute('height', String(height));\n svg.appendChild(ref.cloneNode(true));\n const img = new window.Image();\n img.onload = () => {\n const canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n const context = canvas.getContext('2d');\n context === null || context === void 0 || context.drawImage(img, 0, 0);\n callback(canvas.toDataURL().replace('data:image/png;base64,', ''));\n };\n img.src = `data:image/svg+xml;utf8,${encodeSvg(new window.XMLSerializer().serializeToString(svg))}`;\n }\n}\nexport class Symbol extends WebShape {\n tag = 'symbol';\n}\nexport class TSpan extends WebShape {\n tag = 'tspan';\n}\nexport class Text extends WebShape {\n tag = 'text';\n}\nexport class TextPath extends WebShape {\n tag = 'textPath';\n}\nexport class Use extends WebShape {\n tag = 'use';\n}\nexport default Svg;\n//# sourceMappingURL=elements.web.js.map","import { transformsArrayToProps } from '../../lib/extract/extractTransform';\nexport const hasTouchableProperty = props => props.onPress || props.onPressIn || props.onPressOut || props.onLongPress;\nexport const camelCaseToDashed = camelCase => {\n return camelCase.replace(/[A-Z]/g, m => '-' + m.toLowerCase());\n};\nfunction stringifyTransformProps(transformProps) {\n const transformArray = [];\n if (transformProps.translate != null) {\n transformArray.push(`translate(${transformProps.translate})`);\n }\n if (transformProps.translateX != null || transformProps.translateY != null) {\n transformArray.push(`translate(${transformProps.translateX || 0}, ${transformProps.translateY || 0})`);\n }\n if (transformProps.scale != null) {\n transformArray.push(`scale(${transformProps.scale})`);\n }\n if (transformProps.scaleX != null || transformProps.scaleY != null) {\n transformArray.push(`scale(${transformProps.scaleX || 1}, ${transformProps.scaleY || 1})`);\n }\n // rotation maps to rotate, not to collide with the text rotate attribute (which acts per glyph rather than block)\n if (transformProps.rotation != null) {\n transformArray.push(`rotate(${transformProps.rotation})`);\n }\n if (transformProps.skewX != null) {\n transformArray.push(`skewX(${transformProps.skewX})`);\n }\n if (transformProps.skewY != null) {\n transformArray.push(`skewY(${transformProps.skewY})`);\n }\n return transformArray;\n}\nexport function parseTransformProp(transform, props) {\n const transformArray = [];\n props && transformArray.push(...stringifyTransformProps(props));\n if (Array.isArray(transform)) {\n if (typeof transform[0] === 'number') {\n transformArray.push(`matrix(${transform.join(' ')})`);\n } else {\n const stringifiedProps = transformsArrayToProps(transform);\n transformArray.push(...stringifyTransformProps(stringifiedProps));\n }\n } else if (typeof transform === 'string') {\n transformArray.push(transform);\n }\n return transformArray.length ? transformArray.join(' ') : undefined;\n}\nexport const getBoundingClientRect = node => {\n if (node) {\n const isElement = node.nodeType === 1; /* Node.ELEMENT_NODE */\n if (isElement && typeof node.getBoundingClientRect === 'function') {\n return node.getBoundingClientRect();\n }\n }\n throw new Error('Can not get boundingClientRect of ' + node || 'undefined');\n};\nconst measureLayout = (node, callback) => {\n const relativeNode = node === null || node === void 0 ? void 0 : node.parentNode;\n if (relativeNode) {\n setTimeout(() => {\n // @ts-expect-error TODO: handle it better\n const relativeRect = getBoundingClientRect(relativeNode);\n const {\n height,\n left,\n top,\n width\n } = getBoundingClientRect(node);\n const x = left - relativeRect.left;\n const y = top - relativeRect.top;\n callback(x, y, width, height, left, top);\n }, 0);\n }\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function remeasure() {\n const tag = this.state.touchable.responderID;\n if (tag === null) {\n return;\n }\n measureLayout(tag, this._handleQueryLayout);\n}\n\n/* Taken from here: https://gist.github.com/jennyknuth/222825e315d45a738ed9d6e04c7a88d0 */\nexport function encodeSvg(svgString) {\n return svgString.replace('/g, '%3E').replace(/\\s+/g, ' ');\n}\n//# sourceMappingURL=index.js.map","import { append, appendTransform, identity, reset, toArray } from '../Matrix2D';\nimport { parse } from './transform';\nimport { parse as parseTransformSvgToRnStyle } from './transformToRn';\nfunction appendTransformProps(props) {\n const {\n x,\n y,\n originX,\n originY,\n scaleX,\n scaleY,\n rotation,\n skewX,\n skewY\n } = props;\n appendTransform(x + originX, y + originY, scaleX, scaleY, rotation, skewX, skewY, originX, originY);\n}\nfunction universal2axis(universal, axisX, axisY, defaultValue) {\n let x;\n let y;\n if (typeof universal === 'number') {\n x = y = universal;\n } else if (typeof universal === 'string') {\n const coords = universal.split(/\\s*,\\s*/);\n if (coords.length === 2) {\n x = +coords[0];\n y = +coords[1];\n } else if (coords.length === 1) {\n x = y = +coords[0];\n }\n } else if (Array.isArray(universal)) {\n if (universal.length === 2) {\n x = +universal[0];\n y = +universal[1];\n } else if (universal.length === 1) {\n x = y = +universal[0];\n }\n }\n axisX = +axisX;\n if (!isNaN(axisX)) {\n x = axisX;\n }\n axisY = +axisY;\n if (!isNaN(axisY)) {\n y = axisY;\n }\n return [x || defaultValue || 0, y || defaultValue || 0];\n}\nexport function transformsArrayToProps(transformObjectsArray) {\n const props = {};\n transformObjectsArray === null || transformObjectsArray === void 0 || transformObjectsArray.forEach(transformObject => {\n const keys = Object.keys(transformObject);\n if (keys.length !== 1) {\n console.error('You must specify exactly one property per transform object.');\n }\n const key = keys[0];\n const value = transformObject[key];\n props[key] = value;\n });\n return props;\n}\nexport function props2transform(props) {\n if (!props) {\n return null;\n }\n const {\n rotation,\n translate,\n translateX,\n translateY,\n origin,\n originX,\n originY,\n scale,\n scaleX,\n scaleY,\n skew,\n skewX,\n skewY,\n x,\n y\n } = props;\n if (rotation == null && translate == null && translateX == null && translateY == null && origin == null && originX == null && originY == null && scale == null && scaleX == null && scaleY == null && skew == null && skewX == null && skewY == null && x == null && y == null) {\n return null;\n }\n if (Array.isArray(x) || Array.isArray(y)) {\n console.warn('Passing SvgLengthList to x or y attribute where SvgLength expected');\n }\n const tr = universal2axis(translate, translateX || (Array.isArray(x) ? x[0] : x), translateY || (Array.isArray(y) ? y[0] : y));\n const or = universal2axis(origin, originX, originY);\n const sc = universal2axis(scale, scaleX, scaleY, 1);\n const sk = universal2axis(skew, skewX, skewY);\n return {\n rotation: rotation == null ? 0 : +rotation || 0,\n originX: or[0],\n originY: or[1],\n scaleX: sc[0],\n scaleY: sc[1],\n skewX: sk[0],\n skewY: sk[1],\n x: tr[0],\n y: tr[1]\n };\n}\nexport function transformToMatrix(props, transform) {\n if (!props && !transform) {\n return null;\n }\n reset();\n props && appendTransformProps(props);\n if (transform) {\n if (Array.isArray(transform)) {\n if (typeof transform[0] === 'number') {\n const columnMatrix = transform;\n append(columnMatrix[0], columnMatrix[1], columnMatrix[2], columnMatrix[3], columnMatrix[4], columnMatrix[5]);\n } else {\n const transformProps = props2transform(transformsArrayToProps(transform));\n transformProps && appendTransformProps(transformProps);\n }\n } else if (typeof transform === 'string') {\n try {\n const t = parse(transform);\n append(t[0], t[3], t[1], t[4], t[2], t[5]);\n } catch (e) {\n console.error(e);\n }\n } else {\n const transformProps = props2transform(transform);\n transformProps && appendTransformProps(transformProps);\n }\n }\n return toArray();\n}\nexport default function extractTransform(props) {\n if (Array.isArray(props) && typeof props[0] === 'number') {\n return props;\n }\n if (typeof props === 'string') {\n try {\n const t = parse(props);\n return [t[0], t[3], t[1], t[4], t[2], t[5]];\n } catch (e) {\n console.error(e);\n return identity;\n }\n }\n // this type is not correct since props can be of type TransformsStyle['transform'] too\n // but it satisfies TS and should not produce any type errors\n const transformProps = props;\n return transformToMatrix(props2transform(transformProps), transformProps === null || transformProps === void 0 ? void 0 : transformProps.transform);\n}\nexport function extractTransformSvgView(props) {\n if (typeof props.transform === 'string') {\n return parseTransformSvgToRnStyle(props.transform);\n }\n return props.transform;\n}\n//# sourceMappingURL=extractTransform.js.map","/**\n * based on\n * https://github.com/CreateJS/EaselJS/blob/631cdffb85eff9413dab43b4676f059b4232d291/src/easeljs/geom/Matrix2D.js\n */\nconst DEG_TO_RAD = Math.PI / 180;\nexport const identity = [1, 0, 0, 1, 0, 0];\nlet a = 1;\nlet b = 0;\nlet c = 0;\nlet d = 1;\nlet tx = 0;\nlet ty = 0;\nlet hasInitialState = true;\n\n/**\n * Represents an affine transformation matrix, and provides tools for concatenating transforms.\n *\n * This matrix can be visualized as:\n *\n * \t[ a c tx\n * \t b d ty\n * \t 0 0 1 ]\n *\n * Note the locations of b and c.\n **/\n\n/**\n * Reset current matrix to an identity matrix.\n * @method reset\n **/\nexport function reset() {\n if (hasInitialState) {\n return;\n }\n a = d = 1;\n b = c = tx = ty = 0;\n hasInitialState = true;\n}\n\n/**\n * Returns an array with current matrix values.\n * @method toArray\n * @return {Array} an array with current matrix values.\n **/\nexport function toArray() {\n if (hasInitialState) {\n return identity;\n }\n return [a, b, c, d, tx, ty];\n}\n\n/**\n * Appends the specified matrix properties to this matrix. All parameters are required.\n * This is the equivalent of multiplying `(this matrix) * (specified matrix)`.\n * @method append\n * @param {Number} a2\n * @param {Number} b2\n * @param {Number} c2\n * @param {Number} d2\n * @param {Number} tx2\n * @param {Number} ty2\n **/\nexport function append(a2, b2, c2, d2, tx2, ty2) {\n const change = a2 !== 1 || b2 !== 0 || c2 !== 0 || d2 !== 1;\n const translate = tx2 !== 0 || ty2 !== 0;\n if (!change && !translate) {\n return;\n }\n if (hasInitialState) {\n hasInitialState = false;\n a = a2;\n b = b2;\n c = c2;\n d = d2;\n tx = tx2;\n ty = ty2;\n return;\n }\n const a1 = a;\n const b1 = b;\n const c1 = c;\n const d1 = d;\n if (change) {\n a = a1 * a2 + c1 * b2;\n b = b1 * a2 + d1 * b2;\n c = a1 * c2 + c1 * d2;\n d = b1 * c2 + d1 * d2;\n }\n if (translate) {\n tx = a1 * tx2 + c1 * ty2 + tx;\n ty = b1 * tx2 + d1 * ty2 + ty;\n }\n}\n\n/**\n * Generates matrix properties from the specified display object transform properties, and appends them to this matrix.\n * For example, you can use this to generate a matrix representing the transformations of a display object:\n *\n * \treset();\n * \tappendTransform(o.x, o.y, o.scaleX, o.scaleY, o.rotation);\n * \tvar matrix = toArray()\n *\n * @method appendTransform\n * @param {Number} x\n * @param {Number} y\n * @param {Number} scaleX\n * @param {Number} scaleY\n * @param {Number} rotation\n * @param {Number} skewX\n * @param {Number} skewY\n * @param {Number} regX Optional.\n * @param {Number} regY Optional.\n **/\nexport function appendTransform(x, y, scaleX, scaleY, rotation, skewX, skewY, regX, regY) {\n if (x === 0 && y === 0 && scaleX === 1 && scaleY === 1 && rotation === 0 && skewX === 0 && skewY === 0 && regX === 0 && regY === 0) {\n return;\n }\n let cos, sin;\n if (rotation % 360) {\n const r = rotation * DEG_TO_RAD;\n cos = Math.cos(r);\n sin = Math.sin(r);\n } else {\n cos = 1;\n sin = 0;\n }\n const a2 = cos * scaleX;\n const b2 = sin * scaleX;\n const c2 = -sin * scaleY;\n const d2 = cos * scaleY;\n if (skewX || skewY) {\n const b1 = Math.tan(skewY * DEG_TO_RAD);\n const c1 = Math.tan(skewX * DEG_TO_RAD);\n append(a2 + c1 * b2, b1 * a2 + b2, c2 + c1 * d2, b1 * c2 + d2, x, y);\n } else {\n append(a2, b2, c2, d2, x, y);\n }\n if (regX || regY) {\n // append the registration offset:\n tx -= regX * a + regY * c;\n ty -= regX * b + regY * d;\n hasInitialState = false;\n }\n}\n//# sourceMappingURL=Matrix2D.js.map","/*\n * Generated by PEG.js 0.10.0.\n *\n * http://pegjs.org/\n */\n\n\"use strict\";\n\nfunction peg$subclass(child, parent) {\n function ctor() {\n this.constructor = child;\n }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n}\nfunction peg$SyntaxError(message, expected, found, location) {\n this.message = message;\n this.expected = expected;\n this.found = found;\n this.location = location;\n this.name = \"SyntaxError\";\n if (typeof Error.captureStackTrace === \"function\") {\n Error.captureStackTrace(this, peg$SyntaxError);\n }\n}\npeg$subclass(peg$SyntaxError, Error);\npeg$SyntaxError.buildMessage = function (expected, found) {\n var DESCRIBE_EXPECTATION_FNS = {\n literal: function (expectation) {\n return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n },\n \"class\": function (expectation) {\n var escapedParts = \"\",\n i;\n for (i = 0; i < expectation.parts.length; i++) {\n escapedParts += expectation.parts[i] instanceof Array ? classEscape(expectation.parts[i][0]) + \"-\" + classEscape(expectation.parts[i][1]) : classEscape(expectation.parts[i]);\n }\n return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts + \"]\";\n },\n any: function (expectation) {\n return \"any character\";\n },\n end: function (expectation) {\n return \"end of input\";\n },\n other: function (expectation) {\n return expectation.description;\n }\n };\n function hex(ch) {\n return ch.charCodeAt(0).toString(16).toUpperCase();\n }\n function literalEscape(s) {\n return s.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"').replace(/\\0/g, '\\\\0').replace(/\\t/g, '\\\\t').replace(/\\n/g, '\\\\n').replace(/\\r/g, '\\\\r').replace(/[\\x00-\\x0F]/g, function (ch) {\n return '\\\\x0' + hex(ch);\n }).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function (ch) {\n return '\\\\x' + hex(ch);\n });\n }\n function classEscape(s) {\n return s.replace(/\\\\/g, '\\\\\\\\').replace(/\\]/g, '\\\\]').replace(/\\^/g, '\\\\^').replace(/-/g, '\\\\-').replace(/\\0/g, '\\\\0').replace(/\\t/g, '\\\\t').replace(/\\n/g, '\\\\n').replace(/\\r/g, '\\\\r').replace(/[\\x00-\\x0F]/g, function (ch) {\n return '\\\\x0' + hex(ch);\n }).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function (ch) {\n return '\\\\x' + hex(ch);\n });\n }\n function describeExpectation(expectation) {\n return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);\n }\n function describeExpected(expected) {\n var descriptions = new Array(expected.length),\n i,\n j;\n for (i = 0; i < expected.length; i++) {\n descriptions[i] = describeExpectation(expected[i]);\n }\n descriptions.sort();\n if (descriptions.length > 0) {\n for (i = 1, j = 1; i < descriptions.length; i++) {\n if (descriptions[i - 1] !== descriptions[i]) {\n descriptions[j] = descriptions[i];\n j++;\n }\n }\n descriptions.length = j;\n }\n switch (descriptions.length) {\n case 1:\n return descriptions[0];\n case 2:\n return descriptions[0] + \" or \" + descriptions[1];\n default:\n return descriptions.slice(0, -1).join(\", \") + \", or \" + descriptions[descriptions.length - 1];\n }\n }\n function describeFound(found) {\n return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n }\n return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n};\nfunction peg$parse(input, options) {\n options = options !== void 0 ? options : {};\n var peg$FAILED = {},\n peg$startRuleFunctions = {\n transformList: peg$parsetransformList\n },\n peg$startRuleFunction = peg$parsetransformList,\n peg$c0 = function (ts) {\n return ts;\n },\n peg$c1 = function (t, ts) {\n return multiply_matrices(t, ts);\n },\n peg$c2 = \"matrix\",\n peg$c3 = peg$literalExpectation(\"matrix\", false),\n peg$c4 = \"(\",\n peg$c5 = peg$literalExpectation(\"(\", false),\n peg$c6 = \")\",\n peg$c7 = peg$literalExpectation(\")\", false),\n peg$c8 = function (a, b, c, d, e, f) {\n return [a, c, e, b, d, f];\n },\n peg$c9 = \"translate\",\n peg$c10 = peg$literalExpectation(\"translate\", false),\n peg$c11 = function (tx, ty) {\n return [1, 0, tx, 0, 1, ty || 0];\n },\n peg$c12 = \"scale\",\n peg$c13 = peg$literalExpectation(\"scale\", false),\n peg$c14 = function (sx, sy) {\n return [sx, 0, 0, 0, sy === null ? sx : sy, 0];\n },\n peg$c15 = \"rotate\",\n peg$c16 = peg$literalExpectation(\"rotate\", false),\n peg$c17 = function (angle, c) {\n var cos = Math.cos(deg2rad * angle);\n var sin = Math.sin(deg2rad * angle);\n if (c !== null) {\n var x = c[0];\n var y = c[1];\n return [cos, -sin, cos * -x + -sin * -y + x, sin, cos, sin * -x + cos * -y + y];\n }\n return [cos, -sin, 0, sin, cos, 0];\n },\n peg$c18 = \"skewX\",\n peg$c19 = peg$literalExpectation(\"skewX\", false),\n peg$c20 = function (angle) {\n return [1, Math.tan(deg2rad * angle), 0, 0, 1, 0];\n },\n peg$c21 = \"skewY\",\n peg$c22 = peg$literalExpectation(\"skewY\", false),\n peg$c23 = function (angle) {\n return [1, 0, 0, Math.tan(deg2rad * angle), 1, 0];\n },\n peg$c24 = function (f) {\n return parseFloat(f.join(\"\"));\n },\n peg$c25 = function (i) {\n return parseInt(i.join(\"\"));\n },\n peg$c26 = function (n) {\n return n;\n },\n peg$c27 = function (n1, n2) {\n return [n1, n2];\n },\n peg$c28 = \",\",\n peg$c29 = peg$literalExpectation(\",\", false),\n peg$c30 = function (ds) {\n return ds.join(\"\");\n },\n peg$c31 = function (f) {\n return f.join(\"\");\n },\n peg$c32 = function (d) {\n return d.join(\"\");\n },\n peg$c33 = peg$otherExpectation(\"fractionalConstant\"),\n peg$c34 = \".\",\n peg$c35 = peg$literalExpectation(\".\", false),\n peg$c36 = function (d1, d2) {\n return [d1 ? d1.join(\"\") : null, \".\", d2.join(\"\")].join(\"\");\n },\n peg$c37 = /^[eE]/,\n peg$c38 = peg$classExpectation([\"e\", \"E\"], false, false),\n peg$c39 = function (e) {\n return [e[0], e[1], e[2].join(\"\")].join(\"\");\n },\n peg$c40 = /^[+\\-]/,\n peg$c41 = peg$classExpectation([\"+\", \"-\"], false, false),\n peg$c42 = /^[0-9]/,\n peg$c43 = peg$classExpectation([[\"0\", \"9\"]], false, false),\n peg$c44 = /^[ \\t\\r\\n]/,\n peg$c45 = peg$classExpectation([\" \", \"\\t\", \"\\r\", \"\\n\"], false, false),\n peg$currPos = 0,\n peg$savedPos = 0,\n peg$posDetailsCache = [{\n line: 1,\n column: 1\n }],\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n peg$result;\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n function text() {\n return input.substring(peg$savedPos, peg$currPos);\n }\n function location() {\n return peg$computeLocation(peg$savedPos, peg$currPos);\n }\n function expected(description, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos);\n throw peg$buildStructuredError([peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location);\n }\n function error(message, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos);\n throw peg$buildSimpleError(message, location);\n }\n function peg$literalExpectation(text, ignoreCase) {\n return {\n type: \"literal\",\n text: text,\n ignoreCase: ignoreCase\n };\n }\n function peg$classExpectation(parts, inverted, ignoreCase) {\n return {\n type: \"class\",\n parts: parts,\n inverted: inverted,\n ignoreCase: ignoreCase\n };\n }\n function peg$anyExpectation() {\n return {\n type: \"any\"\n };\n }\n function peg$endExpectation() {\n return {\n type: \"end\"\n };\n }\n function peg$otherExpectation(description) {\n return {\n type: \"other\",\n description: description\n };\n }\n function peg$computePosDetails(pos) {\n var details = peg$posDetailsCache[pos],\n p;\n if (details) {\n return details;\n } else {\n p = pos - 1;\n while (!peg$posDetailsCache[p]) {\n p--;\n }\n details = peg$posDetailsCache[p];\n details = {\n line: details.line,\n column: details.column\n };\n while (p < pos) {\n if (input.charCodeAt(p) === 10) {\n details.line++;\n details.column = 1;\n } else {\n details.column++;\n }\n p++;\n }\n peg$posDetailsCache[pos] = details;\n return details;\n }\n }\n function peg$computeLocation(startPos, endPos) {\n var startPosDetails = peg$computePosDetails(startPos),\n endPosDetails = peg$computePosDetails(endPos);\n return {\n start: {\n offset: startPos,\n line: startPosDetails.line,\n column: startPosDetails.column\n },\n end: {\n offset: endPos,\n line: endPosDetails.line,\n column: endPosDetails.column\n }\n };\n }\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) {\n return;\n }\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n peg$maxFailExpected.push(expected);\n }\n function peg$buildSimpleError(message, location) {\n return new peg$SyntaxError(message, null, null, location);\n }\n function peg$buildStructuredError(expected, found, location) {\n return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected, found), expected, found, location);\n }\n function peg$parsetransformList() {\n var s0, s1, s2, s3, s4;\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsewsp();\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsewsp();\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsetransforms();\n if (s2 === peg$FAILED) {\n s2 = null;\n }\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$parsewsp();\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$parsewsp();\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c0(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parsetransforms() {\n var s0, s1, s2, s3;\n s0 = peg$currPos;\n s1 = peg$parsetransform();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parsecommaWsp();\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parsecommaWsp();\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parsetransforms();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c1(s1, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$parsetransform();\n }\n return s0;\n }\n function peg$parsetransform() {\n var s0;\n s0 = peg$parsematrix();\n if (s0 === peg$FAILED) {\n s0 = peg$parsetranslate();\n if (s0 === peg$FAILED) {\n s0 = peg$parsescale();\n if (s0 === peg$FAILED) {\n s0 = peg$parserotate();\n if (s0 === peg$FAILED) {\n s0 = peg$parseskewX();\n if (s0 === peg$FAILED) {\n s0 = peg$parseskewY();\n }\n }\n }\n }\n }\n return s0;\n }\n function peg$parsematrix() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17;\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c2) {\n s1 = peg$c2;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c3);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parsewsp();\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parsewsp();\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 40) {\n s3 = peg$c4;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c5);\n }\n }\n if (s3 !== peg$FAILED) {\n s4 = [];\n s5 = peg$parsewsp();\n while (s5 !== peg$FAILED) {\n s4.push(s5);\n s5 = peg$parsewsp();\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parsenumber();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsecommaWsp();\n if (s6 !== peg$FAILED) {\n s7 = peg$parsenumber();\n if (s7 !== peg$FAILED) {\n s8 = peg$parsecommaWsp();\n if (s8 !== peg$FAILED) {\n s9 = peg$parsenumber();\n if (s9 !== peg$FAILED) {\n s10 = peg$parsecommaWsp();\n if (s10 !== peg$FAILED) {\n s11 = peg$parsenumber();\n if (s11 !== peg$FAILED) {\n s12 = peg$parsecommaWsp();\n if (s12 !== peg$FAILED) {\n s13 = peg$parsenumber();\n if (s13 !== peg$FAILED) {\n s14 = peg$parsecommaWsp();\n if (s14 !== peg$FAILED) {\n s15 = peg$parsenumber();\n if (s15 !== peg$FAILED) {\n s16 = [];\n s17 = peg$parsewsp();\n while (s17 !== peg$FAILED) {\n s16.push(s17);\n s17 = peg$parsewsp();\n }\n if (s16 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s17 = peg$c6;\n peg$currPos++;\n } else {\n s17 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c7);\n }\n }\n if (s17 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c8(s5, s7, s9, s11, s13, s15);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parsetranslate() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8;\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 9) === peg$c9) {\n s1 = peg$c9;\n peg$currPos += 9;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c10);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parsewsp();\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parsewsp();\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 40) {\n s3 = peg$c4;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c5);\n }\n }\n if (s3 !== peg$FAILED) {\n s4 = [];\n s5 = peg$parsewsp();\n while (s5 !== peg$FAILED) {\n s4.push(s5);\n s5 = peg$parsewsp();\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parsenumber();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsecommaWspNumber();\n if (s6 === peg$FAILED) {\n s6 = null;\n }\n if (s6 !== peg$FAILED) {\n s7 = [];\n s8 = peg$parsewsp();\n while (s8 !== peg$FAILED) {\n s7.push(s8);\n s8 = peg$parsewsp();\n }\n if (s7 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s8 = peg$c6;\n peg$currPos++;\n } else {\n s8 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c7);\n }\n }\n if (s8 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c11(s5, s6);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parsescale() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8;\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c12) {\n s1 = peg$c12;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c13);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parsewsp();\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parsewsp();\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 40) {\n s3 = peg$c4;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c5);\n }\n }\n if (s3 !== peg$FAILED) {\n s4 = [];\n s5 = peg$parsewsp();\n while (s5 !== peg$FAILED) {\n s4.push(s5);\n s5 = peg$parsewsp();\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parsenumber();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsecommaWspNumber();\n if (s6 === peg$FAILED) {\n s6 = null;\n }\n if (s6 !== peg$FAILED) {\n s7 = [];\n s8 = peg$parsewsp();\n while (s8 !== peg$FAILED) {\n s7.push(s8);\n s8 = peg$parsewsp();\n }\n if (s7 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s8 = peg$c6;\n peg$currPos++;\n } else {\n s8 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c7);\n }\n }\n if (s8 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c14(s5, s6);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parserotate() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8;\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 6) === peg$c15) {\n s1 = peg$c15;\n peg$currPos += 6;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c16);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parsewsp();\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parsewsp();\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 40) {\n s3 = peg$c4;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c5);\n }\n }\n if (s3 !== peg$FAILED) {\n s4 = [];\n s5 = peg$parsewsp();\n while (s5 !== peg$FAILED) {\n s4.push(s5);\n s5 = peg$parsewsp();\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parsenumber();\n if (s5 !== peg$FAILED) {\n s6 = peg$parsecommaWspTwoNumbers();\n if (s6 === peg$FAILED) {\n s6 = null;\n }\n if (s6 !== peg$FAILED) {\n s7 = [];\n s8 = peg$parsewsp();\n while (s8 !== peg$FAILED) {\n s7.push(s8);\n s8 = peg$parsewsp();\n }\n if (s7 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s8 = peg$c6;\n peg$currPos++;\n } else {\n s8 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c7);\n }\n }\n if (s8 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c17(s5, s6);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parseskewX() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c18) {\n s1 = peg$c18;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c19);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parsewsp();\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parsewsp();\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 40) {\n s3 = peg$c4;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c5);\n }\n }\n if (s3 !== peg$FAILED) {\n s4 = [];\n s5 = peg$parsewsp();\n while (s5 !== peg$FAILED) {\n s4.push(s5);\n s5 = peg$parsewsp();\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parsenumber();\n if (s5 !== peg$FAILED) {\n s6 = [];\n s7 = peg$parsewsp();\n while (s7 !== peg$FAILED) {\n s6.push(s7);\n s7 = peg$parsewsp();\n }\n if (s6 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s7 = peg$c6;\n peg$currPos++;\n } else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c7);\n }\n }\n if (s7 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c20(s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parseskewY() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 5) === peg$c21) {\n s1 = peg$c21;\n peg$currPos += 5;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c22);\n }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parsewsp();\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parsewsp();\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 40) {\n s3 = peg$c4;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c5);\n }\n }\n if (s3 !== peg$FAILED) {\n s4 = [];\n s5 = peg$parsewsp();\n while (s5 !== peg$FAILED) {\n s4.push(s5);\n s5 = peg$parsewsp();\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parsenumber();\n if (s5 !== peg$FAILED) {\n s6 = [];\n s7 = peg$parsewsp();\n while (s7 !== peg$FAILED) {\n s6.push(s7);\n s7 = peg$parsewsp();\n }\n if (s6 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s7 = peg$c6;\n peg$currPos++;\n } else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c7);\n }\n }\n if (s7 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c23(s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parsenumber() {\n var s0, s1, s2, s3;\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = peg$parsesign();\n if (s2 === peg$FAILED) {\n s2 = null;\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parsefloatingPointConstant();\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c24(s1);\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = peg$parsesign();\n if (s2 === peg$FAILED) {\n s2 = null;\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parseintegerConstant();\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c25(s1);\n }\n s0 = s1;\n }\n return s0;\n }\n function peg$parsecommaWspNumber() {\n var s0, s1, s2;\n s0 = peg$currPos;\n s1 = peg$parsecommaWsp();\n if (s1 !== peg$FAILED) {\n s2 = peg$parsenumber();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c26(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parsecommaWspTwoNumbers() {\n var s0, s1, s2, s3, s4;\n s0 = peg$currPos;\n s1 = peg$parsecommaWsp();\n if (s1 !== peg$FAILED) {\n s2 = peg$parsenumber();\n if (s2 !== peg$FAILED) {\n s3 = peg$parsecommaWsp();\n if (s3 !== peg$FAILED) {\n s4 = peg$parsenumber();\n if (s4 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c27(s2, s4);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parsecommaWsp() {\n var s0, s1, s2, s3, s4;\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parsewsp();\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parsewsp();\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parsecomma();\n if (s2 === peg$FAILED) {\n s2 = null;\n }\n if (s2 !== peg$FAILED) {\n s3 = [];\n s4 = peg$parsewsp();\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = peg$parsewsp();\n }\n if (s3 !== peg$FAILED) {\n s1 = [s1, s2, s3];\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parsecomma();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parsewsp();\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parsewsp();\n }\n if (s2 !== peg$FAILED) {\n s1 = [s1, s2];\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n return s0;\n }\n function peg$parsecomma() {\n var s0;\n if (input.charCodeAt(peg$currPos) === 44) {\n s0 = peg$c28;\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c29);\n }\n }\n return s0;\n }\n function peg$parseintegerConstant() {\n var s0, s1;\n s0 = peg$currPos;\n s1 = peg$parsedigitSequence();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c30(s1);\n }\n s0 = s1;\n return s0;\n }\n function peg$parsefloatingPointConstant() {\n var s0, s1, s2, s3;\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = peg$parsefractionalConstant();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseexponent();\n if (s3 === peg$FAILED) {\n s3 = null;\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c31(s1);\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$currPos;\n s2 = peg$parsedigitSequence();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseexponent();\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c32(s1);\n }\n s0 = s1;\n }\n return s0;\n }\n function peg$parsefractionalConstant() {\n var s0, s1, s2, s3;\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = peg$parsedigitSequence();\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 46) {\n s2 = peg$c34;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c35);\n }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parsedigitSequence();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c36(s1, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parsedigitSequence();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 46) {\n s2 = peg$c34;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c35);\n }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c32(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c33);\n }\n }\n return s0;\n }\n function peg$parseexponent() {\n var s0, s1, s2, s3, s4;\n s0 = peg$currPos;\n s1 = peg$currPos;\n if (peg$c37.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c38);\n }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parsesign();\n if (s3 === peg$FAILED) {\n s3 = null;\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parsedigitSequence();\n if (s4 !== peg$FAILED) {\n s2 = [s2, s3, s4];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c39(s1);\n }\n s0 = s1;\n return s0;\n }\n function peg$parsesign() {\n var s0;\n if (peg$c40.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c41);\n }\n }\n return s0;\n }\n function peg$parsedigitSequence() {\n var s0, s1;\n s0 = [];\n s1 = peg$parsedigit();\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n s1 = peg$parsedigit();\n }\n } else {\n s0 = peg$FAILED;\n }\n return s0;\n }\n function peg$parsedigit() {\n var s0;\n if (peg$c42.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c43);\n }\n }\n return s0;\n }\n function peg$parsewsp() {\n var s0;\n if (peg$c44.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$c45);\n }\n }\n return s0;\n }\n var deg2rad = Math.PI / 180;\n\n /*\n ╔═ ═╗ ╔═ ═╗ ╔═ ═╗\n ║ al cl el ║ ║ ar cr er ║ ║ a c e ║\n ║ bl dl fl ║ * ║ br dr fr ║ = ║ b d f ║\n ║ 0 0 1 ║ ║ 0 0 1 ║ ║ 0 0 1 ║\n ╚═ ═╝ ╚═ ═╝ ╚═ ═╝\n */\n function multiply_matrices(l, r) {\n var al = l[0];\n var cl = l[1];\n var el = l[2];\n var bl = l[3];\n var dl = l[4];\n var fl = l[5];\n var ar = r[0];\n var cr = r[1];\n var er = r[2];\n var br = r[3];\n var dr = r[4];\n var fr = r[5];\n var a = al * ar + cl * br;\n var c = al * cr + cl * dr;\n var e = al * er + cl * fr + el;\n var b = bl * ar + dl * br;\n var d = bl * cr + dl * dr;\n var f = bl * er + dl * fr + fl;\n return [a, c, e, b, d, f];\n }\n peg$result = peg$startRuleFunction();\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail(peg$endExpectation());\n }\n throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos));\n }\n}\nmodule.exports = {\n SyntaxError: peg$SyntaxError,\n parse: peg$parse\n};\n//# sourceMappingURL=transform.js.map","// @generated by Peggy 4.0.3.\n//\n// https://peggyjs.org/\n\n'use strict';\n\nfunction peg$subclass(child, parent) {\n function C() {\n this.constructor = child;\n }\n C.prototype = parent.prototype;\n child.prototype = new C();\n}\nfunction peg$SyntaxError(message, expected, found, location) {\n var self = Error.call(this, message);\n // istanbul ignore next Check is a necessary evil to support older environments\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(self, peg$SyntaxError.prototype);\n }\n self.expected = expected;\n self.found = found;\n self.location = location;\n self.name = 'SyntaxError';\n return self;\n}\npeg$subclass(peg$SyntaxError, Error);\nfunction peg$padEnd(str, targetLength, padString) {\n padString = padString || ' ';\n if (str.length > targetLength) {\n return str;\n }\n targetLength -= str.length;\n padString += padString.repeat(targetLength);\n return str + padString.slice(0, targetLength);\n}\npeg$SyntaxError.prototype.format = function (sources) {\n var str = 'Error: ' + this.message;\n if (this.location) {\n var src = null;\n var k;\n for (k = 0; k < sources.length; k++) {\n if (sources[k].source === this.location.source) {\n src = sources[k].text.split(/\\r\\n|\\n|\\r/g);\n break;\n }\n }\n var s = this.location.start;\n var offset_s = this.location.source && typeof this.location.source.offset === 'function' ? this.location.source.offset(s) : s;\n var loc = this.location.source + ':' + offset_s.line + ':' + offset_s.column;\n if (src) {\n var e = this.location.end;\n var filler = peg$padEnd('', offset_s.line.toString().length, ' ');\n var line = src[s.line - 1];\n var last = s.line === e.line ? e.column : line.length + 1;\n var hatLen = last - s.column || 1;\n str += '\\n --> ' + loc + '\\n' + filler + ' |\\n' + offset_s.line + ' | ' + line + '\\n' + filler + ' | ' + peg$padEnd('', s.column - 1, ' ') + peg$padEnd('', hatLen, '^');\n } else {\n str += '\\n at ' + loc;\n }\n }\n return str;\n};\npeg$SyntaxError.buildMessage = function (expected, found) {\n var DESCRIBE_EXPECTATION_FNS = {\n literal: function (expectation) {\n return '\"' + literalEscape(expectation.text) + '\"';\n },\n class: function (expectation) {\n var escapedParts = expectation.parts.map(function (part) {\n return Array.isArray(part) ? classEscape(part[0]) + '-' + classEscape(part[1]) : classEscape(part);\n });\n return '[' + (expectation.inverted ? '^' : '') + escapedParts.join('') + ']';\n },\n any: function () {\n return 'any character';\n },\n end: function () {\n return 'end of input';\n },\n other: function (expectation) {\n return expectation.description;\n }\n };\n function hex(ch) {\n return ch.charCodeAt(0).toString(16).toUpperCase();\n }\n function literalEscape(s) {\n return s.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"').replace(/\\0/g, '\\\\0').replace(/\\t/g, '\\\\t').replace(/\\n/g, '\\\\n').replace(/\\r/g, '\\\\r').replace(/[\\x00-\\x0F]/g, function (ch) {\n return '\\\\x0' + hex(ch);\n }).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function (ch) {\n return '\\\\x' + hex(ch);\n });\n }\n function classEscape(s) {\n return s.replace(/\\\\/g, '\\\\\\\\').replace(/\\]/g, '\\\\]').replace(/\\^/g, '\\\\^').replace(/-/g, '\\\\-').replace(/\\0/g, '\\\\0').replace(/\\t/g, '\\\\t').replace(/\\n/g, '\\\\n').replace(/\\r/g, '\\\\r').replace(/[\\x00-\\x0F]/g, function (ch) {\n return '\\\\x0' + hex(ch);\n }).replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function (ch) {\n return '\\\\x' + hex(ch);\n });\n }\n function describeExpectation(expectation) {\n return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);\n }\n function describeExpected(expected) {\n var descriptions = expected.map(describeExpectation);\n var i, j;\n descriptions.sort();\n if (descriptions.length > 0) {\n for (i = 1, j = 1; i < descriptions.length; i++) {\n if (descriptions[i - 1] !== descriptions[i]) {\n descriptions[j] = descriptions[i];\n j++;\n }\n }\n descriptions.length = j;\n }\n switch (descriptions.length) {\n case 1:\n return descriptions[0];\n case 2:\n return descriptions[0] + ' or ' + descriptions[1];\n default:\n return descriptions.slice(0, -1).join(', ') + ', or ' + descriptions[descriptions.length - 1];\n }\n }\n function describeFound(found) {\n return found ? '\"' + literalEscape(found) + '\"' : 'end of input';\n }\n return 'Expected ' + describeExpected(expected) + ' but ' + describeFound(found) + ' found.';\n};\nfunction peg$parse(input, options) {\n options = options !== undefined ? options : {};\n var peg$FAILED = {};\n var peg$source = options.grammarSource;\n var peg$startRuleFunctions = {\n start: peg$parsestart\n };\n var peg$startRuleFunction = peg$parsestart;\n var peg$c0 = 'matrix(';\n var peg$c1 = ')';\n var peg$c2 = 'translate(';\n var peg$c3 = 'scale(';\n var peg$c4 = 'rotate(';\n var peg$c5 = 'skewX(';\n var peg$c6 = 'skewY(';\n var peg$c7 = '.';\n var peg$c8 = 'e';\n var peg$r0 = /^[ \\t\\n\\r,]/;\n var peg$r1 = /^[ \\t\\n\\r]/;\n var peg$r2 = /^[+\\-]/;\n var peg$r3 = /^[0-9]/;\n var peg$e0 = peg$otherExpectation('transform functions');\n var peg$e1 = peg$otherExpectation('transformFunctions');\n var peg$e2 = peg$otherExpectation('transform function');\n var peg$e3 = peg$otherExpectation('matrix');\n var peg$e4 = peg$literalExpectation('matrix(', false);\n var peg$e5 = peg$literalExpectation(')', false);\n var peg$e6 = peg$otherExpectation('translate');\n var peg$e7 = peg$literalExpectation('translate(', false);\n var peg$e8 = peg$otherExpectation('scale');\n var peg$e9 = peg$literalExpectation('scale(', false);\n var peg$e10 = peg$otherExpectation('rotate');\n var peg$e11 = peg$literalExpectation('rotate(', false);\n var peg$e12 = peg$otherExpectation('x, y');\n var peg$e13 = peg$otherExpectation('skewX');\n var peg$e14 = peg$literalExpectation('skewX(', false);\n var peg$e15 = peg$otherExpectation('skewY');\n var peg$e16 = peg$literalExpectation('skewY(', false);\n var peg$e17 = peg$otherExpectation('space or comma');\n var peg$e18 = peg$classExpectation([' ', '\\t', '\\n', '\\r', ','], false, false);\n var peg$e19 = peg$otherExpectation('whitespace');\n var peg$e20 = peg$classExpectation([' ', '\\t', '\\n', '\\r'], false, false);\n var peg$e21 = peg$classExpectation(['+', '-'], false, false);\n var peg$e22 = peg$classExpectation([['0', '9']], false, false);\n var peg$e23 = peg$literalExpectation('.', false);\n var peg$e24 = peg$literalExpectation('e', false);\n var peg$f0 = function (head, tail) {\n const results = Array.isArray(head) ? head : [head];\n tail.forEach(element => {\n if (Array.isArray(element[1])) {\n results.push(...element[1]);\n } else {\n results.push(element[1]);\n }\n });\n return results;\n };\n var peg$f1 = function (a, b, c, d, e, f, g, h, i) {\n return {\n matrix: [a, b, c, d, e, f, g, h, i]\n };\n };\n var peg$f2 = function (x, y) {\n if (y == undefined) {\n return {\n translate: x\n };\n }\n return {\n translate: [x, y]\n };\n };\n var peg$f3 = function (x, y) {\n if (y == undefined) {\n return {\n scale: x\n };\n }\n return [{\n scaleX: x\n }, {\n scaleY: y\n }];\n };\n var peg$f4 = function (x, yz) {\n if (yz !== null) {\n return {\n rotate: `${x}deg`\n };\n }\n return [{\n rotate: `${x}deg`\n }];\n };\n var peg$f5 = function (y, z) {\n return [y, z];\n };\n var peg$f6 = function (x) {\n return [{\n skewX: `${x}deg`\n }];\n };\n var peg$f7 = function (y) {\n return [{\n skewY: `${y}deg`\n }];\n };\n var peg$f8 = function () {\n return parseFloat(text());\n };\n var peg$currPos = options.peg$currPos | 0;\n var peg$savedPos = peg$currPos;\n var peg$posDetailsCache = [{\n line: 1,\n column: 1\n }];\n var peg$maxFailPos = peg$currPos;\n var peg$maxFailExpected = options.peg$maxFailExpected || [];\n var peg$silentFails = options.peg$silentFails | 0;\n var peg$result;\n if (options.startRule) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error('Can\\'t start parsing from rule \"' + options.startRule + '\".');\n }\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n function text() {\n return input.substring(peg$savedPos, peg$currPos);\n }\n function offset() {\n return peg$savedPos;\n }\n function range() {\n return {\n source: peg$source,\n start: peg$savedPos,\n end: peg$currPos\n };\n }\n function location() {\n return peg$computeLocation(peg$savedPos, peg$currPos);\n }\n function expected(description, location) {\n location = location !== undefined ? location : peg$computeLocation(peg$savedPos, peg$currPos);\n throw peg$buildStructuredError([peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location);\n }\n function error(message, location) {\n location = location !== undefined ? location : peg$computeLocation(peg$savedPos, peg$currPos);\n throw peg$buildSimpleError(message, location);\n }\n function peg$literalExpectation(text, ignoreCase) {\n return {\n type: 'literal',\n text: text,\n ignoreCase: ignoreCase\n };\n }\n function peg$classExpectation(parts, inverted, ignoreCase) {\n return {\n type: 'class',\n parts: parts,\n inverted: inverted,\n ignoreCase: ignoreCase\n };\n }\n function peg$anyExpectation() {\n return {\n type: 'any'\n };\n }\n function peg$endExpectation() {\n return {\n type: 'end'\n };\n }\n function peg$otherExpectation(description) {\n return {\n type: 'other',\n description: description\n };\n }\n function peg$computePosDetails(pos) {\n var details = peg$posDetailsCache[pos];\n var p;\n if (details) {\n return details;\n } else {\n if (pos >= peg$posDetailsCache.length) {\n p = peg$posDetailsCache.length - 1;\n } else {\n p = pos;\n while (!peg$posDetailsCache[--p]) {}\n }\n details = peg$posDetailsCache[p];\n details = {\n line: details.line,\n column: details.column\n };\n while (p < pos) {\n if (input.charCodeAt(p) === 10) {\n details.line++;\n details.column = 1;\n } else {\n details.column++;\n }\n p++;\n }\n peg$posDetailsCache[pos] = details;\n return details;\n }\n }\n function peg$computeLocation(startPos, endPos, offset) {\n var startPosDetails = peg$computePosDetails(startPos);\n var endPosDetails = peg$computePosDetails(endPos);\n var res = {\n source: peg$source,\n start: {\n offset: startPos,\n line: startPosDetails.line,\n column: startPosDetails.column\n },\n end: {\n offset: endPos,\n line: endPosDetails.line,\n column: endPosDetails.column\n }\n };\n if (offset && peg$source && typeof peg$source.offset === 'function') {\n res.start = peg$source.offset(res.start);\n res.end = peg$source.offset(res.end);\n }\n return res;\n }\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) {\n return;\n }\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n peg$maxFailExpected.push(expected);\n }\n function peg$buildSimpleError(message, location) {\n return new peg$SyntaxError(message, null, null, location);\n }\n function peg$buildStructuredError(expected, found, location) {\n return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected, found), expected, found, location);\n }\n function peg$parsestart() {\n var s0, s1;\n peg$silentFails++;\n s0 = peg$parsetransformFunctions();\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e0);\n }\n }\n return s0;\n }\n function peg$parsetransformFunctions() {\n var s0, s1, s2, s3, s4, s5;\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = peg$parsefunction();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n s5 = peg$parsefunction();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n s5 = peg$parsefunction();\n if (s5 !== peg$FAILED) {\n s4 = [s4, s5];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n peg$savedPos = s0;\n s0 = peg$f0(s1, s2);\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e1);\n }\n }\n return s0;\n }\n function peg$parsefunction() {\n var s0, s1;\n peg$silentFails++;\n s0 = peg$parsematrix();\n if (s0 === peg$FAILED) {\n s0 = peg$parsetranslate();\n if (s0 === peg$FAILED) {\n s0 = peg$parsescale();\n if (s0 === peg$FAILED) {\n s0 = peg$parserotate();\n if (s0 === peg$FAILED) {\n s0 = peg$parseskewX();\n if (s0 === peg$FAILED) {\n s0 = peg$parseskewY();\n }\n }\n }\n }\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e2);\n }\n }\n return s0;\n }\n function peg$parsematrix() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19, s20, s21, s22, s23;\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (input.substr(peg$currPos, 7) === peg$c0) {\n s2 = peg$c0;\n peg$currPos += 7;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e4);\n }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n s4 = peg$parseNUM();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsespaceOrComma();\n s6 = peg$parseNUM();\n if (s6 !== peg$FAILED) {\n s7 = peg$parsespaceOrComma();\n s8 = peg$parseNUM();\n if (s8 !== peg$FAILED) {\n s9 = peg$parsespaceOrComma();\n s10 = peg$parseNUM();\n if (s10 !== peg$FAILED) {\n s11 = peg$parsespaceOrComma();\n s12 = peg$parseNUM();\n if (s12 !== peg$FAILED) {\n s13 = peg$parsespaceOrComma();\n s14 = peg$parseNUM();\n if (s14 !== peg$FAILED) {\n s15 = peg$parsespaceOrComma();\n s16 = peg$parseNUM();\n if (s16 !== peg$FAILED) {\n s17 = peg$parsespaceOrComma();\n s18 = peg$parseNUM();\n if (s18 !== peg$FAILED) {\n s19 = peg$parsespaceOrComma();\n s20 = peg$parseNUM();\n if (s20 !== peg$FAILED) {\n s21 = peg$parse_();\n if (input.charCodeAt(peg$currPos) === 41) {\n s22 = peg$c1;\n peg$currPos++;\n } else {\n s22 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e5);\n }\n }\n if (s22 !== peg$FAILED) {\n s23 = peg$parse_();\n peg$savedPos = s0;\n s0 = peg$f1(s4, s6, s8, s10, s12, s14, s16, s18, s20);\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e3);\n }\n }\n return s0;\n }\n function peg$parsetranslate() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (input.substr(peg$currPos, 10) === peg$c2) {\n s2 = peg$c2;\n peg$currPos += 10;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e7);\n }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n s4 = peg$parseNUM();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsespaceOrComma();\n s6 = peg$parseNUM();\n if (s6 === peg$FAILED) {\n s6 = null;\n }\n s7 = peg$parse_();\n if (input.charCodeAt(peg$currPos) === 41) {\n s8 = peg$c1;\n peg$currPos++;\n } else {\n s8 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e5);\n }\n }\n if (s8 !== peg$FAILED) {\n s9 = peg$parse_();\n peg$savedPos = s0;\n s0 = peg$f2(s4, s6);\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e6);\n }\n }\n return s0;\n }\n function peg$parsescale() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (input.substr(peg$currPos, 6) === peg$c3) {\n s2 = peg$c3;\n peg$currPos += 6;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e9);\n }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n s4 = peg$parseNUM();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsespaceOrComma();\n s6 = peg$parseNUM();\n if (s6 === peg$FAILED) {\n s6 = null;\n }\n s7 = peg$parse_();\n if (input.charCodeAt(peg$currPos) === 41) {\n s8 = peg$c1;\n peg$currPos++;\n } else {\n s8 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e5);\n }\n }\n if (s8 !== peg$FAILED) {\n s9 = peg$parse_();\n peg$savedPos = s0;\n s0 = peg$f3(s4, s6);\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e8);\n }\n }\n return s0;\n }\n function peg$parserotate() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8;\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (input.substr(peg$currPos, 7) === peg$c4) {\n s2 = peg$c4;\n peg$currPos += 7;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e11);\n }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n s4 = peg$parseNUM();\n if (s4 !== peg$FAILED) {\n s5 = peg$parsetwoNumbers();\n if (s5 === peg$FAILED) {\n s5 = null;\n }\n s6 = peg$parse_();\n if (input.charCodeAt(peg$currPos) === 41) {\n s7 = peg$c1;\n peg$currPos++;\n } else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e5);\n }\n }\n if (s7 !== peg$FAILED) {\n s8 = peg$parse_();\n peg$savedPos = s0;\n s0 = peg$f4(s4, s5);\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e10);\n }\n }\n return s0;\n }\n function peg$parsetwoNumbers() {\n var s0, s1, s2, s3, s4;\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = peg$parsespaceOrComma();\n s2 = peg$parseNUM();\n if (s2 !== peg$FAILED) {\n s3 = peg$parsespaceOrComma();\n s4 = peg$parseNUM();\n if (s4 !== peg$FAILED) {\n peg$savedPos = s0;\n s0 = peg$f5(s2, s4);\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e12);\n }\n }\n return s0;\n }\n function peg$parseskewX() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (input.substr(peg$currPos, 6) === peg$c5) {\n s2 = peg$c5;\n peg$currPos += 6;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e14);\n }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n s4 = peg$parseNUM();\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (input.charCodeAt(peg$currPos) === 41) {\n s6 = peg$c1;\n peg$currPos++;\n } else {\n s6 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e5);\n }\n }\n if (s6 !== peg$FAILED) {\n s7 = peg$parse_();\n peg$savedPos = s0;\n s0 = peg$f6(s4);\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e13);\n }\n }\n return s0;\n }\n function peg$parseskewY() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n peg$silentFails++;\n s0 = peg$currPos;\n s1 = peg$parse_();\n if (input.substr(peg$currPos, 6) === peg$c6) {\n s2 = peg$c6;\n peg$currPos += 6;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e16);\n }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n s4 = peg$parseNUM();\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n if (input.charCodeAt(peg$currPos) === 41) {\n s6 = peg$c1;\n peg$currPos++;\n } else {\n s6 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e5);\n }\n }\n if (s6 !== peg$FAILED) {\n s7 = peg$parse_();\n peg$savedPos = s0;\n s0 = peg$f7(s4);\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n peg$silentFails--;\n if (s0 === peg$FAILED) {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e15);\n }\n }\n return s0;\n }\n function peg$parsespaceOrComma() {\n var s0, s1;\n peg$silentFails++;\n s0 = [];\n s1 = input.charAt(peg$currPos);\n if (peg$r0.test(s1)) {\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e18);\n }\n }\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n s1 = input.charAt(peg$currPos);\n if (peg$r0.test(s1)) {\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e18);\n }\n }\n }\n peg$silentFails--;\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e17);\n }\n return s0;\n }\n function peg$parse_() {\n var s0, s1;\n peg$silentFails++;\n s0 = [];\n s1 = input.charAt(peg$currPos);\n if (peg$r1.test(s1)) {\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e20);\n }\n }\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n s1 = input.charAt(peg$currPos);\n if (peg$r1.test(s1)) {\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e20);\n }\n }\n }\n peg$silentFails--;\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e19);\n }\n return s0;\n }\n function peg$parseNUM() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n s0 = peg$currPos;\n s1 = input.charAt(peg$currPos);\n if (peg$r2.test(s1)) {\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e21);\n }\n }\n if (s1 === peg$FAILED) {\n s1 = null;\n }\n s2 = peg$currPos;\n s3 = [];\n s4 = input.charAt(peg$currPos);\n if (peg$r3.test(s4)) {\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e22);\n }\n }\n while (s4 !== peg$FAILED) {\n s3.push(s4);\n s4 = input.charAt(peg$currPos);\n if (peg$r3.test(s4)) {\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e22);\n }\n }\n }\n if (input.charCodeAt(peg$currPos) === 46) {\n s4 = peg$c7;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e23);\n }\n }\n if (s4 !== peg$FAILED) {\n s5 = [];\n s6 = input.charAt(peg$currPos);\n if (peg$r3.test(s6)) {\n peg$currPos++;\n } else {\n s6 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e22);\n }\n }\n if (s6 !== peg$FAILED) {\n while (s6 !== peg$FAILED) {\n s5.push(s6);\n s6 = input.charAt(peg$currPos);\n if (peg$r3.test(s6)) {\n peg$currPos++;\n } else {\n s6 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e22);\n }\n }\n }\n } else {\n s5 = peg$FAILED;\n }\n if (s5 !== peg$FAILED) {\n s3 = [s3, s4, s5];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n if (s2 === peg$FAILED) {\n s2 = [];\n s3 = input.charAt(peg$currPos);\n if (peg$r3.test(s3)) {\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e22);\n }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = input.charAt(peg$currPos);\n if (peg$r3.test(s3)) {\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e22);\n }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 101) {\n s4 = peg$c8;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e24);\n }\n }\n if (s4 !== peg$FAILED) {\n s5 = input.charAt(peg$currPos);\n if (peg$r2.test(s5)) {\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e21);\n }\n }\n if (s5 === peg$FAILED) {\n s5 = null;\n }\n s6 = [];\n s7 = input.charAt(peg$currPos);\n if (peg$r3.test(s7)) {\n peg$currPos++;\n } else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e22);\n }\n }\n if (s7 !== peg$FAILED) {\n while (s7 !== peg$FAILED) {\n s6.push(s7);\n s7 = input.charAt(peg$currPos);\n if (peg$r3.test(s7)) {\n peg$currPos++;\n } else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) {\n peg$fail(peg$e22);\n }\n }\n }\n } else {\n s6 = peg$FAILED;\n }\n if (s6 !== peg$FAILED) {\n s4 = [s4, s5, s6];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n if (s3 === peg$FAILED) {\n s3 = null;\n }\n peg$savedPos = s0;\n s0 = peg$f8();\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n return s0;\n }\n peg$result = peg$startRuleFunction();\n if (options.peg$library) {\n return /** @type {any} */{\n peg$result,\n peg$currPos,\n peg$FAILED,\n peg$maxFailExpected,\n peg$maxFailPos\n };\n }\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail(peg$endExpectation());\n }\n throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos));\n }\n}\nmodule.exports = {\n StartRules: ['start'],\n SyntaxError: peg$SyntaxError,\n parse: peg$parse\n};\n//# sourceMappingURL=transformToRn.js.map","import React from 'react';\nimport {\n// @ts-ignore it is not seen in exports\nunstable_createElement as createElement } from 'react-native';\nimport { prepare } from './utils/prepare';\nimport { convertInt32ColorToRGBA } from './utils/convertInt32Color';\nimport { camelCaseToDashed, hasTouchableProperty, remeasure } from './utils';\nimport SvgTouchableMixin from '../lib/SvgTouchableMixin';\nexport class WebShape extends React.Component {\n prepareProps(props) {\n return props;\n }\n elementRef = /*#__PURE__*/React.createRef();\n lastMergedProps = {};\n\n /**\n * disclaimer: I am not sure why the props are wrapped in a `style` attribute here, but that's how reanimated calls it\n */\n setNativeProps(props) {\n const merged = Object.assign({}, this.props, this.lastMergedProps, props.style);\n this.lastMergedProps = merged;\n const clean = prepare(this, this.prepareProps(merged));\n const current = this.elementRef.current;\n if (current) {\n for (const cleanAttribute of Object.keys(clean)) {\n const cleanValue = clean[cleanAttribute];\n switch (cleanAttribute) {\n case 'ref':\n case 'children':\n break;\n case 'style':\n // style can be an object here or an array, so we convert it to an array and assign each element\n for (const partialStyle of [].concat(clean.style ?? [])) {\n Object.assign(current.style, partialStyle);\n }\n break;\n case 'fill':\n if (cleanValue && typeof cleanValue === 'object') {\n const value = cleanValue;\n current.setAttribute('fill', convertInt32ColorToRGBA(value.payload));\n }\n break;\n case 'stroke':\n if (cleanValue && typeof cleanValue === 'object') {\n const value = cleanValue;\n current.setAttribute('stroke', convertInt32ColorToRGBA(value.payload));\n }\n break;\n default:\n // apply all other incoming prop updates as attributes on the node\n // same logic as in https://github.com/software-mansion/react-native-reanimated/blob/d04720c82f5941532991b235787285d36d717247/src/reanimated2/js-reanimated/index.ts#L38-L39\n // @ts-expect-error TODO: fix this\n current.setAttribute(camelCaseToDashed(cleanAttribute), cleanValue);\n break;\n }\n }\n }\n }\n constructor(props) {\n super(props);\n\n // Do not attach touchable mixin handlers if SVG element doesn't have a touchable prop\n if (hasTouchableProperty(props)) {\n SvgTouchableMixin(this);\n }\n this._remeasureMetricsOnActivation = remeasure.bind(this);\n }\n render() {\n if (!this.tag) {\n throw new Error('When extending `WebShape` you need to overwrite either `tag` or `render`!');\n }\n this.lastMergedProps = {};\n return createElement(this.tag, prepare(this, this.prepareProps(this.props)));\n }\n}\n//# sourceMappingURL=WebShape.js.map","import { hasTouchableProperty, parseTransformProp } from '.';\nimport { resolve } from '../../lib/resolve';\nimport { resolveAssetUri } from '../../lib/resolveAssetUri';\n/**\n * `react-native-svg` supports additional props that aren't defined in the spec.\n * This function replaces them in a spec conforming manner.\n *\n * @param {WebShape} self Instance given to us.\n * @param {Object?} props Optional overridden props given to us.\n * @returns {Object} Cleaned props object.\n * @private\n */\nexport const prepare = (self, props = self.props) => {\n const {\n transform,\n origin,\n originX,\n originY,\n fontFamily,\n fontSize,\n fontWeight,\n fontStyle,\n style,\n forwardedRef,\n gradientTransform,\n patternTransform,\n onPress,\n ...rest\n } = props;\n const clean = {\n ...(hasTouchableProperty(props) ? {\n onStartShouldSetResponder: self.touchableHandleStartShouldSetResponder,\n onResponderTerminationRequest: self.touchableHandleResponderTerminationRequest,\n onResponderGrant: self.touchableHandleResponderGrant,\n onResponderMove: self.touchableHandleResponderMove,\n onResponderRelease: self.touchableHandleResponderRelease,\n onResponderTerminate: self.touchableHandleResponderTerminate\n } : null),\n ...rest\n };\n if (origin != null) {\n clean['transform-origin'] = origin.toString().replace(',', ' ');\n } else if (originX != null || originY != null) {\n clean['transform-origin'] = `${originX || 0} ${originY || 0}`;\n }\n\n // we do it like this because setting transform as undefined causes error in web\n const parsedTransform = parseTransformProp(transform, props);\n if (parsedTransform) {\n clean.transform = parsedTransform;\n }\n const parsedGradientTransform = parseTransformProp(gradientTransform);\n if (parsedGradientTransform) {\n clean.gradientTransform = parsedGradientTransform;\n }\n const parsedPatternTransform = parseTransformProp(patternTransform);\n if (parsedPatternTransform) {\n clean.patternTransform = parsedPatternTransform;\n }\n clean.ref = el => {\n self.elementRef.current = el;\n if (typeof forwardedRef === 'function') {\n forwardedRef(el);\n } else if (forwardedRef) {\n forwardedRef.current = el;\n }\n };\n const styles = {};\n if (fontFamily != null) {\n styles.fontFamily = fontFamily;\n }\n if (fontSize != null) {\n styles.fontSize = fontSize;\n }\n if (fontWeight != null) {\n styles.fontWeight = fontWeight;\n }\n if (fontStyle != null) {\n styles.fontStyle = fontStyle;\n }\n clean.style = resolve(style, styles);\n if (onPress !== null) {\n clean.onClick = props.onPress;\n }\n if (props.href !== null && props.href !== undefined) {\n var _resolveAssetUri;\n clean.href = (_resolveAssetUri = resolveAssetUri(props.href)) === null || _resolveAssetUri === void 0 ? void 0 : _resolveAssetUri.uri;\n }\n return clean;\n};\n//# sourceMappingURL=prepare.js.map","import { StyleSheet } from 'react-native';\n\n// Kept in separate file, to avoid name collision with Symbol element\nexport function resolve(styleProp, cleanedProps) {\n if (styleProp) {\n return StyleSheet ? [styleProp, cleanedProps] :\n // Compatibility for arrays of styles in plain react web\n styleProp[Symbol.iterator] ? Object.assign({}, ...styleProp, cleanedProps) : Object.assign({}, styleProp, cleanedProps);\n } else {\n return cleanedProps;\n }\n}\n//# sourceMappingURL=resolve.js.map","import { PixelRatio } from 'react-native';\n// @ts-expect-error react-native/assets-registry doesn't export types.\nimport { getAssetByID } from '@react-native/assets-registry/registry';\nconst svgDataUriPattern = /^(data:image\\/svg\\+xml;utf8,)(.*)/;\n\n// Based on that function: https://github.com/necolas/react-native-web/blob/54c14d64dabd175e8055e1dc92e9196c821f9b7d/packages/react-native-web/src/exports/Image/index.js#L118-L156\nexport function resolveAssetUri(source) {\n let src = {};\n if (typeof source === 'number') {\n // get the URI from the packager\n const asset = getAssetByID(source);\n if (asset == null) {\n throw new Error(`Image: asset with ID \"${source}\" could not be found. Please check the image source or packager.`);\n }\n src = {\n width: asset.width,\n height: asset.height,\n scale: asset.scales[0]\n };\n if (asset.scales.length > 1) {\n const preferredScale = PixelRatio.get();\n // Get the scale which is closest to the preferred scale\n src.scale = asset.scales.reduce((prev, curr) => Math.abs(curr - preferredScale) < Math.abs(prev - preferredScale) ? curr : prev);\n }\n const scaleSuffix = src.scale !== 1 ? `@${src.scale}x` : '';\n src.uri = asset ? `${asset.httpServerLocation}/${asset.name}${scaleSuffix}.${asset.type}` : '';\n } else if (typeof source === 'string') {\n src.uri = source;\n } else if (source && !Array.isArray(source) && typeof source.uri === 'string') {\n src.uri = source.uri;\n }\n if (src.uri) {\n var _src;\n const match = (_src = src) === null || _src === void 0 || (_src = _src.uri) === null || _src === void 0 ? void 0 : _src.match(svgDataUriPattern);\n // inline SVG markup may contain characters (e.g., #, \") that need to be escaped\n if (match) {\n const [, prefix, svg] = match;\n const encodedSvg = encodeURIComponent(svg);\n src.uri = `${prefix}${encodedSvg}`;\n return src;\n }\n }\n return src;\n}\n//# sourceMappingURL=resolveAssetUri.js.map","export function convertInt32ColorToRGBA(color) {\n const r = color >> 16 & 255;\n const g = color >> 8 & 255;\n const b = color & 255;\n const a = (color >> 24 & 255) / 255;\n const alpha = a.toFixed(2);\n return `rgba(${r},${g},${b},${alpha})`;\n}\n//# sourceMappingURL=convertInt32Color.js.map","import { Touchable } from 'react-native';\nconst PRESS_RETENTION_OFFSET = {\n top: 20,\n left: 20,\n right: 20,\n bottom: 30\n};\n// @ts-expect-error: Mixin is not typed\nconst {\n Mixin\n} = Touchable;\nconst {\n touchableHandleStartShouldSetResponder,\n touchableHandleResponderTerminationRequest,\n touchableHandleResponderGrant,\n touchableHandleResponderMove,\n touchableHandleResponderRelease,\n touchableHandleResponderTerminate,\n touchableGetInitialState\n} = Mixin;\nconst SvgTouchableMixin = {\n ...Mixin,\n touchableHandleStartShouldSetResponder(e) {\n const {\n onStartShouldSetResponder\n } = this.props;\n if (onStartShouldSetResponder) {\n return onStartShouldSetResponder(e);\n } else {\n return touchableHandleStartShouldSetResponder.call(this, e);\n }\n },\n touchableHandleResponderTerminationRequest(e) {\n const {\n onResponderTerminationRequest\n } = this.props;\n if (onResponderTerminationRequest) {\n return onResponderTerminationRequest(e);\n } else {\n return touchableHandleResponderTerminationRequest.call(this, e);\n }\n },\n touchableHandleResponderGrant(e) {\n const {\n onResponderGrant\n } = this.props;\n if (onResponderGrant) {\n return onResponderGrant(e);\n } else {\n return touchableHandleResponderGrant.call(this, e);\n }\n },\n touchableHandleResponderMove(e) {\n const {\n onResponderMove\n } = this.props;\n if (onResponderMove) {\n return onResponderMove(e);\n } else {\n return touchableHandleResponderMove.call(this, e);\n }\n },\n touchableHandleResponderRelease(e) {\n const {\n onResponderRelease\n } = this.props;\n if (onResponderRelease) {\n return onResponderRelease(e);\n } else {\n return touchableHandleResponderRelease.call(this, e);\n }\n },\n touchableHandleResponderTerminate(e) {\n const {\n onResponderTerminate\n } = this.props;\n if (onResponderTerminate) {\n return onResponderTerminate(e);\n } else {\n return touchableHandleResponderTerminate.call(this, e);\n }\n },\n touchableHandlePress(e) {\n const {\n onPress\n } = this.props;\n onPress && onPress(e);\n },\n touchableHandleActivePressIn(e) {\n const {\n onPressIn\n } = this.props;\n onPressIn && onPressIn(e);\n },\n touchableHandleActivePressOut(e) {\n const {\n onPressOut\n } = this.props;\n onPressOut && onPressOut(e);\n },\n touchableHandleLongPress(e) {\n const {\n onLongPress\n } = this.props;\n onLongPress && onLongPress(e);\n },\n touchableGetPressRectOffset() {\n const {\n pressRetentionOffset\n } = this.props;\n return pressRetentionOffset || PRESS_RETENTION_OFFSET;\n },\n touchableGetHitSlop() {\n const {\n hitSlop\n } = this.props;\n return hitSlop;\n },\n touchableGetHighlightDelayMS() {\n const {\n delayPressIn\n } = this.props;\n return delayPressIn || 0;\n },\n touchableGetLongPressDelayMS() {\n const {\n delayLongPress\n } = this.props;\n return delayLongPress === 0 ? 0 : delayLongPress || 500;\n },\n touchableGetPressOutDelayMS() {\n const {\n delayPressOut\n } = this.props;\n return delayPressOut || 0;\n }\n};\nconst touchKeys = Object.keys(SvgTouchableMixin);\nconst touchVals = touchKeys.map(key => SvgTouchableMixin[key]);\nconst numTouchKeys = touchKeys.length;\nexport default target => {\n for (let i = 0; i < numTouchKeys; i++) {\n const key = touchKeys[i];\n const val = touchVals[i];\n if (typeof val === 'function') {\n target[key] = val.bind(target);\n } else {\n target[key] = val;\n }\n }\n target.state = touchableGetInitialState();\n};\n//# sourceMappingURL=SvgTouchableMixin.js.map","/**\n * Copyright (c) Meta Platforms, Inc. and 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 * @format\n */\n\n'use strict';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport AccessibilityUtil from '../../modules/AccessibilityUtil';\nimport BoundingDimensions from './BoundingDimensions';\nimport normalizeColor from '@react-native/normalize-colors';\nimport Position from './Position';\nimport React from 'react';\nimport UIManager from '../UIManager';\nimport View from '../View';\nimport { warnOnce } from '../../modules/warnOnce';\nvar extractSingleTouch = nativeEvent => {\n var touches = nativeEvent.touches;\n var changedTouches = nativeEvent.changedTouches;\n var hasTouches = touches && touches.length > 0;\n var hasChangedTouches = changedTouches && changedTouches.length > 0;\n return !hasTouches && hasChangedTouches ? changedTouches[0] : hasTouches ? touches[0] : nativeEvent;\n};\n\n/**\n * `Touchable`: Taps done right.\n *\n * You hook your `ResponderEventPlugin` events into `Touchable`. `Touchable`\n * will measure time/geometry and tells you when to give feedback to the user.\n *\n * ====================== Touchable Tutorial ===============================\n * The `Touchable` mixin helps you handle the \"press\" interaction. It analyzes\n * the geometry of elements, and observes when another responder (scroll view\n * etc) has stolen the touch lock. It notifies your component when it should\n * give feedback to the user. (bouncing/highlighting/unhighlighting).\n *\n * - When a touch was activated (typically you highlight)\n * - When a touch was deactivated (typically you unhighlight)\n * - When a touch was \"pressed\" - a touch ended while still within the geometry\n * of the element, and no other element (like scroller) has \"stolen\" touch\n * lock (\"responder\") (Typically you bounce the element).\n *\n * A good tap interaction isn't as simple as you might think. There should be a\n * slight delay before showing a highlight when starting a touch. If a\n * subsequent touch move exceeds the boundary of the element, it should\n * unhighlight, but if that same touch is brought back within the boundary, it\n * should rehighlight again. A touch can move in and out of that boundary\n * several times, each time toggling highlighting, but a \"press\" is only\n * triggered if that touch ends while within the element's boundary and no\n * scroller (or anything else) has stolen the lock on touches.\n *\n * To create a new type of component that handles interaction using the\n * `Touchable` mixin, do the following:\n *\n * - Initialize the `Touchable` state.\n *\n * getInitialState: function() {\n * return merge(this.touchableGetInitialState(), yourComponentState);\n * }\n *\n * - Add a method to get your touchable component's node.\n * getTouchableNode: function() {\n * return this.touchableRef.current\n * }\n *\n * - Choose the rendered component who's touches should start the interactive\n * sequence. On that rendered node, forward all `Touchable` responder\n * handlers. You can choose any rendered node you like. Choose a node whose\n * hit target you'd like to instigate the interaction sequence:\n *\n * // In render function:\n * return (\n * \n * \n * Even though the hit detection/interactions are triggered by the\n * wrapping (typically larger) node, we usually end up implementing\n * custom logic that highlights this inner one.\n * \n * \n * );\n *\n * - You may set up your own handlers for each of these events, so long as you\n * also invoke the `touchable*` handlers inside of your custom handler.\n *\n * - Implement the handlers on your component class in order to provide\n * feedback to the user. See documentation for each of these class methods\n * that you should implement.\n *\n * touchableHandlePress: function() {\n * this.performBounceAnimation(); // or whatever you want to do.\n * },\n * touchableHandleActivePressIn: function() {\n * this.beginHighlighting(...); // Whatever you like to convey activation\n * },\n * touchableHandleActivePressOut: function() {\n * this.endHighlighting(...); // Whatever you like to convey deactivation\n * },\n *\n * - There are more advanced methods you can implement (see documentation below):\n * touchableGetHighlightDelayMS: function() {\n * return 20;\n * }\n * // In practice, *always* use a predeclared constant (conserve memory).\n * touchableGetPressRectOffset: function() {\n * return {top: 20, left: 20, right: 20, bottom: 100};\n * }\n */\n\n/**\n * Touchable states.\n */\n\nvar States = {\n NOT_RESPONDER: 'NOT_RESPONDER',\n // Not the responder\n RESPONDER_INACTIVE_PRESS_IN: 'RESPONDER_INACTIVE_PRESS_IN',\n // Responder, inactive, in the `PressRect`\n RESPONDER_INACTIVE_PRESS_OUT: 'RESPONDER_INACTIVE_PRESS_OUT',\n // Responder, inactive, out of `PressRect`\n RESPONDER_ACTIVE_PRESS_IN: 'RESPONDER_ACTIVE_PRESS_IN',\n // Responder, active, in the `PressRect`\n RESPONDER_ACTIVE_PRESS_OUT: 'RESPONDER_ACTIVE_PRESS_OUT',\n // Responder, active, out of `PressRect`\n RESPONDER_ACTIVE_LONG_PRESS_IN: 'RESPONDER_ACTIVE_LONG_PRESS_IN',\n // Responder, active, in the `PressRect`, after long press threshold\n RESPONDER_ACTIVE_LONG_PRESS_OUT: 'RESPONDER_ACTIVE_LONG_PRESS_OUT',\n // Responder, active, out of `PressRect`, after long press threshold\n ERROR: 'ERROR'\n};\n/*\n * Quick lookup map for states that are considered to be \"active\"\n */\n\nvar baseStatesConditions = {\n NOT_RESPONDER: false,\n RESPONDER_INACTIVE_PRESS_IN: false,\n RESPONDER_INACTIVE_PRESS_OUT: false,\n RESPONDER_ACTIVE_PRESS_IN: false,\n RESPONDER_ACTIVE_PRESS_OUT: false,\n RESPONDER_ACTIVE_LONG_PRESS_IN: false,\n RESPONDER_ACTIVE_LONG_PRESS_OUT: false,\n ERROR: false\n};\nvar IsActive = _objectSpread(_objectSpread({}, baseStatesConditions), {}, {\n RESPONDER_ACTIVE_PRESS_OUT: true,\n RESPONDER_ACTIVE_PRESS_IN: true\n});\n\n/**\n * Quick lookup for states that are considered to be \"pressing\" and are\n * therefore eligible to result in a \"selection\" if the press stops.\n */\nvar IsPressingIn = _objectSpread(_objectSpread({}, baseStatesConditions), {}, {\n RESPONDER_INACTIVE_PRESS_IN: true,\n RESPONDER_ACTIVE_PRESS_IN: true,\n RESPONDER_ACTIVE_LONG_PRESS_IN: true\n});\nvar IsLongPressingIn = _objectSpread(_objectSpread({}, baseStatesConditions), {}, {\n RESPONDER_ACTIVE_LONG_PRESS_IN: true\n});\n\n/**\n * Inputs to the state machine.\n */\nvar Signals = {\n DELAY: 'DELAY',\n RESPONDER_GRANT: 'RESPONDER_GRANT',\n RESPONDER_RELEASE: 'RESPONDER_RELEASE',\n RESPONDER_TERMINATED: 'RESPONDER_TERMINATED',\n ENTER_PRESS_RECT: 'ENTER_PRESS_RECT',\n LEAVE_PRESS_RECT: 'LEAVE_PRESS_RECT',\n LONG_PRESS_DETECTED: 'LONG_PRESS_DETECTED'\n};\n/**\n * Mapping from States x Signals => States\n */\nvar Transitions = {\n NOT_RESPONDER: {\n DELAY: States.ERROR,\n RESPONDER_GRANT: States.RESPONDER_INACTIVE_PRESS_IN,\n RESPONDER_RELEASE: States.ERROR,\n RESPONDER_TERMINATED: States.ERROR,\n ENTER_PRESS_RECT: States.ERROR,\n LEAVE_PRESS_RECT: States.ERROR,\n LONG_PRESS_DETECTED: States.ERROR\n },\n RESPONDER_INACTIVE_PRESS_IN: {\n DELAY: States.RESPONDER_ACTIVE_PRESS_IN,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT,\n LONG_PRESS_DETECTED: States.ERROR\n },\n RESPONDER_INACTIVE_PRESS_OUT: {\n DELAY: States.RESPONDER_ACTIVE_PRESS_OUT,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT,\n LONG_PRESS_DETECTED: States.ERROR\n },\n RESPONDER_ACTIVE_PRESS_IN: {\n DELAY: States.ERROR,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_OUT,\n LONG_PRESS_DETECTED: States.RESPONDER_ACTIVE_LONG_PRESS_IN\n },\n RESPONDER_ACTIVE_PRESS_OUT: {\n DELAY: States.ERROR,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_OUT,\n LONG_PRESS_DETECTED: States.ERROR\n },\n RESPONDER_ACTIVE_LONG_PRESS_IN: {\n DELAY: States.ERROR,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_OUT,\n LONG_PRESS_DETECTED: States.RESPONDER_ACTIVE_LONG_PRESS_IN\n },\n RESPONDER_ACTIVE_LONG_PRESS_OUT: {\n DELAY: States.ERROR,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_OUT,\n LONG_PRESS_DETECTED: States.ERROR\n },\n error: {\n DELAY: States.NOT_RESPONDER,\n RESPONDER_GRANT: States.RESPONDER_INACTIVE_PRESS_IN,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.NOT_RESPONDER,\n LEAVE_PRESS_RECT: States.NOT_RESPONDER,\n LONG_PRESS_DETECTED: States.NOT_RESPONDER\n }\n};\n\n// ==== Typical Constants for integrating into UI components ====\n// var HIT_EXPAND_PX = 20;\n// var HIT_VERT_OFFSET_PX = 10;\nvar HIGHLIGHT_DELAY_MS = 130;\nvar PRESS_EXPAND_PX = 20;\nvar LONG_PRESS_THRESHOLD = 500;\nvar LONG_PRESS_DELAY_MS = LONG_PRESS_THRESHOLD - HIGHLIGHT_DELAY_MS;\nvar LONG_PRESS_ALLOWED_MOVEMENT = 10;\n\n// Default amount \"active\" region protrudes beyond box\n\n/**\n * By convention, methods prefixed with underscores are meant to be @private,\n * and not @protected. Mixers shouldn't access them - not even to provide them\n * as callback handlers.\n *\n *\n * ========== Geometry =========\n * `Touchable` only assumes that there exists a `HitRect` node. The `PressRect`\n * is an abstract box that is extended beyond the `HitRect`.\n *\n * +--------------------------+\n * | | - \"Start\" events in `HitRect` cause `HitRect`\n * | +--------------------+ | to become the responder.\n * | | +--------------+ | | - `HitRect` is typically expanded around\n * | | | | | | the `VisualRect`, but shifted downward.\n * | | | VisualRect | | | - After pressing down, after some delay,\n * | | | | | | and before letting up, the Visual React\n * | | +--------------+ | | will become \"active\". This makes it eligible\n * | | HitRect | | for being highlighted (so long as the\n * | +--------------------+ | press remains in the `PressRect`).\n * | PressRect o |\n * +----------------------|---+\n * Out Region |\n * +-----+ This gap between the `HitRect` and\n * `PressRect` allows a touch to move far away\n * from the original hit rect, and remain\n * highlighted, and eligible for a \"Press\".\n * Customize this via\n * `touchableGetPressRectOffset()`.\n *\n *\n *\n * ======= State Machine =======\n *\n * +-------------+ <---+ RESPONDER_RELEASE\n * |NOT_RESPONDER|\n * +-------------+ <---+ RESPONDER_TERMINATED\n * +\n * | RESPONDER_GRANT (HitRect)\n * v\n * +---------------------------+ DELAY +-------------------------+ T + DELAY +------------------------------+\n * |RESPONDER_INACTIVE_PRESS_IN|+-------->|RESPONDER_ACTIVE_PRESS_IN| +------------> |RESPONDER_ACTIVE_LONG_PRESS_IN|\n * +---------------------------+ +-------------------------+ +------------------------------+\n * + ^ + ^ + ^\n * |LEAVE_ |ENTER_ |LEAVE_ |ENTER_ |LEAVE_ |ENTER_\n * |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT\n * | | | | | |\n * v + v + v +\n * +----------------------------+ DELAY +--------------------------+ +-------------------------------+\n * |RESPONDER_INACTIVE_PRESS_OUT|+------->|RESPONDER_ACTIVE_PRESS_OUT| |RESPONDER_ACTIVE_LONG_PRESS_OUT|\n * +----------------------------+ +--------------------------+ +-------------------------------+\n *\n * T + DELAY => LONG_PRESS_DELAY_MS + DELAY\n *\n * Not drawn are the side effects of each transition. The most important side\n * effect is the `touchableHandlePress` abstract method invocation that occurs\n * when a responder is released while in either of the \"Press\" states.\n *\n * The other important side effects are the highlight abstract method\n * invocations (internal callbacks) to be implemented by the mixer.\n *\n *\n * @lends Touchable.prototype\n */\nvar TouchableMixin = {\n // HACK (part 1): basic support for touchable interactions using a keyboard\n componentDidMount: function componentDidMount() {\n warnOnce('TouchableMixin', 'TouchableMixin is deprecated. Please use Pressable.');\n var touchableNode = this.getTouchableNode && this.getTouchableNode();\n if (touchableNode && touchableNode.addEventListener) {\n this._touchableBlurListener = e => {\n if (this._isTouchableKeyboardActive) {\n if (this.state.touchable.touchState && this.state.touchable.touchState !== States.NOT_RESPONDER) {\n this.touchableHandleResponderTerminate({\n nativeEvent: e\n });\n }\n this._isTouchableKeyboardActive = false;\n }\n };\n touchableNode.addEventListener('blur', this._touchableBlurListener);\n }\n },\n /**\n * Clear all timeouts on unmount\n */\n componentWillUnmount: function componentWillUnmount() {\n var touchableNode = this.getTouchableNode && this.getTouchableNode();\n if (touchableNode && touchableNode.addEventListener) {\n touchableNode.removeEventListener('blur', this._touchableBlurListener);\n }\n this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout);\n this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout);\n this.pressOutDelayTimeout && clearTimeout(this.pressOutDelayTimeout);\n // Clear DOM nodes\n this.pressInLocation = null;\n this.state.touchable.responderID = null;\n },\n /**\n * It's prefer that mixins determine state in this way, having the class\n * explicitly mix the state in the one and only `getInitialState` method.\n *\n * @return {object} State object to be placed inside of\n * `this.state.touchable`.\n */\n touchableGetInitialState: function touchableGetInitialState() {\n return {\n touchable: {\n touchState: undefined,\n responderID: null\n }\n };\n },\n // ==== Hooks to Gesture Responder system ====\n /**\n * Must return true if embedded in a native platform scroll view.\n */\n touchableHandleResponderTerminationRequest: function touchableHandleResponderTerminationRequest() {\n return !this.props.rejectResponderTermination;\n },\n /**\n * Must return true to start the process of `Touchable`.\n */\n touchableHandleStartShouldSetResponder: function touchableHandleStartShouldSetResponder() {\n return !this.props.disabled;\n },\n /**\n * Return true to cancel press on long press.\n */\n touchableLongPressCancelsPress: function touchableLongPressCancelsPress() {\n return true;\n },\n /**\n * Place as callback for a DOM element's `onResponderGrant` event.\n * @param {SyntheticEvent} e Synthetic event from event system.\n *\n */\n touchableHandleResponderGrant: function touchableHandleResponderGrant(e) {\n var dispatchID = e.currentTarget;\n // Since e is used in a callback invoked on another event loop\n // (as in setTimeout etc), we need to call e.persist() on the\n // event to make sure it doesn't get reused in the event object pool.\n e.persist();\n this.pressOutDelayTimeout && clearTimeout(this.pressOutDelayTimeout);\n this.pressOutDelayTimeout = null;\n this.state.touchable.touchState = States.NOT_RESPONDER;\n this.state.touchable.responderID = dispatchID;\n this._receiveSignal(Signals.RESPONDER_GRANT, e);\n var delayMS = this.touchableGetHighlightDelayMS !== undefined ? Math.max(this.touchableGetHighlightDelayMS(), 0) : HIGHLIGHT_DELAY_MS;\n delayMS = isNaN(delayMS) ? HIGHLIGHT_DELAY_MS : delayMS;\n if (delayMS !== 0) {\n this.touchableDelayTimeout = setTimeout(this._handleDelay.bind(this, e), delayMS);\n } else {\n this._handleDelay(e);\n }\n var longDelayMS = this.touchableGetLongPressDelayMS !== undefined ? Math.max(this.touchableGetLongPressDelayMS(), 10) : LONG_PRESS_DELAY_MS;\n longDelayMS = isNaN(longDelayMS) ? LONG_PRESS_DELAY_MS : longDelayMS;\n this.longPressDelayTimeout = setTimeout(this._handleLongDelay.bind(this, e), longDelayMS + delayMS);\n },\n /**\n * Place as callback for a DOM element's `onResponderRelease` event.\n */\n touchableHandleResponderRelease: function touchableHandleResponderRelease(e) {\n this.pressInLocation = null;\n this._receiveSignal(Signals.RESPONDER_RELEASE, e);\n },\n /**\n * Place as callback for a DOM element's `onResponderTerminate` event.\n */\n touchableHandleResponderTerminate: function touchableHandleResponderTerminate(e) {\n this.pressInLocation = null;\n this._receiveSignal(Signals.RESPONDER_TERMINATED, e);\n },\n /**\n * Place as callback for a DOM element's `onResponderMove` event.\n */\n touchableHandleResponderMove: function touchableHandleResponderMove(e) {\n // Measurement may not have returned yet.\n if (!this.state.touchable.positionOnActivate) {\n return;\n }\n var positionOnActivate = this.state.touchable.positionOnActivate;\n var dimensionsOnActivate = this.state.touchable.dimensionsOnActivate;\n var pressRectOffset = this.touchableGetPressRectOffset ? this.touchableGetPressRectOffset() : {\n left: PRESS_EXPAND_PX,\n right: PRESS_EXPAND_PX,\n top: PRESS_EXPAND_PX,\n bottom: PRESS_EXPAND_PX\n };\n var pressExpandLeft = pressRectOffset.left;\n var pressExpandTop = pressRectOffset.top;\n var pressExpandRight = pressRectOffset.right;\n var pressExpandBottom = pressRectOffset.bottom;\n var hitSlop = this.touchableGetHitSlop ? this.touchableGetHitSlop() : null;\n if (hitSlop) {\n pressExpandLeft += hitSlop.left || 0;\n pressExpandTop += hitSlop.top || 0;\n pressExpandRight += hitSlop.right || 0;\n pressExpandBottom += hitSlop.bottom || 0;\n }\n var touch = extractSingleTouch(e.nativeEvent);\n var pageX = touch && touch.pageX;\n var pageY = touch && touch.pageY;\n if (this.pressInLocation) {\n var movedDistance = this._getDistanceBetweenPoints(pageX, pageY, this.pressInLocation.pageX, this.pressInLocation.pageY);\n if (movedDistance > LONG_PRESS_ALLOWED_MOVEMENT) {\n this._cancelLongPressDelayTimeout();\n }\n }\n var isTouchWithinActive = pageX > positionOnActivate.left - pressExpandLeft && pageY > positionOnActivate.top - pressExpandTop && pageX < positionOnActivate.left + dimensionsOnActivate.width + pressExpandRight && pageY < positionOnActivate.top + dimensionsOnActivate.height + pressExpandBottom;\n if (isTouchWithinActive) {\n var prevState = this.state.touchable.touchState;\n this._receiveSignal(Signals.ENTER_PRESS_RECT, e);\n var curState = this.state.touchable.touchState;\n if (curState === States.RESPONDER_INACTIVE_PRESS_IN && prevState !== States.RESPONDER_INACTIVE_PRESS_IN) {\n // fix for t7967420\n this._cancelLongPressDelayTimeout();\n }\n } else {\n this._cancelLongPressDelayTimeout();\n this._receiveSignal(Signals.LEAVE_PRESS_RECT, e);\n }\n },\n /**\n * Invoked when the item receives focus. Mixers might override this to\n * visually distinguish the `VisualRect` so that the user knows that it\n * currently has the focus. Most platforms only support a single element being\n * focused at a time, in which case there may have been a previously focused\n * element that was blurred just prior to this. This can be overridden when\n * using `Touchable.Mixin.withoutDefaultFocusAndBlur`.\n */\n touchableHandleFocus: function touchableHandleFocus(e) {\n this.props.onFocus && this.props.onFocus(e);\n },\n /**\n * Invoked when the item loses focus. Mixers might override this to\n * visually distinguish the `VisualRect` so that the user knows that it\n * no longer has focus. Most platforms only support a single element being\n * focused at a time, in which case the focus may have moved to another.\n * This can be overridden when using\n * `Touchable.Mixin.withoutDefaultFocusAndBlur`.\n */\n touchableHandleBlur: function touchableHandleBlur(e) {\n this.props.onBlur && this.props.onBlur(e);\n },\n // ==== Abstract Application Callbacks ====\n\n /**\n * Invoked when the item should be highlighted. Mixers should implement this\n * to visually distinguish the `VisualRect` so that the user knows that\n * releasing a touch will result in a \"selection\" (analog to click).\n *\n * @abstract\n * touchableHandleActivePressIn: function,\n */\n\n /**\n * Invoked when the item is \"active\" (in that it is still eligible to become\n * a \"select\") but the touch has left the `PressRect`. Usually the mixer will\n * want to unhighlight the `VisualRect`. If the user (while pressing) moves\n * back into the `PressRect` `touchableHandleActivePressIn` will be invoked\n * again and the mixer should probably highlight the `VisualRect` again. This\n * event will not fire on an `touchEnd/mouseUp` event, only move events while\n * the user is depressing the mouse/touch.\n *\n * @abstract\n * touchableHandleActivePressOut: function\n */\n\n /**\n * Invoked when the item is \"selected\" - meaning the interaction ended by\n * letting up while the item was either in the state\n * `RESPONDER_ACTIVE_PRESS_IN` or `RESPONDER_INACTIVE_PRESS_IN`.\n *\n * @abstract\n * touchableHandlePress: function\n */\n\n /**\n * Invoked when the item is long pressed - meaning the interaction ended by\n * letting up while the item was in `RESPONDER_ACTIVE_LONG_PRESS_IN`. If\n * `touchableHandleLongPress` is *not* provided, `touchableHandlePress` will\n * be called as it normally is. If `touchableHandleLongPress` is provided, by\n * default any `touchableHandlePress` callback will not be invoked. To\n * override this default behavior, override `touchableLongPressCancelsPress`\n * to return false. As a result, `touchableHandlePress` will be called when\n * lifting up, even if `touchableHandleLongPress` has also been called.\n *\n * @abstract\n * touchableHandleLongPress: function\n */\n\n /**\n * Returns the number of millis to wait before triggering a highlight.\n *\n * @abstract\n * touchableGetHighlightDelayMS: function\n */\n\n /**\n * Returns the amount to extend the `HitRect` into the `PressRect`. Positive\n * numbers mean the size expands outwards.\n *\n * @abstract\n * touchableGetPressRectOffset: function\n */\n\n // ==== Internal Logic ====\n\n /**\n * Measures the `HitRect` node on activation. The Bounding rectangle is with\n * respect to viewport - not page, so adding the `pageXOffset/pageYOffset`\n * should result in points that are in the same coordinate system as an\n * event's `globalX/globalY` data values.\n *\n * - Consider caching this for the lifetime of the component, or possibly\n * being able to share this cache between any `ScrollMap` view.\n *\n * @sideeffects\n * @private\n */\n _remeasureMetricsOnActivation: function _remeasureMetricsOnActivation() {\n var tag = this.state.touchable.responderID;\n if (tag == null) {\n return;\n }\n UIManager.measure(tag, this._handleQueryLayout);\n },\n _handleQueryLayout: function _handleQueryLayout(l, t, w, h, globalX, globalY) {\n //don't do anything UIManager failed to measure node\n if (!l && !t && !w && !h && !globalX && !globalY) {\n return;\n }\n this.state.touchable.positionOnActivate && Position.release(this.state.touchable.positionOnActivate);\n this.state.touchable.dimensionsOnActivate &&\n // $FlowFixMe\n BoundingDimensions.release(this.state.touchable.dimensionsOnActivate);\n this.state.touchable.positionOnActivate = Position.getPooled(globalX, globalY);\n // $FlowFixMe\n this.state.touchable.dimensionsOnActivate = BoundingDimensions.getPooled(w, h);\n },\n _handleDelay: function _handleDelay(e) {\n this.touchableDelayTimeout = null;\n this._receiveSignal(Signals.DELAY, e);\n },\n _handleLongDelay: function _handleLongDelay(e) {\n this.longPressDelayTimeout = null;\n var curState = this.state.touchable.touchState;\n if (curState !== States.RESPONDER_ACTIVE_PRESS_IN && curState !== States.RESPONDER_ACTIVE_LONG_PRESS_IN) {\n console.error('Attempted to transition from state `' + curState + '` to `' + States.RESPONDER_ACTIVE_LONG_PRESS_IN + '`, which is not supported. This is ' + 'most likely due to `Touchable.longPressDelayTimeout` not being cancelled.');\n } else {\n this._receiveSignal(Signals.LONG_PRESS_DETECTED, e);\n }\n },\n /**\n * Receives a state machine signal, performs side effects of the transition\n * and stores the new state. Validates the transition as well.\n *\n * @param {Signals} signal State machine signal.\n * @throws Error if invalid state transition or unrecognized signal.\n * @sideeffects\n */\n _receiveSignal: function _receiveSignal(signal, e) {\n var responderID = this.state.touchable.responderID;\n var curState = this.state.touchable.touchState;\n var nextState = Transitions[curState] && Transitions[curState][signal];\n if (!responderID && signal === Signals.RESPONDER_RELEASE) {\n return;\n }\n if (!nextState) {\n throw new Error('Unrecognized signal `' + signal + '` or state `' + curState + '` for Touchable responder `' + responderID + '`');\n }\n if (nextState === States.ERROR) {\n throw new Error('Touchable cannot transition from `' + curState + '` to `' + signal + '` for responder `' + responderID + '`');\n }\n if (curState !== nextState) {\n this._performSideEffectsForTransition(curState, nextState, signal, e);\n this.state.touchable.touchState = nextState;\n }\n },\n _cancelLongPressDelayTimeout: function _cancelLongPressDelayTimeout() {\n this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout);\n this.longPressDelayTimeout = null;\n },\n _isHighlight: function _isHighlight(state) {\n return state === States.RESPONDER_ACTIVE_PRESS_IN || state === States.RESPONDER_ACTIVE_LONG_PRESS_IN;\n },\n _savePressInLocation: function _savePressInLocation(e) {\n var touch = extractSingleTouch(e.nativeEvent);\n var pageX = touch && touch.pageX;\n var pageY = touch && touch.pageY;\n var locationX = touch && touch.locationX;\n var locationY = touch && touch.locationY;\n this.pressInLocation = {\n pageX,\n pageY,\n locationX,\n locationY\n };\n },\n _getDistanceBetweenPoints: function _getDistanceBetweenPoints(aX, aY, bX, bY) {\n var deltaX = aX - bX;\n var deltaY = aY - bY;\n return Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n },\n /**\n * Will perform a transition between touchable states, and identify any\n * highlighting or unhighlighting that must be performed for this particular\n * transition.\n *\n * @param {States} curState Current Touchable state.\n * @param {States} nextState Next Touchable state.\n * @param {Signal} signal Signal that triggered the transition.\n * @param {Event} e Native event.\n * @sideeffects\n */\n _performSideEffectsForTransition: function _performSideEffectsForTransition(curState, nextState, signal, e) {\n var curIsHighlight = this._isHighlight(curState);\n var newIsHighlight = this._isHighlight(nextState);\n var isFinalSignal = signal === Signals.RESPONDER_TERMINATED || signal === Signals.RESPONDER_RELEASE;\n if (isFinalSignal) {\n this._cancelLongPressDelayTimeout();\n }\n var isInitialTransition = curState === States.NOT_RESPONDER && nextState === States.RESPONDER_INACTIVE_PRESS_IN;\n var isActiveTransition = !IsActive[curState] && IsActive[nextState];\n if (isInitialTransition || isActiveTransition) {\n this._remeasureMetricsOnActivation();\n }\n if (IsPressingIn[curState] && signal === Signals.LONG_PRESS_DETECTED) {\n this.touchableHandleLongPress && this.touchableHandleLongPress(e);\n }\n if (newIsHighlight && !curIsHighlight) {\n this._startHighlight(e);\n } else if (!newIsHighlight && curIsHighlight) {\n this._endHighlight(e);\n }\n if (IsPressingIn[curState] && signal === Signals.RESPONDER_RELEASE) {\n var hasLongPressHandler = !!this.props.onLongPress;\n var pressIsLongButStillCallOnPress = IsLongPressingIn[curState] && (\n // We *are* long pressing.. // But either has no long handler\n !hasLongPressHandler || !this.touchableLongPressCancelsPress()); // or we're told to ignore it.\n\n var shouldInvokePress = !IsLongPressingIn[curState] || pressIsLongButStillCallOnPress;\n if (shouldInvokePress && this.touchableHandlePress) {\n if (!newIsHighlight && !curIsHighlight) {\n // we never highlighted because of delay, but we should highlight now\n this._startHighlight(e);\n this._endHighlight(e);\n }\n this.touchableHandlePress(e);\n }\n }\n this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout);\n this.touchableDelayTimeout = null;\n },\n _playTouchSound: function _playTouchSound() {\n UIManager.playTouchSound();\n },\n _startHighlight: function _startHighlight(e) {\n this._savePressInLocation(e);\n this.touchableHandleActivePressIn && this.touchableHandleActivePressIn(e);\n },\n _endHighlight: function _endHighlight(e) {\n if (this.touchableHandleActivePressOut) {\n if (this.touchableGetPressOutDelayMS && this.touchableGetPressOutDelayMS()) {\n this.pressOutDelayTimeout = setTimeout(() => {\n this.touchableHandleActivePressOut(e);\n }, this.touchableGetPressOutDelayMS());\n } else {\n this.touchableHandleActivePressOut(e);\n }\n }\n },\n // HACK (part 2): basic support for touchable interactions using a keyboard (including\n // delays and longPress)\n touchableHandleKeyEvent: function touchableHandleKeyEvent(e) {\n var type = e.type,\n key = e.key;\n if (key === 'Enter' || key === ' ') {\n if (type === 'keydown') {\n if (!this._isTouchableKeyboardActive) {\n if (!this.state.touchable.touchState || this.state.touchable.touchState === States.NOT_RESPONDER) {\n this.touchableHandleResponderGrant(e);\n this._isTouchableKeyboardActive = true;\n }\n }\n } else if (type === 'keyup') {\n if (this._isTouchableKeyboardActive) {\n if (this.state.touchable.touchState && this.state.touchable.touchState !== States.NOT_RESPONDER) {\n this.touchableHandleResponderRelease(e);\n this._isTouchableKeyboardActive = false;\n }\n }\n }\n e.stopPropagation();\n // prevent the default behaviour unless the Touchable functions as a link\n // and Enter is pressed\n if (!(key === 'Enter' && AccessibilityUtil.propsToAriaRole(this.props) === 'link')) {\n e.preventDefault();\n }\n }\n },\n withoutDefaultFocusAndBlur: {}\n};\n\n/**\n * Provide an optional version of the mixin where `touchableHandleFocus` and\n * `touchableHandleBlur` can be overridden. This allows appropriate defaults to\n * be set on TV platforms, without breaking existing implementations of\n * `Touchable`.\n */\nvar touchableHandleFocus = TouchableMixin.touchableHandleFocus,\n touchableHandleBlur = TouchableMixin.touchableHandleBlur,\n TouchableMixinWithoutDefaultFocusAndBlur = _objectWithoutPropertiesLoose(TouchableMixin, [\"touchableHandleFocus\", \"touchableHandleBlur\"]);\nTouchableMixin.withoutDefaultFocusAndBlur = TouchableMixinWithoutDefaultFocusAndBlur;\nvar Touchable = {\n Mixin: TouchableMixin,\n TOUCH_TARGET_DEBUG: false,\n // Highlights all touchable targets. Toggle with Inspector.\n /**\n * Renders a debugging overlay to visualize touch target with hitSlop (might not work on Android).\n */\n renderDebugView: _ref => {\n var color = _ref.color,\n hitSlop = _ref.hitSlop;\n if (!Touchable.TOUCH_TARGET_DEBUG) {\n return null;\n }\n if (process.env.NODE_ENV !== 'production') {\n throw Error('Touchable.TOUCH_TARGET_DEBUG should not be enabled in prod!');\n }\n var debugHitSlopStyle = {};\n hitSlop = hitSlop || {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0\n };\n for (var key in hitSlop) {\n debugHitSlopStyle[key] = -hitSlop[key];\n }\n var normalizedColor = normalizeColor(color);\n if (typeof normalizedColor !== 'number') {\n return null;\n }\n var hexColor = '#' + ('00000000' + normalizedColor.toString(16)).substr(-8);\n return /*#__PURE__*/React.createElement(View, {\n pointerEvents: \"none\",\n style: _objectSpread({\n position: 'absolute',\n borderColor: hexColor.slice(0, -2) + '55',\n // More opaque\n borderWidth: 1,\n borderStyle: 'dashed',\n backgroundColor: hexColor.slice(0, -2) + '0F'\n }, debugHitSlopStyle)\n });\n }\n};\nexport default Touchable;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nimport PooledClass from '../../vendor/react-native/PooledClass';\nvar twoArgumentPooler = PooledClass.twoArgumentPooler;\n\n/**\n * PooledClass representing the bounding rectangle of a region.\n */\nfunction BoundingDimensions(width, height) {\n this.width = width;\n this.height = height;\n}\nBoundingDimensions.prototype.destructor = function () {\n this.width = null;\n this.height = null;\n};\nBoundingDimensions.getPooledFromElement = function (element) {\n return BoundingDimensions.getPooled(element.offsetWidth, element.offsetHeight);\n};\nPooledClass.addPoolingTo(BoundingDimensions, twoArgumentPooler);\nexport default BoundingDimensions;","/* eslint-disable */\n\n/**\n * Copyright (c) Meta Platforms, Inc. and 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 * From React 16.0.0\n */\n\nimport invariant from 'fbjs/lib/invariant';\nvar twoArgumentPooler = function twoArgumentPooler(a1, a2) {\n var Klass = this;\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2);\n return instance;\n } else {\n return new Klass(a1, a2);\n }\n};\nvar standardReleaser = function standardReleaser(instance) {\n var Klass = this;\n instance.destructor();\n if (Klass.instancePool.length < Klass.poolSize) {\n Klass.instancePool.push(instance);\n }\n};\nvar DEFAULT_POOL_SIZE = 10;\nvar DEFAULT_POOLER = twoArgumentPooler;\n\n/**\n * Augments `CopyConstructor` to be a poolable class, augmenting only the class\n * itself (statically) not adding any prototypical fields. Any CopyConstructor\n * you give this may have a `poolSize` property, and will look for a\n * prototypical `destructor` on instances.\n *\n * @param {Function} CopyConstructor Constructor that can be used to reset.\n * @param {Function} pooler Customizable pooler.\n */\nvar addPoolingTo = function addPoolingTo(CopyConstructor, pooler) {\n // Casting as any so that flow ignores the actual implementation and trusts\n // it to match the type we declared\n var NewKlass = CopyConstructor;\n NewKlass.instancePool = [];\n NewKlass.getPooled = pooler || DEFAULT_POOLER;\n if (!NewKlass.poolSize) {\n NewKlass.poolSize = DEFAULT_POOL_SIZE;\n }\n NewKlass.release = standardReleaser;\n return NewKlass;\n};\nvar PooledClass = {\n addPoolingTo: addPoolingTo,\n twoArgumentPooler: twoArgumentPooler\n};\nexport default PooledClass;","/**\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nimport PooledClass from '../../vendor/react-native/PooledClass';\nvar twoArgumentPooler = PooledClass.twoArgumentPooler;\nfunction Position(left, top) {\n this.left = left;\n this.top = top;\n}\nPosition.prototype.destructor = function () {\n this.left = null;\n this.top = null;\n};\nPooledClass.addPoolingTo(Position, twoArgumentPooler);\nexport default Position;","export function showErrorCSS(name, type) {\n throw Error(`[react-native-svg] You are trying to import a ${type} \\`${name}\\` that has been moved to a sub-package. Change your import from \\`react-native-svg\\` to \\`react-native-svg/css\\`.`);\n}\nexport function SvgCss() {\n showErrorCSS('SvgCss', 'component');\n}\nexport function SvgCssUri() {\n showErrorCSS('SvgCssUri', 'component');\n}\nexport function SvgWithCss() {\n showErrorCSS('SvgWithCss', 'component');\n}\nexport function SvgWithCssUri() {\n showErrorCSS('SvgWithCssUri', 'component');\n}\nexport function inlineStyles() {\n showErrorCSS('inlineStyles', 'function');\n}\nexport function LocalSvg() {\n showErrorCSS('LocalSvg', 'component');\n}\nexport function WithLocalSvg() {\n showErrorCSS('WithLocalSvg', 'component');\n}\nexport function loadLocalRawResource() {\n showErrorCSS('loadLocalRawResource', 'function');\n}\n//# sourceMappingURL=deprecated.js.map","export {};\n//# sourceMappingURL=types.js.map","import AIChat from './AIChat';\nimport Allergies from './Allergies';\nimport CareTeam from './CareTeam';\nimport Chat from './Chat';\nimport Conditions from './Conditions';\nimport Documents from './Documents';\nimport Imaging from './Imaging';\nimport Labs from './Labs';\nimport Medications from './Medications';\nimport Procedures from './Procedures';\nimport ProfileInfo from './ProfileInfo';\nimport Reports from './Reports';\nimport Vaccinations from './Vaccinations';\nimport Visits from './Visits';\nimport AISparkle from './AISparkle';\nimport UserCircle from './UserCircle';\nimport Play from './Play';\nimport Pause from './Pause';\nimport Portals from './Portals';\nimport MedicationsFilled from './MedicationsFilled';\nimport CareTeamFilled from './CareTeamFilled';\nimport ConditionsFilled from './ConditionsFilled';\nimport FilesFilled from './FilesFilled';\nimport FolderFilled from './FolderFilled';\nimport LabsFilled from './LabsFilled';\nimport NotesFilled from './NotesFilled';\nimport ProceduresFilled from './ProceduresFilled';\nimport ProfileInfoFilled from './ProfileInfoFilled';\nimport VaccinationsFilled from './VaccinationsFilled';\nimport VisitsFilled from './VisitsFilled';\nimport AllergiesFilled from './AllergiesFilled';\n\nexport {\n AIChat,\n Allergies,\n CareTeam,\n Chat,\n Conditions,\n Documents,\n Imaging,\n Labs,\n Medications,\n Procedures,\n ProfileInfo,\n Reports,\n Vaccinations,\n Visits,\n AISparkle,\n UserCircle,\n Play,\n Pause,\n MedicationsFilled,\n CareTeamFilled,\n ConditionsFilled,\n FilesFilled,\n FolderFilled,\n LabsFilled,\n NotesFilled,\n ProceduresFilled,\n ProfileInfoFilled,\n VaccinationsFilled,\n VisitsFilled,\n AllergiesFilled,\n Portals,\n};\n","import React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst AIChatButton: React.FC = (props) => {\n return (\n \n \n \n \n \n );\n};\n\nexport default React.memo(AIChatButton);\n","import { SvgProps } from 'react-native-svg';\n\nexport type BaseIconProps = {\n width: number;\n height: number;\n color: string;\n};\n\nexport type CustomSVGProps = SvgProps & BaseIconProps;\n\nexport const getBaseSVGProps = (props: CustomSVGProps, viewBoxDimensions?: number): SvgProps => {\n const { height, width, color, ...rest } = props;\n return {\n width: `${width}`,\n height: `${height}`,\n viewBox: `0 0 ${viewBoxDimensions || width} ${viewBoxDimensions || height}`,\n ...rest,\n };\n};\n","import React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst Allergies: React.FC = (props) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default React.memo(Allergies);\n","import React from 'react';\nimport Svg, { Path, Ellipse, Circle } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst CareTeam: React.FC = (props) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default React.memo(CareTeam);\n","import React from 'react';\nimport Svg, { Path, Circle } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst Chat: React.FC = (props) => {\n return (\n \n \n \n \n \n \n \n );\n};\n\nexport default React.memo(Chat);\n","import React from 'react';\nimport Svg, { Path, Ellipse, Circle } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst Conditions: React.FC = (props) => {\n return (\n \n \n \n \n \n );\n};\n\nexport default React.memo(Conditions);\n","import React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst Documents: React.FC = (props) => {\n return (\n \n \n \n \n \n );\n};\n\nexport default React.memo(Documents);\n","import React from 'react';\nimport Svg, { Path, Circle, Rect } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst Imaging: React.FC = (props) => {\n return (\n \n \n \n \n \n \n );\n};\n\nexport default React.memo(Imaging);\n","import React from 'react';\nimport Svg, { Path, Rect } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst Labs: React.FC = (props) => {\n return (\n \n \n \n \n \n );\n};\n\nexport default React.memo(Labs);\n","import React from 'react';\nimport Svg, { Path, Mask } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst Medications: React.FC = (props) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default React.memo(Medications);\n","import React from 'react';\nimport Svg, { Path, Rect } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst Procedures: React.FC = (props) => {\n return (\n \n \n \n \n );\n};\n\nexport default React.memo(Procedures);\n","import React from 'react';\nimport Svg, { Path, Circle } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst ProfileInfo: React.FC = (props) => {\n return (\n \n \n \n \n );\n};\n\nexport default React.memo(ProfileInfo);\n","import React from 'react';\nimport Svg, { Path, Ellipse, Circle } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst Reports: React.FC = (props) => {\n return (\n \n \n \n \n \n \n );\n};\n\nexport default React.memo(Reports);\n","import React from 'react';\nimport Svg, { Path, Ellipse, Circle, G, Defs, ClipPath } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst Vaccinations: React.FC = (props) => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default React.memo(Vaccinations);\n","import React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst Visits: React.FC = (props) => {\n return (\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default React.memo(Visits);\n","import React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst AISparkle: React.FC = (props) => {\n return (\n \n \n \n );\n};\n\nexport default React.memo(AISparkle);\n","import React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst UserCircle: React.FC = (props) => {\n return (\n \n \n \n );\n};\n\nexport default React.memo(UserCircle);\n","import React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\nimport { View } from 'react-native';\n\nconst Play: React.FC = (props) => {\n return (\n \n \n \n \n \n );\n};\n\nexport default React.memo(Play);\n","import React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst Pause: React.FC = (props) => {\n return (\n \n \n \n \n );\n};\n\nexport default React.memo(Pause);\n","import React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst Portals: React.FC = (props) => {\n return (\n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default React.memo(Portals);\n","import React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst MedicationsFilled: React.FC = (props) => {\n return (\n \n \n \n \n \n \n \n );\n};\n\nexport default React.memo(MedicationsFilled);\n","import React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst CareTeamFilled: React.FC = (props) => {\n return (\n \n \n \n );\n};\n\nexport default React.memo(CareTeamFilled);\n","import React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst ConditionsFilled: React.FC = (props) => {\n return (\n \n \n \n );\n};\n\nexport default React.memo(ConditionsFilled);\n","import React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst FilesFilled: React.FC = (props) => {\n return (\n \n \n \n \n );\n};\n\nexport default React.memo(FilesFilled);\n","import React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst FolderFilled: React.FC = (props) => {\n return (\n \n \n \n \n );\n};\n\nexport default React.memo(FolderFilled);\n","import React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst LabsFilled: React.FC = (props) => {\n return (\n \n \n \n );\n};\n\nexport default React.memo(LabsFilled);\n","import React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst NotesFilled: React.FC = (props) => {\n return (\n \n \n \n \n );\n};\n\nexport default React.memo(NotesFilled);\n","import React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst ProceduresFilled: React.FC = (props) => {\n return (\n \n \n \n );\n};\n\nexport default React.memo(ProceduresFilled);\n","import React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst ProfileInfoFilled: React.FC = (props) => {\n return (\n \n \n \n \n );\n};\n\nexport default React.memo(ProfileInfoFilled);\n","import React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst VaccinationsFilled: React.FC = (props) => {\n return (\n \n \n \n );\n};\n\nexport default React.memo(VaccinationsFilled);\n","import React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst VisitsFilled: React.FC = (props) => {\n return (\n \n \n \n \n );\n};\n\nexport default React.memo(VisitsFilled);\n","import React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport { CustomSVGProps, getBaseSVGProps } from './utils';\n\nconst AllergiesFilled: React.FC = (props) => {\n return (\n \n \n \n );\n};\n\nexport default React.memo(AllergiesFilled);\n","import { useCallback } from 'react';\nimport HoverDetectionContainer from '../components/v2BaseComponents/HoverDetectionContainer';\nimport { useToggle } from './useToggle';\nimport { useIsDisabledByParent } from '../components/v2BaseComponents/IsDisabledProvider';\nimport { isPresent } from 'ts-is-present';\nimport { StyleProp, ViewStyle } from 'react-native';\n\nexport type State = 'default' | 'hovered' | 'pressed' | 'inactive';\n\nexport type StateStyles = {\n default: TStyles;\n hovered?: TStyles;\n pressed?: TStyles;\n inactive?: TStyles;\n};\n\nexport type UseInteractionStateStylesArgs = {\n isDisabled?: boolean;\n stateStyles: StateStyles;\n hoverDetectionContainerStyles?: StyleProp;\n};\n\nexport type UseInteractionStateStylesReturnValue = {\n styles: TStyles;\n onPressIn: () => void;\n onPressOut: () => void;\n renderInHoverContainer: (children: React.ReactNode, style?: StyleProp) => React.ReactNode;\n state: State;\n};\n\nexport const useInteractionStateStyles = ({\n isDisabled = false,\n stateStyles,\n hoverDetectionContainerStyles,\n}: UseInteractionStateStylesArgs): UseInteractionStateStylesReturnValue => {\n const isDisabledByParent = useIsDisabledByParent(isDisabled);\n const isHovered = useToggle(false);\n const onHoverChange = useCallback(\n (hovered: boolean) => {\n hovered ? isHovered.toggleOn() : isHovered.toggleOff();\n },\n [isHovered.toggleOff, isHovered.toggleOn],\n );\n const isPressed = useToggle(false);\n\n // sorted by priority\n const state: State = [\n isDisabledByParent ? 'inactive' : null,\n isPressed.value ? 'pressed' : null,\n isHovered.value ? 'hovered' : null,\n 'default',\n ]\n .filter(isPresent)\n .find(Boolean) as State;\n\n const style = stateStyles[state] || stateStyles.default;\n\n return {\n styles: style,\n state,\n onPressIn: isPressed.toggleOn,\n onPressOut: isPressed.toggleOff,\n renderInHoverContainer: (children: React.ReactNode, style?: StyleProp) => (\n \n {children}\n \n ),\n };\n};\n","import React, { useCallback } from 'react';\nimport { StyleProp, View, ViewStyle } from 'react-native';\n\nexport type HoverDetectionContainerOwnProps = {\n children: React.ReactNode;\n onHoverChange: (isHovered: boolean) => void;\n style?: StyleProp;\n};\n\nexport type HoverDetectionContainerProps = HoverDetectionContainerOwnProps;\n\nconst HoverDetectionContainer: React.FC = ({ children, onHoverChange, style }) => {\n const onEnter = useCallback(() => {\n onHoverChange(true);\n }, [onHoverChange]);\n\n const onLeave = useCallback(() => {\n onHoverChange(false);\n }, [onHoverChange]);\n\n return (\n \n {children}\n \n );\n};\n\nexport default React.memo(HoverDetectionContainer);\n","import React from 'react';\n\nexport type UseToggleReturnValue = {\n value: boolean;\n toggle: () => void;\n toggleOn: () => void;\n toggleOff: () => void;\n};\n\nexport const useToggle = (initialState = false) => {\n const [state, setState] = React.useState(initialState);\n const toggle = React.useCallback(() => {\n setState((prevState) => !prevState);\n }, []);\n const toggleOn = React.useCallback(() => {\n setState(true);\n }, []);\n const toggleOff = React.useCallback(() => {\n setState(false);\n }, []);\n return {\n value: state,\n toggle,\n toggleOn,\n toggleOff,\n };\n};\n","import React from 'react';\n\nconst IsDisabledContext = React.createContext(false);\n\nexport type IsDisabledProviderOwnProps = {\n isDisabled: boolean;\n children: React.ReactNode;\n};\n\nexport type IsDisabledProviderProps = IsDisabledProviderOwnProps;\n\nconst IsDisabled: React.FC = (props) => {\n const isDisabledByParent = useIsDisabledByParent();\n return (\n \n {props.children}\n \n );\n};\n\nexport default React.memo(IsDisabled);\n\nexport const useIsDisabledByParent = (inputIsDisabled?: boolean): boolean => {\n return React.useContext(IsDisabledContext) || !!inputIsDisabled;\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hasValueAtKey = exports.hasPresentKey = exports.isFilled = exports.isDefined = exports.isPresent = void 0;\nfunction isPresent(t) {\n return t !== undefined && t !== null;\n}\nexports.isPresent = isPresent;\nfunction isDefined(t) {\n return t !== undefined;\n}\nexports.isDefined = isDefined;\nfunction isFilled(t) {\n return t !== null;\n}\nexports.isFilled = isFilled;\n/**\n * Returns a function that can be used to filter down objects\n * to the ones that have a defined non-null value under the key `k`.\n *\n * @example\n * ```ts\n * const filesWithUrl = files.filter(file => file.url);\n * files[0].url // In this case, TS might still treat this as undefined/null\n *\n * const filesWithUrl = files.filter(hasPresentKey(\"url\"));\n * files[0].url // TS will know that this is present\n * ```\n *\n * See https://github.com/microsoft/TypeScript/issues/16069\n * why is that useful.\n */\nfunction hasPresentKey(k) {\n return function (a) {\n return a[k] !== undefined && a[k] !== null;\n };\n}\nexports.hasPresentKey = hasPresentKey;\n/**\n * Returns a function that can be used to filter down objects\n * to the ones that have a specific value V under a key `k`.\n *\n * @example\n * ```ts\n * type File = { type: \"image\", imageUrl: string } | { type: \"pdf\", pdfUrl: string };\n * const files: File[] = [];\n *\n * const imageFiles = files.filter(file => file.type === \"image\");\n * files[0].type // In this case, TS will still treat it as `\"image\" | \"pdf\"`\n *\n * const filesWithUrl = files.filter(hasValueKey(\"type\", \"image\" as const));\n * files[0].type // TS will now know that this is \"image\"\n * files[0].imageUrl // TS will know this is present, because already it excluded the other union members.\n *\n * Note: the cast `as const` is necessary, otherwise TS will only know that type is a string.\n * ```\n *\n * See https://github.com/microsoft/TypeScript/issues/16069\n * why is that useful.\n */\nfunction hasValueAtKey(k, v) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (a) {\n return a[k] === v;\n };\n}\nexports.hasValueAtKey = hasValueAtKey;\n//# sourceMappingURL=index.js.map","import React from 'react';\nimport Svg, { Path, SvgProps } from 'react-native-svg';\n\nconst AppleLogo: React.FC = (props) => {\n return (\n \n \n \n );\n};\n\nexport default React.memo(AppleLogo);\n","import React from 'react';\nimport Svg, { Path, SvgProps } from 'react-native-svg';\n\nconst GoogleLogo: React.FC = (props) => {\n return (\n \n \n \n \n \n \n );\n};\n\nexport default React.memo(GoogleLogo);\n","import { I18n } from 'aws-amplify/utils';\n\nI18n.setLanguage('en');\n\nexport function getIntl>(prefix: string, messages: T) {\n const withPrefixedKeys = Object.keys(messages).reduce((acc, key) => {\n acc[`${prefix}.${key}`] = messages[key];\n return acc;\n }, {} as Record);\n I18n.putVocabularies({\n en: withPrefixedKeys,\n });\n return (key: K, values?: Record): string => {\n const rawIntlValue = I18n.get(`${prefix}.${String(key)}`);\n if (values) {\n return Object.keys(values).reduce((acc, key) => {\n return acc.split(`{${key}}`).join(String(values[key]));\n }, rawIntlValue);\n } else {\n return rawIntlValue;\n }\n };\n}\n","export { Cache, ConsoleLogger, CookieStorage, Hub, I18n, ServiceWorker, defaultStorage, sessionStorage, sharedInMemoryStorage } from '@aws-amplify/core';\nexport { parseAmplifyConfig } from '@aws-amplify/core/internals/utils';\n//# sourceMappingURL=index.mjs.map\n","export function hexToRgbA(hex: string, opacity: number) {\n let result: any;\n if (/^#([A-Fa-f0-9]{3}){1,2}$/.test(hex)) {\n result = hex.substring(1).split('');\n if (result.length == 3) {\n result = [result[0], result[0], result[1], result[1], result[2], result[2]];\n }\n result = '0x' + result.join('');\n return 'rgba(' + [(result >> 16) & 255, (result >> 8) & 255, result & 255].join(',') + ',' + opacity + ')';\n }\n throw new Error('Bad Hex');\n}\n","import React from 'react';\nimport Stack from '../Stack';\nimport Icon, { IconName } from '../Icon';\nimport PressableDynamicOpacity from '../../v2BaseComponents/PressableDynamicOpacity';\nimport Text from '../Text';\nimport { getSpacing } from '../../../utils/spacing';\nimport Popover, { PopoverProps } from '../Popover';\nimport MainContentContainer from '../MainContentContainer';\n\nexport type MenuItem = {\n title: string;\n onPress: () => void;\n isDisabled?: boolean;\n icon: IconName;\n testID?: string;\n};\n\nexport type MenuOwnProps = {\n items: MenuItem[];\n} & Omit;\n\nexport type MenuProps = MenuOwnProps;\n\nconst Menu: React.FC = ({ items, ...popoverProps }) => {\n return (\n <>\n \n {(togglePopover) => (\n \n \n {items.map((item, index) => (\n {\n item.onPress();\n togglePopover();\n }}\n isDisabled={item.isDisabled}\n style={{\n paddingBottom: getSpacing(3),\n paddingTop: getSpacing(3),\n width: '100%',\n }}\n testID={item.testID}\n >\n \n \n {item.title}\n \n \n ))}\n \n \n )}\n \n \n );\n};\n\nexport default React.memo(Menu);\n","import React from 'react';\nimport { StyleProp, ViewStyle, Pressable, LayoutChangeEvent, GestureResponderEvent } from 'react-native';\nimport { StateStyles, useInteractionStateStyles } from '../../../hooks/useInteractionStateStyles';\nimport { useIsDisabledByParent } from '../IsDisabledProvider';\n\nexport type PressableDynamicOpacityOwnProps = {\n onPress?: (e: GestureResponderEvent) => void;\n children: React.ReactNode;\n pressedOpacity?: number;\n isDisabled?: boolean;\n style?: StyleProp;\n testID?: string;\n /**\n * Makes the component pressable. If false, the component will not be pressable.\n *\n * Convenience prop for conditionally rendering within a pressable container.\n */\n makePressable?: boolean;\n addHoverEffect?: boolean;\n onFocus?: () => void;\n onLayout?: (event: LayoutChangeEvent) => void;\n onTouchStart?: () => void;\n onTouchEnd?: () => void;\n customStateStyles?: Partial>;\n hoverDetectionContainerStyles?: StyleProp;\n};\n\nexport type PressableDynamicOpacityProps = PressableDynamicOpacityOwnProps;\n\nconst PressableDynamicOpacity: React.FC = ({\n onPress,\n pressedOpacity = 0.5,\n children,\n isDisabled,\n style,\n testID,\n makePressable = true,\n addHoverEffect = false,\n customStateStyles,\n hoverDetectionContainerStyles,\n ...toPass\n}) => {\n const isDisabledByParent = useIsDisabledByParent(isDisabled);\n const { onPressIn, onPressOut, renderInHoverContainer, styles } = useInteractionStateStyles({\n hoverDetectionContainerStyles,\n isDisabled: isDisabledByParent,\n stateStyles: {\n default: {\n opacity: 1,\n ...(customStateStyles?.default || {}),\n },\n hovered: {\n opacity: 0.8,\n ...(customStateStyles?.hovered || {}),\n },\n pressed: {\n opacity: 0.6,\n ...(customStateStyles?.pressed || {}),\n },\n inactive: {\n opacity: 0.5,\n ...(customStateStyles?.inactive || {}),\n },\n },\n });\n if (!makePressable) return <>{children};\n\n const mainContent = (\n \n {children}\n \n );\n\n return addHoverEffect ? renderInHoverContainer(mainContent) : mainContent;\n};\n\nexport default React.memo(PressableDynamicOpacity);\n","import React, { useState } from 'react';\nimport { LayoutChangeEvent, LayoutRectangle, Pressable, StyleProp, View, ViewStyle } from 'react-native';\nimport { colors, shadows, zIndex } from '../../utils/theme';\nimport { FixedContentContainer } from './FixedPositionPortalContainer';\nimport { useElementPosition } from '../../hooks/useElementPosition';\nimport { useIsDisabledByParent } from './IsDisabledProvider';\n\ntype PopoverPosition = 'bottom-right-align' | 'top-right-align' | 'top-left-align';\n\ntype RenderButtonArgs = {\n ref: any;\n onPress: () => void;\n onLayout: (e: LayoutChangeEvent) => void;\n isDisabled: boolean;\n};\n\nexport type PopoverOwnProps = {\n renderButton: (args: RenderButtonArgs) => React.ReactNode;\n children: (togglePopover: () => void) => React.ReactNode | React.ReactNode[];\n popoverPosition: PopoverPosition;\n popoverWidth?: number;\n};\n\nexport type PopoverProps = PopoverOwnProps;\n\nconst Popover: React.FC = (props) => {\n const isDisabledByParent = useIsDisabledByParent();\n const buttonPosition = useElementPosition({});\n const [popoverVisible, setPopoverVisible] = useState(false);\n const [buttonLayout, setButtonLayout] = useState(null);\n\n const togglePopover = () => {\n setPopoverVisible(!popoverVisible);\n };\n\n const getPopoverStyle = (): StyleProp => {\n if (!buttonPosition.position) return {};\n\n const popoverWidth = props.popoverWidth || 240;\n\n const bottom =\n props.popoverPosition === 'bottom-right-align'\n ? buttonPosition.position.getBottomAlignFromTopWithPadding(8)\n : undefined;\n const top =\n props.popoverPosition === 'top-right-align' || props.popoverPosition === 'top-left-align'\n ? buttonPosition.position.getTopAlignFromBottomWithPadding(8)\n : undefined;\n\n const right =\n props.popoverPosition === 'top-right-align' || props.popoverPosition === 'bottom-right-align'\n ? buttonPosition.position.right\n : undefined;\n\n const left = props.popoverPosition === 'top-left-align' ? buttonPosition.position.left : undefined;\n\n const style = {\n position: 'absolute' as const,\n right,\n bottom: bottom,\n top: top,\n left,\n width: popoverWidth,\n backgroundColor: colors.White,\n borderRadius: 5,\n borderWidth: 1,\n borderColor: colors['Gray-Text'],\n zIndex: zIndex.prompt,\n ...shadows.default,\n };\n\n return style;\n };\n\n return (\n <>\n {props.renderButton({\n ref: buttonPosition.ref,\n onPress: () => {\n if (buttonLayout) {\n togglePopover();\n } else {\n // give button a chance to register position\n setTimeout(() => {\n setPopoverVisible(true);\n }, 300);\n }\n },\n onLayout: (e) => {\n setButtonLayout(e.nativeEvent.layout);\n buttonPosition.onLayout(e);\n },\n isDisabled: isDisabledByParent || !buttonPosition.ref,\n })}\n {popoverVisible ? (\n \n setPopoverVisible(false)}\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n overflow: 'hidden',\n }}\n >\n \n {props.children(togglePopover)}\n \n \n \n ) : null}\n \n );\n};\n\nexport default React.memo(Popover);\n","import { useCallback, useEffect, useRef } from 'react';\nimport { Dimensions, LayoutChangeEvent, Platform } from 'react-native';\nimport { useForceUpdate } from './useForceUpdate';\nimport { useIsFocused } from '@react-navigation/native';\nimport { batchMeasureViewRef } from '../utils/batchMeasureViewRef';\nimport { useRerenderOnInterval } from './useRerenderOnInterval';\nimport { useRegisterOnLayoutChangeListener } from '../components/v2BaseComponents/LayoutChangeEventProvider';\nimport { EdgeInsets, useSafeAreaInsets } from 'react-native-safe-area-context';\nimport { useIsKeyboardRestrictedView, useWindowHeightWithKeyboard } from '../components/shared/KeyboardRestrictedView';\n\n/**\n * Helps normalize absolute positioning across platforms.\n *\n * There exists subtle inconsistencies in the way that absolute positioning is calculated across platforms.\n *\n * Validation can easily be done by viewing the AbsolutePositioningValidation component.\n */\nexport class ComputedPosition {\n private _rawPosition: RawPosition;\n private _insets: EdgeInsets;\n private _windowHeight: number;\n private _windowWidth: number;\n private _windowHeightWithKeyboard: number;\n private _isKeyboardVisible: boolean;\n constructor(\n rawPosition: RawPosition,\n insets: EdgeInsets,\n isKeyboardVisible: boolean,\n windowHeightWithKeyboard: number,\n ) {\n this._rawPosition = rawPosition;\n this._insets = insets;\n this._windowHeight = isKeyboardVisible ? windowHeightWithKeyboard : Dimensions.get('window').height;\n this._windowWidth = Dimensions.get('window').width;\n this._windowHeightWithKeyboard = windowHeightWithKeyboard;\n this._isKeyboardVisible = isKeyboardVisible;\n }\n\n public getHasRawPositionChangedEnoughForUpdate(\n rawPosition: RawPosition,\n windowHeightWithKeyboard: number,\n isKeyboardVisible: boolean,\n ) {\n const isEnoughDelta = (val1: number, val2: number) => Math.abs(val1 - val2) > 3;\n\n return (\n isEnoughDelta(this._rawPosition.x, rawPosition.x) ||\n isEnoughDelta(this._rawPosition.y, rawPosition.y) ||\n isEnoughDelta(this._rawPosition.width, rawPosition.width) ||\n isEnoughDelta(this._rawPosition.height, rawPosition.height) ||\n isEnoughDelta(this._rawPosition.pageX, rawPosition.pageX) ||\n isEnoughDelta(this._rawPosition.pageY, rawPosition.pageY) ||\n isEnoughDelta(this._windowHeightWithKeyboard, windowHeightWithKeyboard) ||\n this._isKeyboardVisible !== isKeyboardVisible\n );\n }\n\n /**\n * Top of the screen -> top of the element\n *\n * Handles observed inconsistencies in the top value on iOS\n */\n public get top(): number {\n return this._rawPosition.pageY - (Platform.OS === 'ios' || Platform.OS === 'android' ? this._insets.top : 0);\n }\n\n /**\n * Left of the screen -> left of the element\n */\n public get left(): number {\n return this._rawPosition.pageX - this._insets.left;\n }\n\n /**\n * Right of the screen -> right of the element\n */\n public get right(): number {\n return this._windowWidth - this._rawPosition.pageX - this._rawPosition.width - this._insets.right;\n }\n\n /**\n * Bottom of the screen -> bottom of the element\n */\n public get bottom(): number {\n return (\n this._windowHeight +\n (Platform.OS === 'android' ? this._insets.top : 0) -\n this._rawPosition.pageY -\n this._rawPosition.height -\n this._insets.bottom\n );\n }\n\n /**\n * Height of the element\n */\n public get height(): number {\n return this._rawPosition.height;\n }\n\n /**\n * Width of the element\n */\n public get width(): number {\n return this._rawPosition.width;\n }\n\n /**\n * The bottom position value for the top of the element.\n *\n * Example: A select popover that should be above the input\n */\n public get bottomAlignFromTop(): number {\n return (\n this._windowHeight +\n (Platform.OS === 'android' ? this._insets.top : 0) -\n this._rawPosition.pageY -\n this._insets.bottom\n );\n }\n\n /**\n * The top position value for the bottom of the element.\n *\n * Example: A select popover that should be below the input\n */\n public get topAlignFromBottom(): number {\n return this.top + this._rawPosition.height;\n }\n\n /**\n * The bottom position value for the top of the element with padding.\n *\n * Example: A select popover that should be above the input with padding\n */\n public getBottomAlignFromTopWithPadding(padding: number): number {\n return this.bottomAlignFromTop + padding;\n }\n\n /**\n * The top position value for the bottom of the element with padding.\n *\n * Example: A select popover that should be below the input with padding\n */\n public getTopAlignFromBottomWithPadding(padding: number): number {\n return this.topAlignFromBottom + padding;\n }\n\n /**\n * The left value of the horizontal midpoint of the element\n */\n public get viewMidpointX(): number {\n return this.left + this.width / 2;\n }\n\n /**\n * The top value of the vertical midpoint of the element\n */\n public get viewMidpointY(): number {\n return this.top + this.height / 2;\n }\n\n /**\n * Whether the element is on the top half of the screen\n */\n public get isOnTopHalfOfScreen(): boolean {\n return this.viewMidpointY < this._windowHeight / 2;\n }\n\n /**\n * The maximum position below the element. Useful for determining the maximum height of a select popover\n * below the input\n */\n public getMaxVisibleHeightFromBottom(cutoffHeight = Infinity): number {\n return Math.min(this.bottom, cutoffHeight);\n }\n\n /**\n * The maximum position above the element. Useful for determining the maximum height of a select popover\n * above the input\n */\n public getMaxVisibleHeightFromTop(cutoffHeight = Infinity): number {\n return Math.min(this.top, cutoffHeight);\n }\n\n /**\n * Determines if the element is completely within the viewport\n */\n public get isInViewport(): boolean {\n const viewRect = {\n rectTop: this._rawPosition.pageY,\n rectBottom: this._rawPosition.pageY,\n rectWidth: this._rawPosition.pageX + this._rawPosition.width,\n };\n\n return (\n viewRect.rectBottom != 0 &&\n viewRect.rectTop >= 0 &&\n viewRect.rectBottom <= this._windowHeight &&\n viewRect.rectWidth > 0 &&\n viewRect.rectWidth <= this._windowWidth\n );\n }\n}\n\ntype RawPosition = {\n x: number;\n y: number;\n width: number;\n height: number;\n pageX: number;\n pageY: number;\n};\n\nexport type UseElementPositionReturnValue = {\n ref: any;\n position: ComputedPosition | null;\n onLayout: (e: LayoutChangeEvent) => void;\n};\n\nexport type UseElementPositionArgs = {\n isDisabled?: boolean;\n clearPositionOnDisable?: boolean;\n};\n\n/**\n * Hook to get the position of an element\n *\n * It's probably best to leverage onLayout for this, but that does not account for the position of the element on the screen changing\n */\nexport const useElementPosition = ({\n isDisabled,\n clearPositionOnDisable,\n}: UseElementPositionArgs = {}): UseElementPositionReturnValue => {\n const windowHeightWithKeyboard = useWindowHeightWithKeyboard();\n const windowHeightWithKeyboardRef = useRef(windowHeightWithKeyboard);\n useEffect(() => {\n windowHeightWithKeyboardRef.current = windowHeightWithKeyboard;\n });\n const isKeyboardVisible = useIsKeyboardRestrictedView();\n const isKeyboardVisibleRef = useRef(isKeyboardVisible);\n useEffect(() => {\n isKeyboardVisibleRef.current = isKeyboardVisible;\n });\n const isFocused = useIsFocused();\n const { forceUpdate } = useForceUpdate();\n const ref = useRef(null);\n const insets = useSafeAreaInsets();\n\n const isDisabledOrLostFocus = isDisabled || !isFocused;\n\n const positionRef = useRef(null);\n\n if (isDisabledOrLostFocus && clearPositionOnDisable) {\n positionRef.current = null;\n }\n\n // rerender every second if ref not yet registered\n const shouldRerenderOnInterval = isFocused && !ref;\n useRerenderOnInterval({\n isDisabled: !shouldRerenderOnInterval,\n interval: 1000,\n });\n\n const measureLayout = useCallback(() => {\n if (isDisabledOrLostFocus) return;\n\n if (!ref.current) return;\n\n batchMeasureViewRef(\n ref,\n (x: number, y: number, width: number, height: number, pageX: number, pageY: number) => {\n if (isDisabledOrLostFocus) return;\n\n const isValidMeasurement = [x, y, width, height, pageX, pageY].every((_) => _ !== undefined);\n\n if (!isValidMeasurement) return;\n\n const newPosition = { x, y, width, height, pageX, pageY };\n const shouldUpdate =\n !positionRef.current ||\n positionRef.current.getHasRawPositionChangedEnoughForUpdate(\n newPosition,\n windowHeightWithKeyboardRef.current,\n isKeyboardVisibleRef.current,\n );\n\n if (shouldUpdate) {\n positionRef.current = new ComputedPosition(\n newPosition,\n insets,\n isKeyboardVisibleRef.current,\n windowHeightWithKeyboardRef.current,\n );\n forceUpdate();\n }\n },\n );\n }, [forceUpdate, isDisabledOrLostFocus]);\n\n useRegisterOnLayoutChangeListener(measureLayout);\n\n useEffect(() => {\n if (!isDisabledOrLostFocus) {\n measureLayout();\n }\n }, [isDisabledOrLostFocus]);\n\n return {\n ref,\n position: positionRef.current,\n onLayout: measureLayout,\n };\n};\n","import { useCallback, useState } from 'react';\n\nexport type UseForceUpdateReturnValue = {\n forceUpdate: () => void;\n};\n\nexport function useForceUpdate() {\n const [, setTick] = useState(0);\n return {\n forceUpdate: useCallback(() => {\n setTick((tick) => tick + 1);\n }, []),\n };\n}\n","import { InteractionManager, MeasureOnSuccessCallback, Platform, View } from 'react-native';\nimport _throttle from 'lodash/throttle';\n\nexport type Position = {\n x: number;\n y: number;\n width: number;\n height: number;\n pageX: number;\n pageY: number;\n};\ntype PendingViewRef = {\n ref: React.MutableRefObject;\n callback: MeasureOnSuccessCallback;\n};\ntype MeasureResult = {\n ref: React.MutableRefObject;\n result: Position | null;\n};\n\nlet pendingViewRefs: PendingViewRef[] = [];\n\nconst batchMeasureViewRefs = () => {\n const copied = [...pendingViewRefs];\n pendingViewRefs = [];\n const results: MeasureResult[] = [];\n\n if (copied.length === 0) return;\n\n const executeMeasurements = () => {\n const maybeBatchReturnValues = () => {\n if (results.length === copied.length) {\n results.forEach(({ ref, result }) => {\n const targetCallback = copied.find((item) => item.ref === ref)?.callback;\n if (targetCallback && result) {\n targetCallback(result.x, result.y, result.width, result.height, result.pageX, result.pageY);\n }\n });\n }\n };\n\n copied.forEach(({ ref }) => {\n if (ref.current) {\n ref.current.measure(\n (x: number, y: number, width: number, height: number, pageX: number, pageY: number) => {\n results.push({ ref, result: { x, y, width, height, pageX, pageY } });\n maybeBatchReturnValues();\n },\n );\n } else {\n results.push({ ref, result: null });\n maybeBatchReturnValues();\n }\n });\n };\n\n Platform.OS === 'web' ? executeMeasurements() : InteractionManager.runAfterInteractions(executeMeasurements);\n};\n\nconst throttledBatchMeasureViewRefs = _throttle(batchMeasureViewRefs, 20);\n\n/**\n * Calls to .measure are a bridge operation on native platforms. Firing these one-off are very costly and causes errors\n * for excessive pending callbacks. Firing these off synchronously/batched is the best way to handle this.\n */\nexport const batchMeasureViewRef = (ref: React.MutableRefObject, callback: MeasureOnSuccessCallback) => {\n const alreadyHasRef = pendingViewRefs.some((item) => item.ref === ref);\n if (alreadyHasRef) {\n pendingViewRefs = pendingViewRefs.filter((item) => item.ref !== ref);\n pendingViewRefs.push({ ref, callback });\n } else {\n pendingViewRefs.push({ ref, callback });\n throttledBatchMeasureViewRefs();\n }\n};\n","var debounce = require('./debounce'),\n isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` 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 throttled 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 `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nmodule.exports = throttle;\n","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\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\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\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\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\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) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\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\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\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\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}\n\nmodule.exports = debounce;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","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};\n\nmodule.exports = now;\n","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')();\n\nmodule.exports = root;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","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))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","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\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","/** 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\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","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' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","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))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","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\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","import { useEffect, useState } from 'react';\n\nexport type UseRerenderOnIntervalArgs = {\n isDisabled?: boolean;\n interval?: number;\n};\n\nexport const useRerenderOnInterval = ({ isDisabled, interval }: UseRerenderOnIntervalArgs) => {\n const [, setCount] = useState(0);\n\n useEffect(() => {\n if (isDisabled) return;\n\n const intervalTimer = setInterval(() => {\n setCount((_) => _ + 1);\n }, interval || 100);\n return () => clearInterval(intervalTimer);\n }, [interval, isDisabled]);\n};\n","import { useIsFocused } from '@react-navigation/native';\nimport React from 'react';\nimport { createContext } from 'react';\n\nexport type LayoutChangeEventProviderContextValue = {\n registerLayoutChangeListener: (listener: () => void) => void;\n unRegisterLayoutChangeListener: (listener: () => void) => void;\n onLayoutChange: () => void;\n};\n\nexport const LayoutChangeEventProviderContext = createContext({\n registerLayoutChangeListener: () => {},\n unRegisterLayoutChangeListener: () => {},\n onLayoutChange: () => {},\n});\n\nconst LayoutChangeEventProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {\n const registeredListeners = React.useRef<(() => void)[]>([]);\n const onLayoutChange = React.useCallback(() => {\n registeredListeners.current.forEach((listener) => listener());\n }, []);\n const registerLayoutChangeListener = React.useCallback((listener: () => void) => {\n const withoutListener = registeredListeners.current.filter((_) => _ !== listener);\n registeredListeners.current = [...withoutListener, listener];\n }, []);\n const unRegisterLayoutChangeListener = React.useCallback((listener: () => void) => {\n registeredListeners.current = registeredListeners.current.filter((_) => _ !== listener);\n }, []);\n\n const context: LayoutChangeEventProviderContextValue = React.useMemo(\n () => ({\n registerLayoutChangeListener,\n unRegisterLayoutChangeListener,\n onLayoutChange,\n }),\n [registerLayoutChangeListener, unRegisterLayoutChangeListener, onLayoutChange],\n );\n\n return (\n \n {children}\n \n );\n};\n\nexport default React.memo(LayoutChangeEventProvider);\n\nexport const useOnLayoutChange = () => {\n const { onLayoutChange } = React.useContext(LayoutChangeEventProviderContext);\n return onLayoutChange;\n};\n\n/**\n * Will call the listener when the layout changes. This can be caused by a change in a scroll or a change in the size of the window.\n *\n * The listener should be memoized to prevent unnecessary re-renders and effecient performance.\n */\nexport const useRegisterOnLayoutChangeListener = (listener: () => void) => {\n const { registerLayoutChangeListener, unRegisterLayoutChangeListener } = React.useContext(\n LayoutChangeEventProviderContext,\n );\n const isFocused = useIsFocused();\n\n React.useEffect(() => {\n return () => {\n unRegisterLayoutChangeListener(listener);\n };\n }, []);\n\n React.useEffect(() => {\n if (isFocused) {\n registerLayoutChangeListener(listener);\n } else {\n unRegisterLayoutChangeListener(listener);\n }\n }, [isFocused]);\n};\n","'use client';\n\nexport * from './SafeAreaContext';\nexport * from './SafeAreaView';\nexport * from './InitialWindow';\nexport * from './SafeArea.types';\n//# sourceMappingURL=index.js.map","function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from 'react';\nimport { Dimensions, StyleSheet } from 'react-native';\nimport { NativeSafeAreaProvider } from './NativeSafeAreaProvider';\nconst isDev = process.env.NODE_ENV !== 'production';\nexport const SafeAreaInsetsContext = /*#__PURE__*/React.createContext(null);\nif (isDev) {\n SafeAreaInsetsContext.displayName = 'SafeAreaInsetsContext';\n}\nexport const SafeAreaFrameContext = /*#__PURE__*/React.createContext(null);\nif (isDev) {\n SafeAreaFrameContext.displayName = 'SafeAreaFrameContext';\n}\nexport function SafeAreaProvider({\n children,\n initialMetrics,\n initialSafeAreaInsets,\n style,\n ...others\n}) {\n const parentInsets = useParentSafeAreaInsets();\n const parentFrame = useParentSafeAreaFrame();\n const [insets, setInsets] = React.useState(initialMetrics?.insets ?? initialSafeAreaInsets ?? parentInsets ?? null);\n const [frame, setFrame] = React.useState(initialMetrics?.frame ?? parentFrame ?? {\n // Backwards compat so we render anyway if we don't have frame.\n x: 0,\n y: 0,\n width: Dimensions.get('window').width,\n height: Dimensions.get('window').height\n });\n const onInsetsChange = React.useCallback(event => {\n const {\n nativeEvent: {\n frame: nextFrame,\n insets: nextInsets\n }\n } = event;\n setFrame(curFrame => {\n if (\n // Backwards compat with old native code that won't send frame.\n nextFrame && (nextFrame.height !== curFrame.height || nextFrame.width !== curFrame.width || nextFrame.x !== curFrame.x || nextFrame.y !== curFrame.y)) {\n return nextFrame;\n } else {\n return curFrame;\n }\n });\n setInsets(curInsets => {\n if (!curInsets || nextInsets.bottom !== curInsets.bottom || nextInsets.left !== curInsets.left || nextInsets.right !== curInsets.right || nextInsets.top !== curInsets.top) {\n return nextInsets;\n } else {\n return curInsets;\n }\n });\n }, []);\n return /*#__PURE__*/React.createElement(NativeSafeAreaProvider, _extends({\n style: [styles.fill, style],\n onInsetsChange: onInsetsChange\n }, others), insets != null ? /*#__PURE__*/React.createElement(SafeAreaFrameContext.Provider, {\n value: frame\n }, /*#__PURE__*/React.createElement(SafeAreaInsetsContext.Provider, {\n value: insets\n }, children)) : null);\n}\nconst styles = StyleSheet.create({\n fill: {\n flex: 1\n }\n});\nfunction useParentSafeAreaInsets() {\n return React.useContext(SafeAreaInsetsContext);\n}\nfunction useParentSafeAreaFrame() {\n return React.useContext(SafeAreaFrameContext);\n}\nconst NO_INSETS_ERROR = 'No safe area value available. Make sure you are rendering `` at the top of your app.';\nexport function useSafeAreaInsets() {\n const insets = React.useContext(SafeAreaInsetsContext);\n if (insets == null) {\n throw new Error(NO_INSETS_ERROR);\n }\n return insets;\n}\nexport function useSafeAreaFrame() {\n const frame = React.useContext(SafeAreaFrameContext);\n if (frame == null) {\n throw new Error(NO_INSETS_ERROR);\n }\n return frame;\n}\nexport function withSafeAreaInsets(WrappedComponent) {\n return /*#__PURE__*/React.forwardRef((props, ref) => {\n const insets = useSafeAreaInsets();\n return /*#__PURE__*/React.createElement(WrappedComponent, _extends({}, props, {\n insets: insets,\n ref: ref\n }));\n });\n}\n\n/**\n * @deprecated\n */\nexport function useSafeArea() {\n return useSafeAreaInsets();\n}\n\n/**\n * @deprecated\n */\nexport const SafeAreaConsumer = SafeAreaInsetsContext.Consumer;\n\n/**\n * @deprecated\n */\nexport const SafeAreaContext = SafeAreaInsetsContext;\n//# sourceMappingURL=SafeAreaContext.js.map","/* eslint-env browser */\n\nimport * as React from 'react';\nimport { View } from 'react-native';\n/**\n * TODO:\n * Currently insets and frame are based on the window and are not\n * relative to the provider view. This is inconsistent with iOS and Android.\n * However in most cases if the provider view covers the screen this is not\n * an issue.\n */\n\nconst CSSTransitions = {\n WebkitTransition: 'webkitTransitionEnd',\n Transition: 'transitionEnd',\n MozTransition: 'transitionend',\n MSTransition: 'msTransitionEnd',\n OTransition: 'oTransitionEnd'\n};\nexport function NativeSafeAreaProvider({\n children,\n style,\n onInsetsChange\n}) {\n React.useEffect(() => {\n // Skip for SSR.\n if (typeof document === 'undefined') {\n return;\n }\n const element = createContextElement();\n document.body.appendChild(element);\n const onEnd = () => {\n const {\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight\n } = window.getComputedStyle(element);\n const insets = {\n top: paddingTop ? parseInt(paddingTop, 10) : 0,\n bottom: paddingBottom ? parseInt(paddingBottom, 10) : 0,\n left: paddingLeft ? parseInt(paddingLeft, 10) : 0,\n right: paddingRight ? parseInt(paddingRight, 10) : 0\n };\n const frame = {\n x: 0,\n y: 0,\n width: document.documentElement.offsetWidth,\n height: document.documentElement.offsetHeight\n };\n // @ts-ignore: missing properties\n onInsetsChange({\n nativeEvent: {\n insets,\n frame\n }\n });\n };\n element.addEventListener(getSupportedTransitionEvent(), onEnd);\n onEnd();\n return () => {\n document.body.removeChild(element);\n element.removeEventListener(getSupportedTransitionEvent(), onEnd);\n };\n }, [onInsetsChange]);\n return /*#__PURE__*/React.createElement(View, {\n style: style\n }, children);\n}\nlet _supportedTransitionEvent = null;\nfunction getSupportedTransitionEvent() {\n if (_supportedTransitionEvent != null) {\n return _supportedTransitionEvent;\n }\n const element = document.createElement('invalidtype');\n _supportedTransitionEvent = CSSTransitions.Transition;\n for (const key in CSSTransitions) {\n if (element.style[key] !== undefined) {\n _supportedTransitionEvent = CSSTransitions[key];\n break;\n }\n }\n return _supportedTransitionEvent;\n}\nlet _supportedEnv = null;\nfunction getSupportedEnv() {\n if (_supportedEnv !== null) {\n return _supportedEnv;\n }\n const {\n CSS\n } = window;\n if (CSS && CSS.supports && CSS.supports('top: constant(safe-area-inset-top)')) {\n _supportedEnv = 'constant';\n } else {\n _supportedEnv = 'env';\n }\n return _supportedEnv;\n}\nfunction getInset(side) {\n return `${getSupportedEnv()}(safe-area-inset-${side})`;\n}\nfunction createContextElement() {\n const element = document.createElement('div');\n const {\n style\n } = element;\n style.position = 'fixed';\n style.left = '0';\n style.top = '0';\n style.width = '0';\n style.height = '0';\n style.zIndex = '-1';\n style.overflow = 'hidden';\n style.visibility = 'hidden';\n // Bacon: Anything faster than this and the callback will be invoked too early with the wrong insets\n style.transitionDuration = '0.05s';\n style.transitionProperty = 'padding';\n style.transitionDelay = '0s';\n style.paddingTop = getInset('top');\n style.paddingBottom = getInset('bottom');\n style.paddingLeft = getInset('left');\n style.paddingRight = getInset('right');\n return element;\n}\n//# sourceMappingURL=NativeSafeAreaProvider.web.js.map","function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from 'react';\nimport { StyleSheet, View } from 'react-native';\nimport { useSafeAreaInsets } from './SafeAreaContext';\nconst defaultEdges = {\n top: 'additive',\n left: 'additive',\n bottom: 'additive',\n right: 'additive'\n};\nfunction getEdgeValue(inset, current, mode) {\n switch (mode) {\n case 'off':\n return current;\n case 'maximum':\n return Math.max(current, inset);\n case 'additive':\n default:\n return current + inset;\n }\n}\nexport const SafeAreaView = /*#__PURE__*/React.forwardRef(({\n style = {},\n mode,\n edges,\n ...rest\n}, ref) => {\n const insets = useSafeAreaInsets();\n const edgesRecord = React.useMemo(() => {\n if (edges == null) {\n return defaultEdges;\n }\n return Array.isArray(edges) ? edges.reduce((acc, edge) => {\n acc[edge] = 'additive';\n return acc;\n }, {}) :\n // ts has trouble with refining readonly arrays.\n edges;\n }, [edges]);\n const appliedStyle = React.useMemo(() => {\n const flatStyle = StyleSheet.flatten(style);\n if (mode === 'margin') {\n const {\n margin = 0,\n marginVertical = margin,\n marginHorizontal = margin,\n marginTop = marginVertical,\n marginRight = marginHorizontal,\n marginBottom = marginVertical,\n marginLeft = marginHorizontal\n } = flatStyle;\n const marginStyle = {\n marginTop: getEdgeValue(insets.top, marginTop, edgesRecord.top),\n marginRight: getEdgeValue(insets.right, marginRight, edgesRecord.right),\n marginBottom: getEdgeValue(insets.bottom, marginBottom, edgesRecord.bottom),\n marginLeft: getEdgeValue(insets.left, marginLeft, edgesRecord.left)\n };\n return [style, marginStyle];\n } else {\n const {\n padding = 0,\n paddingVertical = padding,\n paddingHorizontal = padding,\n paddingTop = paddingVertical,\n paddingRight = paddingHorizontal,\n paddingBottom = paddingVertical,\n paddingLeft = paddingHorizontal\n } = flatStyle;\n const paddingStyle = {\n paddingTop: getEdgeValue(insets.top, paddingTop, edgesRecord.top),\n paddingRight: getEdgeValue(insets.right, paddingRight, edgesRecord.right),\n paddingBottom: getEdgeValue(insets.bottom, paddingBottom, edgesRecord.bottom),\n paddingLeft: getEdgeValue(insets.left, paddingLeft, edgesRecord.left)\n };\n return [style, paddingStyle];\n }\n }, [edgesRecord.bottom, edgesRecord.left, edgesRecord.right, edgesRecord.top, insets.bottom, insets.left, insets.right, insets.top, mode, style]);\n return /*#__PURE__*/React.createElement(View, _extends({\n style: appliedStyle\n }, rest, {\n ref: ref\n }));\n});\n//# sourceMappingURL=SafeAreaView.web.js.map","export const initialWindowMetrics = null;\n\n/**\n * @deprecated\n */\nexport const initialWindowSafeAreaInsets = null;\n//# sourceMappingURL=InitialWindow.js.map","export {};\n//# sourceMappingURL=SafeArea.types.js.map","import React, { useEffect, useMemo, useState } from 'react';\nimport { Dimensions, Keyboard, Platform, View } from 'react-native';\nimport { colors } from '../../utils/theme';\nimport { useOnLayoutChange } from '../v2BaseComponents/LayoutChangeEventProvider';\n\nexport type KeyboardRestrictedViewOwnProps = {\n children: React.ReactNode;\n};\n\nexport type KeyboardRestrictedViewProps = KeyboardRestrictedViewOwnProps;\n\nexport type IsInKeyboardRestrictedViewContext = {\n isKeyboardRestrictedView: boolean;\n windowHeightWithKeyboard: number;\n};\n\nconst IsKeyboardRestrictedViewContext = React.createContext({\n isKeyboardRestrictedView: false,\n windowHeightWithKeyboard: Dimensions.get('window').height,\n});\n\nconst getShouldRestrictViewToKeyboard = () => {\n if (Platform.OS !== 'web') {\n return false;\n }\n\n return !!window.visualViewport;\n};\n\ntype ViewportDimensions = {\n width: number;\n height: number;\n};\n\nconst getWindowDimensions = (): ViewportDimensions => {\n if (!getShouldRestrictViewToKeyboard()) {\n return Dimensions.get('window');\n }\n\n return {\n width: window.visualViewport?.width || window.innerWidth,\n height: window.visualViewport?.height || window.innerHeight,\n };\n};\n\nconst scrollToTop = () => {\n /**\n * Scroll to the top of the page\n *\n * Top must be -1 to work on iOS. 0 does not work. If it is 0, the scroll will not happen if the screen is scrolled\n * down < ~50px.... This is a bug in iOS.\n */\n window.scroll({ top: -1, left: 0, behavior: 'instant' });\n};\n\n/**\n * We want to scroll the input component. The event is called on the nested input, but\n * we want to scroll to the parent component with a label.\n *\n * Doing this dom traversal is a bit hacky for react. This uses a pretty conservative approach\n * to do a best effort to find that parent component. Worst case, it will return the input itself.\n * This is not ideal, but ultimately will just cutoff the label above the scrollview\n */\nfunction findInputScrollableParent(element: Element): Element {\n function findFirstParentWithTabIndex(element: Element) {\n let currentElement: Element | null = element;\n\n while (currentElement) {\n if (currentElement.hasAttribute('tabindex')) {\n return currentElement;\n }\n currentElement = currentElement.parentElement;\n }\n\n // Return null if no parent with tabindex is found\n return null;\n }\n\n const maybeParentWithLabel = findFirstParentWithTabIndex(element);\n if (!maybeParentWithLabel) return element;\n\n // ensure that this is a reasonable parent and not some ancestor far up the dom tree\n const parentWithLabelTop = maybeParentWithLabel.getBoundingClientRect().top;\n const inputTop = element.getBoundingClientRect().top;\n\n if (parentWithLabelTop < inputTop && inputTop - parentWithLabelTop < 40) {\n return maybeParentWithLabel;\n } else {\n return element;\n }\n}\n\nfunction scrollFocusedElementIntoView() {\n const focusedElement = document.activeElement;\n if (focusedElement) {\n const scrollableParent = findInputScrollableParent(focusedElement);\n\n scrollableParent.scrollIntoView({\n behavior: 'smooth',\n block: 'start',\n inline: 'start',\n });\n }\n}\n\nconst NativeKeyboardRestrictedView: React.FC = (props) => {\n const [isKeyboardVisible, setKeyboardVisible] = useState(false);\n const [keyboardHeight, setKeyboardHeight] = useState(0);\n const onLayoutChange = useOnLayoutChange(); // allows for absolutely positioned elements to resize\n\n useEffect(() => {\n const keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', (e) => {\n setKeyboardVisible(true);\n\n setKeyboardHeight((height) => {\n const flooredHeight = Math.floor(e.endCoordinates.height);\n const isDeltaEnough = Math.abs(flooredHeight - height) > 10;\n if (isDeltaEnough) {\n return flooredHeight;\n } else {\n return height;\n }\n });\n\n onLayoutChange();\n });\n const keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', () => {\n setKeyboardVisible(false);\n\n onLayoutChange();\n });\n\n return () => {\n keyboardDidHideListener.remove();\n keyboardDidShowListener.remove();\n };\n }, []);\n\n const contextValue = useMemo(() => {\n return {\n isKeyboardRestrictedView: isKeyboardVisible,\n windowHeightWithKeyboard: isKeyboardVisible\n ? Dimensions.get('window').height - keyboardHeight\n : Dimensions.get('window').height,\n };\n }, [isKeyboardVisible, keyboardHeight]);\n\n return (\n \n {props.children}\n \n );\n};\n\n/**\n * A component that limits the view of the app to the area not covered by the keyboard.\n *\n * When not a phone or tablet, the view is not restricted.\n *\n * When on a phone, android devices automatically adjust the view when the keyboard is opened. However,\n * iOS devices do not adjust the view automatically. This results in a suboptimal/non-native experience, where\n * the keyboard covers part of the view.\n */\nconst WebKeyboardRestrictedView: React.FC = (props) => {\n const shouldRestrictViewToKeyboard = useMemo(() => getShouldRestrictViewToKeyboard(), []);\n const startDimensions = useMemo(() => getWindowDimensions(), []);\n const [isKeyboardVisible, setIsKeyboardVisible] = useState(false);\n const [lastResizeDimensions, setLastResizeDimensions] = useState(startDimensions);\n\n useEffect(() => {\n const handleResize = () => {\n if (!shouldRestrictViewToKeyboard) return;\n\n const currentDimensions = getWindowDimensions();\n setLastResizeDimensions(currentDimensions);\n const isKeyboardVisible = getWindowDimensions().height < startDimensions.height * 0.9;\n setIsKeyboardVisible(isKeyboardVisible);\n\n if (isKeyboardVisible) {\n setTimeout(scrollToTop, 50);\n\n // Programmatic scrolling can mess with the browser default of scrolling the focused element into view. Wait a bit and do so manually\n setTimeout(scrollFocusedElementIntoView, 100);\n }\n };\n\n window.visualViewport?.addEventListener('resize', handleResize);\n\n return () => {\n window.visualViewport?.removeEventListener('resize', handleResize);\n };\n }, [shouldRestrictViewToKeyboard, startDimensions.height]);\n\n useEffect(() => {\n if (!isKeyboardVisible) return;\n\n /*\n keep \"scrolling to the top\" of the viewport while the keyboard is up.\n The visual space is constrained to the area not covered by the keyboard, this just prevents the user from scrolling down to empty space\n */\n const scrollToTopInterval = setInterval(scrollToTop, 100);\n\n return () => {\n clearInterval(scrollToTopInterval);\n };\n }, [isKeyboardVisible]);\n\n const contextValue = useMemo(() => {\n return {\n isKeyboardRestrictedView: isKeyboardVisible,\n windowHeightWithKeyboard: Dimensions.get('window').height,\n };\n }, [isKeyboardVisible]);\n\n return (\n \n \n \n {props.children}\n \n \n \n \n );\n};\n\nexport default React.memo(\n Platform.select({\n web: WebKeyboardRestrictedView,\n default: NativeKeyboardRestrictedView,\n }),\n);\n\nexport const useIsKeyboardRestrictedView = () => {\n return React.useContext(IsKeyboardRestrictedViewContext).isKeyboardRestrictedView;\n};\n\nexport const useWindowHeightWithKeyboard = () => {\n return React.useContext(IsKeyboardRestrictedViewContext).windowHeightWithKeyboard;\n};\n","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nimport dismissKeyboard from '../../modules/dismissKeyboard';\n\n// in the future we can use https://github.com/w3c/virtual-keyboard\nvar Keyboard = {\n isVisible() {\n return false;\n },\n addListener() {\n return {\n remove: () => {}\n };\n },\n dismiss() {\n dismissKeyboard();\n },\n removeAllListeners() {},\n removeListener() {}\n};\nexport default Keyboard;","import React from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\nimport { getSpacing } from '../../../utils/spacing';\nimport { View } from 'react-native';\n\nexport type MainContentContainerOwnProps = {\n style?: StyleProp;\n children: React.ReactNode;\n testID?: string;\n flex?: number;\n disableRenderInContainer?: boolean;\n};\n\nexport type MainContentContainerProps = MainContentContainerOwnProps;\n\nexport const mainContentPadding = getSpacing(8);\n\nconst MainContentContainer: React.FC = (props) => {\n if (props.disableRenderInContainer) return props.children;\n\n return (\n \n {props.children}\n \n );\n};\n\nexport default React.memo(MainContentContainer);\n","import { Portal, PortalHost } from '@gorhom/portal';\nimport React from 'react';\n\nexport const HasNestedScrollViewPortalProvider = React.createContext(false);\n\nconst nestedScrollViewPortalName = 'nested-scroll-view-portal';\n\nexport const NestedScrollViewPortalHostContainer: React.FC<{ children: any }> = (props) => (\n \n {props.children}\n \n \n);\n\nexport const useHasNestedScrollViewPortal = () => React.useContext(HasNestedScrollViewPortalProvider);\n\nexport const MaybeRenderNestedScrollViewPortal: React.FC<{ children: any }> = ({ children }) => {\n const hasPortal = useHasNestedScrollViewPortal();\n return hasPortal ? (\n \n \n {children}\n \n \n ) : (\n children\n );\n};\n\nexport const useAssertHasNestedScrollViewPortal = () => {\n if (!useHasNestedScrollViewPortal()) {\n throw new Error('useAssertHasNestedScrollViewPortal must be used within a NestedScrollViewPortalHostContainer');\n }\n};\n","import React from 'react';\nimport { DimensionValue, StyleProp, ViewStyle } from 'react-native';\nimport Stack from './Stack';\n\nexport type RestrictedWidthVariant = 'default' | 'lg' | 'sm' | 'xs' | 'md';\n\nexport type MaxWidthRestrictedContentOwnProps = {\n children: any;\n style?: StyleProp;\n contentContainerStyle?: StyleProp;\n maxWidth?: number;\n variant?: RestrictedWidthVariant;\n};\n\nexport type MaxWidthRestrictedContentProps = MaxWidthRestrictedContentOwnProps;\n\nexport const DEFAULT_MAX_WIDTH = 800;\n\nconst maxWidthMap: Record = {\n default: DEFAULT_MAX_WIDTH,\n md: 1100,\n lg: '100%',\n sm: 700,\n xs: 400,\n};\n\nconst MaxWidthRestrictedContent: React.FC = (props) => {\n const maxWidth: DimensionValue = props.maxWidth ? props.maxWidth : maxWidthMap[props.variant || 'default'];\n\n return (\n \n \n {props.children}\n \n \n );\n};\n\nexport default React.memo(MaxWidthRestrictedContent);\n","import React from 'react';\nimport { usePrevious } from '../../../hooks/usePrevious';\n\nexport type UseCurrentAndPreviousTabArgs = {\n selectedTab: string;\n onTabChange: () => void;\n};\n\nexport type UseCurrentAndPreviousTabReturnValue = {\n selectedTab: string;\n previousTab: string | null;\n};\n\nexport const useCurrentAndPreviousTab = ({\n selectedTab,\n onTabChange,\n}: UseCurrentAndPreviousTabArgs): UseCurrentAndPreviousTabReturnValue => {\n const previousTab = usePrevious(selectedTab, onTabChange);\n return { selectedTab, previousTab };\n};\n\nexport const IsInSideTabContentContainerContext = React.createContext(false);\n\nexport const useIsInSideTabContentContainer = (): boolean => React.useContext(IsInSideTabContentContainerContext);\n","import { useEffect, useRef } from 'react';\nimport _isEqual from 'lodash/isEqual';\nimport { useForceUpdate } from './useForceUpdate';\n\nexport function usePrevious(value: TValue, onChange?: () => void): TValue | null {\n const { forceUpdate } = useForceUpdate();\n const current = useRef(value);\n const previous = useRef(null);\n\n const isEqual = _isEqual(value, current.current);\n if (!isEqual) {\n onChange?.();\n previous.current = current.current;\n current.current = value;\n }\n useEffect(() => {\n if (!isEqual) {\n forceUpdate();\n }\n }, [isEqual]);\n\n return previous.current;\n}\n","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}\n\nmodule.exports = isEqual;\n","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}\n\nmodule.exports = baseIsEqual;\n","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\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","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;\n\nmodule.exports = Stack;\n","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\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","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\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","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}\n\nmodule.exports = assocIndexOf;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","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\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","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}\n\nmodule.exports = listCacheHas;\n","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\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","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}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","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}\n\nmodule.exports = stackSet;\n","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');\n\nmodule.exports = Map;\n","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}\n\nmodule.exports = getNative;\n","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('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","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}\n\nmodule.exports = isFunction;\n","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}\n\nmodule.exports = isMasked;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","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\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","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}\n\nmodule.exports = mapCacheClear;\n","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\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","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}\n\nmodule.exports = hashClear;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","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}\n\nmodule.exports = hashGet;\n","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}\n\nmodule.exports = hashHas;\n","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}\n\nmodule.exports = hashSet;\n","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}\n\nmodule.exports = mapCacheDelete;\n","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)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","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}\n\nmodule.exports = mapCacheGet;\n","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}\n\nmodule.exports = mapCacheHas;\n","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\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","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\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","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\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","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]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","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\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","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}\n\nmodule.exports = getAllKeys;\n","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}\n\nmodule.exports = baseGetAllKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","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};\n\nmodule.exports = getSymbols;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","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}\n\nmodule.exports = keys;\n","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\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","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() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","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}\n\nmodule.exports = baseIsArguments;\n","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;\n\nmodule.exports = isBuffer;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","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;\n\nmodule.exports = isTypedArray;\n","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]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","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\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","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}\n\nmodule.exports = baseKeys;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","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);\n\nmodule.exports = nativeKeys;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","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}\n\nmodule.exports = isArrayLike;\n","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]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","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');\n\nmodule.exports = DataView;\n","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');\n\nmodule.exports = Promise;\n","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');\n\nmodule.exports = Set;\n","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');\n\nmodule.exports = WeakMap;\n","import PRFlatList from './PRFlatList';\nimport PRScrollView from './PRScrollView';\nimport { useIsInScrollView } from './hooks';\nexport { PRFlatList, PRScrollView, useIsInScrollView };\n","import React, { forwardRef, useCallback, useImperativeHandle, useRef } from 'react';\nimport { FlatList, FlatListProps } from 'react-native';\nimport ScrollContextProvider from './ScrollContextProvider';\n\n// Define your own props type\nexport type PRFlatListOwnProps = {};\n\n// Extend the FlatListProps with your own props\nexport type PRFlatListProps = PRFlatListOwnProps & FlatListProps;\n\n// Define the component as a generic function and type it with forwardRef\nfunction PRFlatList(props: PRFlatListProps, ref: React.Ref>) {\n const localRef = useRef(null);\n\n // Normalize the forwarded ref\n useImperativeHandle(ref, () => localRef.current as FlatList);\n\n const renderFlatList = useCallback(\n (onScroll: () => void) => {\n const { children, ...toPass } = props;\n return (\n {\n onScroll();\n props.onScroll?.(e);\n }}\n ref={localRef}\n scrollEventThrottle={30}\n >\n {children}\n \n );\n },\n [props],\n );\n\n return {renderFlatList};\n}\n\n// Use forwardRef with the generic component\nexport default forwardRef(PRFlatList) as (\n props: PRFlatListProps & { ref?: React.Ref> },\n) => React.ReactElement;\n","import React, { useCallback, useMemo } from 'react';\nimport { ScrollContext } from './ScrollContext';\nimport { useOnLayoutChange } from '../../v2BaseComponents/LayoutChangeEventProvider';\nimport { FlatList, ScrollView } from 'react-native';\n\nexport type ScrollContextProviderOwnProps = {\n scrollRef: React.RefObject | null;\n children: (onScroll: () => void) => React.ReactNode;\n};\n\nexport type ScrollContextProviderProps = ScrollContextProviderOwnProps;\n\nconst SCROLL_STOP_DELAY = 300;\n\nconst ScrollContextProvider: React.FC = (props) => {\n const scrollStopTimer = React.useRef(null);\n const parentScrollContext = React.useContext(ScrollContext);\n const onLayoutChange = useOnLayoutChange();\n\n const onScroll = useCallback(() => {\n if (parentScrollContext.isInScroll) {\n parentScrollContext.onScroll;\n } else {\n if (scrollStopTimer.current) {\n clearTimeout(scrollStopTimer.current);\n }\n\n // Set a new timer to detect scroll end\n scrollStopTimer.current = setTimeout(onLayoutChange, SCROLL_STOP_DELAY);\n }\n }, [onLayoutChange, parentScrollContext.isInScroll, parentScrollContext.onScroll]);\n\n const context: ScrollContext = useMemo(\n () => ({\n isInScroll: true,\n onScroll,\n scrollRef: props.scrollRef,\n }),\n [onScroll],\n );\n\n return {props.children(onScroll)};\n};\n\nexport default React.memo(ScrollContextProvider);\n","import { createContext } from 'react';\nimport { FlatList, ScrollView } from 'react-native';\n\nexport type ScrollContext = {\n isInScroll: boolean;\n onScroll: () => void;\n scrollRef: React.RefObject | null;\n};\n\nexport const ScrollContext = createContext({\n isInScroll: false,\n onScroll: () => {},\n scrollRef: null,\n});\n","import React, { forwardRef, useCallback, useImperativeHandle, useRef } from 'react';\nimport { ScrollView, ScrollViewProps } from 'react-native';\nimport ScrollContextProvider from './ScrollContextProvider';\n\nexport type PRScrollViewOwnProps = {};\n\nexport type PRScrollViewProps = PRScrollViewOwnProps & ScrollViewProps;\n\nconst PRScrollView = forwardRef((props, ref) => {\n const localRef = useRef(null);\n\n // Normalize the forwarded ref\n useImperativeHandle(ref, () => localRef.current as ScrollView);\n\n const renderScrollView = useCallback(\n (onScroll: () => void) => {\n const { children, ...toPass } = props;\n return (\n {\n onScroll();\n props.onScroll?.(e);\n }}\n scrollEventThrottle={30}\n overScrollMode=\"never\"\n >\n {children}\n \n );\n },\n [props],\n );\n\n return {renderScrollView};\n});\n\nexport default React.memo(PRScrollView);\n","import { useContext } from 'react';\nimport { ScrollContext } from './ScrollContext';\n\nexport const useIsInScrollView = () => {\n const { isInScroll } = useContext(ScrollContext);\n return isInScroll;\n};\n\nexport const useScrollRef = () => {\n const { scrollRef } = useContext(ScrollContext);\n return scrollRef;\n};\n","import React from 'react';\nimport { createNativeStackNavigator } from '@react-navigation/native-stack';\nimport appNavigationNames from '../../utils/appNavigationNames';\nimport { useIsUserLoggedIn } from '../../hooks/useIsUserLoggedIn';\nimport { getIntl } from '../../utils/intl';\nimport TabNavigation from './TabNavigation';\nimport { SignUpScreen } from '../screens/Root/SignUpScreen';\nimport { SignInScreen } from '../screens/Root/SignInScreen';\nimport SharedReportScreen from '../screens/Root/SharedReportScreen';\nimport { desktopHeaderConfigs, getHeader, mobileHeaderConfigs } from '../v2BaseComponents/Header';\nimport { colors } from '../../utils/theme';\nimport RedirectScreen from '../screens/Root/RedirectScreen';\nimport WelcomeScreen from '../screens/Root/WelcomeScreen';\n\nexport type AppNavigatorOwnProps = {};\n\nexport type AppNavigatorProps = AppNavigatorOwnProps;\n\nconst intl = getIntl('RootAppNavigation', {\n faqs: 'FAQs',\n termsOfService: 'Terms of Service',\n login: 'Login',\n signup: 'Sign Up',\n welcome: 'Primary Record',\n app: 'Primary Record',\n sharedReport: 'Shared Report',\n about: 'About',\n dataSafety: 'Data Safety',\n});\n\nconst Stack = createNativeStackNavigator();\n\nconst RootNavigation: React.FC = ({}) => {\n const { isUserLoggedIn } = useIsUserLoggedIn();\n\n if (isUserLoggedIn === 'loading') return null;\n\n const initialRouteName = isUserLoggedIn ? appNavigationNames.root.app : appNavigationNames.root.welcome;\n\n /**\n * These routes cannot have params\n */\n return (\n \n \n \n \n \n \n \n \n );\n};\n\nexport default React.memo(RootNavigation);\n","/**\n * Navigators\n */\nexport { default as createNativeStackNavigator } from './navigators/createNativeStackNavigator';\n\n/**\n * Views\n */\nexport { default as NativeStackView } from './views/NativeStackView';\n\n/**\n * Types\n */\n//# sourceMappingURL=index.js.map","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport { createNavigatorFactory, StackActions, StackRouter, useNavigationBuilder } from '@react-navigation/native';\nimport * as React from 'react';\nimport NativeStackView from '../views/NativeStackView';\nfunction NativeStackNavigator(_ref) {\n let {\n id,\n initialRouteName,\n children,\n screenListeners,\n screenOptions,\n ...rest\n } = _ref;\n const {\n state,\n descriptors,\n navigation,\n NavigationContent\n } = useNavigationBuilder(StackRouter, {\n id,\n initialRouteName,\n children,\n screenListeners,\n screenOptions\n });\n React.useEffect(() => {\n var _navigation$addListen;\n return (// @ts-expect-error: there may not be a tab navigator in parent\n navigation === null || navigation === void 0 ? void 0 : (_navigation$addListen = navigation.addListener) === null || _navigation$addListen === void 0 ? void 0 : _navigation$addListen.call(navigation, 'tabPress', e => {\n const isFocused = navigation.isFocused();\n\n // Run the operation in the next frame so we're sure all listeners have been run\n // This is necessary to know if preventDefault() has been called\n requestAnimationFrame(() => {\n if (state.index > 0 && isFocused && !e.defaultPrevented) {\n // When user taps on already focused tab and we're inside the tab,\n // reset the stack to replicate native behaviour\n navigation.dispatch({\n ...StackActions.popToTop(),\n target: state.key\n });\n }\n });\n })\n );\n }, [navigation, state.index, state.key]);\n return /*#__PURE__*/React.createElement(NavigationContent, null, /*#__PURE__*/React.createElement(NativeStackView, _extends({}, rest, {\n state: state,\n navigation: navigation,\n descriptors: descriptors\n })));\n}\nexport default createNavigatorFactory(NativeStackNavigator);\n//# sourceMappingURL=createNativeStackNavigator.js.map","import { getHeaderTitle, Header, HeaderBackButton, HeaderBackContext, SafeAreaProviderCompat, Screen } from '@react-navigation/elements';\nimport * as React from 'react';\nimport { Image, StyleSheet, View } from 'react-native';\nconst TRANSPARENT_PRESENTATIONS = ['transparentModal', 'containedTransparentModal'];\nexport default function NativeStackView(_ref) {\n let {\n state,\n descriptors\n } = _ref;\n const parentHeaderBack = React.useContext(HeaderBackContext);\n return /*#__PURE__*/React.createElement(SafeAreaProviderCompat, null, /*#__PURE__*/React.createElement(View, {\n style: styles.container\n }, state.routes.map((route, i) => {\n var _state$routes, _state$routes2;\n const isFocused = state.index === i;\n const previousKey = (_state$routes = state.routes[i - 1]) === null || _state$routes === void 0 ? void 0 : _state$routes.key;\n const nextKey = (_state$routes2 = state.routes[i + 1]) === null || _state$routes2 === void 0 ? void 0 : _state$routes2.key;\n const previousDescriptor = previousKey ? descriptors[previousKey] : undefined;\n const nextDescriptor = nextKey ? descriptors[nextKey] : undefined;\n const {\n options,\n navigation,\n render\n } = descriptors[route.key];\n const headerBack = previousDescriptor ? {\n title: getHeaderTitle(previousDescriptor.options, previousDescriptor.route.name)\n } : parentHeaderBack;\n const canGoBack = headerBack !== undefined;\n const {\n header,\n headerShown,\n headerTintColor,\n headerBackImageSource,\n headerLeft,\n headerRight,\n headerTitle,\n headerTitleAlign,\n headerTitleStyle,\n headerStyle,\n headerShadowVisible,\n headerTransparent,\n headerBackground,\n headerBackTitle,\n presentation,\n contentStyle\n } = options;\n const nextPresentation = nextDescriptor === null || nextDescriptor === void 0 ? void 0 : nextDescriptor.options.presentation;\n return /*#__PURE__*/React.createElement(Screen, {\n key: route.key,\n focused: isFocused,\n route: route,\n navigation: navigation,\n headerShown: headerShown,\n headerTransparent: headerTransparent,\n header: header !== undefined ? header({\n back: headerBack,\n options,\n route,\n navigation\n }) : /*#__PURE__*/React.createElement(Header, {\n title: getHeaderTitle(options, route.name),\n headerTintColor: headerTintColor,\n headerLeft: typeof headerLeft === 'function' ? _ref2 => {\n let {\n tintColor\n } = _ref2;\n return headerLeft({\n tintColor,\n canGoBack,\n label: headerBackTitle\n });\n } : headerLeft === undefined && canGoBack ? _ref3 => {\n let {\n tintColor\n } = _ref3;\n return /*#__PURE__*/React.createElement(HeaderBackButton, {\n tintColor: tintColor,\n backImage: headerBackImageSource !== undefined ? () => /*#__PURE__*/React.createElement(Image, {\n source: headerBackImageSource,\n style: [styles.backImage, {\n tintColor\n }]\n }) : undefined,\n onPress: navigation.goBack,\n canGoBack: canGoBack\n });\n } : headerLeft,\n headerRight: typeof headerRight === 'function' ? _ref4 => {\n let {\n tintColor\n } = _ref4;\n return headerRight({\n tintColor,\n canGoBack\n });\n } : headerRight,\n headerTitle: typeof headerTitle === 'function' ? _ref5 => {\n let {\n children,\n tintColor\n } = _ref5;\n return headerTitle({\n children,\n tintColor\n });\n } : headerTitle,\n headerTitleAlign: headerTitleAlign,\n headerTitleStyle: headerTitleStyle,\n headerTransparent: headerTransparent,\n headerShadowVisible: headerShadowVisible,\n headerBackground: headerBackground,\n headerStyle: headerStyle\n }),\n style: [StyleSheet.absoluteFill, {\n display: isFocused || nextPresentation != null && TRANSPARENT_PRESENTATIONS.includes(nextPresentation) ? 'flex' : 'none'\n }, presentation != null && TRANSPARENT_PRESENTATIONS.includes(presentation) ? {\n backgroundColor: 'transparent'\n } : null]\n }, /*#__PURE__*/React.createElement(HeaderBackContext.Provider, {\n value: headerBack\n }, /*#__PURE__*/React.createElement(View, {\n style: [styles.contentContainer, contentStyle]\n }, render())));\n })));\n}\nconst styles = StyleSheet.create({\n container: {\n flex: 1\n },\n contentContainer: {\n flex: 1\n },\n backImage: {\n height: 24,\n width: 24,\n margin: 3,\n resizeMode: 'contain'\n }\n});\n//# sourceMappingURL=NativeStackView.js.map","export { default as Background } from './Background';\nexport { default as getDefaultHeaderHeight } from './Header/getDefaultHeaderHeight';\nexport { default as getHeaderTitle } from './Header/getHeaderTitle';\nexport { default as Header } from './Header/Header';\nexport { default as HeaderBackButton } from './Header/HeaderBackButton';\nexport { default as HeaderBackContext } from './Header/HeaderBackContext';\nexport { default as HeaderBackground } from './Header/HeaderBackground';\nexport { default as HeaderHeightContext } from './Header/HeaderHeightContext';\nexport { default as HeaderShownContext } from './Header/HeaderShownContext';\nexport { default as HeaderTitle } from './Header/HeaderTitle';\nexport { default as useHeaderHeight } from './Header/useHeaderHeight';\nexport { default as MissingIcon } from './MissingIcon';\nexport { default as PlatformPressable } from './PlatformPressable';\nexport { default as ResourceSavingView } from './ResourceSavingView';\nexport { default as SafeAreaProviderCompat } from './SafeAreaProviderCompat';\nexport { default as Screen } from './Screen';\nexport const Assets = [\n// eslint-disable-next-line import/no-commonjs\nrequire('./assets/back-icon.png'),\n// eslint-disable-next-line import/no-commonjs\nrequire('./assets/back-icon-mask.png')];\nexport * from './types';\n//# sourceMappingURL=index.js.map","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport { useTheme } from '@react-navigation/native';\nimport * as React from 'react';\nimport { View } from 'react-native';\nexport default function Background(_ref) {\n let {\n style,\n ...rest\n } = _ref;\n const {\n colors\n } = useTheme();\n return /*#__PURE__*/React.createElement(View, _extends({}, rest, {\n style: [{\n flex: 1,\n backgroundColor: colors.background\n }, style]\n }));\n}\n//# sourceMappingURL=Background.js.map","import { Platform } from 'react-native';\nexport default function getDefaultHeaderHeight(layout, modalPresentation, statusBarHeight) {\n let headerHeight;\n const isLandscape = layout.width > layout.height;\n if (Platform.OS === 'ios') {\n if (Platform.isPad || Platform.isTV) {\n if (modalPresentation) {\n headerHeight = 56;\n } else {\n headerHeight = 50;\n }\n } else {\n if (isLandscape) {\n headerHeight = 32;\n } else {\n if (modalPresentation) {\n headerHeight = 56;\n } else {\n headerHeight = 44;\n }\n }\n }\n } else if (Platform.OS === 'android') {\n headerHeight = 56;\n } else {\n headerHeight = 64;\n }\n return headerHeight + statusBarHeight;\n}\n//# sourceMappingURL=getDefaultHeaderHeight.js.map","export default function getHeaderTitle(options, fallback) {\n return typeof options.headerTitle === 'string' ? options.headerTitle : options.title !== undefined ? options.title : fallback;\n}\n//# sourceMappingURL=getHeaderTitle.js.map","import * as React from 'react';\nimport { Animated, Platform, StyleSheet, View } from 'react-native';\nimport { useSafeAreaFrame, useSafeAreaInsets } from 'react-native-safe-area-context';\nimport getDefaultHeaderHeight from './getDefaultHeaderHeight';\nimport HeaderBackground from './HeaderBackground';\nimport HeaderShownContext from './HeaderShownContext';\nimport HeaderTitle from './HeaderTitle';\nconst warnIfHeaderStylesDefined = styles => {\n Object.keys(styles).forEach(styleProp => {\n const value = styles[styleProp];\n if (styleProp === 'position' && value === 'absolute') {\n console.warn(\"position: 'absolute' is not supported on headerStyle. If you would like to render content under the header, use the 'headerTransparent' option.\");\n } else if (value !== undefined) {\n console.warn(`${styleProp} was given a value of ${value}, this has no effect on headerStyle.`);\n }\n });\n};\nexport default function Header(props) {\n const insets = useSafeAreaInsets();\n const frame = useSafeAreaFrame();\n const isParentHeaderShown = React.useContext(HeaderShownContext);\n\n // On models with Dynamic Island the status bar height is smaller than the safe area top inset.\n const hasDynamicIsland = Platform.OS === 'ios' && insets.top > 50;\n const statusBarHeight = hasDynamicIsland ? insets.top - 5 : insets.top;\n const {\n layout = frame,\n modal = false,\n title,\n headerTitle: customTitle,\n headerTitleAlign = Platform.select({\n ios: 'center',\n default: 'left'\n }),\n headerLeft,\n headerLeftLabelVisible,\n headerTransparent,\n headerTintColor,\n headerBackground,\n headerRight,\n headerTitleAllowFontScaling: titleAllowFontScaling,\n headerTitleStyle: titleStyle,\n headerLeftContainerStyle: leftContainerStyle,\n headerRightContainerStyle: rightContainerStyle,\n headerTitleContainerStyle: titleContainerStyle,\n headerBackgroundContainerStyle: backgroundContainerStyle,\n headerStyle: customHeaderStyle,\n headerShadowVisible,\n headerPressColor,\n headerPressOpacity,\n headerStatusBarHeight = isParentHeaderShown ? 0 : statusBarHeight\n } = props;\n const defaultHeight = getDefaultHeaderHeight(layout, modal, headerStatusBarHeight);\n const {\n height = defaultHeight,\n minHeight,\n maxHeight,\n backgroundColor,\n borderBottomColor,\n borderBottomEndRadius,\n borderBottomLeftRadius,\n borderBottomRightRadius,\n borderBottomStartRadius,\n borderBottomWidth,\n borderColor,\n borderEndColor,\n borderEndWidth,\n borderLeftColor,\n borderLeftWidth,\n borderRadius,\n borderRightColor,\n borderRightWidth,\n borderStartColor,\n borderStartWidth,\n borderStyle,\n borderTopColor,\n borderTopEndRadius,\n borderTopLeftRadius,\n borderTopRightRadius,\n borderTopStartRadius,\n borderTopWidth,\n borderWidth,\n // @ts-expect-error: web support for shadow\n boxShadow,\n elevation,\n shadowColor,\n shadowOffset,\n shadowOpacity,\n shadowRadius,\n opacity,\n transform,\n ...unsafeStyles\n } = StyleSheet.flatten(customHeaderStyle || {});\n if (process.env.NODE_ENV !== 'production') {\n warnIfHeaderStylesDefined(unsafeStyles);\n }\n const safeStyles = {\n backgroundColor,\n borderBottomColor,\n borderBottomEndRadius,\n borderBottomLeftRadius,\n borderBottomRightRadius,\n borderBottomStartRadius,\n borderBottomWidth,\n borderColor,\n borderEndColor,\n borderEndWidth,\n borderLeftColor,\n borderLeftWidth,\n borderRadius,\n borderRightColor,\n borderRightWidth,\n borderStartColor,\n borderStartWidth,\n borderStyle,\n borderTopColor,\n borderTopEndRadius,\n borderTopLeftRadius,\n borderTopRightRadius,\n borderTopStartRadius,\n borderTopWidth,\n borderWidth,\n // @ts-expect-error: boxShadow is only for Web\n boxShadow,\n elevation,\n shadowColor,\n shadowOffset,\n shadowOpacity,\n shadowRadius,\n opacity,\n transform\n };\n\n // Setting a property to undefined triggers default style\n // So we need to filter them out\n // Users can use `null` instead\n for (const styleProp in safeStyles) {\n // @ts-expect-error: typescript wrongly complains that styleProp cannot be used to index safeStyles\n if (safeStyles[styleProp] === undefined) {\n // @ts-expect-error\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete safeStyles[styleProp];\n }\n }\n const backgroundStyle = [safeStyles, headerShadowVisible === false && {\n elevation: 0,\n shadowOpacity: 0,\n borderBottomWidth: 0\n }];\n const leftButton = headerLeft ? headerLeft({\n tintColor: headerTintColor,\n pressColor: headerPressColor,\n pressOpacity: headerPressOpacity,\n labelVisible: headerLeftLabelVisible\n }) : null;\n const rightButton = headerRight ? headerRight({\n tintColor: headerTintColor,\n pressColor: headerPressColor,\n pressOpacity: headerPressOpacity\n }) : null;\n const headerTitle = typeof customTitle !== 'function' ? props => /*#__PURE__*/React.createElement(HeaderTitle, props) : customTitle;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Animated.View, {\n pointerEvents: \"box-none\",\n style: [StyleSheet.absoluteFill, {\n zIndex: 0\n }, backgroundContainerStyle]\n }, headerBackground ? headerBackground({\n style: backgroundStyle\n }) : headerTransparent ? null : /*#__PURE__*/React.createElement(HeaderBackground, {\n style: backgroundStyle\n })), /*#__PURE__*/React.createElement(Animated.View, {\n pointerEvents: \"box-none\",\n style: [{\n height,\n minHeight,\n maxHeight,\n opacity,\n transform\n }]\n }, /*#__PURE__*/React.createElement(View, {\n pointerEvents: \"none\",\n style: {\n height: headerStatusBarHeight\n }\n }), /*#__PURE__*/React.createElement(View, {\n pointerEvents: \"box-none\",\n style: styles.content\n }, /*#__PURE__*/React.createElement(Animated.View, {\n pointerEvents: \"box-none\",\n style: [styles.left, headerTitleAlign === 'center' && styles.expand, {\n marginStart: insets.left\n }, leftContainerStyle]\n }, leftButton), /*#__PURE__*/React.createElement(Animated.View, {\n pointerEvents: \"box-none\",\n style: [styles.title, {\n // Avoid the title from going offscreen or overlapping buttons\n maxWidth: headerTitleAlign === 'center' ? layout.width - ((leftButton ? headerLeftLabelVisible !== false ? 80 : 32 : 16) + Math.max(insets.left, insets.right)) * 2 : layout.width - ((leftButton ? 72 : 16) + (rightButton ? 72 : 16) + insets.left - insets.right)\n }, titleContainerStyle]\n }, headerTitle({\n children: title,\n allowFontScaling: titleAllowFontScaling,\n tintColor: headerTintColor,\n style: titleStyle\n })), /*#__PURE__*/React.createElement(Animated.View, {\n pointerEvents: \"box-none\",\n style: [styles.right, styles.expand, {\n marginEnd: insets.right\n }, rightContainerStyle]\n }, rightButton))));\n}\nconst styles = StyleSheet.create({\n content: {\n flex: 1,\n flexDirection: 'row',\n alignItems: 'stretch'\n },\n title: {\n marginHorizontal: 16,\n justifyContent: 'center'\n },\n left: {\n justifyContent: 'center',\n alignItems: 'flex-start'\n },\n right: {\n justifyContent: 'center',\n alignItems: 'flex-end'\n },\n expand: {\n flexGrow: 1,\n flexBasis: 0\n }\n});\n//# sourceMappingURL=Header.js.map","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport { useTheme } from '@react-navigation/native';\nimport * as React from 'react';\nimport { Animated, Platform, StyleSheet } from 'react-native';\nexport default function HeaderBackground(_ref) {\n let {\n style,\n ...rest\n } = _ref;\n const {\n colors\n } = useTheme();\n return /*#__PURE__*/React.createElement(Animated.View, _extends({\n style: [styles.container, {\n backgroundColor: colors.card,\n borderBottomColor: colors.border,\n shadowColor: colors.border\n }, style]\n }, rest));\n}\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n ...Platform.select({\n android: {\n elevation: 4\n },\n ios: {\n shadowOpacity: 0.85,\n shadowRadius: 0,\n shadowOffset: {\n width: 0,\n height: StyleSheet.hairlineWidth\n }\n },\n default: {\n borderBottomWidth: StyleSheet.hairlineWidth\n }\n })\n }\n});\n//# sourceMappingURL=HeaderBackground.js.map","import getNamedContext from '../getNamedContext';\nconst HeaderShownContext = getNamedContext('HeaderShownContext', false);\nexport default HeaderShownContext;\n//# sourceMappingURL=HeaderShownContext.js.map","import * as React from 'react';\nconst contexts = '__react_navigation__elements_contexts';\n// We use a global variable to keep our contexts so that we can reuse same contexts across packages\nglobal[contexts] = global[contexts] ?? new Map();\nexport default function getNamedContext(name, initialValue) {\n let context = global[contexts].get(name);\n if (context) {\n return context;\n }\n context = /*#__PURE__*/React.createContext(initialValue);\n context.displayName = name;\n global[contexts].set(name, context);\n return context;\n}\n//# sourceMappingURL=getNamedContext.js.map","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport { useTheme } from '@react-navigation/native';\nimport * as React from 'react';\nimport { Animated, Platform, StyleSheet } from 'react-native';\nexport default function HeaderTitle(_ref) {\n let {\n tintColor,\n style,\n ...rest\n } = _ref;\n const {\n colors\n } = useTheme();\n return /*#__PURE__*/React.createElement(Animated.Text, _extends({\n accessibilityRole: \"header\",\n \"aria-level\": \"1\",\n numberOfLines: 1\n }, rest, {\n style: [styles.title, {\n color: tintColor === undefined ? colors.text : tintColor\n }, style]\n }));\n}\nconst styles = StyleSheet.create({\n title: Platform.select({\n ios: {\n fontSize: 17,\n fontWeight: '600'\n },\n android: {\n fontSize: 20,\n fontFamily: 'sans-serif-medium',\n fontWeight: 'normal'\n },\n default: {\n fontSize: 18,\n fontWeight: '500'\n }\n })\n});\n//# sourceMappingURL=HeaderTitle.js.map","import { useTheme } from '@react-navigation/native';\nimport * as React from 'react';\nimport { Animated, I18nManager, Image, Platform, StyleSheet, View } from 'react-native';\nimport MaskedView from '../MaskedView';\nimport PlatformPressable from '../PlatformPressable';\nexport default function HeaderBackButton(_ref) {\n let {\n disabled,\n allowFontScaling,\n backImage,\n label,\n labelStyle,\n labelVisible = Platform.OS === 'ios',\n onLabelLayout,\n onPress,\n pressColor,\n pressOpacity,\n screenLayout,\n tintColor: customTintColor,\n titleLayout,\n truncatedLabel = 'Back',\n accessibilityLabel = label && label !== 'Back' ? `${label}, back` : 'Go back',\n testID,\n style\n } = _ref;\n const {\n colors\n } = useTheme();\n const [initialLabelWidth, setInitialLabelWidth] = React.useState(undefined);\n const tintColor = customTintColor !== undefined ? customTintColor : Platform.select({\n ios: colors.primary,\n default: colors.text\n });\n const handleLabelLayout = e => {\n onLabelLayout === null || onLabelLayout === void 0 ? void 0 : onLabelLayout(e);\n setInitialLabelWidth(e.nativeEvent.layout.x + e.nativeEvent.layout.width);\n };\n const shouldTruncateLabel = () => {\n return !label || initialLabelWidth && titleLayout && screenLayout && (screenLayout.width - titleLayout.width) / 2 < initialLabelWidth + 26;\n };\n const renderBackImage = () => {\n if (backImage) {\n return backImage({\n tintColor\n });\n } else {\n return /*#__PURE__*/React.createElement(Image, {\n style: [styles.icon, Boolean(labelVisible) && styles.iconWithLabel, Boolean(tintColor) && {\n tintColor\n }],\n source: require('../assets/back-icon.png'),\n fadeDuration: 0\n });\n }\n };\n const renderLabel = () => {\n const leftLabelText = shouldTruncateLabel() ? truncatedLabel : label;\n if (!labelVisible || leftLabelText === undefined) {\n return null;\n }\n const labelElement = /*#__PURE__*/React.createElement(View, {\n style: screenLayout ?\n // We make the button extend till the middle of the screen\n // Otherwise it appears to cut off when translating\n [styles.labelWrapper, {\n minWidth: screenLayout.width / 2 - 27\n }] : null\n }, /*#__PURE__*/React.createElement(Animated.Text, {\n accessible: false,\n onLayout:\n // This measurement is used to determine if we should truncate the label when it doesn't fit\n // Only measure it when label is not truncated because we want the measurement of full label\n leftLabelText === label ? handleLabelLayout : undefined,\n style: [styles.label, tintColor ? {\n color: tintColor\n } : null, labelStyle],\n numberOfLines: 1,\n allowFontScaling: !!allowFontScaling\n }, leftLabelText));\n if (backImage || Platform.OS !== 'ios') {\n // When a custom backimage is specified, we can't mask the label\n // Otherwise there might be weird effect due to our mask not being the same as the image\n return labelElement;\n }\n return /*#__PURE__*/React.createElement(MaskedView, {\n maskElement: /*#__PURE__*/React.createElement(View, {\n style: styles.iconMaskContainer\n }, /*#__PURE__*/React.createElement(Image, {\n source: require('../assets/back-icon-mask.png'),\n style: styles.iconMask\n }), /*#__PURE__*/React.createElement(View, {\n style: styles.iconMaskFillerRect\n }))\n }, labelElement);\n };\n const handlePress = () => onPress && requestAnimationFrame(onPress);\n return /*#__PURE__*/React.createElement(PlatformPressable, {\n disabled: disabled,\n accessible: true,\n accessibilityRole: \"button\",\n accessibilityLabel: accessibilityLabel,\n testID: testID,\n onPress: disabled ? undefined : handlePress,\n pressColor: pressColor,\n pressOpacity: pressOpacity,\n android_ripple: androidRipple,\n style: [styles.container, disabled && styles.disabled, style],\n hitSlop: Platform.select({\n ios: undefined,\n default: {\n top: 16,\n right: 16,\n bottom: 16,\n left: 16\n }\n })\n }, /*#__PURE__*/React.createElement(React.Fragment, null, renderBackImage(), renderLabel()));\n}\nconst androidRipple = {\n borderless: true,\n foreground: Platform.OS === 'android' && Platform.Version >= 23,\n radius: 20\n};\nconst styles = StyleSheet.create({\n container: {\n alignItems: 'center',\n flexDirection: 'row',\n minWidth: StyleSheet.hairlineWidth,\n // Avoid collapsing when title is long\n ...Platform.select({\n ios: null,\n default: {\n marginVertical: 3,\n marginHorizontal: 11\n }\n })\n },\n disabled: {\n opacity: 0.5\n },\n label: {\n fontSize: 17,\n // Title and back label are a bit different width due to title being bold\n // Adjusting the letterSpacing makes them coincide better\n letterSpacing: 0.35\n },\n labelWrapper: {\n // These styles will make sure that the label doesn't fill the available space\n // Otherwise it messes with the measurement of the label\n flexDirection: 'row',\n alignItems: 'flex-start'\n },\n icon: Platform.select({\n ios: {\n height: 21,\n width: 13,\n marginLeft: 8,\n marginRight: 22,\n marginVertical: 12,\n resizeMode: 'contain',\n transform: [{\n scaleX: I18nManager.getConstants().isRTL ? -1 : 1\n }]\n },\n default: {\n height: 24,\n width: 24,\n margin: 3,\n resizeMode: 'contain',\n transform: [{\n scaleX: I18nManager.getConstants().isRTL ? -1 : 1\n }]\n }\n }),\n iconWithLabel: Platform.OS === 'ios' ? {\n marginRight: 6\n } : {},\n iconMaskContainer: {\n flex: 1,\n flexDirection: 'row',\n justifyContent: 'center'\n },\n iconMaskFillerRect: {\n flex: 1,\n backgroundColor: '#000'\n },\n iconMask: {\n height: 21,\n width: 13,\n marginLeft: -14.5,\n marginVertical: 12,\n alignSelf: 'center',\n resizeMode: 'contain',\n transform: [{\n scaleX: I18nManager.getConstants().isRTL ? -1 : 1\n }]\n }\n});\n//# sourceMappingURL=HeaderBackButton.js.map","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\nvar I18nManager = {\n allowRTL() {\n return;\n },\n forceRTL() {\n return;\n },\n getConstants() {\n return {\n isRTL: false\n };\n }\n};\nexport default I18nManager;","/**\n * Use a stub for MaskedView on all Platforms that don't support it.\n */\n\nexport default function MaskedView(_ref) {\n let {\n children\n } = _ref;\n return children;\n}\n//# sourceMappingURL=MaskedView.js.map","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport { useTheme } from '@react-navigation/native';\nimport * as React from 'react';\nimport { Animated, Easing, Platform, Pressable } from 'react-native';\nconst AnimatedPressable = Animated.createAnimatedComponent(Pressable);\nconst ANDROID_VERSION_LOLLIPOP = 21;\nconst ANDROID_SUPPORTS_RIPPLE = Platform.OS === 'android' && Platform.Version >= ANDROID_VERSION_LOLLIPOP;\n\n/**\n * PlatformPressable provides an abstraction on top of Pressable to handle platform differences.\n */\nexport default function PlatformPressable(_ref) {\n let {\n onPressIn,\n onPressOut,\n android_ripple,\n pressColor,\n pressOpacity = 0.3,\n style,\n ...rest\n } = _ref;\n const {\n dark\n } = useTheme();\n const [opacity] = React.useState(() => new Animated.Value(1));\n const animateTo = (toValue, duration) => {\n if (ANDROID_SUPPORTS_RIPPLE) {\n return;\n }\n Animated.timing(opacity, {\n toValue,\n duration,\n easing: Easing.inOut(Easing.quad),\n useNativeDriver: true\n }).start();\n };\n const handlePressIn = e => {\n animateTo(pressOpacity, 0);\n onPressIn === null || onPressIn === void 0 ? void 0 : onPressIn(e);\n };\n const handlePressOut = e => {\n animateTo(1, 200);\n onPressOut === null || onPressOut === void 0 ? void 0 : onPressOut(e);\n };\n return /*#__PURE__*/React.createElement(AnimatedPressable, _extends({\n onPressIn: handlePressIn,\n onPressOut: handlePressOut,\n android_ripple: ANDROID_SUPPORTS_RIPPLE ? {\n color: pressColor !== undefined ? pressColor : dark ? 'rgba(255, 255, 255, .32)' : 'rgba(0, 0, 0, .32)',\n ...android_ripple\n } : undefined,\n style: [{\n opacity: !ANDROID_SUPPORTS_RIPPLE ? opacity : 1\n }, style]\n }, rest));\n}\n//# sourceMappingURL=PlatformPressable.js.map","","","import getNamedContext from '../getNamedContext';\nconst HeaderBackContext = getNamedContext('HeaderBackContext', undefined);\nexport default HeaderBackContext;\n//# sourceMappingURL=HeaderBackContext.js.map","import getNamedContext from '../getNamedContext';\nconst HeaderHeightContext = getNamedContext('HeaderHeightContext', undefined);\nexport default HeaderHeightContext;\n//# sourceMappingURL=HeaderHeightContext.js.map","import * as React from 'react';\nimport HeaderHeightContext from './HeaderHeightContext';\nexport default function useHeaderHeight() {\n const height = React.useContext(HeaderHeightContext);\n if (height === undefined) {\n throw new Error(\"Couldn't find the header height. Are you inside a screen in a navigator with a header?\");\n }\n return height;\n}\n//# sourceMappingURL=useHeaderHeight.js.map","import * as React from 'react';\nimport { StyleSheet, Text } from 'react-native';\nexport default function MissingIcon(_ref) {\n let {\n color,\n size,\n style\n } = _ref;\n return /*#__PURE__*/React.createElement(Text, {\n style: [styles.icon, {\n color,\n fontSize: size\n }, style]\n }, \"\\u23F7\");\n}\nconst styles = StyleSheet.create({\n icon: {\n backgroundColor: 'transparent'\n }\n});\n//# sourceMappingURL=MissingIcon.js.map","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport * as React from 'react';\nimport { Platform, StyleSheet, View } from 'react-native';\nconst FAR_FAR_AWAY = 30000; // this should be big enough to move the whole view out of its container\n\nexport default function ResourceSavingScene(_ref) {\n let {\n visible,\n children,\n style,\n ...rest\n } = _ref;\n if (Platform.OS === 'web') {\n return /*#__PURE__*/React.createElement(View\n // @ts-expect-error: hidden exists on web, but not in React Native\n , _extends({\n hidden: !visible,\n style: [{\n display: visible ? 'flex' : 'none'\n }, styles.container, style],\n pointerEvents: visible ? 'auto' : 'none'\n }, rest), children);\n }\n return /*#__PURE__*/React.createElement(View, {\n style: [styles.container, style]\n // box-none doesn't seem to work properly on Android\n ,\n pointerEvents: visible ? 'auto' : 'none'\n }, /*#__PURE__*/React.createElement(View, {\n collapsable: false,\n removeClippedSubviews:\n // On iOS & macOS, set removeClippedSubviews to true only when not focused\n // This is an workaround for a bug where the clipped view never re-appears\n Platform.OS === 'ios' || Platform.OS === 'macos' ? !visible : true,\n pointerEvents: visible ? 'auto' : 'none',\n style: visible ? styles.attached : styles.detached\n }, children));\n}\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n overflow: 'hidden'\n },\n attached: {\n flex: 1\n },\n detached: {\n flex: 1,\n top: FAR_FAR_AWAY\n }\n});\n//# sourceMappingURL=ResourceSavingView.js.map","import * as React from 'react';\nimport { Dimensions, Platform, StyleSheet, View } from 'react-native';\nimport { initialWindowMetrics, SafeAreaFrameContext, SafeAreaInsetsContext, SafeAreaProvider } from 'react-native-safe-area-context';\nconst {\n width = 0,\n height = 0\n} = Dimensions.get('window');\n\n// To support SSR on web, we need to have empty insets for initial values\n// Otherwise there can be mismatch between SSR and client output\n// We also need to specify empty values to support tests environments\nconst initialMetrics = Platform.OS === 'web' || initialWindowMetrics == null ? {\n frame: {\n x: 0,\n y: 0,\n width,\n height\n },\n insets: {\n top: 0,\n left: 0,\n right: 0,\n bottom: 0\n }\n} : initialWindowMetrics;\nexport default function SafeAreaProviderCompat(_ref) {\n let {\n children,\n style\n } = _ref;\n const insets = React.useContext(SafeAreaInsetsContext);\n if (insets) {\n // If we already have insets, don't wrap the stack in another safe area provider\n // This avoids an issue with updates at the cost of potentially incorrect values\n // https://github.com/react-navigation/react-navigation/issues/174\n return /*#__PURE__*/React.createElement(View, {\n style: [styles.container, style]\n }, children);\n }\n if (Platform.OS === 'web') {\n children = /*#__PURE__*/React.createElement(SafeAreaFrameProvider, {\n initialMetrics: initialMetrics\n }, children);\n }\n return /*#__PURE__*/React.createElement(SafeAreaProvider, {\n initialMetrics: initialMetrics,\n style: style\n }, children);\n}\n\n// FIXME: On the Web, the safe area frame value doesn't update on resize\n// So we workaround this by measuring the frame on resize\nconst SafeAreaFrameProvider = _ref2 => {\n let {\n initialMetrics,\n children\n } = _ref2;\n const element = React.useRef(null);\n const [frame, setFrame] = React.useState(initialMetrics.frame);\n React.useEffect(() => {\n if (element.current == null) {\n return;\n }\n const rect = element.current.getBoundingClientRect();\n setFrame({\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n });\n let timeout;\n const observer = new ResizeObserver(entries => {\n const entry = entries[0];\n if (entry) {\n const {\n x,\n y,\n width,\n height\n } = entry.contentRect;\n\n // Debounce the frame updates to avoid too many updates in a short time\n clearTimeout(timeout);\n timeout = setTimeout(() => {\n setFrame({\n x,\n y,\n width,\n height\n });\n }, 100);\n }\n });\n observer.observe(element.current);\n return () => {\n observer.disconnect();\n clearTimeout(timeout);\n };\n }, []);\n return /*#__PURE__*/React.createElement(SafeAreaFrameContext.Provider, {\n value: frame\n }, /*#__PURE__*/React.createElement(\"div\", {\n ref: element,\n style: {\n ...StyleSheet.absoluteFillObject,\n pointerEvents: 'none',\n visibility: 'hidden'\n }\n }), children);\n};\nSafeAreaProviderCompat.initialMetrics = initialMetrics;\nconst styles = StyleSheet.create({\n container: {\n flex: 1\n }\n});\n//# sourceMappingURL=SafeAreaProviderCompat.js.map","import { NavigationContext, NavigationRouteContext } from '@react-navigation/native';\nimport * as React from 'react';\nimport { StyleSheet, View } from 'react-native';\nimport { useSafeAreaFrame, useSafeAreaInsets } from 'react-native-safe-area-context';\nimport Background from './Background';\nimport getDefaultHeaderHeight from './Header/getDefaultHeaderHeight';\nimport HeaderHeightContext from './Header/HeaderHeightContext';\nimport HeaderShownContext from './Header/HeaderShownContext';\nexport default function Screen(props) {\n const dimensions = useSafeAreaFrame();\n const insets = useSafeAreaInsets();\n const isParentHeaderShown = React.useContext(HeaderShownContext);\n const parentHeaderHeight = React.useContext(HeaderHeightContext);\n const {\n focused,\n modal = false,\n header,\n headerShown = true,\n headerTransparent,\n headerStatusBarHeight = isParentHeaderShown ? 0 : insets.top,\n navigation,\n route,\n children,\n style\n } = props;\n const [headerHeight, setHeaderHeight] = React.useState(() => getDefaultHeaderHeight(dimensions, modal, headerStatusBarHeight));\n return /*#__PURE__*/React.createElement(Background, {\n accessibilityElementsHidden: !focused,\n importantForAccessibility: focused ? 'auto' : 'no-hide-descendants',\n style: [styles.container, style]\n }, /*#__PURE__*/React.createElement(View, {\n style: styles.content\n }, /*#__PURE__*/React.createElement(HeaderShownContext.Provider, {\n value: isParentHeaderShown || headerShown !== false\n }, /*#__PURE__*/React.createElement(HeaderHeightContext.Provider, {\n value: headerShown ? headerHeight : parentHeaderHeight ?? 0\n }, children))), headerShown ? /*#__PURE__*/React.createElement(NavigationContext.Provider, {\n value: navigation\n }, /*#__PURE__*/React.createElement(NavigationRouteContext.Provider, {\n value: route\n }, /*#__PURE__*/React.createElement(View, {\n onLayout: e => {\n const {\n height\n } = e.nativeEvent.layout;\n setHeaderHeight(height);\n },\n style: headerTransparent ? styles.absolute : null\n }, header))) : null);\n}\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n flexDirection: 'column-reverse'\n },\n // This is necessary to avoid applying 'column-reverse' to screen content\n content: {\n flex: 1\n },\n absolute: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0\n }\n});\n//# sourceMappingURL=Screen.js.map","export {};\n//# sourceMappingURL=types.js.map","import { NavigatorScreenParams, useNavigation, useNavigationState } from '@react-navigation/native';\nimport { NativeStackNavigationProp } from '@react-navigation/native-stack';\nimport { APITypes, Dynamo, MedicalDataTypes } from '../primary-record-types';\nimport { NoteDestinationParams } from '../components/shared/Notes/utils/types';\nimport { useCallback, useMemo } from 'react';\nimport React from 'react';\nimport useMedicalProfile from '../hooks/api/useMedicalProfile';\nimport useMedicalProfiles from '../hooks/api/useMedicalProfiles';\nimport { ReportType } from '../primary-record-types/reports';\nimport { useMaybeLoadingAppType } from '../hooks/useAppType';\n\ntype CardType = 'insurance' | 'id';\n\nexport type NoteEditTab = 'note' | 'attachment';\n\nexport type ProfileTab = 'dashboard' | 'health' | 'manage';\n\nexport type EditProfileTab = 'information' | 'idCards' | 'advancedDirectives';\n\nexport type OrganizationTab =\n | 'organization'\n | 'organization-users'\n | 'billing'\n | 'groups'\n | 'invitation-definitions'\n | 'subscription'\n | 'client-billing';\n\n// root navigation routes cannot have params\nexport type RootAppNavigationParamList = {\n welcome: undefined;\n login: undefined;\n signup: undefined;\n app: NavigatorScreenParams;\n 'shared-report': { shareCode: string };\n redirect: undefined;\n};\nexport const useRootNavigation = () => useNavigation>();\n\n// tab navigation routes cannot have params\nexport type TabNavigationParamList = {\n activity: NavigatorScreenParams;\n profiles: NavigatorScreenParams;\n clients: NavigatorScreenParams;\n notes: NavigatorScreenParams;\n account: NavigatorScreenParams;\n resources: NavigatorScreenParams;\n organization: NavigatorScreenParams;\n};\nexport const useTabNavigation = () => useNavigation>();\n\n// activity tab\nexport type ActivityTabNavigationParamList = {\n root: undefined;\n details: {\n profileId: string;\n auditLogId: string;\n };\n 'add-message': {\n profileIds: string[];\n };\n};\nexport const useActivityTabNavigation = () =>\n useNavigation>();\n\n// notes tab\nexport type NotesTabNavigationParamList = {\n root: undefined;\n add: NoteDestinationParams;\n details: { noteId: string };\n edit: { noteId: string; defaultTab?: NoteEditTab };\n transfer: { noteId: string };\n send: { noteId: string };\n};\nexport const useNotesTabNavigation = () => useNavigation>();\nexport const useNestedNavigation = () => {\n const rootNavigation = useRootNavigation();\n const appType = useMaybeLoadingAppType();\n\n return useMemo(() => {\n const nestedNavigation = (tab: keyof TabNavigationParamList, screen: string, value: any) => {\n rootNavigation.navigate('app', {\n screen: tab,\n initial: false,\n params: {\n screen: screen as any,\n initial: false,\n params: value,\n },\n });\n };\n\n return {\n nestedNotesNavigate: (\n screen: K,\n value: NotesTabNavigationParamList[K],\n ) => {\n nestedNavigation('notes', screen, value);\n },\n nestedActivityNavigate: (\n screen: K,\n value: ActivityTabNavigationParamList[K],\n ) => {\n nestedNavigation('activity', screen, value);\n },\n nestedProfileNavigation: (\n screen: K,\n value: ProfilesTabParamList[K],\n ) => {\n nestedNavigation(appType === 'consumer' ? 'profiles' : 'clients', screen, value);\n },\n nestedAccountNavigation: (\n screen: K,\n value: AccountTabParamList[K],\n ) => {\n nestedNavigation('account', screen, value);\n },\n nestedResourcesNavigation: (\n screen: K,\n value: ResourcesTabParamList[K],\n ) => {\n nestedNavigation('resources', screen, value);\n },\n nestedOrganizationNavigation: (\n screen: K,\n value: OrganizationTabParamList[K],\n ) => {\n nestedNavigation('organization', screen, value);\n },\n };\n }, [rootNavigation]);\n};\n\nexport const useTabDefaultScreenNavigation = () => {\n const tabNavigation = useTabNavigation();\n const nestedNavigation = useNestedNavigation();\n\n return useCallback(\n (tab: keyof TabNavigationParamList) => {\n if (tab === 'account') {\n nestedNavigation.nestedAccountNavigation('root', undefined);\n } else if (tab === 'activity') {\n nestedNavigation.nestedActivityNavigate('root', undefined);\n } else if (tab === 'notes') {\n nestedNavigation.nestedNotesNavigate('root', undefined);\n } else if (tab === 'profiles' || tab === 'clients') {\n nestedNavigation.nestedProfileNavigation('root', undefined);\n } else if (tab === 'resources') {\n nestedNavigation.nestedResourcesNavigation('root', undefined);\n } else if (tab === 'organization') {\n nestedNavigation.nestedOrganizationNavigation('root', {});\n } else {\n console.error('No default screen for tab');\n tabNavigation.navigate(tab);\n }\n },\n [nestedNavigation, tabNavigation],\n );\n};\n\nconst ActiveTabContext = React.createContext(null);\ntype NonProfileOrClientsTabNames = Exclude;\n/**\n * A wrapper to explicitly set the active tab context for a component. Each root tab screen should use this HOC\n *\n * Using this instead of digging through the internal react-navigation state\n */\nexport const withActiveTab =

(\n Component: React.ComponentType

,\n tab: NonProfileOrClientsTabNames | 'clients-or-profiles',\n) => {\n return (props: P) => {\n const appType = useMaybeLoadingAppType();\n const mappedTab =\n tab === 'clients-or-profiles'\n ? appType === 'consumer'\n ? ('profiles' as const)\n : ('clients' as const)\n : tab;\n return (\n \n \n \n );\n };\n};\n\nconst getLatestHistoryItem = (history: any[] | undefined): any => {\n return history?.[history.length - 1];\n};\n\nconst getMostRecentLeafRoute = (state: any): any => {\n if (!state) {\n return null;\n }\n\n const route = getLatestHistoryItem(state.routes);\n if (route?.state) {\n return getMostRecentLeafRoute(route.state);\n }\n\n return route;\n};\n\nconst useCurrentTabRoute = () => {\n const tabStackNavigation = useTabNavigation()?.getState();\n\n return getLatestHistoryItem(tabStackNavigation?.routes);\n};\n\nexport const useActiveTab = (): { activeTab: keyof TabNavigationParamList | null; isRoot: boolean } => {\n const tab = React.useContext(ActiveTabContext);\n const currentRoute = useCurrentTabRoute();\n\n return {\n activeTab: tab,\n isRoot: currentRoute?.name === 'root',\n };\n};\n\nexport type UseTabRouteActiveProfileReturnValue = {\n profileId: string | null;\n profile: APITypes.medicalProfileService.GetProfileResponse | null;\n};\n\nexport const useTabRouteActiveProfile = (): UseTabRouteActiveProfileReturnValue => {\n const { collaboratorMedicalProfiles, medicalProfiles } = useMedicalProfiles();\n const accessibleProfileIds = [...collaboratorMedicalProfiles, ...medicalProfiles].map((_) => _.medicalProfileId);\n const activeTab = useActiveTab();\n const state = useNavigationState((_) => _);\n const routeName = getMostRecentLeafRoute(state).name;\n const profileId = getMostRecentLeafRoute(state)?.params?.profileId || null;\n const isInviteWithoutProfileAccess =\n !!profileId && !accessibleProfileIds.includes(profileId) && routeName === 'invite';\n const { isLoadingProfile, profile } = useMedicalProfile({\n medicalProfileId: isInviteWithoutProfileAccess ? null : profileId,\n });\n if (activeTab.activeTab !== 'profiles' || !profileId) {\n return { profileId: null, profile: null };\n }\n\n return { profileId, profile: isLoadingProfile ? null : profile || null };\n};\n\nexport type ActiveTabAndActiveScreen = {\n activeTab: keyof TabNavigationParamList;\n activeScreen:\n | keyof ActivityTabNavigationParamList\n | keyof ProfilesTabParamList\n | keyof NotesTabNavigationParamList\n | keyof AccountTabParamList\n | keyof ResourcesTabParamList;\n params: Record;\n};\n\nexport const useActiveTabActiveScreen = (): ActiveTabAndActiveScreen | null => {\n const activeTab = useActiveTab();\n const state = useNavigationState((_) => _);\n const activeScreen = getMostRecentLeafRoute(state)?.name;\n return activeTab?.activeTab && activeScreen\n ? {\n activeTab: activeTab.activeTab as any,\n activeScreen: activeScreen as any,\n params: getMostRecentLeafRoute(state)?.params || {},\n }\n : null;\n};\n\n/**\n * A wrapper for react-navigation's goBack functionality that handles edge cases around\n * not having a screen to go back to\n */\nexport const useGoBack = () => {\n const { activeTab } = useActiveTab();\n const tabNavigation = useTabNavigation();\n const navigateToTabDefaultScreen = useTabDefaultScreenNavigation();\n const { nestedActivityNavigate } = useNestedNavigation();\n\n return useCallback(() => {\n if (tabNavigation?.goBack && tabNavigation.canGoBack()) {\n // first default to standard goBack if available\n tabNavigation.goBack();\n } else if (activeTab) {\n // if we can't go back, kick the user out to the root screen of the tab if available\n navigateToTabDefaultScreen(activeTab);\n } else {\n // no root screen found, just navigate to \"home\"\n nestedActivityNavigate('root', undefined);\n }\n }, [activeTab, navigateToTabDefaultScreen, nestedActivityNavigate, tabNavigation]);\n};\n\nexport type FilterAllergyStatus = 'active' | 'inactive';\n\nexport type ClientRecordDetailsTab =\n | 'details'\n | 'invitation-details'\n | 'notes'\n | 'history'\n | 'organization-files'\n | 'activity';\n\nexport type ResourceSearchScreenParams = {\n searchText?: string;\n conditionStatus?: MedicalDataTypes.PrimaryRecordConditionStatus;\n allergyStatus?: FilterAllergyStatus;\n medicationStatus?: 'active' | 'inactive';\n visitStatus?: MedicalDataTypes.PrimaryRecordVisitType | 'other' | 'all';\n};\n\n/**\n * booleans are stringified, so we need to use a type to represent them\n */\nexport type BooleanString = 'true' | 'false';\n\n// profiles tab\nexport type ProfilesTabParamList = {\n root: undefined | { isRegistration?: BooleanString };\n add: { useUser: BooleanString };\n invite: { profileId: string; invitationId: string };\n profile: { defaultTab?: ProfileTab; profileId: string; firstName?: string; forcePortalRefresh?: BooleanString };\n edit: { profileId: string; firstName: string; defaultTab?: EditProfileTab };\n 'contact-details': { profileId: string };\n 'emergency-contacts': { profileId: string };\n 'edit-emergency-contact': { profileId: string; emergencyContactId: string };\n 'create-emergency-contact': { profileId: string };\n 'care-team': { profileId: string };\n 'add-care-team': { profileId: string; associatedResourceId?: string };\n 'care-team-member': { profileId: string; careTeamMemberId: string };\n 'edit-care-team-member': { profileId: string; careTeamMemberId: string };\n 'copy-care-team-member': { profileId: string; careTeamMemberId: string };\n 'add-related-care-team-member': { profileId: string; careTeamMemberId: string };\n 'invite-collaborator': {\n profileId: string;\n careTeamMemberId?: string;\n defaultFirstName?: string;\n defaultLastName?: string;\n defaultEmail?: string;\n };\n 'invite-details': { profileId: string; invitationId: string };\n collaborator: { profileId: string; collaboratorId: string };\n 'collaborator-invoice': { profileId: string; collaboratorId: string; invoiceId: string };\n 'add-transfer-request': { profileId: string; collaboratorId?: string };\n 'transfer-request': { profileId: string };\n 'transfer-request-response': { transferProfileId: string; transferRequestId: string };\n 'add-card': { profileId: string; cardType: CardType };\n 'edit-card': { profileId: string; cardType: CardType; cardId: string; description: string };\n data: { profileId: string; category: MedicalDataTypes.PrimaryRecordResourceCategory };\n 'data-bulk-update': {\n profileId: string;\n category: MedicalDataTypes.PrimaryRecordResourceCategory;\n } & ResourceSearchScreenParams;\n 'data-details': {\n profileId: string;\n category: MedicalDataTypes.PrimaryRecordResourceCategory;\n resourceId: string;\n };\n 'add-data': {\n profileId: string;\n category: MedicalDataTypes.PrimaryRecordResourceCategory;\n sourceResourceId: string | null;\n careTeamMemberId?: string;\n startDateTime?: string;\n };\n 'edit-data': {\n profileId: string;\n category: MedicalDataTypes.PrimaryRecordResourceCategory;\n resourceId: string;\n };\n 'add-portal': {\n profileId: string;\n };\n 'add-note': NoteDestinationParams;\n 'copy-note': {\n profileId: string;\n noteId: string;\n noteEntityType: Dynamo.NoteEntityType;\n };\n note: { noteId: string; noteEntityType: Dynamo.NoteEntityType; profileId: string };\n 'edit-note': { noteId: string; noteEntityType: Dynamo.NoteEntityType; defaultTab?: NoteEditTab; profileId: string };\n 'send-note': { noteId: string; noteEntityType: Dynamo.NoteEntityType; profileId: string };\n 'transfer-note': { noteId: string; noteEntityType: Dynamo.NoteEntityType; profileId: string };\n 'portal-connection': { profileId: string; healthSystemId: string };\n reports: { profileId: string };\n 'add-shared-report': { profileId: string; reportType: ReportType };\n 'shared-report': { profileId: string; sharedReportId: string };\n files: { profileId: string; defaultFolderId?: string };\n file: {\n profileId: string;\n fileId: string;\n page?: string;\n bbTop?: string;\n bbLeft?: string;\n bbWidth?: string;\n bbHeight?: string;\n startTime?: string;\n };\n chat: {\n profileId: string;\n defaultChatId?: string;\n defaultPrompt?: string;\n disableSetDefaultChat?: BooleanString;\n };\n 'date-labs': {\n profileId: string;\n date: string;\n };\n 'lab-history': {\n profileId: string;\n labCode: string;\n };\n 'profile-activity': {\n profileId: string;\n };\n 'profile-activity-details': {\n auditLogId: string;\n profileId: string;\n };\n 'message-profile': {\n profileId: string;\n };\n 'client-profile': {\n profileId: string;\n };\n 'edit-client-profile-groups': {\n clientRecordId: string;\n };\n 'client-record': {\n clientRecordId: string;\n defaultTab?: ClientRecordDetailsTab;\n };\n 'edit-client-record': {\n clientRecordId: string;\n };\n 'add-client-record': undefined;\n 'add-client-invitation': undefined;\n 'add-client-record-invitation': {\n clientRecordId: string;\n };\n 'edit-client-invitation': {\n clientRecordId: string;\n };\n 'client-record-note': {\n clientRecordId: string;\n noteId: string;\n };\n 'add-client-record-note': {\n clientRecordId: string;\n };\n 'edit-client-record-note': {\n clientRecordId: string;\n noteId: string;\n };\n 'edit-client-billing-info': {\n clientRecordId: string;\n };\n 'copy-org-note-to-clients': {\n medicalProfileIds: string[];\n };\n 'copy-visit-to-clients': {\n medicalProfileIds: string[];\n };\n 'copy-org-care-team-member-to-clients': {\n medicalProfileIds: string[];\n };\n 'send-clients-message': {\n clientMedicalProfileIds: string[];\n };\n 'clients-activity': {\n clientMedicalProfileIds: string[];\n };\n 'client-activity-details': {\n auditLogId: string;\n clientMedicalProfileId: string;\n };\n 'org-invite-accept-success': {\n clientProfileId: string;\n organizationId: string;\n };\n 'client-activity-history': {\n clientRecordId: string;\n };\n 'client-invoice-items': {\n clientRecordId: string;\n };\n connect: {\n profileId: string;\n forcePortalRefresh?: BooleanString;\n };\n access: {\n profileId: string;\n };\n 'profile-notes': {\n profileId: string;\n };\n messages: {\n profileId: string;\n };\n 'bulk-add-client-records': {};\n 'bulk-add-client-profiles-groups': {\n clientRecordIds: string[];\n };\n 'add-suggested-profile-folders': {\n profileId: string;\n };\n 'edit-code-status': {\n profileId: string;\n };\n 'edit-legal-decision-maker': {\n profileId: string;\n };\n 'bulk-invite-clients': {\n clientRecordsStorageKey: string;\n };\n 'visit-invite-emails': {\n profileId: string;\n };\n};\nexport const useProfilesTabNavigation = () => useNavigation>();\n\n// account tab\nexport type AccountTabParamList = {\n root: undefined;\n information: { defaultToEdit?: BooleanString };\n support: undefined;\n subscription: undefined;\n 'account-deletion-confirmation': undefined;\n preferences: undefined;\n redirect: undefined;\n};\nexport const useAccountTabNavigation = () => useNavigation>();\n\nexport type ResourcesTabParamList = {\n root: undefined;\n note: { noteId: string };\n 'edit-note': { noteId: string };\n 'add-note': undefined;\n 'add-care-team-member': undefined;\n 'edit-care-team-member': { careTeamMemberId: string };\n 'care-team-member': { careTeamMemberId: string };\n};\nexport const useResourcesTabNavigation = () => useNavigation>();\n\nexport type OrganizationTabParamList = {\n root: { defaultTab?: OrganizationTab };\n 'add-organization-invitation': undefined;\n 'organization-invitation': { invitationId: string };\n user: { organizationUserId: string };\n 'edit-user': { organizationUserId: string };\n 'add-group': undefined;\n group: { groupId: string };\n 'edit-group': { groupId: string };\n 'add-invitation-template': undefined;\n 'edit-invitation-template': { invitationTemplateId: string };\n 'invitation-template': { invitationTemplateId: string };\n 'edit-client-billing-branding': {};\n};\nexport const useOrganizationTabNavigation = () => useNavigation>();\n\ntype ExtractNestedKeys = {\n [K in keyof T]: T[K] extends Record ? keyof T[K] : never;\n}[keyof T];\n\n/**\n * Any possible param name from any navigation route\n */\nexport type AllParamNames =\n | ExtractNestedKeys\n | ExtractNestedKeys\n | ExtractNestedKeys\n | ExtractNestedKeys\n | ExtractNestedKeys\n | ExtractNestedKeys\n | ExtractNestedKeys\n | ExtractNestedKeys;\n\nconst appNavigationNames = {\n root: {\n welcome: 'welcome',\n faqs: 'faqs',\n signup: 'signup',\n login: 'login',\n termsOfService: 'terms-of-service',\n app: 'app',\n sharedReport: 'shared-report',\n redirect: 'redirect',\n },\n tabs: {\n activity: 'activity',\n profiles: 'profiles',\n notes: 'notes',\n account: 'account',\n resources: 'resources',\n organization: 'organization',\n clients: 'clients',\n },\n activity: {\n root: 'root',\n auditLogDetails: 'details',\n addMessage: 'add-message',\n },\n notes: {\n root: 'root',\n add: 'add',\n details: 'details',\n edit: 'edit',\n transfer: 'transfer',\n send: 'send',\n },\n account: {\n root: 'root',\n information: 'information',\n support: 'support',\n subscription: 'subscription',\n accountDeletionConfirmation: 'account-deletion-confirmation',\n preferences: 'preferences',\n redirect: 'redirect',\n },\n profiles: {\n root: 'root',\n add: 'add',\n invite: 'invite',\n profile: 'profile',\n edit: 'edit',\n contactDetails: 'contact-details',\n emergencyContacts: 'emergency-contacts',\n editEmergencyContact: 'edit-emergency-contact',\n createEmergencyContact: 'create-emergency-contact',\n careTeam: 'care-team',\n addCareTeam: 'add-care-team',\n careTeamMember: 'care-team-member',\n editCareTeamMember: 'edit-care-team-member',\n copyCareTeamMember: 'copy-care-team-member',\n addRelatedCareTeamMember: 'add-related-care-team-member',\n inviteCollaborator: 'invite-collaborator',\n inviteDetails: 'invite-details',\n collaborator: 'collaborator',\n collaboratorInvoice: 'collaborator-invoice',\n addTransferRequest: 'add-transfer-request',\n transferRequest: 'transfer-request',\n transferRequestResponse: 'transfer-request-response',\n addCard: 'add-card',\n editCard: 'edit-card',\n data: 'data',\n dataBulkUpdate: 'data-bulk-update',\n dataDetails: 'data-details',\n addData: 'add-data',\n editData: 'edit-data',\n dataImage: 'data-image',\n addPortal: 'add-portal',\n addNote: 'add-note',\n copyNote: 'copy-note',\n note: 'note',\n editNote: 'edit-note',\n sendNote: 'send-note',\n transferNote: 'transfer-note',\n portalConnection: 'portal-connection',\n reports: 'reports',\n addSharedReport: 'add-shared-report',\n sharedReport: 'shared-report',\n files: 'files',\n file: 'file',\n chat: 'chat',\n dateLabs: 'date-labs',\n labHistory: 'lab-history',\n profileActivity: 'profile-activity',\n profileActivityDetails: 'profile-activity-details',\n messageProfile: 'message-profile',\n clientProfile: 'client-profile',\n editClientProfileGroups: 'edit-client-profile-groups',\n bulkAddClientProfilesGroups: 'bulk-add-client-profiles-groups',\n clientRecord: 'client-record',\n addClientRecord: 'add-client-record',\n editClientRecord: 'edit-client-record',\n addClientInvitation: 'add-client-invitation',\n editClientInvitation: 'edit-client-invitation',\n addClientRecordInvitation: 'add-client-record-invitation',\n clientRecordNote: 'client-record-note',\n addClientRecordNote: 'add-client-record-note',\n editClientRecordNote: 'edit-client-record-note',\n copyOrgNoteToClients: 'copy-org-note-to-clients',\n copyVisitToClients: 'copy-visit-to-clients',\n copyOrgCareTeamMemberToClients: 'copy-org-care-team-member-to-clients',\n sendClientsMessage: 'send-clients-message',\n clientsActivity: 'clients-activity',\n clientActivityDetails: 'client-activity-details',\n orgInviteAcceptSuccess: 'org-invite-accept-success',\n clientActivityHistory: 'client-activity-history',\n connect: 'connect',\n access: 'access',\n profileNotes: 'profile-notes',\n bulkAddClientRecords: 'bulk-add-client-records',\n addSuggestedProfileFolders: 'add-suggested-profile-folders',\n editClientBillingInfo: 'edit-client-billing-info',\n clientInvoiceItems: 'client-invoice-items',\n editCodeStatus: 'edit-code-status',\n editLegalDecisionMaker: 'edit-legal-decision-maker',\n bulkInviteClients: 'bulk-invite-clients',\n messages: 'messages',\n visitInviteEmails: 'visit-invite-emails',\n },\n resources: {\n root: 'root',\n note: 'note',\n editNote: 'edit-note',\n addNote: 'add-note',\n addCareTeamMember: 'add-care-team-member',\n editCareTeamMember: 'edit-care-team-member',\n careTeamMember: 'care-team-member',\n },\n organization: {\n root: 'root',\n addOrganizationInvitation: 'add-organization-invitation',\n organizationInvitation: 'organization-invitation',\n user: 'user',\n editUser: 'edit-user',\n addGroup: 'add-group',\n editGroup: 'edit-group',\n group: 'group',\n addInvitationDefinition: 'add-invitation-template',\n editInvitationDefinition: 'edit-invitation-template',\n invitationDefinition: 'invitation-template',\n editClientBillingBranding: 'edit-client-billing-branding',\n },\n} as const;\n\nexport default appNavigationNames;\n","import { useMutation, useQuery } from '@tanstack/react-query';\nimport { APITypes } from '../../primary-record-types';\nimport urls from '../../utils/urls';\nimport useNotify from '../useNotify';\nimport { getIntl } from '../../utils/intl';\nimport { TempAndPersistedAvatarState } from '../../components/v2BaseComponents/ImagePicker/TempImagePicker';\nimport { useClearInMemoryAvatarCache } from '../useAvatar';\nimport { appAPI } from '../../utils/api';\nimport { getMedicalProfileDetailsCacheKey, onProfileContactDetailsUpdate } from './cacheKeys';\nimport { useQueryErrorNotify } from '../useQueryCallbacks';\n\nconst intl = getIntl('useMedicalProfile', {\n errorLoadingProfile: 'Error loading profile',\n errorUpdatingContactDetails: 'Error occurred while updating Medical Profile',\n updateContactDetailsSuccess: 'Medical profile updated successfully',\n createEmergencyContactSuccess: 'Emergency contact created successfully',\n createEmergencyContactError: 'Error occurred while creating emergency contact',\n deleteEmergencyContactSuccess: 'Emergency contact deleted successfully',\n deleteEmergencyContactError: 'Error occurred while deleting emergency contact',\n updateAvatarError: 'Error occurred while updating profile photo',\n});\n\nexport type UseMedicalProfileArgs = {\n medicalProfileId: string | null;\n onContactDetailsUpdateSuccess?: () => void;\n onCreateEmergencyContactSuccess?: () => void;\n onDeleteEmergencyContactSuccess?: () => void;\n};\n\nexport type UpdateContactDetailsArgs = {\n contactDetailsId: string;\n contactDetails: APITypes.medicalProfileService.UpdateContactDetailsBody;\n};\n\nexport type CreateEmergencyContactArgs = {\n emergencyContactDetails: APITypes.medicalProfileService.CreateEmergencyContactDetailsBody;\n medicalProfileId: string;\n};\n\nexport type DeleteEmergencyContactArgs = {\n medicalProfileId: string;\n emergencyContactId: string;\n};\n\nexport type ProfileAvatarUpdateArgs = {\n avatarState: TempAndPersistedAvatarState;\n};\n\nexport type UseMedicalProfileReturnValue = {\n profile: APITypes.medicalProfileService.GetProfileResponse | null;\n isLoadingProfile: boolean;\n updateContact: (args: UpdateContactDetailsArgs) => void;\n isUpdatingContact: boolean;\n createEmergencyContact: (args: CreateEmergencyContactArgs) => void;\n isCreatingEmergencyContact: boolean;\n deleteEmergencyContact: (args: DeleteEmergencyContactArgs) => void;\n isDeletingEmergencyContact: boolean;\n};\n\nexport default function useMedicalProfile({\n medicalProfileId,\n onContactDetailsUpdateSuccess,\n onCreateEmergencyContactSuccess,\n}: UseMedicalProfileArgs): UseMedicalProfileReturnValue {\n const clearInMemoryAvatarCache = useClearInMemoryAvatarCache();\n const notify = useNotify();\n const profileQuery = useQuery({\n queryKey: getMedicalProfileDetailsCacheKey(medicalProfileId || ''),\n queryFn: async () => {\n if (!medicalProfileId) throw new Error('Cannot get profile without a medical profile id');\n return await appAPI.get(urls.api.medicalProfiles.medicalProfile(medicalProfileId));\n },\n enabled: !!medicalProfileId,\n });\n useQueryErrorNotify(profileQuery, intl('errorLoadingProfile'));\n\n const contactDetailsMutation = useMutation({\n mutationFn: async (args: UpdateContactDetailsArgs) => {\n if (!medicalProfileId) throw new Error('Cannot update contact details without a medical profile id');\n\n return await appAPI.put(urls.api.medicalProfiles.contactDetails(medicalProfileId, args.contactDetailsId), {\n body: args.contactDetails,\n });\n },\n onError: () => {\n notify('error', intl('errorUpdatingContactDetails'));\n },\n onSuccess: () => {\n notify('success', intl('updateContactDetailsSuccess'));\n onContactDetailsUpdateSuccess?.();\n\n if (medicalProfileId) {\n clearInMemoryAvatarCache(urls.api.medicalProfiles.avatar(medicalProfileId));\n onProfileContactDetailsUpdate.resetCache({ medicalProfileId })();\n }\n },\n });\n\n const deleteEmergencyContactMutation = useMutation({\n mutationFn: async (args: DeleteEmergencyContactArgs) => {\n if (!medicalProfileId) throw new Error('Cannot delete emergency contact without a medical profile id');\n\n await appAPI.del(urls.api.medicalProfiles.contactDetails(medicalProfileId, args.emergencyContactId));\n },\n onError: () => {\n notify('error', intl('deleteEmergencyContactError'));\n },\n onSuccess: () => {\n notify('success', intl('deleteEmergencyContactSuccess'));\n onContactDetailsUpdateSuccess?.();\n\n if (medicalProfileId) {\n onProfileContactDetailsUpdate.resetCache({ medicalProfileId })();\n }\n },\n });\n\n const createEmergencyContact = useMutation({\n mutationFn: async (args: CreateEmergencyContactArgs) => {\n if (!args.medicalProfileId) throw new Error('Cannot create emergency contact without a medical profile id');\n\n await appAPI.post(urls.api.medicalProfiles.emergencyContact(args.medicalProfileId), {\n body: args.emergencyContactDetails,\n });\n },\n onError: () => {\n notify('error', intl('createEmergencyContactError'));\n },\n onSuccess: () => {\n notify('success', intl('createEmergencyContactSuccess'));\n onCreateEmergencyContactSuccess?.();\n\n if (medicalProfileId) {\n onProfileContactDetailsUpdate.resetCache({ medicalProfileId })();\n }\n },\n });\n\n return {\n profile: profileQuery.data || null,\n isLoadingProfile: profileQuery.isLoading,\n updateContact: contactDetailsMutation.mutate,\n isUpdatingContact: contactDetailsMutation.isPending,\n createEmergencyContact: createEmergencyContact.mutateAsync,\n isCreatingEmergencyContact: createEmergencyContact.isPending,\n deleteEmergencyContact: deleteEmergencyContactMutation.mutateAsync,\n isDeletingEmergencyContact: deleteEmergencyContactMutation.isPending,\n };\n}\n","import { Dynamo, MedicalDataTypes, NotificationTypes } from '../primary-record-types';\n\nconst buildQuery = (queryParams?: Record) => {\n if (!queryParams) return '';\n\n const filteredQueryParams = Object.fromEntries(\n Object.entries(queryParams).filter(([, value]) => value !== undefined),\n ) as Record;\n if (!Object.keys(filteredQueryParams).length) return '';\n\n return `?${new URLSearchParams(filteredQueryParams).toString()}`;\n};\n\nexport default {\n api: {\n app: '/app',\n patients: '/patients',\n publicSharedReports: (shareCode: string) => `/shared-reports/${shareCode}`,\n users: {\n me: '/users/me',\n avatar: '/users/me/avatar',\n avatarUpdateUrl: '/users/me/avatar/update-url',\n userPromoCode: '/users/me/promo-code',\n userUTMParameters: '/users/me/utm-parameters',\n myPreferences: '/users/me/preferences',\n platform: '/users/me/platform',\n adminOrganizations: '/users/admin/organizations',\n toggleOrganizationPaidStatus: '/users/admin/organizations/toggle-paid-status',\n },\n publicOrganizations: {\n clientInvitationLogo: (organizationClientInvitationId: string) =>\n `/public-organizations/client-invitations/${organizationClientInvitationId}/organization/logo`,\n },\n errors: {\n reportError: '/errors',\n },\n organizations: {\n myOrganization: '/organizations/me',\n avatar: (organizationId: string) => `/organizations/${organizationId}/avatar`,\n logo: (organizationId: string) => `/organizations/${organizationId}/logo`,\n createOrganization: '/organizations',\n organization: (organizationId: string) => `/organizations/${organizationId}`,\n usage: {\n maxMedicalProfiles: (organizationId: string) =>\n `/organizations/${organizationId}/usage/max-medical-profiles`,\n allowedMedicalProfiles: (organizationId: string) =>\n `/organizations/${organizationId}/usage/allowed-medical-profiles`,\n profileMetricUsage: (profileId: string, metric: Dynamo.MedicalProfileUsageMetricType) =>\n `/usage/medical-profiles/${profileId}/metric-types/${metric}`,\n },\n files: {\n persistToMedicalProfiles: (organizationId: string) =>\n `/organizations/${organizationId}/files/persist-to-medical-profiles`,\n organizationMedicalProfileFileFolder: (organizationId: string, medicalProfileId: string) =>\n `/organizations/${organizationId}/files/medical-profiles/${medicalProfileId}/organization-folder`,\n },\n visits: {\n persistToMedicalProfiles: (organizationId: string) =>\n `/organizations/${organizationId}/visits/persist-to-medical-profiles`,\n },\n groups: {\n groups: (organizationId: string) => `/organizations/${organizationId}/groups`,\n group: (organizationId: string, groupId: string) =>\n `/organizations/${organizationId}/groups/${groupId}`,\n bulkAddClientRecordGroups: (organizationId: string) =>\n `/organizations/${organizationId}/groups/client-records/bulk-add`,\n },\n invitationDefinitions: {\n invitationDefinitions: (organizationId: string) =>\n `/organizations/${organizationId}/invitation-definitions`,\n invitationDefinition: (organizationId: string, organizationInvitationDefinitionId: string) =>\n `/organizations/${organizationId}/invitation-definitions/${organizationInvitationDefinitionId}`,\n invitationDefinitionFile: (\n organizationId: string,\n organizationInvitationDefinitionId: string,\n fileId: string,\n ) =>\n `/organizations/${organizationId}/invitation-definitions/${organizationInvitationDefinitionId}/files/${fileId}`,\n },\n userInvitations: {\n userInvitations: (organizationId: string) => `/organizations/${organizationId}/user-invitations`,\n userInvitation: (organizationId: string, organizationUserInvitationId: string) =>\n `/organizations/${organizationId}/user-invitations/${organizationUserInvitationId}`,\n myInvitations: '/organizations/user-invitations/me',\n inviteResponse: (organizationId: string, organizationUserInvitationId: string) =>\n `/organizations/${organizationId}/user-invitations/${organizationUserInvitationId}/response`,\n invitationFile: (organizationId: string, organizationInvitationDefinitionId: string, fileId: string) =>\n `/organizations/${organizationId}/invitation-definitions/${organizationInvitationDefinitionId}/files/${fileId}`,\n resendInvitationEmail: (organizationId: string, userInvitationId: string) =>\n `/organizations/${organizationId}/user-invitations/${userInvitationId}/resend-email`,\n },\n users: {\n users: (organizationId: string) => `/organizations/${organizationId}/users`,\n user: (organizationId: string, organizationUserId: string) =>\n `/organizations/${organizationId}/users/${organizationUserId}`,\n userAvatar: (organizationId: string, organizationUserId: string) =>\n `/organizations/${organizationId}/users/${organizationUserId}/avatar`,\n userPermissions: (organizationId: string, organizationUserId: string) =>\n `/organizations/${organizationId}/users/${organizationUserId}/permissions`,\n userGroups: (organizationId: string, organizationUserId: string) =>\n `/organizations/${organizationId}/users/${organizationUserId}/groups`,\n },\n clientInvitations: {\n organizationLogo: (organizationId: string, organizationClientInvitationId: string) =>\n `/organizations/${organizationId}/client-invitations/${organizationClientInvitationId}/organization/logo`,\n organizationAvatar: (organizationId: string, organizationClientInvitationId: string) =>\n `/organizations/${organizationId}/client-invitations/${organizationClientInvitationId}/organization/avatar`,\n myInvitations: '/organizations/client-invitations/me',\n organizationClientInvitations: (organizationId: string) =>\n `/organizations/${organizationId}/client-invitations`,\n organizationClientInvitation: (organizationId: string, clientInvitationId: string) =>\n `/organizations/${organizationId}/client-invitations/${clientInvitationId}`,\n organizationClientInvitationResponse: (organizationId: string, clientInvitationId: string) =>\n `/organizations/${organizationId}/client-invitations/${clientInvitationId}/response`,\n invitationOrganizationAvatar: (organizationId: string, clientInvitationId: string) =>\n `/organizations/${organizationId}/client-invitations/${clientInvitationId}/organization/avatar`,\n invitationOrganizationLogo: (organizationId: string, clientInvitationId: string) =>\n `/organizations/${organizationId}/client-invitations/${clientInvitationId}/organization/logo`,\n organizationClientInvitationFile: (\n organizationId: string,\n organizationClientInvitationId: string,\n fileId: string,\n ) =>\n `/organizations/${organizationId}/client-invitations/${organizationClientInvitationId}/files/${fileId}`,\n resendInvitationEmail: (organizationId: string, clientInvitationId: string) =>\n `/organizations/${organizationId}/client-invitations/${clientInvitationId}/resend-email`,\n },\n clientRecords: {\n clientRecords: (organizationId: string) => `/organizations/${organizationId}/client-records`,\n clientRecord: (organizationId: string, organizationClientRecordId: string) =>\n `/organizations/${organizationId}/client-records/${organizationClientRecordId}`,\n reEngageClient: (organizationId: string, organizationClientRecordId: string) =>\n `/organizations/${organizationId}/client-records/${organizationClientRecordId}/reengage`,\n inviteClient: (organizationId: string, organizationClientRecordId: string) =>\n `/organizations/${organizationId}/client-records/${organizationClientRecordId}/invite`,\n clientRecordInvitation: (organizationId: string, organizationClientRecordId: string) =>\n `/organizations/${organizationId}/client-records/${organizationClientRecordId}/invitation`,\n clientRecordHistory: (organizationId: string, medicalProfileId: string) =>\n `/organizations/${organizationId}/client-records/medical-profiles/${medicalProfileId}`,\n clientRecordAuditLogs: (organizationId: string, clientRecordId: string) =>\n `/organizations/${organizationId}/client-records/${clientRecordId}/audit-logs`,\n clientRecordInvitationFile: (organizationId: string, clientRecordId: string, fileId: string) =>\n `/organizations/${organizationId}/client-records/${clientRecordId}/invitation-files/${fileId}`,\n bulkAdd: (organizationId: string) => `/organizations/${organizationId}/client-records/bulk`,\n billingDetails: (organizationId: string, organizationClientRecordId: string) =>\n `/organizations/${organizationId}/client-records/${organizationClientRecordId}/billing-details`,\n invoiceItems: (organizationId: string, organizationClientRecordId: string) =>\n `/organizations/${organizationId}/client-records/${organizationClientRecordId}/invoice-items`,\n invoiceItem: (organizationId: string, organizationClientRecordId: string, invoiceItemId: string) =>\n `/organizations/${organizationId}/client-records/${organizationClientRecordId}/invoice-items/${invoiceItemId}`,\n bulkAddInvoiceItems: (organizationId: string, organizationClientRecordId: string) =>\n `/organizations/${organizationId}/client-records/${organizationClientRecordId}/invoice-items/bulk`,\n clientInvoices: (organizationId: string, organizationClientRecordId: string) =>\n `/organizations/${organizationId}/client-records/${organizationClientRecordId}/invoices`,\n previewInvoice: (organizationId: string, organizationClientRecordId: string) =>\n `/organizations/${organizationId}/client-records/${organizationClientRecordId}/invoices/preview`,\n clientInvoice: (organizationId: string, organizationClientRecordId: string, invoiceId: string) =>\n `/organizations/${organizationId}/client-records/${organizationClientRecordId}/invoices/${invoiceId}`,\n refundClientInvoice: (organizationId: string, organizationClientRecordId: string, invoiceId: string) =>\n `/organizations/${organizationId}/client-records/${organizationClientRecordId}/invoices/${invoiceId}/refund`,\n invoiceInvoiceItems: (organizationId: string, organizationClientRecordId: string, invoiceId: string) =>\n `/organizations/${organizationId}/client-records/${organizationClientRecordId}/invoices/${invoiceId}/invoice-items`,\n voidInvoice: (organizationId: string, organizationClientRecordId: string, invoiceId: string) =>\n `/organizations/${organizationId}/client-records/${organizationClientRecordId}/invoices/${invoiceId}/void`,\n markInvoiceAsPaid: (organizationId: string, organizationClientRecordId: string, invoiceId: string) =>\n `/organizations/${organizationId}/client-records/${organizationClientRecordId}/invoices/${invoiceId}/mark-paid`,\n resendInvoice: (organizationId: string, organizationClientRecordId: string, invoiceId: string) =>\n `/organizations/${organizationId}/client-records/${organizationClientRecordId}/invoices/${invoiceId}/resend`,\n clientRecordGroups: (organizationId: string, clientRecordId: string) =>\n `/organizations/${organizationId}/client-records/${clientRecordId}/groups`,\n clientProfileNotificationCounts: (organizationId: string) =>\n `/organizations/${organizationId}/client-profile-notification-counts`,\n },\n profiles: {\n profiles: (organizationId: string) => `/organizations/${organizationId}/medical-profiles`,\n profile: (organizationId: string, medicalProfileId: string) =>\n `/organizations/${organizationId}/medical-profiles/${medicalProfileId}`,\n },\n careTeamMembers: {\n careTeamMembers: (organizationId: string) => `/organizations/${organizationId}/care-team-members`,\n careTeamMember: (organizationId: string, careTeamMemberId: string) =>\n `/organizations/${organizationId}/care-team-members/${careTeamMemberId}`,\n careTeamMemberAvatar: (organizationId: string, careTeamMemberId: string) =>\n `/organizations/${organizationId}/care-team-members/${careTeamMemberId}/avatar`,\n careTeamMemberInsuranceCard: (\n organizationId: string,\n careTeamMemberId: string,\n frontOrBack: 'front' | 'back',\n ) =>\n `/organizations/${organizationId}/care-team-members/${careTeamMemberId}/insurance-card-image/${frontOrBack}`,\n copyCareTeamMemberToClients: (organizationId: string, careTeamMemberId: string) =>\n `/organizations/${organizationId}/care-team-members/${careTeamMemberId}/copy-to-medical-profiles`,\n },\n paymentIntegration: {\n getSetupUrl: (organizationId: string) => `/organizations/${organizationId}/payment-integration/setup`,\n status: (organizationId: string) => `/organizations/${organizationId}/payment-integration/status`,\n getOnboardingUrl: (organizationId: string) =>\n `/organizations/${organizationId}/payment-integration/onboarding-url/retrieve`,\n getDashboardUrl: (organizationId: string) =>\n `/organizations/${organizationId}/payment-integration/dashboard-url`,\n brandingImage: (organizationId: string, iconOrLog: 'logo' | 'icon') =>\n `/organizations/${organizationId}/payment-integration/branding/images/${iconOrLog}`,\n brandingImages: (organizationId: string) =>\n `/organizations/${organizationId}/payment-integration/branding/images`,\n setupTestOrganization: (organizationId: string) =>\n `/organizations/${organizationId}/payment-integration/setup-test`,\n },\n },\n payment: {\n webCheckoutSession: '/payments/web-checkout-session',\n webBillingSession: '/payments/web-billing-session',\n validatePromotionCode: '/payments/validate-promotion-code',\n webProducts: '/payments/web-products',\n paymentStatus: '/payments/payment-status',\n validateRegistrationCode: '/payments/validate-registration-code',\n applyRegistrationCode: '/payments/apply-registration-code',\n myRegistrationCode: '/payments/my-registration-code',\n registrationCode: '/payments/registration-code',\n },\n medicalProfileFiles: {\n medicalProfileFile: (medicalProfileId: string, medicalProfileFileId: string) =>\n `/medical-profile-files/${medicalProfileId}/files/${medicalProfileFileId}`,\n medicalProfileFileDownloadUrl: (medicalProfileId: string, medicalProfileFileId: string) =>\n `/medical-profile-files/${medicalProfileId}/files/${medicalProfileFileId}/download-url`,\n medicalProfileFiles: (medicalProfileId: string) => `/medical-profile-files/${medicalProfileId}`,\n search: (medicalProfileId: string) => `/medical-profile-files/${medicalProfileId}/search`,\n reprocess: (medicalProfileId: string, medicalProfileFileId: string) =>\n `/medical-profile-files/${medicalProfileId}/files/${medicalProfileFileId}/reprocess`,\n pageImage: (medicalProfileId: string, medicalProfileFileId: string, page: number) =>\n `/medical-profile-files/${medicalProfileId}/files/${medicalProfileFileId}/images/page/${page}`,\n audio: (medicalProfileId: string, medicalProfileFileId: string) =>\n `/medical-profile-files/${medicalProfileId}/files/${medicalProfileFileId}/audio`,\n folder: (medicalProfileId: string, folderId: string) =>\n `/medical-profile-files/${medicalProfileId}/folders/${folderId}`,\n profileFolders: (medicalProfileId: string) => `/medical-profile-files/${medicalProfileId}/folders`,\n folderDescendants: (medicalProfileId: string, folderId: string) =>\n `/medical-profile-files/${medicalProfileId}/folders/${folderId}/immediate-descendants`,\n updateFileFolder: (medicalProfileId: string, medicalProfileFileId: string) =>\n `/medical-profile-files/${medicalProfileId}/files/${medicalProfileFileId}/parent-folder`,\n },\n ehrIntegrations: {\n oneUpHealth: {\n endpoints: {\n endpoint: (id: number) => `/ehr-integrations/one-up-health/endpoints/${id}`,\n search: '/ehr-integrations/one-up-health/endpoints/search',\n image: (imageUrl: string) =>\n `/ehr-integrations/one-up-health/image${buildQuery({\n imageUrl,\n })}`,\n connect: (medicalProfileId: string) =>\n `/ehr-integrations/one-up-health/medical-profiles/${medicalProfileId}/endpoints/connect`,\n refresh: (medicalProfileId: string) =>\n `/ehr-integrations/one-up-health/medical-profiles/${medicalProfileId}/refresh`,\n automaticRefresh: (medicalProfileId: string, endpointId: number) =>\n `/ehr-integrations/one-up-health/medical-profiles/${medicalProfileId}/endpoints/${endpointId}/automatic-refresh`,\n refreshProgress: (medicalProfileId: string) =>\n `/ehr-integrations/one-up-health/medical-profiles/${medicalProfileId}/refresh/progress`,\n connectedEndpoints: (medicalProfileId: string) =>\n `/ehr-integrations/one-up-health/medical-profiles/${medicalProfileId}/connected-endpoints`,\n connectedEndpoint: (medicalProfileId: string, connectedEndpointId: string) =>\n `/ehr-integrations/one-up-health/medical-profiles/${medicalProfileId}/endpoints/${connectedEndpointId}`,\n endpointIngestionHistory: (medicalProfileId: string, connectedEndpointId: string) =>\n `/ehr-integrations/one-up-health/medical-profiles/${medicalProfileId}/endpoints/${connectedEndpointId}/ingestions`,\n confirmPatientMismatch: (medicalProfileId: string, connectedEndpointId: string) =>\n `/ehr-integrations/one-up-health/medical-profiles/${medicalProfileId}/endpoints/${connectedEndpointId}/confirm-patient-mismatch`,\n automaticRefreshStatus: (medicalProfileId: string, endpointId: string) =>\n `/ehr-integrations/one-up-health/medical-profiles/${medicalProfileId}/endpoints/${endpointId}/automatic-refresh-status`,\n refreshCapabilityDiscovery: (medicalProfileId: string, endpointId: string) =>\n `/ehr-integrations/one-up-health/medical-profiles/${medicalProfileId}/endpoints/${endpointId}/refresh-capability-discovery`,\n },\n },\n },\n chats: {\n medicalProfileChat: (medicalProfileId: string, chatId: string) =>\n `/chats/medical-profiles/${medicalProfileId}/chats/${chatId}`,\n medicalProfileChats: (medicalProfileId: string) => `/chats/medical-profiles/${medicalProfileId}/chats`,\n medicalProfileChatMessages: (medicalProfileId: string, chatId: string) =>\n `/chats/medical-profiles/${medicalProfileId}/chats/${chatId}/messages`,\n medicalProfileSearch: (medicalProfileId: string) => `/chats/medical-profiles/${medicalProfileId}/search`,\n },\n reports: {\n medicalProfileReport: (medicalProfileId: string) => `/reports/medical-profiles/${medicalProfileId}/reports`,\n reports: (medicalProfileId: string) => `/reports/medical-profiles/${medicalProfileId}/reports`,\n sharedReports: (medicalProfileId: string) => `/reports/shared-reports/medical-profiles/${medicalProfileId}`,\n sharedReport: (medicalProfileId: string, sharedReportId: string) =>\n `/reports/shared-reports/medical-profiles/${medicalProfileId}/shared-report/${sharedReportId}`,\n },\n auditLogs: {\n profileAuditLogsSearch: (medicalProfileId: string) =>\n `/audit-logs/medical-profiles/${medicalProfileId}/search`,\n auditLog: (medicalProfileId: string, auditLogId: string) =>\n `/audit-logs/medical-profiles/${medicalProfileId}/audit-logs/${auditLogId}`,\n auditLogCommentAvatar: (medicalProfileId: string, auditLogId: string, userId: string) =>\n `/audit-logs/medical-profiles/${medicalProfileId}/audit-logs/${auditLogId}/users/${userId}/comment-avatar`,\n auditLogComment: (medicalProfileId: string, auditLogId: string) =>\n `/audit-logs/medical-profiles/${medicalProfileId}/audit-logs/${auditLogId}/comment`,\n auditLogMessage: (medicalProfileId: string) =>\n `/audit-logs/medical-profiles/${medicalProfileId}/audit-logs`,\n },\n notes: {\n list: {\n userNotes: '/notes/my-notes',\n profileNotes: (profileId: string) => `/notes/medical-profiles/${profileId}`,\n careTeamMemberNotes: (profileId: string, careTeamMemberId: string) =>\n `/notes/medical-profiles/${profileId}/care-team-members/${careTeamMemberId}`,\n careTeamNotes: (profileId: string) => `/notes/medical-profiles/${profileId}/care-team-notes`,\n resourceTypeNotes: (\n profileId: string,\n resourceCategory: MedicalDataTypes.PrimaryRecordResourceCategory,\n ) => `/notes/medical-profiles/${profileId}/resources/${resourceCategory}`,\n resourceNotes: (\n profileId: string,\n resourceCategory: MedicalDataTypes.PrimaryRecordResourceCategory,\n resourceId: string,\n ) => `/notes/medical-profiles/${profileId}/resources/${resourceCategory}/${resourceId}`,\n resourceGroupNotes: (\n profileId: string,\n resourceCategory: MedicalDataTypes.PrimaryRecordResourceCategory,\n ) => `/notes/medical-profiles/${profileId}/resources/${resourceCategory}/resource-group`,\n organizationNotes: (organizationId: string) => `/notes/organizations/${organizationId}`,\n organizationClientRecordNotes: (organizationId: string, organizationClientRecordId: string) =>\n `/notes/organizations/${organizationId}/client-records/${organizationClientRecordId}`,\n },\n notes: '/notes',\n note: (noteId: string) => `/notes/${noteId}`,\n copyNote: (sourceMedicalProfileId: string, noteId: string) =>\n `/notes/medical-profiles/${sourceMedicalProfileId}/notes/${noteId}/copy`,\n noteImage: (noteId: string, noteImageId: string) => `/notes/${noteId}/images/${noteImageId}`,\n noteFile: (noteId: string, noteFileId: string) => `/notes/${noteId}/files/${noteFileId}`,\n noteComment: (noteId: string) => `/notes/${noteId}/comments`,\n noteUserAvatar: (noteId: string, userId: string) => `/notes/${noteId}/users/${userId}/avatar`,\n copyNoteToClients: (organizationId: string, noteId: string) =>\n `/notes/organizations/${organizationId}/notes/${noteId}/copy`,\n copyNoteToClient: (organizationId: string, noteId: string, medicalProfileId: string) =>\n `/notes/organizations/${organizationId}/notes/${noteId}/copy/medical-profiles/${medicalProfileId}`,\n sendNoteEmail: (noteId: string) => `/notes/${noteId}/send-email`,\n },\n medicalData: {\n fdaDrugSearch: '/medical-data/fda-drugs/search',\n elementSearch: {\n vaccineTypes: (medicalProfileId: string) =>\n `/medical-data/medical-profiles/${medicalProfileId}/search/vaccination-types`,\n },\n visitInviteEmails: (medicalProfileId: string) =>\n `/medical-data/medical-profiles/${medicalProfileId}/visit-invite-emails`,\n counts: (medicalProfileId: string) => `/medical-data/medical-profiles/${medicalProfileId}/resource-counts`,\n filteredCounts: (medicalProfileId: string) =>\n `/medical-data/medical-profiles/${medicalProfileId}/filtered-resource-counts`,\n resources: (\n medicalProfileId: string,\n resourceCategory: MedicalDataTypes.PrimaryRecordResourceCategory,\n sort?: 'ascending' | 'descending',\n ) => `/medical-data/medical-profiles/${medicalProfileId}/${resourceCategory}${buildQuery({ sort })}`,\n resource: (\n medicalProfileId: string,\n resourceCategory: MedicalDataTypes.PrimaryRecordResourceCategory,\n resourceId: string,\n ) => `/medical-data/medical-profiles/${medicalProfileId}/${resourceCategory}/${resourceId}`,\n categoryAgnosticResource: (medicalProfileId: string, resourceId: string) =>\n `/medical-data/medical-profiles/${medicalProfileId}/resources/${resourceId}`,\n relatedResources: (\n medicalProfileId: string,\n resourceCategory: MedicalDataTypes.PrimaryRecordResourceCategory,\n resourceId: string,\n relatedResourceCategory: MedicalDataTypes.PrimaryRecordResourceCategory,\n ) =>\n `/medical-data/medical-profiles/${medicalProfileId}/${resourceCategory}/${resourceId}/related-resources/${relatedResourceCategory}`,\n groupRelatedResources: (\n medicalProfileId: string,\n resourceCategory: MedicalDataTypes.PrimaryRecordResourceCategory,\n relatedResourceCategory: MedicalDataTypes.PrimaryRecordResourceCategory,\n ) =>\n `/medical-data/medical-profiles/${medicalProfileId}/${resourceCategory}/resource-group/related-resources/${relatedResourceCategory}`,\n resourceImage: (\n medicalProfileId: string,\n resourceCategory: MedicalDataTypes.PrimaryRecordResourceCategory,\n resourceId: string,\n resourceImageId: string,\n ) =>\n `/medical-data/medical-profiles/${medicalProfileId}/${resourceCategory}/${resourceId}/images/${resourceImageId}`,\n resourceDescription: (medicalProfileId: string, resourceCategory: string, resourceId: string) =>\n `/medical-data/medical-profiles/${medicalProfileId}/${resourceCategory}/${resourceId}/description`,\n careTeamMemberResources: (\n medicalProfileId: string,\n careTeamMemberId: string,\n resourceCategory: MedicalDataTypes.PrimaryRecordResourceCategory,\n ) =>\n `/medical-data/medical-profiles/${medicalProfileId}/care-team-members/${careTeamMemberId}/${resourceCategory}`,\n resourceCareTeam: (\n medicalProfileId: string,\n resourceCategory: MedicalDataTypes.PrimaryRecordResourceCategory,\n resourceId: string,\n ) =>\n `/medical-data/medical-profiles/${medicalProfileId}/${resourceCategory}/${resourceId}/resource-care-team`,\n resourceReferenceCounts: (medicalProfileId: string) =>\n `/medical-data/medical-profiles/${medicalProfileId}/resources/reference-counts`,\n bulkUpdate: (medicalProfileId: string) =>\n `/medical-data/medical-profiles/${medicalProfileId}/resources/bulk-update`,\n bulkCreate: (medicalProfileId: string, resourceCategory: MedicalDataTypes.PrimaryRecordResourceCategory) =>\n `/medical-data/medical-profiles/${medicalProfileId}/${resourceCategory}/bulk-create`,\n relatedResourceSuggestions: (\n medicalProfileId: string,\n resourceCategory: MedicalDataTypes.PrimaryRecordResourceCategory,\n resourceId: string,\n relatedResourceCategory: MedicalDataTypes.PrimaryRecordResourceCategory,\n ) =>\n `/medical-data/medical-profiles/${medicalProfileId}/${resourceCategory}/${resourceId}/related-resources/${relatedResourceCategory}/suggestions`,\n relatedResourceDiscoveries: (\n medicalProfileId: string,\n resourceCategory: MedicalDataTypes.PrimaryRecordResourceCategory,\n resourceId: string,\n relatedResourceCategory: MedicalDataTypes.PrimaryRecordResourceCategory,\n ) =>\n `/medical-data/medical-profiles/${medicalProfileId}/${resourceCategory}/${resourceId}/related-resources/${relatedResourceCategory}/discoveries`,\n labDateBuckets: (medicalProfileId: string) =>\n `/medical-data/medical-profiles/${medicalProfileId}/lab/date-buckets`,\n dateLabs: (medicalProfileId: string) =>\n `/medical-data/medical-profiles/${medicalProfileId}/search/panels-for-date`,\n labHistory: (medicalProfileId: string) =>\n `/medical-data/medical-profiles/${medicalProfileId}/lab/codes/history`,\n uniqueLabCodes: (medicalProfileId: string) =>\n `/medical-data/medical-profiles/${medicalProfileId}/lab/unique-codes`,\n },\n medicalProfiles: {\n medicalProfiles: '/medical-profiles',\n medicalProfile: (medicalProfileId: string) => `/medical-profiles/${medicalProfileId}`,\n contactDetails: (medicalProfileId: string, contactDetailsId: string) =>\n `/medical-profiles/${medicalProfileId}/contacts/${contactDetailsId}`,\n avatar: (medicalProfileId: string) => `/medical-profiles/${medicalProfileId}/avatar`,\n emergencyContact: (medicalProfileId: string) => `/medical-profiles/${medicalProfileId}/emergency-contacts`,\n owner: {\n owner: (medicalProfileId: string) => `/medical-profiles/${medicalProfileId}/owner`,\n avatar: (medicalProfileId: string) => `/medical-profiles/${medicalProfileId}/owner/avatar`,\n },\n cards: {\n cards: (medicalProfileId: string) => `/medical-profiles/${medicalProfileId}/cards`,\n insuranceCardImage: (medicalProfileId: string, insuranceCardId: string) =>\n `/medical-profiles/${medicalProfileId}/insurance-cards/${insuranceCardId}/image`,\n idCardImage: (medicalProfileId: string, idCardId: string) =>\n `/medical-profiles/${medicalProfileId}/id-cards/${idCardId}/image`,\n insuranceCard: (medicalProfileId: string, insuranceCardId: string) =>\n `/medical-profiles/${medicalProfileId}/insurance-cards/${insuranceCardId}`,\n idCard: (medicalProfileId: string, idCardId: string) =>\n `/medical-profiles/${medicalProfileId}/id-cards/${idCardId}`,\n insuranceCards: (medicalProfileId: string) => `/medical-profiles/${medicalProfileId}/insurance-cards`,\n idCards: (medicalProfileId: string) => `/medical-profiles/${medicalProfileId}/id-cards`,\n },\n inAppNotifications: {\n allProfileCounts: '/medical-profiles/in-app-notifications/counts',\n allNotifications: (medicalProfileId: string) =>\n `/medical-profiles/${medicalProfileId}/in-app-notifications/all`,\n toggleInAppNotificationReadStatus: (medicalProfileId: string) =>\n `/medical-profiles/${medicalProfileId}/in-app-notifications/toggle-read-status`,\n inAppNotificationAvatar: (\n medicalProfileId: string,\n notificationType: NotificationTypes.NotificationType,\n entityId: string,\n userId: string,\n ) =>\n `/medical-profiles/${medicalProfileId}/in-app-notifications/avatar/${notificationType}/${entityId}/user/${userId}`,\n },\n },\n paymentStatus: {\n canAddProfile: '/medical-profiles/can-add-medical-profile',\n profilePaymentStatusById: (medicalProfileId: string) =>\n `/medical-profiles/${medicalProfileId}/payment-status`,\n },\n ownershipTransfer: {\n profileTransferRequest: (medicalProfileId: string) =>\n `/medical-profiles/${medicalProfileId}/transfer-requests`,\n myInboundTransferRequests: '/medical-profiles/transfer-requests/my-inbound-transfer-requests',\n createTransferRequest: (medicalProfileId: string) =>\n `/medical-profiles/${medicalProfileId}/transfer-requests`,\n revokeTransferRequest: (medicalProfileId: string) =>\n `/medical-profiles/${medicalProfileId}/transfer-requests/revoke`,\n respondToTransferRequest: (medicalProfileId: string) =>\n `/medical-profiles/${medicalProfileId}/transfer-requests/decision`,\n pendingTransferRequest: (medicalProfileId: string, transferRequestId: string) =>\n `/medical-profiles/${medicalProfileId}/pending-transfer-requests/${transferRequestId}`,\n pendingTransferRequestAvatar: (medicalProfileId: string) =>\n `/medical-profiles/${medicalProfileId}/pending-transfer-request-avatar`,\n },\n careTeamMembers: {\n careTeamMembers: (medicalProfileId: string) => `/medical-profiles/${medicalProfileId}/care-team-members`,\n careTeamMember: (medicalProfileId: string, careTeamMemberId: string) =>\n `/medical-profiles/${medicalProfileId}/care-team-members/${careTeamMemberId}`,\n copy: (medicalProfileId: string, careTeamMemberId: string) =>\n `/medical-profiles/${medicalProfileId}/care-team-members/${careTeamMemberId}/copy`,\n avatar: (medicalProfileId: string, careTeamMemberId: string) =>\n `/medical-profiles/${medicalProfileId}/care-team-members/${careTeamMemberId}/avatar`,\n insuranceCard: (medicalProfileId: string, careTeamMemberId: string, frontOrBack: 'front' | 'back') =>\n `/medical-profiles/${medicalProfileId}/care-team-members/${careTeamMemberId}/insurance-card-image/${frontOrBack}`,\n relatedCareTeamMembers: (\n medicalProfileId: string,\n careTeamMemberId: string,\n relatedCareTeamMemberId?: string,\n ) =>\n `/medical-profiles/${medicalProfileId}/care-team-members/${careTeamMemberId}/related-care-team-members${\n relatedCareTeamMemberId ? `/${relatedCareTeamMemberId}` : ''\n }`,\n resourceRelatedCareTeamMembers: (medicalProfileId: string, resourceId: string) =>\n `/medical-profiles/${medicalProfileId}/care-team-members/related-to-resource/${resourceId}`,\n resourceGroupRelatedCareTeamMembers: (medicalProfileId: string) =>\n `/medical-profiles/${medicalProfileId}/care-team-members/related-to-resources`,\n },\n collaborators: {\n careTeamMemberCollaborators: (medicalProfileId: string, careTeamMemberId: string) =>\n `/medical-profiles/${medicalProfileId}/care-team-members/${careTeamMemberId}/collaborators`,\n collaborators: (medicalProfileId: string) => `/medical-profiles/${medicalProfileId}/collaborators`,\n collaborator: (medicalProfileId: string, collaboratorId: string) =>\n `/medical-profiles/${medicalProfileId}/collaborators/${collaboratorId}`,\n me: (medicalProfileId: string) => `/medical-profiles/${medicalProfileId}/collaborators/me`,\n medicalProfileInvites: (medicalProfileId: string) =>\n `/medical-profiles/${medicalProfileId}/collaborators/invites`,\n medicalProfileInvite: (medicalProfileId: string, medicalProfileInviteId: string) =>\n `/medical-profiles/${medicalProfileId}/collaborators/invites/${medicalProfileInviteId}`,\n medicalProfileInvitePermissions: (medicalProfileId: string, medicalProfileInviteId: string) =>\n `/medical-profiles/${medicalProfileId}/collaborators/invites/${medicalProfileInviteId}/permissions`,\n collaboratorPermissions: (medicalProfileId: string, collaboratorId: string) =>\n `/medical-profiles/${medicalProfileId}/collaborators/${collaboratorId}/permissions`,\n myInvites: `/medical-profiles/my-invites`,\n invitedProfileAvatar: (medicalProfileId: string, inviteId: string) =>\n `/medical-profiles/${medicalProfileId}/collaborators/invites/${inviteId}/profile-avatar`,\n inviteInviterUserAvatar: (medicalProfileId: string, inviteId: string) =>\n `/medical-profiles/${medicalProfileId}/collaborators/invites/${inviteId}/inviter-avatar`,\n collaboratorAvatar: (medicalProfileId: string, collaboratorId: string) =>\n `/medical-profiles/${medicalProfileId}/collaborators/${collaboratorId}/avatar`,\n resendInviteEmail: (medicalProfileId: string, inviteId: string) =>\n `/medical-profiles/${medicalProfileId}/invites/${inviteId}/resend-email`,\n collaboratorInvoices: (medicalProfileId: string, collaboratorId: string) =>\n `/medical-profiles/${medicalProfileId}/collaborators/${collaboratorId}/invoices`,\n collaboratorInvoice: (medicalProfileId: string, collaboratorId: string, invoiceId: string) =>\n `/medical-profiles/${medicalProfileId}/collaborators/${collaboratorId}/invoices/${invoiceId}`,\n },\n directives: {\n codeStatus: (medicalProfileId: string) => `/medical-profiles/${medicalProfileId}/directives/code-status`,\n poa: (medicalProfileId: string) => `/medical-profiles/${medicalProfileId}/directives/poa`,\n },\n permissions: {\n evaluatedPermissions: (medicalProfileId: string) =>\n `/medical-profiles/${medicalProfileId}/evaluated-permissions`,\n },\n files: {\n tempFiles: '/files/temp-file',\n tempFile: (tempFileId: string) => `/files/temp-file/${tempFileId}`,\n },\n featureToggles: {\n me: '/feature-toggles/me',\n },\n nativeNotifications: {\n userDevicePushTokens: '/native-notifications/user-device-push-tokens',\n removeDevicePushTokens: '/native-notifications/remove-user-device-push-tokens',\n },\n },\n};\n","import { useContext } from 'react';\nimport { NotificationContext, NotifyFunc } from '../components/notifications/NotificationsProvider';\n\nexport default function useNotify(): NotifyFunc {\n return useContext(NotificationContext).notify;\n}\n","import { QueryOptions, useQueries, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { blobToBase64 } from '../utils/blobBase64Conversions';\nimport { appAPI, publicAPI } from '../utils/api';\n\nexport type UseAvatarArgs = {\n avatarAPIUrl: string | null;\n /**\n * Avatars are usually cached by url. That can be too unique for things like note comments where\n * the same user ID will be used for multiple comments. This allows you to specify a cache key\n */\n avatarCacheKey?: string;\n usePublicAPI?: boolean;\n};\n\nexport type AvatarData = {\n name: string;\n base64: string;\n imageFetchUrl: string | null;\n};\n\nexport type UseAvatarReturnValue = {\n avatar: AvatarData | null;\n isLoadingAvatar: boolean;\n avatarAPIUrl: string | null;\n};\n\nexport const useClearInMemoryAvatarCache = () => {\n const queryClient = useQueryClient();\n\n return (avatarAPIUrl: string) => queryClient.refetchQueries({ queryKey: [avatarAPIUrl] });\n};\n\nexport type GetAvatarDownloadUrlResponse = {\n avatarUrl: string;\n name: string;\n} | null;\n\nasync function fetchAvatar(avatarAPIUrl: string, usePublicAPI: boolean): Promise {\n const api = usePublicAPI ? publicAPI : appAPI;\n try {\n let imageFetchUrl: string | null = null;\n let response: Response | null = null;\n let name = '';\n if (avatarAPIUrl.includes('/one-up-health/image')) {\n const downloadURLResult = await api.get(avatarAPIUrl, {\n textResponse: true,\n });\n imageFetchUrl = downloadURLResult;\n return {\n name,\n base64: downloadURLResult,\n imageFetchUrl: avatarAPIUrl,\n };\n } else if (avatarAPIUrl.includes('integration/branding/images/')) {\n const downloadURLResult = await api.get(avatarAPIUrl);\n if (!downloadURLResult) return null;\n\n // download file from stripe and return base64\n const response = await fetch(downloadURLResult.avatarUrl);\n if (response.status !== 200) return null;\n\n const blob = await response.blob();\n const base64 = await blobToBase64(blob);\n return {\n name,\n base64,\n imageFetchUrl: avatarAPIUrl,\n };\n } else if (avatarAPIUrl.includes('http')) {\n imageFetchUrl = avatarAPIUrl;\n response = await fetch(avatarAPIUrl);\n } else {\n const downloadURLResult = (await api.get(avatarAPIUrl)) as GetAvatarDownloadUrlResponse;\n imageFetchUrl = downloadURLResult?.avatarUrl || null;\n\n if (!downloadURLResult?.avatarUrl) return null;\n\n name = downloadURLResult.name;\n response = await fetch(downloadURLResult.avatarUrl);\n }\n\n if (response.status !== 200) return null;\n\n const blob = await response.blob();\n const base64 = await blobToBase64(blob);\n\n return {\n name,\n base64,\n imageFetchUrl: imageFetchUrl,\n };\n } catch (e) {\n console.error(e);\n return null;\n }\n}\n\nexport const useAvatar = ({ avatarAPIUrl, avatarCacheKey, usePublicAPI }: UseAvatarArgs): UseAvatarReturnValue => {\n const avatarQuery = useQuery({\n queryKey: avatarCacheKey ? [avatarCacheKey] : [avatarAPIUrl],\n queryFn: async () => fetchAvatar(avatarAPIUrl || '', usePublicAPI || false),\n enabled: !!avatarAPIUrl,\n });\n\n return {\n // @ts-expect-error TS2322\n avatar: avatarQuery.data,\n isLoadingAvatar: avatarQuery.isLoading,\n avatarAPIUrl,\n };\n};\n\nexport const useAvatars = ({ avatarAPIUrls }: { avatarAPIUrls: string[] }): UseAvatarReturnValue[] => {\n const queries = avatarAPIUrls.map>((avatarAPIUrl) => ({\n queryKey: [avatarAPIUrl],\n queryFn: () => fetchAvatar(avatarAPIUrl, false),\n }));\n const queryResults = useQueries({ queries: queries as any });\n return queryResults.map((queryResult, index) => ({\n avatar: queryResult.data,\n isLoadingAvatar: queryResult.isLoading,\n avatarAPIUrl: avatarAPIUrls[index],\n })) as any;\n};\n\nexport type MaybeAvatarArgs = {\n avatarAPIUrl: string | null;\n usePublicAPI?: boolean;\n};\n\nexport type MaybeAvatarReturnValue = UseAvatarReturnValue | null;\n\n/**\n * Same as useAvatar, but can be called without an avatarAPIUrl. If no avatarAPIUrl is provided, the hook will return null.\n */\nexport const useMaybeAvatar = ({ avatarAPIUrl, usePublicAPI }: MaybeAvatarArgs): MaybeAvatarReturnValue => {\n const result = useAvatar({ avatarAPIUrl: avatarAPIUrl || '', usePublicAPI: usePublicAPI || false });\n\n return avatarAPIUrl ? result : null;\n};\n","async function blobToBase64(blob: Blob): Promise {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onerror = reject;\n reader.onload = () => {\n resolve(reader.result as string);\n };\n reader.readAsDataURL(blob);\n });\n}\n\nexport { blobToBase64 };\n","import { get, post, put, del, ApiError } from 'aws-amplify/api';\n\ninterface ResponsePayload {\n json(): Promise;\n text(): Promise;\n}\n/**\n * Basic response type of REST API.\n *\n * @internal\n */\nexport interface RestApiResponse {\n body: ResponsePayload;\n statusCode: number;\n headers: Headers;\n}\n\nconst makeRequest = async (\n makeRequest: () => Promise>,\n method: string,\n options: Options,\n): Promise => {\n try {\n const response = await makeRequest();\n // this may not contain a json body, handle gracefully if so\n try {\n const result = options.textResponse ? await response?.body?.text?.() : await response?.body?.json?.();\n return result as TResponse;\n } catch (e) {\n return null as any;\n }\n } catch (error) {\n if (error instanceof ApiError) {\n if (\n typeof error.response?.statusCode === 'number' &&\n options.ignoreErrorStatus?.includes(error.response?.statusCode)\n ) {\n return null as any;\n }\n\n console.error(JSON.stringify(error.response));\n console.error(\n JSON.stringify(\n {\n message: 'Error making request: ' + error.message,\n status: error.response?.statusCode,\n body: error.response?.body,\n method,\n correlationId: error.response?.headers?.['x-amzn-requestid'],\n },\n null,\n 2,\n ),\n );\n }\n\n throw error;\n }\n};\n\ntype Options = {\n ignoreErrorStatus?: number[];\n textResponse?: boolean;\n};\n\nexport type Init = {\n body?: any;\n} & Options;\n\nconst getAPI = (apiName: string) => ({\n get: async (url: string, init: Init = {}) =>\n makeRequest(\n () => get({ apiName, path: url, options: init }).response as any as Promise>,\n 'GET',\n init,\n ),\n post: async (url: string, init: Init = {}) =>\n makeRequest(\n () =>\n post({\n apiName,\n path: url,\n options: {\n body: init.body || {},\n },\n }).response as any as Promise>,\n 'POST',\n init,\n ),\n del: async (url: string, init: Init = {}) =>\n makeRequest(\n () =>\n del({\n apiName,\n path: url,\n options: {},\n }).response as any as Promise>,\n 'DELETE',\n init,\n ),\n put: async (url: string, init: Init = {}) =>\n makeRequest(\n () =>\n put({\n apiName,\n path: url,\n options: {\n body: init.body || {},\n },\n }).response as any as Promise>,\n 'PUT',\n init,\n ),\n});\n\nexport const appAPI = getAPI('appApi');\nexport const publicAPI = getAPI('publicApi');\n","export * from '@aws-amplify/api';\n//# sourceMappingURL=index.mjs.map\n","export { generateClient } from './API.mjs';\nexport { CONNECTION_STATE_CHANGE, ConnectionState, GraphQLAuthError, events } from '@aws-amplify/api-graphql';\nexport { del, get, head, isCancelError, patch, post, put } from '@aws-amplify/api-rest';\nexport { ApiError } from '@aws-amplify/core/internals/utils';\n//# sourceMappingURL=index.mjs.map\n","import { generateClient as generateClient$1 } from '@aws-amplify/api-graphql/internals';\nimport { Amplify } from '@aws-amplify/core';\n\n/**\n * Generates an API client that can work with models or raw GraphQL\n *\n * @returns {@link V6Client}\n * @throws {@link Error} - Throws error when client cannot be generated due to configuration issues.\n */\nfunction generateClient(options = {}) {\n return generateClient$1({\n ...options,\n amplify: Amplify,\n });\n}\n\nexport { generateClient };\n//# sourceMappingURL=API.mjs.map\n","export { InternalGraphQLAPI, InternalGraphQLAPIClass } from './InternalGraphQLAPI.mjs';\nexport { cancel, graphql, isCancelError } from './v6.mjs';\nexport { generateClient } from './generateClient.mjs';\n//# sourceMappingURL=index.mjs.map\n","import { parse, print } from 'graphql';\nimport { catchError } from 'rxjs';\nimport { AmplifyUrl, getAmplifyUserAgent } from '@aws-amplify/core/internals/utils';\nimport { isCancelError } from '@aws-amplify/api-rest';\nimport { post, cancel, updateRequestToBeCancellable } from '@aws-amplify/api-rest/internals';\nimport { AWSAppSyncRealTimeProvider } from '../Providers/AWSAppSyncRealTimeProvider/index.mjs';\nimport { resolveConfig } from '../utils/resolveConfig.mjs';\nimport { resolveLibraryOptions } from '../utils/resolveLibraryOptions.mjs';\nimport { repackageUnauthorizedError } from '../utils/errors/repackageAuthError.mjs';\nimport { NO_ENDPOINT } from '../utils/errors/constants.mjs';\nimport { GraphQLApiError } from '../utils/errors/GraphQLApiError.mjs';\nimport '../utils/errors/validation.mjs';\nimport { createGraphQLResultWithError } from '../utils/errors/createGraphQLResultWithError.mjs';\nimport { isGraphQLResponseWithErrors } from './utils/runtimeTypeGuards/isGraphQLResponseWithErrors.mjs';\nimport { headerBasedAuth } from './graphqlAuth.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst USER_AGENT_HEADER = 'x-amz-user-agent';\nconst isAmplifyInstance = (amplify) => {\n return typeof amplify !== 'function';\n};\n/**\n * Export Cloud Logic APIs\n */\nclass InternalGraphQLAPIClass {\n constructor() {\n /**\n * @private\n */\n this.appSyncRealTime = new AWSAppSyncRealTimeProvider();\n this._api = {\n post,\n cancelREST: cancel,\n isCancelErrorREST: isCancelError,\n updateRequestToBeCancellable,\n };\n }\n getModuleName() {\n return 'InternalGraphQLAPI';\n }\n /**\n * to get the operation type\n * @param operation\n */\n getGraphqlOperationType(operation) {\n const doc = parse(operation);\n const definitions = doc.definitions;\n const [{ operation: operationType }] = definitions;\n return operationType;\n }\n /**\n * Executes a GraphQL operation\n *\n * @param options - GraphQL Options\n * @param [additionalHeaders] - headers to merge in after any `libraryConfigHeaders` set in the config\n * @returns An Observable if the query is a subscription query, else a promise of the graphql result.\n */\n graphql(amplify, { query: paramQuery, variables = {}, authMode, authToken }, additionalHeaders, customUserAgentDetails) {\n const query = typeof paramQuery === 'string'\n ? parse(paramQuery)\n : parse(print(paramQuery));\n const [operationDef = {}] = query.definitions.filter(def => def.kind === 'OperationDefinition');\n const { operation: operationType } = operationDef;\n const headers = additionalHeaders || {};\n switch (operationType) {\n case 'query':\n case 'mutation': {\n const abortController = new AbortController();\n let responsePromise;\n if (isAmplifyInstance(amplify)) {\n responsePromise = this._graphql(amplify, { query, variables, authMode }, headers, abortController, customUserAgentDetails, authToken);\n }\n else {\n // NOTE: this wrapper function must be await-able so the Amplify server context manager can\n // destroy the context only after it completes\n const wrapper = async (amplifyInstance) => {\n const result = await this._graphql(amplifyInstance, { query, variables, authMode }, headers, abortController, customUserAgentDetails, authToken);\n return result;\n };\n responsePromise = amplify(wrapper);\n }\n this._api.updateRequestToBeCancellable(responsePromise, abortController);\n return responsePromise;\n }\n case 'subscription':\n return this._graphqlSubscribe(amplify, { query, variables, authMode }, headers, customUserAgentDetails, authToken);\n default:\n throw new Error(`invalid operation type: ${operationType}`);\n }\n }\n async _graphql(amplify, { query, variables, authMode: explicitAuthMode }, additionalHeaders = {}, abortController, customUserAgentDetails, authToken) {\n const { apiKey, region, endpoint: appSyncGraphqlEndpoint, customEndpoint, customEndpointRegion, defaultAuthMode, } = resolveConfig(amplify);\n const initialAuthMode = explicitAuthMode || defaultAuthMode || 'iam';\n // identityPool is an alias for iam. TODO: remove 'iam' in v7\n const authMode = initialAuthMode === 'identityPool' ? 'iam' : initialAuthMode;\n /**\n * Retrieve library options from Amplify configuration.\n * `customHeaders` here are from the Amplify configuration options,\n * and are for non-AppSync endpoints only. These are *not* the same as\n * `additionalHeaders`, which are custom headers that are either 1)\n * included when configuring the API client or 2) passed along with\n * individual requests.\n */\n const { headers: customHeaders, withCredentials } = resolveLibraryOptions(amplify);\n /**\n * Client or request-specific custom headers that may or may not be\n * returned by a function:\n */\n let additionalCustomHeaders;\n if (typeof additionalHeaders === 'function') {\n const requestOptions = {\n method: 'POST',\n url: new AmplifyUrl(customEndpoint || appSyncGraphqlEndpoint || '').toString(),\n queryString: print(query),\n };\n additionalCustomHeaders = await additionalHeaders(requestOptions);\n }\n else {\n additionalCustomHeaders = additionalHeaders;\n }\n // if an authorization header is set, have the explicit authToken take precedence\n if (authToken) {\n additionalCustomHeaders = {\n ...additionalCustomHeaders,\n Authorization: authToken,\n };\n }\n const authHeaders = await headerBasedAuth(amplify, authMode, apiKey, additionalCustomHeaders);\n const headers = {\n ...(!customEndpoint && authHeaders),\n /**\n * Custom endpoint headers.\n * If there is both a custom endpoint and custom region present, we get the headers.\n * If there is a custom endpoint but no region, we return an empty object.\n * If neither are present, we return an empty object.\n */\n ...((customEndpoint && (customEndpointRegion ? authHeaders : {})) || {}),\n // Custom headers included in Amplify configuration options:\n ...(customHeaders &&\n (await customHeaders({\n query: print(query),\n variables,\n }))),\n // Custom headers from individual requests or API client configuration:\n ...additionalCustomHeaders,\n // User agent headers:\n ...(!customEndpoint && {\n [USER_AGENT_HEADER]: getAmplifyUserAgent(customUserAgentDetails),\n }),\n };\n const body = {\n query: print(query),\n variables: variables || null,\n };\n let signingServiceInfo;\n /**\n * We do not send the signing service info to the REST API under the\n * following conditions (i.e. it will not sign the request):\n * - there is a custom endpoint but no region\n * - the auth mode is `none`, or `apiKey`\n * - the auth mode is a type other than the types listed below\n */\n if ((customEndpoint && !customEndpointRegion) ||\n (authMode !== 'oidc' &&\n authMode !== 'userPool' &&\n authMode !== 'iam' &&\n authMode !== 'lambda')) {\n signingServiceInfo = undefined;\n }\n else {\n signingServiceInfo = {\n service: !customEndpointRegion ? 'appsync' : 'execute-api',\n region: !customEndpointRegion ? region : customEndpointRegion,\n };\n }\n const endpoint = customEndpoint || appSyncGraphqlEndpoint;\n if (!endpoint) {\n throw createGraphQLResultWithError(new GraphQLApiError(NO_ENDPOINT));\n }\n let response;\n try {\n // \t// // See the inline doc of the REST `post()` API for possible errors to be thrown.\n // \t// // As these errors are catastrophic they should be caught and handled by GraphQL\n // \t// // API consumers.\n const { body: responseBody } = await this._api.post(amplify, {\n url: new AmplifyUrl(endpoint),\n options: {\n headers,\n body,\n signingServiceInfo,\n withCredentials,\n },\n abortController,\n });\n response = await responseBody.json();\n }\n catch (error) {\n if (this.isCancelError(error)) {\n throw error;\n }\n response = createGraphQLResultWithError(error);\n }\n if (isGraphQLResponseWithErrors(response)) {\n throw repackageUnauthorizedError(response);\n }\n return response;\n }\n /**\n * Checks to see if an error thrown is from an api request cancellation\n * @param {any} error - Any error\n * @return {boolean} - A boolean indicating if the error was from an api request cancellation\n */\n isCancelError(error) {\n return this._api.isCancelErrorREST(error);\n }\n /**\n * Cancels an inflight request. Only applicable for graphql queries and mutations\n * @param {any} request - request to cancel\n * @returns - A boolean indicating if the request was cancelled\n */\n cancel(request, message) {\n return this._api.cancelREST(request, message);\n }\n _graphqlSubscribe(amplify, { query, variables, authMode: explicitAuthMode }, additionalHeaders = {}, customUserAgentDetails, authToken) {\n const config = resolveConfig(amplify);\n const initialAuthMode = explicitAuthMode || config?.defaultAuthMode || 'iam';\n // identityPool is an alias for iam. TODO: remove 'iam' in v7\n const authMode = initialAuthMode === 'identityPool' ? 'iam' : initialAuthMode;\n /**\n * Retrieve library options from Amplify configuration.\n * `libraryConfigHeaders` are from the Amplify configuration options,\n * and will not be overwritten by other custom headers. These are *not*\n * the same as `additionalHeaders`, which are custom headers that are\n * either 1)included when configuring the API client or 2) passed along\n * with individual requests.\n */\n const { headers: libraryConfigHeaders } = resolveLibraryOptions(amplify);\n return this.appSyncRealTime\n .subscribe({\n query: print(query),\n variables,\n appSyncGraphqlEndpoint: config?.endpoint,\n region: config?.region,\n authenticationType: authMode,\n apiKey: config?.apiKey,\n additionalHeaders,\n authToken,\n libraryConfigHeaders,\n }, customUserAgentDetails)\n .pipe(catchError(e => {\n if (e.errors) {\n throw repackageUnauthorizedError(e);\n }\n throw e;\n }));\n }\n}\nconst InternalGraphQLAPI = new InternalGraphQLAPIClass();\n\nexport { InternalGraphQLAPI, InternalGraphQLAPIClass };\n//# sourceMappingURL=InternalGraphQLAPI.mjs.map\n","/**\n * GraphQL.js provides a reference implementation for the GraphQL specification\n * but is also a useful utility for operating on GraphQL files and building\n * sophisticated tools.\n *\n * This primary module exports a general purpose function for fulfilling all\n * steps of the GraphQL specification in a single operation, but also includes\n * utilities for every part of the GraphQL specification:\n *\n * - Parsing the GraphQL language.\n * - Building a GraphQL type schema.\n * - Validating a GraphQL request against a type schema.\n * - Executing a GraphQL request against a type schema.\n *\n * This also includes utility functions for operating on GraphQL types and\n * GraphQL documents to facilitate building tools.\n *\n * You may also import from each sub-directory directly. For example, the\n * following two import statements are equivalent:\n *\n * import { parse } from 'graphql';\n * import { parse } from 'graphql/language';\n */\n// The GraphQL.js version info.\nexport { version, versionInfo } from \"./version.mjs\"; // The primary entry point into fulfilling a GraphQL request.\n\nexport { graphql, graphqlSync } from \"./graphql.mjs\"; // Create and operate on GraphQL type definitions and schema.\n\nexport { // Definitions\nGraphQLSchema, GraphQLDirective, GraphQLScalarType, GraphQLObjectType, GraphQLInterfaceType, GraphQLUnionType, GraphQLEnumType, GraphQLInputObjectType, GraphQLList, GraphQLNonNull // Standard GraphQL Scalars\n, specifiedScalarTypes, GraphQLInt, GraphQLFloat, GraphQLString, GraphQLBoolean, GraphQLID // Built-in Directives defined by the Spec\n, specifiedDirectives, GraphQLIncludeDirective, GraphQLSkipDirective, GraphQLDeprecatedDirective, GraphQLSpecifiedByDirective // \"Enum\" of Type Kinds\n, TypeKind // Constant Deprecation Reason\n, DEFAULT_DEPRECATION_REASON // GraphQL Types for introspection.\n, introspectionTypes, __Schema, __Directive, __DirectiveLocation, __Type, __Field, __InputValue, __EnumValue, __TypeKind // Meta-field definitions.\n, SchemaMetaFieldDef, TypeMetaFieldDef, TypeNameMetaFieldDef // Predicates\n, isSchema, isDirective, isType, isScalarType, isObjectType, isInterfaceType, isUnionType, isEnumType, isInputObjectType, isListType, isNonNullType, isInputType, isOutputType, isLeafType, isCompositeType, isAbstractType, isWrappingType, isNullableType, isNamedType, isRequiredArgument, isRequiredInputField, isSpecifiedScalarType, isIntrospectionType, isSpecifiedDirective // Assertions\n, assertSchema, assertDirective, assertType, assertScalarType, assertObjectType, assertInterfaceType, assertUnionType, assertEnumType, assertInputObjectType, assertListType, assertNonNullType, assertInputType, assertOutputType, assertLeafType, assertCompositeType, assertAbstractType, assertWrappingType, assertNullableType, assertNamedType // Un-modifiers\n, getNullableType, getNamedType // Validate GraphQL schema.\n, validateSchema, assertValidSchema } from \"./type/index.mjs\";\n// Parse and operate on GraphQL language source files.\nexport { Token, Source, Location, getLocation // Print source location\n, printLocation, printSourceLocation // Lex\n, Lexer, TokenKind // Parse\n, parse, parseValue, parseType // Print\n, print // Visit\n, visit, visitInParallel, getVisitFn, BREAK, Kind, DirectiveLocation // Predicates\n, isDefinitionNode, isExecutableDefinitionNode, isSelectionNode, isValueNode, isTypeNode, isTypeSystemDefinitionNode, isTypeDefinitionNode, isTypeSystemExtensionNode, isTypeExtensionNode } from \"./language/index.mjs\";\n// Execute GraphQL queries.\nexport { execute, executeSync, defaultFieldResolver, defaultTypeResolver, responsePathAsArray, getDirectiveValues } from \"./execution/index.mjs\";\nexport { subscribe, createSourceEventStream } from \"./subscription/index.mjs\";\n// Validate GraphQL documents.\nexport { validate, ValidationContext // All validation rules in the GraphQL Specification.\n, specifiedRules // Individual validation rules.\n, ExecutableDefinitionsRule, FieldsOnCorrectTypeRule, FragmentsOnCompositeTypesRule, KnownArgumentNamesRule, KnownDirectivesRule, KnownFragmentNamesRule, KnownTypeNamesRule, LoneAnonymousOperationRule, NoFragmentCyclesRule, NoUndefinedVariablesRule, NoUnusedFragmentsRule, NoUnusedVariablesRule, OverlappingFieldsCanBeMergedRule, PossibleFragmentSpreadsRule, ProvidedRequiredArgumentsRule, ScalarLeafsRule, SingleFieldSubscriptionsRule, UniqueArgumentNamesRule, UniqueDirectivesPerLocationRule, UniqueFragmentNamesRule, UniqueInputFieldNamesRule, UniqueOperationNamesRule, UniqueVariableNamesRule, ValuesOfCorrectTypeRule, VariablesAreInputTypesRule, VariablesInAllowedPositionRule // SDL-specific validation rules\n, LoneSchemaDefinitionRule, UniqueOperationTypesRule, UniqueTypeNamesRule, UniqueEnumValueNamesRule, UniqueFieldDefinitionNamesRule, UniqueDirectiveNamesRule, PossibleTypeExtensionsRule // Custom validation rules\n, NoDeprecatedCustomRule, NoSchemaIntrospectionCustomRule } from \"./validation/index.mjs\";\n// Create, format, and print GraphQL errors.\nexport { GraphQLError, syntaxError, locatedError, printError, formatError } from \"./error/index.mjs\";\n// Utilities for operating on GraphQL type schema and parsed sources.\nexport { // Produce the GraphQL query recommended for a full schema introspection.\n// Accepts optional IntrospectionOptions.\ngetIntrospectionQuery // Gets the target Operation from a Document.\n, getOperationAST // Gets the Type for the target Operation AST.\n, getOperationRootType // Convert a GraphQLSchema to an IntrospectionQuery.\n, introspectionFromSchema // Build a GraphQLSchema from an introspection result.\n, buildClientSchema // Build a GraphQLSchema from a parsed GraphQL Schema language AST.\n, buildASTSchema // Build a GraphQLSchema from a GraphQL schema language document.\n, buildSchema // @deprecated: Get the description from a schema AST node and supports legacy\n// syntax for specifying descriptions - will be removed in v16.\n, getDescription // Extends an existing GraphQLSchema from a parsed GraphQL Schema\n// language AST.\n, extendSchema // Sort a GraphQLSchema.\n, lexicographicSortSchema // Print a GraphQLSchema to GraphQL Schema language.\n, printSchema // Print a GraphQLType to GraphQL Schema language.\n, printType // Prints the built-in introspection schema in the Schema Language\n// format.\n, printIntrospectionSchema // Create a GraphQLType from a GraphQL language AST.\n, typeFromAST // Create a JavaScript value from a GraphQL language AST with a Type.\n, valueFromAST // Create a JavaScript value from a GraphQL language AST without a Type.\n, valueFromASTUntyped // Create a GraphQL language AST from a JavaScript value.\n, astFromValue // A helper to use within recursive-descent visitors which need to be aware of\n// the GraphQL type system.\n, TypeInfo, visitWithTypeInfo // Coerces a JavaScript value to a GraphQL type, or produces errors.\n, coerceInputValue // Concatenates multiple AST together.\n, concatAST // Separates an AST into an AST per Operation.\n, separateOperations // Strips characters that are not significant to the validity or execution\n// of a GraphQL document.\n, stripIgnoredCharacters // Comparators for types\n, isEqualType, isTypeSubTypeOf, doTypesOverlap // Asserts a string is a valid GraphQL name.\n, assertValidName // Determine if a string is a valid GraphQL name.\n, isValidNameError // Compares two GraphQLSchemas and detects breaking changes.\n, BreakingChangeType, DangerousChangeType, findBreakingChanges, findDangerousChanges // @deprecated: Report all deprecated usage within a GraphQL document.\n, findDeprecatedUsages } from \"./utilities/index.mjs\";\n","/**\n * Note: This file is autogenerated using \"resources/gen-version.js\" script and\n * automatically updated by \"npm version\" command.\n */\n\n/**\n * A string containing the version of the GraphQL.js library\n */\nexport var version = '15.8.0';\n/**\n * An object containing the components of the GraphQL.js version string\n */\n\nexport var versionInfo = Object.freeze({\n major: 15,\n minor: 8,\n patch: 0,\n preReleaseTag: null\n});\n","import isPromise from \"./jsutils/isPromise.mjs\";\nimport { parse } from \"./language/parser.mjs\";\nimport { validate } from \"./validation/validate.mjs\";\nimport { validateSchema } from \"./type/validate.mjs\";\nimport { execute } from \"./execution/execute.mjs\";\n/**\n * This is the primary entry point function for fulfilling GraphQL operations\n * by parsing, validating, and executing a GraphQL document along side a\n * GraphQL schema.\n *\n * More sophisticated GraphQL servers, such as those which persist queries,\n * may wish to separate the validation and execution phases to a static time\n * tooling step, and a server runtime step.\n *\n * Accepts either an object with named arguments, or individual arguments:\n *\n * schema:\n * The GraphQL type system to use when validating and executing a query.\n * source:\n * A GraphQL language formatted string representing the requested operation.\n * rootValue:\n * The value provided as the first argument to resolver functions on the top\n * level type (e.g. the query object type).\n * contextValue:\n * The context value is provided as an argument to resolver functions after\n * field arguments. It is used to pass shared information useful at any point\n * during executing this query, for example the currently logged in user and\n * connections to databases or other services.\n * variableValues:\n * A mapping of variable name to runtime value to use for all variables\n * defined in the requestString.\n * operationName:\n * The name of the operation to use if requestString contains multiple\n * possible operations. Can be omitted if requestString contains only\n * one operation.\n * fieldResolver:\n * A resolver function to use when one is not provided by the schema.\n * If not provided, the default field resolver is used (which looks for a\n * value or method on the source value with the field's name).\n * typeResolver:\n * A type resolver function to use when none is provided by the schema.\n * If not provided, the default type resolver is used (which looks for a\n * `__typename` field or alternatively calls the `isTypeOf` method).\n */\n\nexport function graphql(argsOrSchema, source, rootValue, contextValue, variableValues, operationName, fieldResolver, typeResolver) {\n var _arguments = arguments;\n\n /* eslint-enable no-redeclare */\n // Always return a Promise for a consistent API.\n return new Promise(function (resolve) {\n return resolve( // Extract arguments from object args if provided.\n _arguments.length === 1 ? graphqlImpl(argsOrSchema) : graphqlImpl({\n schema: argsOrSchema,\n source: source,\n rootValue: rootValue,\n contextValue: contextValue,\n variableValues: variableValues,\n operationName: operationName,\n fieldResolver: fieldResolver,\n typeResolver: typeResolver\n }));\n });\n}\n/**\n * The graphqlSync function also fulfills GraphQL operations by parsing,\n * validating, and executing a GraphQL document along side a GraphQL schema.\n * However, it guarantees to complete synchronously (or throw an error) assuming\n * that all field resolvers are also synchronous.\n */\n\nexport function graphqlSync(argsOrSchema, source, rootValue, contextValue, variableValues, operationName, fieldResolver, typeResolver) {\n /* eslint-enable no-redeclare */\n // Extract arguments from object args if provided.\n var result = arguments.length === 1 ? graphqlImpl(argsOrSchema) : graphqlImpl({\n schema: argsOrSchema,\n source: source,\n rootValue: rootValue,\n contextValue: contextValue,\n variableValues: variableValues,\n operationName: operationName,\n fieldResolver: fieldResolver,\n typeResolver: typeResolver\n }); // Assert that the execution was synchronous.\n\n if (isPromise(result)) {\n throw new Error('GraphQL execution failed to complete synchronously.');\n }\n\n return result;\n}\n\nfunction graphqlImpl(args) {\n var schema = args.schema,\n source = args.source,\n rootValue = args.rootValue,\n contextValue = args.contextValue,\n variableValues = args.variableValues,\n operationName = args.operationName,\n fieldResolver = args.fieldResolver,\n typeResolver = args.typeResolver; // Validate Schema\n\n var schemaValidationErrors = validateSchema(schema);\n\n if (schemaValidationErrors.length > 0) {\n return {\n errors: schemaValidationErrors\n };\n } // Parse\n\n\n var document;\n\n try {\n document = parse(source);\n } catch (syntaxError) {\n return {\n errors: [syntaxError]\n };\n } // Validate\n\n\n var validationErrors = validate(schema, document);\n\n if (validationErrors.length > 0) {\n return {\n errors: validationErrors\n };\n } // Execute\n\n\n return execute({\n schema: schema,\n document: document,\n rootValue: rootValue,\n contextValue: contextValue,\n variableValues: variableValues,\n operationName: operationName,\n fieldResolver: fieldResolver,\n typeResolver: typeResolver\n });\n}\n","/**\n * Returns true if the value acts like a Promise, i.e. has a \"then\" function,\n * otherwise returns false.\n */\n// eslint-disable-next-line no-redeclare\nexport default function isPromise(value) {\n return typeof (value === null || value === void 0 ? void 0 : value.then) === 'function';\n}\n","import { syntaxError } from \"../error/syntaxError.mjs\";\nimport { Kind } from \"./kinds.mjs\";\nimport { Location } from \"./ast.mjs\";\nimport { TokenKind } from \"./tokenKind.mjs\";\nimport { Source, isSource } from \"./source.mjs\";\nimport { DirectiveLocation } from \"./directiveLocation.mjs\";\nimport { Lexer, isPunctuatorTokenKind } from \"./lexer.mjs\";\n/**\n * Configuration options to control parser behavior\n */\n\n/**\n * Given a GraphQL source, parses it into a Document.\n * Throws GraphQLError if a syntax error is encountered.\n */\nexport function parse(source, options) {\n var parser = new Parser(source, options);\n return parser.parseDocument();\n}\n/**\n * Given a string containing a GraphQL value (ex. `[42]`), parse the AST for\n * that value.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Values directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: valueFromAST().\n */\n\nexport function parseValue(source, options) {\n var parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n var value = parser.parseValueLiteral(false);\n parser.expectToken(TokenKind.EOF);\n return value;\n}\n/**\n * Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for\n * that type.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Types directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: typeFromAST().\n */\n\nexport function parseType(source, options) {\n var parser = new Parser(source, options);\n parser.expectToken(TokenKind.SOF);\n var type = parser.parseTypeReference();\n parser.expectToken(TokenKind.EOF);\n return type;\n}\n/**\n * This class is exported only to assist people in implementing their own parsers\n * without duplicating too much code and should be used only as last resort for cases\n * such as experimental syntax or if certain features could not be contributed upstream.\n *\n * It is still part of the internal API and is versioned, so any changes to it are never\n * considered breaking changes. If you still need to support multiple versions of the\n * library, please use the `versionInfo` variable for version detection.\n *\n * @internal\n */\n\nexport var Parser = /*#__PURE__*/function () {\n function Parser(source, options) {\n var sourceObj = isSource(source) ? source : new Source(source);\n this._lexer = new Lexer(sourceObj);\n this._options = options;\n }\n /**\n * Converts a name lex token into a name parse node.\n */\n\n\n var _proto = Parser.prototype;\n\n _proto.parseName = function parseName() {\n var token = this.expectToken(TokenKind.NAME);\n return {\n kind: Kind.NAME,\n value: token.value,\n loc: this.loc(token)\n };\n } // Implements the parsing rules in the Document section.\n\n /**\n * Document : Definition+\n */\n ;\n\n _proto.parseDocument = function parseDocument() {\n var start = this._lexer.token;\n return {\n kind: Kind.DOCUMENT,\n definitions: this.many(TokenKind.SOF, this.parseDefinition, TokenKind.EOF),\n loc: this.loc(start)\n };\n }\n /**\n * Definition :\n * - ExecutableDefinition\n * - TypeSystemDefinition\n * - TypeSystemExtension\n *\n * ExecutableDefinition :\n * - OperationDefinition\n * - FragmentDefinition\n */\n ;\n\n _proto.parseDefinition = function parseDefinition() {\n if (this.peek(TokenKind.NAME)) {\n switch (this._lexer.token.value) {\n case 'query':\n case 'mutation':\n case 'subscription':\n return this.parseOperationDefinition();\n\n case 'fragment':\n return this.parseFragmentDefinition();\n\n case 'schema':\n case 'scalar':\n case 'type':\n case 'interface':\n case 'union':\n case 'enum':\n case 'input':\n case 'directive':\n return this.parseTypeSystemDefinition();\n\n case 'extend':\n return this.parseTypeSystemExtension();\n }\n } else if (this.peek(TokenKind.BRACE_L)) {\n return this.parseOperationDefinition();\n } else if (this.peekDescription()) {\n return this.parseTypeSystemDefinition();\n }\n\n throw this.unexpected();\n } // Implements the parsing rules in the Operations section.\n\n /**\n * OperationDefinition :\n * - SelectionSet\n * - OperationType Name? VariableDefinitions? Directives? SelectionSet\n */\n ;\n\n _proto.parseOperationDefinition = function parseOperationDefinition() {\n var start = this._lexer.token;\n\n if (this.peek(TokenKind.BRACE_L)) {\n return {\n kind: Kind.OPERATION_DEFINITION,\n operation: 'query',\n name: undefined,\n variableDefinitions: [],\n directives: [],\n selectionSet: this.parseSelectionSet(),\n loc: this.loc(start)\n };\n }\n\n var operation = this.parseOperationType();\n var name;\n\n if (this.peek(TokenKind.NAME)) {\n name = this.parseName();\n }\n\n return {\n kind: Kind.OPERATION_DEFINITION,\n operation: operation,\n name: name,\n variableDefinitions: this.parseVariableDefinitions(),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n loc: this.loc(start)\n };\n }\n /**\n * OperationType : one of query mutation subscription\n */\n ;\n\n _proto.parseOperationType = function parseOperationType() {\n var operationToken = this.expectToken(TokenKind.NAME);\n\n switch (operationToken.value) {\n case 'query':\n return 'query';\n\n case 'mutation':\n return 'mutation';\n\n case 'subscription':\n return 'subscription';\n }\n\n throw this.unexpected(operationToken);\n }\n /**\n * VariableDefinitions : ( VariableDefinition+ )\n */\n ;\n\n _proto.parseVariableDefinitions = function parseVariableDefinitions() {\n return this.optionalMany(TokenKind.PAREN_L, this.parseVariableDefinition, TokenKind.PAREN_R);\n }\n /**\n * VariableDefinition : Variable : Type DefaultValue? Directives[Const]?\n */\n ;\n\n _proto.parseVariableDefinition = function parseVariableDefinition() {\n var start = this._lexer.token;\n return {\n kind: Kind.VARIABLE_DEFINITION,\n variable: this.parseVariable(),\n type: (this.expectToken(TokenKind.COLON), this.parseTypeReference()),\n defaultValue: this.expectOptionalToken(TokenKind.EQUALS) ? this.parseValueLiteral(true) : undefined,\n directives: this.parseDirectives(true),\n loc: this.loc(start)\n };\n }\n /**\n * Variable : $ Name\n */\n ;\n\n _proto.parseVariable = function parseVariable() {\n var start = this._lexer.token;\n this.expectToken(TokenKind.DOLLAR);\n return {\n kind: Kind.VARIABLE,\n name: this.parseName(),\n loc: this.loc(start)\n };\n }\n /**\n * SelectionSet : { Selection+ }\n */\n ;\n\n _proto.parseSelectionSet = function parseSelectionSet() {\n var start = this._lexer.token;\n return {\n kind: Kind.SELECTION_SET,\n selections: this.many(TokenKind.BRACE_L, this.parseSelection, TokenKind.BRACE_R),\n loc: this.loc(start)\n };\n }\n /**\n * Selection :\n * - Field\n * - FragmentSpread\n * - InlineFragment\n */\n ;\n\n _proto.parseSelection = function parseSelection() {\n return this.peek(TokenKind.SPREAD) ? this.parseFragment() : this.parseField();\n }\n /**\n * Field : Alias? Name Arguments? Directives? SelectionSet?\n *\n * Alias : Name :\n */\n ;\n\n _proto.parseField = function parseField() {\n var start = this._lexer.token;\n var nameOrAlias = this.parseName();\n var alias;\n var name;\n\n if (this.expectOptionalToken(TokenKind.COLON)) {\n alias = nameOrAlias;\n name = this.parseName();\n } else {\n name = nameOrAlias;\n }\n\n return {\n kind: Kind.FIELD,\n alias: alias,\n name: name,\n arguments: this.parseArguments(false),\n directives: this.parseDirectives(false),\n selectionSet: this.peek(TokenKind.BRACE_L) ? this.parseSelectionSet() : undefined,\n loc: this.loc(start)\n };\n }\n /**\n * Arguments[Const] : ( Argument[?Const]+ )\n */\n ;\n\n _proto.parseArguments = function parseArguments(isConst) {\n var item = isConst ? this.parseConstArgument : this.parseArgument;\n return this.optionalMany(TokenKind.PAREN_L, item, TokenKind.PAREN_R);\n }\n /**\n * Argument[Const] : Name : Value[?Const]\n */\n ;\n\n _proto.parseArgument = function parseArgument() {\n var start = this._lexer.token;\n var name = this.parseName();\n this.expectToken(TokenKind.COLON);\n return {\n kind: Kind.ARGUMENT,\n name: name,\n value: this.parseValueLiteral(false),\n loc: this.loc(start)\n };\n };\n\n _proto.parseConstArgument = function parseConstArgument() {\n var start = this._lexer.token;\n return {\n kind: Kind.ARGUMENT,\n name: this.parseName(),\n value: (this.expectToken(TokenKind.COLON), this.parseValueLiteral(true)),\n loc: this.loc(start)\n };\n } // Implements the parsing rules in the Fragments section.\n\n /**\n * Corresponds to both FragmentSpread and InlineFragment in the spec.\n *\n * FragmentSpread : ... FragmentName Directives?\n *\n * InlineFragment : ... TypeCondition? Directives? SelectionSet\n */\n ;\n\n _proto.parseFragment = function parseFragment() {\n var start = this._lexer.token;\n this.expectToken(TokenKind.SPREAD);\n var hasTypeCondition = this.expectOptionalKeyword('on');\n\n if (!hasTypeCondition && this.peek(TokenKind.NAME)) {\n return {\n kind: Kind.FRAGMENT_SPREAD,\n name: this.parseFragmentName(),\n directives: this.parseDirectives(false),\n loc: this.loc(start)\n };\n }\n\n return {\n kind: Kind.INLINE_FRAGMENT,\n typeCondition: hasTypeCondition ? this.parseNamedType() : undefined,\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n loc: this.loc(start)\n };\n }\n /**\n * FragmentDefinition :\n * - fragment FragmentName on TypeCondition Directives? SelectionSet\n *\n * TypeCondition : NamedType\n */\n ;\n\n _proto.parseFragmentDefinition = function parseFragmentDefinition() {\n var _this$_options;\n\n var start = this._lexer.token;\n this.expectKeyword('fragment'); // Experimental support for defining variables within fragments changes\n // the grammar of FragmentDefinition:\n // - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet\n\n if (((_this$_options = this._options) === null || _this$_options === void 0 ? void 0 : _this$_options.experimentalFragmentVariables) === true) {\n return {\n kind: Kind.FRAGMENT_DEFINITION,\n name: this.parseFragmentName(),\n variableDefinitions: this.parseVariableDefinitions(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n loc: this.loc(start)\n };\n }\n\n return {\n kind: Kind.FRAGMENT_DEFINITION,\n name: this.parseFragmentName(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n loc: this.loc(start)\n };\n }\n /**\n * FragmentName : Name but not `on`\n */\n ;\n\n _proto.parseFragmentName = function parseFragmentName() {\n if (this._lexer.token.value === 'on') {\n throw this.unexpected();\n }\n\n return this.parseName();\n } // Implements the parsing rules in the Values section.\n\n /**\n * Value[Const] :\n * - [~Const] Variable\n * - IntValue\n * - FloatValue\n * - StringValue\n * - BooleanValue\n * - NullValue\n * - EnumValue\n * - ListValue[?Const]\n * - ObjectValue[?Const]\n *\n * BooleanValue : one of `true` `false`\n *\n * NullValue : `null`\n *\n * EnumValue : Name but not `true`, `false` or `null`\n */\n ;\n\n _proto.parseValueLiteral = function parseValueLiteral(isConst) {\n var token = this._lexer.token;\n\n switch (token.kind) {\n case TokenKind.BRACKET_L:\n return this.parseList(isConst);\n\n case TokenKind.BRACE_L:\n return this.parseObject(isConst);\n\n case TokenKind.INT:\n this._lexer.advance();\n\n return {\n kind: Kind.INT,\n value: token.value,\n loc: this.loc(token)\n };\n\n case TokenKind.FLOAT:\n this._lexer.advance();\n\n return {\n kind: Kind.FLOAT,\n value: token.value,\n loc: this.loc(token)\n };\n\n case TokenKind.STRING:\n case TokenKind.BLOCK_STRING:\n return this.parseStringLiteral();\n\n case TokenKind.NAME:\n this._lexer.advance();\n\n switch (token.value) {\n case 'true':\n return {\n kind: Kind.BOOLEAN,\n value: true,\n loc: this.loc(token)\n };\n\n case 'false':\n return {\n kind: Kind.BOOLEAN,\n value: false,\n loc: this.loc(token)\n };\n\n case 'null':\n return {\n kind: Kind.NULL,\n loc: this.loc(token)\n };\n\n default:\n return {\n kind: Kind.ENUM,\n value: token.value,\n loc: this.loc(token)\n };\n }\n\n case TokenKind.DOLLAR:\n if (!isConst) {\n return this.parseVariable();\n }\n\n break;\n }\n\n throw this.unexpected();\n };\n\n _proto.parseStringLiteral = function parseStringLiteral() {\n var token = this._lexer.token;\n\n this._lexer.advance();\n\n return {\n kind: Kind.STRING,\n value: token.value,\n block: token.kind === TokenKind.BLOCK_STRING,\n loc: this.loc(token)\n };\n }\n /**\n * ListValue[Const] :\n * - [ ]\n * - [ Value[?Const]+ ]\n */\n ;\n\n _proto.parseList = function parseList(isConst) {\n var _this = this;\n\n var start = this._lexer.token;\n\n var item = function item() {\n return _this.parseValueLiteral(isConst);\n };\n\n return {\n kind: Kind.LIST,\n values: this.any(TokenKind.BRACKET_L, item, TokenKind.BRACKET_R),\n loc: this.loc(start)\n };\n }\n /**\n * ObjectValue[Const] :\n * - { }\n * - { ObjectField[?Const]+ }\n */\n ;\n\n _proto.parseObject = function parseObject(isConst) {\n var _this2 = this;\n\n var start = this._lexer.token;\n\n var item = function item() {\n return _this2.parseObjectField(isConst);\n };\n\n return {\n kind: Kind.OBJECT,\n fields: this.any(TokenKind.BRACE_L, item, TokenKind.BRACE_R),\n loc: this.loc(start)\n };\n }\n /**\n * ObjectField[Const] : Name : Value[?Const]\n */\n ;\n\n _proto.parseObjectField = function parseObjectField(isConst) {\n var start = this._lexer.token;\n var name = this.parseName();\n this.expectToken(TokenKind.COLON);\n return {\n kind: Kind.OBJECT_FIELD,\n name: name,\n value: this.parseValueLiteral(isConst),\n loc: this.loc(start)\n };\n } // Implements the parsing rules in the Directives section.\n\n /**\n * Directives[Const] : Directive[?Const]+\n */\n ;\n\n _proto.parseDirectives = function parseDirectives(isConst) {\n var directives = [];\n\n while (this.peek(TokenKind.AT)) {\n directives.push(this.parseDirective(isConst));\n }\n\n return directives;\n }\n /**\n * Directive[Const] : @ Name Arguments[?Const]?\n */\n ;\n\n _proto.parseDirective = function parseDirective(isConst) {\n var start = this._lexer.token;\n this.expectToken(TokenKind.AT);\n return {\n kind: Kind.DIRECTIVE,\n name: this.parseName(),\n arguments: this.parseArguments(isConst),\n loc: this.loc(start)\n };\n } // Implements the parsing rules in the Types section.\n\n /**\n * Type :\n * - NamedType\n * - ListType\n * - NonNullType\n */\n ;\n\n _proto.parseTypeReference = function parseTypeReference() {\n var start = this._lexer.token;\n var type;\n\n if (this.expectOptionalToken(TokenKind.BRACKET_L)) {\n type = this.parseTypeReference();\n this.expectToken(TokenKind.BRACKET_R);\n type = {\n kind: Kind.LIST_TYPE,\n type: type,\n loc: this.loc(start)\n };\n } else {\n type = this.parseNamedType();\n }\n\n if (this.expectOptionalToken(TokenKind.BANG)) {\n return {\n kind: Kind.NON_NULL_TYPE,\n type: type,\n loc: this.loc(start)\n };\n }\n\n return type;\n }\n /**\n * NamedType : Name\n */\n ;\n\n _proto.parseNamedType = function parseNamedType() {\n var start = this._lexer.token;\n return {\n kind: Kind.NAMED_TYPE,\n name: this.parseName(),\n loc: this.loc(start)\n };\n } // Implements the parsing rules in the Type Definition section.\n\n /**\n * TypeSystemDefinition :\n * - SchemaDefinition\n * - TypeDefinition\n * - DirectiveDefinition\n *\n * TypeDefinition :\n * - ScalarTypeDefinition\n * - ObjectTypeDefinition\n * - InterfaceTypeDefinition\n * - UnionTypeDefinition\n * - EnumTypeDefinition\n * - InputObjectTypeDefinition\n */\n ;\n\n _proto.parseTypeSystemDefinition = function parseTypeSystemDefinition() {\n // Many definitions begin with a description and require a lookahead.\n var keywordToken = this.peekDescription() ? this._lexer.lookahead() : this._lexer.token;\n\n if (keywordToken.kind === TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaDefinition();\n\n case 'scalar':\n return this.parseScalarTypeDefinition();\n\n case 'type':\n return this.parseObjectTypeDefinition();\n\n case 'interface':\n return this.parseInterfaceTypeDefinition();\n\n case 'union':\n return this.parseUnionTypeDefinition();\n\n case 'enum':\n return this.parseEnumTypeDefinition();\n\n case 'input':\n return this.parseInputObjectTypeDefinition();\n\n case 'directive':\n return this.parseDirectiveDefinition();\n }\n }\n\n throw this.unexpected(keywordToken);\n };\n\n _proto.peekDescription = function peekDescription() {\n return this.peek(TokenKind.STRING) || this.peek(TokenKind.BLOCK_STRING);\n }\n /**\n * Description : StringValue\n */\n ;\n\n _proto.parseDescription = function parseDescription() {\n if (this.peekDescription()) {\n return this.parseStringLiteral();\n }\n }\n /**\n * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }\n */\n ;\n\n _proto.parseSchemaDefinition = function parseSchemaDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('schema');\n var directives = this.parseDirectives(true);\n var operationTypes = this.many(TokenKind.BRACE_L, this.parseOperationTypeDefinition, TokenKind.BRACE_R);\n return {\n kind: Kind.SCHEMA_DEFINITION,\n description: description,\n directives: directives,\n operationTypes: operationTypes,\n loc: this.loc(start)\n };\n }\n /**\n * OperationTypeDefinition : OperationType : NamedType\n */\n ;\n\n _proto.parseOperationTypeDefinition = function parseOperationTypeDefinition() {\n var start = this._lexer.token;\n var operation = this.parseOperationType();\n this.expectToken(TokenKind.COLON);\n var type = this.parseNamedType();\n return {\n kind: Kind.OPERATION_TYPE_DEFINITION,\n operation: operation,\n type: type,\n loc: this.loc(start)\n };\n }\n /**\n * ScalarTypeDefinition : Description? scalar Name Directives[Const]?\n */\n ;\n\n _proto.parseScalarTypeDefinition = function parseScalarTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('scalar');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n return {\n kind: Kind.SCALAR_TYPE_DEFINITION,\n description: description,\n name: name,\n directives: directives,\n loc: this.loc(start)\n };\n }\n /**\n * ObjectTypeDefinition :\n * Description?\n * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?\n */\n ;\n\n _proto.parseObjectTypeDefinition = function parseObjectTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('type');\n var name = this.parseName();\n var interfaces = this.parseImplementsInterfaces();\n var directives = this.parseDirectives(true);\n var fields = this.parseFieldsDefinition();\n return {\n kind: Kind.OBJECT_TYPE_DEFINITION,\n description: description,\n name: name,\n interfaces: interfaces,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * ImplementsInterfaces :\n * - implements `&`? NamedType\n * - ImplementsInterfaces & NamedType\n */\n ;\n\n _proto.parseImplementsInterfaces = function parseImplementsInterfaces() {\n var _this$_options2;\n\n if (!this.expectOptionalKeyword('implements')) {\n return [];\n }\n\n if (((_this$_options2 = this._options) === null || _this$_options2 === void 0 ? void 0 : _this$_options2.allowLegacySDLImplementsInterfaces) === true) {\n var types = []; // Optional leading ampersand\n\n this.expectOptionalToken(TokenKind.AMP);\n\n do {\n types.push(this.parseNamedType());\n } while (this.expectOptionalToken(TokenKind.AMP) || this.peek(TokenKind.NAME));\n\n return types;\n }\n\n return this.delimitedMany(TokenKind.AMP, this.parseNamedType);\n }\n /**\n * FieldsDefinition : { FieldDefinition+ }\n */\n ;\n\n _proto.parseFieldsDefinition = function parseFieldsDefinition() {\n var _this$_options3;\n\n // Legacy support for the SDL?\n if (((_this$_options3 = this._options) === null || _this$_options3 === void 0 ? void 0 : _this$_options3.allowLegacySDLEmptyFields) === true && this.peek(TokenKind.BRACE_L) && this._lexer.lookahead().kind === TokenKind.BRACE_R) {\n this._lexer.advance();\n\n this._lexer.advance();\n\n return [];\n }\n\n return this.optionalMany(TokenKind.BRACE_L, this.parseFieldDefinition, TokenKind.BRACE_R);\n }\n /**\n * FieldDefinition :\n * - Description? Name ArgumentsDefinition? : Type Directives[Const]?\n */\n ;\n\n _proto.parseFieldDefinition = function parseFieldDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n var name = this.parseName();\n var args = this.parseArgumentDefs();\n this.expectToken(TokenKind.COLON);\n var type = this.parseTypeReference();\n var directives = this.parseDirectives(true);\n return {\n kind: Kind.FIELD_DEFINITION,\n description: description,\n name: name,\n arguments: args,\n type: type,\n directives: directives,\n loc: this.loc(start)\n };\n }\n /**\n * ArgumentsDefinition : ( InputValueDefinition+ )\n */\n ;\n\n _proto.parseArgumentDefs = function parseArgumentDefs() {\n return this.optionalMany(TokenKind.PAREN_L, this.parseInputValueDef, TokenKind.PAREN_R);\n }\n /**\n * InputValueDefinition :\n * - Description? Name : Type DefaultValue? Directives[Const]?\n */\n ;\n\n _proto.parseInputValueDef = function parseInputValueDef() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n var name = this.parseName();\n this.expectToken(TokenKind.COLON);\n var type = this.parseTypeReference();\n var defaultValue;\n\n if (this.expectOptionalToken(TokenKind.EQUALS)) {\n defaultValue = this.parseValueLiteral(true);\n }\n\n var directives = this.parseDirectives(true);\n return {\n kind: Kind.INPUT_VALUE_DEFINITION,\n description: description,\n name: name,\n type: type,\n defaultValue: defaultValue,\n directives: directives,\n loc: this.loc(start)\n };\n }\n /**\n * InterfaceTypeDefinition :\n * - Description? interface Name Directives[Const]? FieldsDefinition?\n */\n ;\n\n _proto.parseInterfaceTypeDefinition = function parseInterfaceTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('interface');\n var name = this.parseName();\n var interfaces = this.parseImplementsInterfaces();\n var directives = this.parseDirectives(true);\n var fields = this.parseFieldsDefinition();\n return {\n kind: Kind.INTERFACE_TYPE_DEFINITION,\n description: description,\n name: name,\n interfaces: interfaces,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * UnionTypeDefinition :\n * - Description? union Name Directives[Const]? UnionMemberTypes?\n */\n ;\n\n _proto.parseUnionTypeDefinition = function parseUnionTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('union');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var types = this.parseUnionMemberTypes();\n return {\n kind: Kind.UNION_TYPE_DEFINITION,\n description: description,\n name: name,\n directives: directives,\n types: types,\n loc: this.loc(start)\n };\n }\n /**\n * UnionMemberTypes :\n * - = `|`? NamedType\n * - UnionMemberTypes | NamedType\n */\n ;\n\n _proto.parseUnionMemberTypes = function parseUnionMemberTypes() {\n return this.expectOptionalToken(TokenKind.EQUALS) ? this.delimitedMany(TokenKind.PIPE, this.parseNamedType) : [];\n }\n /**\n * EnumTypeDefinition :\n * - Description? enum Name Directives[Const]? EnumValuesDefinition?\n */\n ;\n\n _proto.parseEnumTypeDefinition = function parseEnumTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('enum');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var values = this.parseEnumValuesDefinition();\n return {\n kind: Kind.ENUM_TYPE_DEFINITION,\n description: description,\n name: name,\n directives: directives,\n values: values,\n loc: this.loc(start)\n };\n }\n /**\n * EnumValuesDefinition : { EnumValueDefinition+ }\n */\n ;\n\n _proto.parseEnumValuesDefinition = function parseEnumValuesDefinition() {\n return this.optionalMany(TokenKind.BRACE_L, this.parseEnumValueDefinition, TokenKind.BRACE_R);\n }\n /**\n * EnumValueDefinition : Description? EnumValue Directives[Const]?\n *\n * EnumValue : Name\n */\n ;\n\n _proto.parseEnumValueDefinition = function parseEnumValueDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n return {\n kind: Kind.ENUM_VALUE_DEFINITION,\n description: description,\n name: name,\n directives: directives,\n loc: this.loc(start)\n };\n }\n /**\n * InputObjectTypeDefinition :\n * - Description? input Name Directives[Const]? InputFieldsDefinition?\n */\n ;\n\n _proto.parseInputObjectTypeDefinition = function parseInputObjectTypeDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('input');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var fields = this.parseInputFieldsDefinition();\n return {\n kind: Kind.INPUT_OBJECT_TYPE_DEFINITION,\n description: description,\n name: name,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * InputFieldsDefinition : { InputValueDefinition+ }\n */\n ;\n\n _proto.parseInputFieldsDefinition = function parseInputFieldsDefinition() {\n return this.optionalMany(TokenKind.BRACE_L, this.parseInputValueDef, TokenKind.BRACE_R);\n }\n /**\n * TypeSystemExtension :\n * - SchemaExtension\n * - TypeExtension\n *\n * TypeExtension :\n * - ScalarTypeExtension\n * - ObjectTypeExtension\n * - InterfaceTypeExtension\n * - UnionTypeExtension\n * - EnumTypeExtension\n * - InputObjectTypeDefinition\n */\n ;\n\n _proto.parseTypeSystemExtension = function parseTypeSystemExtension() {\n var keywordToken = this._lexer.lookahead();\n\n if (keywordToken.kind === TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaExtension();\n\n case 'scalar':\n return this.parseScalarTypeExtension();\n\n case 'type':\n return this.parseObjectTypeExtension();\n\n case 'interface':\n return this.parseInterfaceTypeExtension();\n\n case 'union':\n return this.parseUnionTypeExtension();\n\n case 'enum':\n return this.parseEnumTypeExtension();\n\n case 'input':\n return this.parseInputObjectTypeExtension();\n }\n }\n\n throw this.unexpected(keywordToken);\n }\n /**\n * SchemaExtension :\n * - extend schema Directives[Const]? { OperationTypeDefinition+ }\n * - extend schema Directives[Const]\n */\n ;\n\n _proto.parseSchemaExtension = function parseSchemaExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('schema');\n var directives = this.parseDirectives(true);\n var operationTypes = this.optionalMany(TokenKind.BRACE_L, this.parseOperationTypeDefinition, TokenKind.BRACE_R);\n\n if (directives.length === 0 && operationTypes.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.SCHEMA_EXTENSION,\n directives: directives,\n operationTypes: operationTypes,\n loc: this.loc(start)\n };\n }\n /**\n * ScalarTypeExtension :\n * - extend scalar Name Directives[Const]\n */\n ;\n\n _proto.parseScalarTypeExtension = function parseScalarTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('scalar');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n\n if (directives.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.SCALAR_TYPE_EXTENSION,\n name: name,\n directives: directives,\n loc: this.loc(start)\n };\n }\n /**\n * ObjectTypeExtension :\n * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend type Name ImplementsInterfaces? Directives[Const]\n * - extend type Name ImplementsInterfaces\n */\n ;\n\n _proto.parseObjectTypeExtension = function parseObjectTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('type');\n var name = this.parseName();\n var interfaces = this.parseImplementsInterfaces();\n var directives = this.parseDirectives(true);\n var fields = this.parseFieldsDefinition();\n\n if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.OBJECT_TYPE_EXTENSION,\n name: name,\n interfaces: interfaces,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * InterfaceTypeExtension :\n * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend interface Name ImplementsInterfaces? Directives[Const]\n * - extend interface Name ImplementsInterfaces\n */\n ;\n\n _proto.parseInterfaceTypeExtension = function parseInterfaceTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('interface');\n var name = this.parseName();\n var interfaces = this.parseImplementsInterfaces();\n var directives = this.parseDirectives(true);\n var fields = this.parseFieldsDefinition();\n\n if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.INTERFACE_TYPE_EXTENSION,\n name: name,\n interfaces: interfaces,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * UnionTypeExtension :\n * - extend union Name Directives[Const]? UnionMemberTypes\n * - extend union Name Directives[Const]\n */\n ;\n\n _proto.parseUnionTypeExtension = function parseUnionTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('union');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var types = this.parseUnionMemberTypes();\n\n if (directives.length === 0 && types.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.UNION_TYPE_EXTENSION,\n name: name,\n directives: directives,\n types: types,\n loc: this.loc(start)\n };\n }\n /**\n * EnumTypeExtension :\n * - extend enum Name Directives[Const]? EnumValuesDefinition\n * - extend enum Name Directives[Const]\n */\n ;\n\n _proto.parseEnumTypeExtension = function parseEnumTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('enum');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var values = this.parseEnumValuesDefinition();\n\n if (directives.length === 0 && values.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.ENUM_TYPE_EXTENSION,\n name: name,\n directives: directives,\n values: values,\n loc: this.loc(start)\n };\n }\n /**\n * InputObjectTypeExtension :\n * - extend input Name Directives[Const]? InputFieldsDefinition\n * - extend input Name Directives[Const]\n */\n ;\n\n _proto.parseInputObjectTypeExtension = function parseInputObjectTypeExtension() {\n var start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('input');\n var name = this.parseName();\n var directives = this.parseDirectives(true);\n var fields = this.parseInputFieldsDefinition();\n\n if (directives.length === 0 && fields.length === 0) {\n throw this.unexpected();\n }\n\n return {\n kind: Kind.INPUT_OBJECT_TYPE_EXTENSION,\n name: name,\n directives: directives,\n fields: fields,\n loc: this.loc(start)\n };\n }\n /**\n * DirectiveDefinition :\n * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations\n */\n ;\n\n _proto.parseDirectiveDefinition = function parseDirectiveDefinition() {\n var start = this._lexer.token;\n var description = this.parseDescription();\n this.expectKeyword('directive');\n this.expectToken(TokenKind.AT);\n var name = this.parseName();\n var args = this.parseArgumentDefs();\n var repeatable = this.expectOptionalKeyword('repeatable');\n this.expectKeyword('on');\n var locations = this.parseDirectiveLocations();\n return {\n kind: Kind.DIRECTIVE_DEFINITION,\n description: description,\n name: name,\n arguments: args,\n repeatable: repeatable,\n locations: locations,\n loc: this.loc(start)\n };\n }\n /**\n * DirectiveLocations :\n * - `|`? DirectiveLocation\n * - DirectiveLocations | DirectiveLocation\n */\n ;\n\n _proto.parseDirectiveLocations = function parseDirectiveLocations() {\n return this.delimitedMany(TokenKind.PIPE, this.parseDirectiveLocation);\n }\n /*\n * DirectiveLocation :\n * - ExecutableDirectiveLocation\n * - TypeSystemDirectiveLocation\n *\n * ExecutableDirectiveLocation : one of\n * `QUERY`\n * `MUTATION`\n * `SUBSCRIPTION`\n * `FIELD`\n * `FRAGMENT_DEFINITION`\n * `FRAGMENT_SPREAD`\n * `INLINE_FRAGMENT`\n *\n * TypeSystemDirectiveLocation : one of\n * `SCHEMA`\n * `SCALAR`\n * `OBJECT`\n * `FIELD_DEFINITION`\n * `ARGUMENT_DEFINITION`\n * `INTERFACE`\n * `UNION`\n * `ENUM`\n * `ENUM_VALUE`\n * `INPUT_OBJECT`\n * `INPUT_FIELD_DEFINITION`\n */\n ;\n\n _proto.parseDirectiveLocation = function parseDirectiveLocation() {\n var start = this._lexer.token;\n var name = this.parseName();\n\n if (DirectiveLocation[name.value] !== undefined) {\n return name;\n }\n\n throw this.unexpected(start);\n } // Core parsing utility functions\n\n /**\n * Returns a location object, used to identify the place in the source that created a given parsed object.\n */\n ;\n\n _proto.loc = function loc(startToken) {\n var _this$_options4;\n\n if (((_this$_options4 = this._options) === null || _this$_options4 === void 0 ? void 0 : _this$_options4.noLocation) !== true) {\n return new Location(startToken, this._lexer.lastToken, this._lexer.source);\n }\n }\n /**\n * Determines if the next token is of a given kind\n */\n ;\n\n _proto.peek = function peek(kind) {\n return this._lexer.token.kind === kind;\n }\n /**\n * If the next token is of the given kind, return that token after advancing the lexer.\n * Otherwise, do not change the parser state and throw an error.\n */\n ;\n\n _proto.expectToken = function expectToken(kind) {\n var token = this._lexer.token;\n\n if (token.kind === kind) {\n this._lexer.advance();\n\n return token;\n }\n\n throw syntaxError(this._lexer.source, token.start, \"Expected \".concat(getTokenKindDesc(kind), \", found \").concat(getTokenDesc(token), \".\"));\n }\n /**\n * If the next token is of the given kind, return that token after advancing the lexer.\n * Otherwise, do not change the parser state and return undefined.\n */\n ;\n\n _proto.expectOptionalToken = function expectOptionalToken(kind) {\n var token = this._lexer.token;\n\n if (token.kind === kind) {\n this._lexer.advance();\n\n return token;\n }\n\n return undefined;\n }\n /**\n * If the next token is a given keyword, advance the lexer.\n * Otherwise, do not change the parser state and throw an error.\n */\n ;\n\n _proto.expectKeyword = function expectKeyword(value) {\n var token = this._lexer.token;\n\n if (token.kind === TokenKind.NAME && token.value === value) {\n this._lexer.advance();\n } else {\n throw syntaxError(this._lexer.source, token.start, \"Expected \\\"\".concat(value, \"\\\", found \").concat(getTokenDesc(token), \".\"));\n }\n }\n /**\n * If the next token is a given keyword, return \"true\" after advancing the lexer.\n * Otherwise, do not change the parser state and return \"false\".\n */\n ;\n\n _proto.expectOptionalKeyword = function expectOptionalKeyword(value) {\n var token = this._lexer.token;\n\n if (token.kind === TokenKind.NAME && token.value === value) {\n this._lexer.advance();\n\n return true;\n }\n\n return false;\n }\n /**\n * Helper function for creating an error when an unexpected lexed token is encountered.\n */\n ;\n\n _proto.unexpected = function unexpected(atToken) {\n var token = atToken !== null && atToken !== void 0 ? atToken : this._lexer.token;\n return syntaxError(this._lexer.source, token.start, \"Unexpected \".concat(getTokenDesc(token), \".\"));\n }\n /**\n * Returns a possibly empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n ;\n\n _proto.any = function any(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n var nodes = [];\n\n while (!this.expectOptionalToken(closeKind)) {\n nodes.push(parseFn.call(this));\n }\n\n return nodes;\n }\n /**\n * Returns a list of parse nodes, determined by the parseFn.\n * It can be empty only if open token is missing otherwise it will always return non-empty list\n * that begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n ;\n\n _proto.optionalMany = function optionalMany(openKind, parseFn, closeKind) {\n if (this.expectOptionalToken(openKind)) {\n var nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n\n return [];\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n ;\n\n _proto.many = function many(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n var nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.\n * Advances the parser to the next lex token after last item in the list.\n */\n ;\n\n _proto.delimitedMany = function delimitedMany(delimiterKind, parseFn) {\n this.expectOptionalToken(delimiterKind);\n var nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (this.expectOptionalToken(delimiterKind));\n\n return nodes;\n };\n\n return Parser;\n}();\n/**\n * A helper function to describe a token as a string for debugging.\n */\n\nfunction getTokenDesc(token) {\n var value = token.value;\n return getTokenKindDesc(token.kind) + (value != null ? \" \\\"\".concat(value, \"\\\"\") : '');\n}\n/**\n * A helper function to describe a token kind as a string for debugging.\n */\n\n\nfunction getTokenKindDesc(kind) {\n return isPunctuatorTokenKind(kind) ? \"\\\"\".concat(kind, \"\\\"\") : kind;\n}\n","import { GraphQLError } from \"./GraphQLError.mjs\";\n/**\n * Produces a GraphQLError representing a syntax error, containing useful\n * descriptive information about the syntax error's position in the source.\n */\n\nexport function syntaxError(source, position, description) {\n return new GraphQLError(\"Syntax Error: \".concat(description), undefined, source, [position]);\n}\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nimport isObjectLike from \"../jsutils/isObjectLike.mjs\";\nimport { SYMBOL_TO_STRING_TAG } from \"../polyfills/symbols.mjs\";\nimport { getLocation } from \"../language/location.mjs\";\nimport { printLocation, printSourceLocation } from \"../language/printLocation.mjs\";\n/**\n * A GraphQLError describes an Error found during the parse, validate, or\n * execute phases of performing a GraphQL operation. In addition to a message\n * and stack trace, it also includes information about the locations in a\n * GraphQL document and/or execution result that correspond to the Error.\n */\n\nexport var GraphQLError = /*#__PURE__*/function (_Error) {\n _inherits(GraphQLError, _Error);\n\n var _super = _createSuper(GraphQLError);\n\n /**\n * An array of { line, column } locations within the source GraphQL document\n * which correspond to this error.\n *\n * Errors during validation often contain multiple locations, for example to\n * point out two things with the same name. Errors during execution include a\n * single location, the field which produced the error.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array describing the JSON-path into the execution response which\n * corresponds to this error. Only included for errors during execution.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array of GraphQL AST Nodes corresponding to this error.\n */\n\n /**\n * The source GraphQL document for the first location of this error.\n *\n * Note that if this Error represents more than one node, the source may not\n * represent nodes after the first node.\n */\n\n /**\n * An array of character offsets within the source GraphQL document\n * which correspond to this error.\n */\n\n /**\n * The original error thrown from a field resolver during execution.\n */\n\n /**\n * Extension fields to add to the formatted error.\n */\n function GraphQLError(message, nodes, source, positions, path, originalError, extensions) {\n var _nodeLocations, _nodeLocations2, _nodeLocations3;\n\n var _this;\n\n _classCallCheck(this, GraphQLError);\n\n _this = _super.call(this, message);\n _this.name = 'GraphQLError';\n _this.originalError = originalError !== null && originalError !== void 0 ? originalError : undefined; // Compute list of blame nodes.\n\n _this.nodes = undefinedIfEmpty(Array.isArray(nodes) ? nodes : nodes ? [nodes] : undefined);\n var nodeLocations = [];\n\n for (var _i2 = 0, _ref3 = (_this$nodes = _this.nodes) !== null && _this$nodes !== void 0 ? _this$nodes : []; _i2 < _ref3.length; _i2++) {\n var _this$nodes;\n\n var _ref4 = _ref3[_i2];\n var loc = _ref4.loc;\n\n if (loc != null) {\n nodeLocations.push(loc);\n }\n }\n\n nodeLocations = undefinedIfEmpty(nodeLocations); // Compute locations in the source for the given nodes/positions.\n\n _this.source = source !== null && source !== void 0 ? source : (_nodeLocations = nodeLocations) === null || _nodeLocations === void 0 ? void 0 : _nodeLocations[0].source;\n _this.positions = positions !== null && positions !== void 0 ? positions : (_nodeLocations2 = nodeLocations) === null || _nodeLocations2 === void 0 ? void 0 : _nodeLocations2.map(function (loc) {\n return loc.start;\n });\n _this.locations = positions && source ? positions.map(function (pos) {\n return getLocation(source, pos);\n }) : (_nodeLocations3 = nodeLocations) === null || _nodeLocations3 === void 0 ? void 0 : _nodeLocations3.map(function (loc) {\n return getLocation(loc.source, loc.start);\n });\n _this.path = path !== null && path !== void 0 ? path : undefined;\n var originalExtensions = originalError === null || originalError === void 0 ? void 0 : originalError.extensions;\n\n if (extensions == null && isObjectLike(originalExtensions)) {\n _this.extensions = _objectSpread({}, originalExtensions);\n } else {\n _this.extensions = extensions !== null && extensions !== void 0 ? extensions : {};\n } // By being enumerable, JSON.stringify will include bellow properties in the resulting output.\n // This ensures that the simplest possible GraphQL service adheres to the spec.\n\n\n Object.defineProperties(_assertThisInitialized(_this), {\n message: {\n enumerable: true\n },\n locations: {\n enumerable: _this.locations != null\n },\n path: {\n enumerable: _this.path != null\n },\n extensions: {\n enumerable: _this.extensions != null && Object.keys(_this.extensions).length > 0\n },\n name: {\n enumerable: false\n },\n nodes: {\n enumerable: false\n },\n source: {\n enumerable: false\n },\n positions: {\n enumerable: false\n },\n originalError: {\n enumerable: false\n }\n }); // Include (non-enumerable) stack trace.\n\n if (originalError !== null && originalError !== void 0 && originalError.stack) {\n Object.defineProperty(_assertThisInitialized(_this), 'stack', {\n value: originalError.stack,\n writable: true,\n configurable: true\n });\n return _possibleConstructorReturn(_this);\n } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\n\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(_assertThisInitialized(_this), GraphQLError);\n } else {\n Object.defineProperty(_assertThisInitialized(_this), 'stack', {\n value: Error().stack,\n writable: true,\n configurable: true\n });\n }\n\n return _this;\n }\n\n _createClass(GraphQLError, [{\n key: \"toString\",\n value: function toString() {\n return printError(this);\n } // FIXME: workaround to not break chai comparisons, should be remove in v16\n // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet\n\n }, {\n key: SYMBOL_TO_STRING_TAG,\n get: function get() {\n return 'Object';\n }\n }]);\n\n return GraphQLError;\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n\nfunction undefinedIfEmpty(array) {\n return array === undefined || array.length === 0 ? undefined : array;\n}\n/**\n * Prints a GraphQLError to a string, representing useful location information\n * about the error's position in the source.\n */\n\n\nexport function printError(error) {\n var output = error.message;\n\n if (error.nodes) {\n for (var _i4 = 0, _error$nodes2 = error.nodes; _i4 < _error$nodes2.length; _i4++) {\n var node = _error$nodes2[_i4];\n\n if (node.loc) {\n output += '\\n\\n' + printLocation(node.loc);\n }\n }\n } else if (error.source && error.locations) {\n for (var _i6 = 0, _error$locations2 = error.locations; _i6 < _error$locations2.length; _i6++) {\n var location = _error$locations2[_i6];\n output += '\\n\\n' + printSourceLocation(error.source, location);\n }\n }\n\n return output;\n}\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/**\n * Return true if `value` is object-like. A value is object-like if it's not\n * `null` and has a `typeof` result of \"object\".\n */\nexport default function isObjectLike(value) {\n return _typeof(value) == 'object' && value !== null;\n}\n","// In ES2015 (or a polyfilled) environment, this will be Symbol.iterator\n// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\nexport var SYMBOL_ITERATOR = typeof Symbol === 'function' && Symbol.iterator != null ? Symbol.iterator : '@@iterator'; // In ES2017 (or a polyfilled) environment, this will be Symbol.asyncIterator\n// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\n\nexport var SYMBOL_ASYNC_ITERATOR = typeof Symbol === 'function' && Symbol.asyncIterator != null ? Symbol.asyncIterator : '@@asyncIterator'; // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\n\nexport var SYMBOL_TO_STRING_TAG = typeof Symbol === 'function' && Symbol.toStringTag != null ? Symbol.toStringTag : '@@toStringTag';\n","/**\n * Represents a location in a Source.\n */\n\n/**\n * Takes a Source and a UTF-8 character offset, and returns the corresponding\n * line and column as a SourceLocation.\n */\nexport function getLocation(source, position) {\n var lineRegexp = /\\r\\n|[\\n\\r]/g;\n var line = 1;\n var column = position + 1;\n var match;\n\n while ((match = lineRegexp.exec(source.body)) && match.index < position) {\n line += 1;\n column = position + 1 - (match.index + match[0].length);\n }\n\n return {\n line: line,\n column: column\n };\n}\n","import { getLocation } from \"./location.mjs\";\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\n\nexport function printLocation(location) {\n return printSourceLocation(location.source, getLocation(location.source, location.start));\n}\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\n\nexport function printSourceLocation(source, sourceLocation) {\n var firstLineColumnOffset = source.locationOffset.column - 1;\n var body = whitespace(firstLineColumnOffset) + source.body;\n var lineIndex = sourceLocation.line - 1;\n var lineOffset = source.locationOffset.line - 1;\n var lineNum = sourceLocation.line + lineOffset;\n var columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0;\n var columnNum = sourceLocation.column + columnOffset;\n var locationStr = \"\".concat(source.name, \":\").concat(lineNum, \":\").concat(columnNum, \"\\n\");\n var lines = body.split(/\\r\\n|[\\n\\r]/g);\n var locationLine = lines[lineIndex]; // Special case for minified documents\n\n if (locationLine.length > 120) {\n var subLineIndex = Math.floor(columnNum / 80);\n var subLineColumnNum = columnNum % 80;\n var subLines = [];\n\n for (var i = 0; i < locationLine.length; i += 80) {\n subLines.push(locationLine.slice(i, i + 80));\n }\n\n return locationStr + printPrefixedLines([[\"\".concat(lineNum), subLines[0]]].concat(subLines.slice(1, subLineIndex + 1).map(function (subLine) {\n return ['', subLine];\n }), [[' ', whitespace(subLineColumnNum - 1) + '^'], ['', subLines[subLineIndex + 1]]]));\n }\n\n return locationStr + printPrefixedLines([// Lines specified like this: [\"prefix\", \"string\"],\n [\"\".concat(lineNum - 1), lines[lineIndex - 1]], [\"\".concat(lineNum), locationLine], ['', whitespace(columnNum - 1) + '^'], [\"\".concat(lineNum + 1), lines[lineIndex + 1]]]);\n}\n\nfunction printPrefixedLines(lines) {\n var existingLines = lines.filter(function (_ref) {\n var _ = _ref[0],\n line = _ref[1];\n return line !== undefined;\n });\n var padLen = Math.max.apply(Math, existingLines.map(function (_ref2) {\n var prefix = _ref2[0];\n return prefix.length;\n }));\n return existingLines.map(function (_ref3) {\n var prefix = _ref3[0],\n line = _ref3[1];\n return leftPad(padLen, prefix) + (line ? ' | ' + line : ' |');\n }).join('\\n');\n}\n\nfunction whitespace(len) {\n return Array(len + 1).join(' ');\n}\n\nfunction leftPad(len, str) {\n return whitespace(len - str.length) + str;\n}\n","/**\n * The set of allowed kind values for AST nodes.\n */\nexport var Kind = Object.freeze({\n // Name\n NAME: 'Name',\n // Document\n DOCUMENT: 'Document',\n OPERATION_DEFINITION: 'OperationDefinition',\n VARIABLE_DEFINITION: 'VariableDefinition',\n SELECTION_SET: 'SelectionSet',\n FIELD: 'Field',\n ARGUMENT: 'Argument',\n // Fragments\n FRAGMENT_SPREAD: 'FragmentSpread',\n INLINE_FRAGMENT: 'InlineFragment',\n FRAGMENT_DEFINITION: 'FragmentDefinition',\n // Values\n VARIABLE: 'Variable',\n INT: 'IntValue',\n FLOAT: 'FloatValue',\n STRING: 'StringValue',\n BOOLEAN: 'BooleanValue',\n NULL: 'NullValue',\n ENUM: 'EnumValue',\n LIST: 'ListValue',\n OBJECT: 'ObjectValue',\n OBJECT_FIELD: 'ObjectField',\n // Directives\n DIRECTIVE: 'Directive',\n // Types\n NAMED_TYPE: 'NamedType',\n LIST_TYPE: 'ListType',\n NON_NULL_TYPE: 'NonNullType',\n // Type System Definitions\n SCHEMA_DEFINITION: 'SchemaDefinition',\n OPERATION_TYPE_DEFINITION: 'OperationTypeDefinition',\n // Type Definitions\n SCALAR_TYPE_DEFINITION: 'ScalarTypeDefinition',\n OBJECT_TYPE_DEFINITION: 'ObjectTypeDefinition',\n FIELD_DEFINITION: 'FieldDefinition',\n INPUT_VALUE_DEFINITION: 'InputValueDefinition',\n INTERFACE_TYPE_DEFINITION: 'InterfaceTypeDefinition',\n UNION_TYPE_DEFINITION: 'UnionTypeDefinition',\n ENUM_TYPE_DEFINITION: 'EnumTypeDefinition',\n ENUM_VALUE_DEFINITION: 'EnumValueDefinition',\n INPUT_OBJECT_TYPE_DEFINITION: 'InputObjectTypeDefinition',\n // Directive Definitions\n DIRECTIVE_DEFINITION: 'DirectiveDefinition',\n // Type System Extensions\n SCHEMA_EXTENSION: 'SchemaExtension',\n // Type Extensions\n SCALAR_TYPE_EXTENSION: 'ScalarTypeExtension',\n OBJECT_TYPE_EXTENSION: 'ObjectTypeExtension',\n INTERFACE_TYPE_EXTENSION: 'InterfaceTypeExtension',\n UNION_TYPE_EXTENSION: 'UnionTypeExtension',\n ENUM_TYPE_EXTENSION: 'EnumTypeExtension',\n INPUT_OBJECT_TYPE_EXTENSION: 'InputObjectTypeExtension'\n});\n/**\n * The enum type representing the possible kind values of AST nodes.\n */\n","import defineInspect from \"../jsutils/defineInspect.mjs\";\n\n/**\n * Contains a range of UTF-8 character offsets and token references that\n * identify the region of the source from which the AST derived.\n */\nexport var Location = /*#__PURE__*/function () {\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The Token at which this Node begins.\n */\n\n /**\n * The Token at which this Node ends.\n */\n\n /**\n * The Source document the AST represents.\n */\n function Location(startToken, endToken, source) {\n this.start = startToken.start;\n this.end = endToken.end;\n this.startToken = startToken;\n this.endToken = endToken;\n this.source = source;\n }\n\n var _proto = Location.prototype;\n\n _proto.toJSON = function toJSON() {\n return {\n start: this.start,\n end: this.end\n };\n };\n\n return Location;\n}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.\n\ndefineInspect(Location);\n/**\n * Represents a range of characters represented by a lexical token\n * within a Source.\n */\n\nexport var Token = /*#__PURE__*/function () {\n /**\n * The kind of Token.\n */\n\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The 1-indexed line number on which this Token appears.\n */\n\n /**\n * The 1-indexed column number at which this Token begins.\n */\n\n /**\n * For non-punctuation tokens, represents the interpreted value of the token.\n */\n\n /**\n * Tokens exist as nodes in a double-linked-list amongst all tokens\n * including ignored tokens. is always the first node and \n * the last.\n */\n function Token(kind, start, end, line, column, prev, value) {\n this.kind = kind;\n this.start = start;\n this.end = end;\n this.line = line;\n this.column = column;\n this.value = value;\n this.prev = prev;\n this.next = null;\n }\n\n var _proto2 = Token.prototype;\n\n _proto2.toJSON = function toJSON() {\n return {\n kind: this.kind,\n value: this.value,\n line: this.line,\n column: this.column\n };\n };\n\n return Token;\n}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.\n\ndefineInspect(Token);\n/**\n * @internal\n */\n\nexport function isNode(maybeNode) {\n return maybeNode != null && typeof maybeNode.kind === 'string';\n}\n/**\n * The list of all possible AST node types.\n */\n","import invariant from \"./invariant.mjs\";\nimport nodejsCustomInspectSymbol from \"./nodejsCustomInspectSymbol.mjs\";\n/**\n * The `defineInspect()` function defines `inspect()` prototype method as alias of `toJSON`\n */\n\nexport default function defineInspect(classObject) {\n var fn = classObject.prototype.toJSON;\n typeof fn === 'function' || invariant(0);\n classObject.prototype.inspect = fn; // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2317')\n\n if (nodejsCustomInspectSymbol) {\n classObject.prototype[nodejsCustomInspectSymbol] = fn;\n }\n}\n","export default function invariant(condition, message) {\n var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js')\n\n if (!booleanCondition) {\n throw new Error(message != null ? message : 'Unexpected invariant triggered.');\n }\n}\n","// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\nvar nodejsCustomInspectSymbol = typeof Symbol === 'function' && typeof Symbol.for === 'function' ? Symbol.for('nodejs.util.inspect.custom') : undefined;\nexport default nodejsCustomInspectSymbol;\n","/**\n * An exported enum describing the different kinds of tokens that the\n * lexer emits.\n */\nexport var TokenKind = Object.freeze({\n SOF: '',\n EOF: '',\n BANG: '!',\n DOLLAR: '$',\n AMP: '&',\n PAREN_L: '(',\n PAREN_R: ')',\n SPREAD: '...',\n COLON: ':',\n EQUALS: '=',\n AT: '@',\n BRACKET_L: '[',\n BRACKET_R: ']',\n BRACE_L: '{',\n PIPE: '|',\n BRACE_R: '}',\n NAME: 'Name',\n INT: 'Int',\n FLOAT: 'Float',\n STRING: 'String',\n BLOCK_STRING: 'BlockString',\n COMMENT: 'Comment'\n});\n/**\n * The enum type representing the token kinds values.\n */\n","function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nimport { SYMBOL_TO_STRING_TAG } from \"../polyfills/symbols.mjs\";\nimport inspect from \"../jsutils/inspect.mjs\";\nimport devAssert from \"../jsutils/devAssert.mjs\";\nimport instanceOf from \"../jsutils/instanceOf.mjs\";\n\n/**\n * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are\n * optional, but they are useful for clients who store GraphQL documents in source files.\n * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might\n * be useful for `name` to be `\"Foo.graphql\"` and location to be `{ line: 40, column: 1 }`.\n * The `line` and `column` properties in `locationOffset` are 1-indexed.\n */\nexport var Source = /*#__PURE__*/function () {\n function Source(body) {\n var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'GraphQL request';\n var locationOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n line: 1,\n column: 1\n };\n typeof body === 'string' || devAssert(0, \"Body must be a string. Received: \".concat(inspect(body), \".\"));\n this.body = body;\n this.name = name;\n this.locationOffset = locationOffset;\n this.locationOffset.line > 0 || devAssert(0, 'line in locationOffset is 1-indexed and must be positive.');\n this.locationOffset.column > 0 || devAssert(0, 'column in locationOffset is 1-indexed and must be positive.');\n } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet\n\n\n _createClass(Source, [{\n key: SYMBOL_TO_STRING_TAG,\n get: function get() {\n return 'Source';\n }\n }]);\n\n return Source;\n}();\n/**\n * Test if the given value is a Source object.\n *\n * @internal\n */\n\n// eslint-disable-next-line no-redeclare\nexport function isSource(source) {\n return instanceOf(source, Source);\n}\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/* eslint-disable flowtype/no-weak-types */\nimport nodejsCustomInspectSymbol from \"./nodejsCustomInspectSymbol.mjs\";\nvar MAX_ARRAY_LENGTH = 10;\nvar MAX_RECURSIVE_DEPTH = 2;\n/**\n * Used to print values in error messages.\n */\n\nexport default function inspect(value) {\n return formatValue(value, []);\n}\n\nfunction formatValue(value, seenValues) {\n switch (_typeof(value)) {\n case 'string':\n return JSON.stringify(value);\n\n case 'function':\n return value.name ? \"[function \".concat(value.name, \"]\") : '[function]';\n\n case 'object':\n if (value === null) {\n return 'null';\n }\n\n return formatObjectValue(value, seenValues);\n\n default:\n return String(value);\n }\n}\n\nfunction formatObjectValue(value, previouslySeenValues) {\n if (previouslySeenValues.indexOf(value) !== -1) {\n return '[Circular]';\n }\n\n var seenValues = [].concat(previouslySeenValues, [value]);\n var customInspectFn = getCustomFn(value);\n\n if (customInspectFn !== undefined) {\n var customValue = customInspectFn.call(value); // check for infinite recursion\n\n if (customValue !== value) {\n return typeof customValue === 'string' ? customValue : formatValue(customValue, seenValues);\n }\n } else if (Array.isArray(value)) {\n return formatArray(value, seenValues);\n }\n\n return formatObject(value, seenValues);\n}\n\nfunction formatObject(object, seenValues) {\n var keys = Object.keys(object);\n\n if (keys.length === 0) {\n return '{}';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[' + getObjectTag(object) + ']';\n }\n\n var properties = keys.map(function (key) {\n var value = formatValue(object[key], seenValues);\n return key + ': ' + value;\n });\n return '{ ' + properties.join(', ') + ' }';\n}\n\nfunction formatArray(array, seenValues) {\n if (array.length === 0) {\n return '[]';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[Array]';\n }\n\n var len = Math.min(MAX_ARRAY_LENGTH, array.length);\n var remaining = array.length - len;\n var items = [];\n\n for (var i = 0; i < len; ++i) {\n items.push(formatValue(array[i], seenValues));\n }\n\n if (remaining === 1) {\n items.push('... 1 more item');\n } else if (remaining > 1) {\n items.push(\"... \".concat(remaining, \" more items\"));\n }\n\n return '[' + items.join(', ') + ']';\n}\n\nfunction getCustomFn(object) {\n var customInspectFn = object[String(nodejsCustomInspectSymbol)];\n\n if (typeof customInspectFn === 'function') {\n return customInspectFn;\n }\n\n if (typeof object.inspect === 'function') {\n return object.inspect;\n }\n}\n\nfunction getObjectTag(object) {\n var tag = Object.prototype.toString.call(object).replace(/^\\[object /, '').replace(/]$/, '');\n\n if (tag === 'Object' && typeof object.constructor === 'function') {\n var name = object.constructor.name;\n\n if (typeof name === 'string' && name !== '') {\n return name;\n }\n }\n\n return tag;\n}\n","export default function devAssert(condition, message) {\n var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js')\n\n if (!booleanCondition) {\n throw new Error(message);\n }\n}\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport inspect from \"./inspect.mjs\";\n/**\n * A replacement for instanceof which includes an error warning when multi-realm\n * constructors are detected.\n */\n\n// See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production\n// See: https://webpack.js.org/guides/production/\nexport default process.env.NODE_ENV === 'production' ? // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')\n// eslint-disable-next-line no-shadow\nfunction instanceOf(value, constructor) {\n return value instanceof constructor;\n} : // eslint-disable-next-line no-shadow\nfunction instanceOf(value, constructor) {\n if (value instanceof constructor) {\n return true;\n }\n\n if (_typeof(value) === 'object' && value !== null) {\n var _value$constructor;\n\n var className = constructor.prototype[Symbol.toStringTag];\n var valueClassName = // We still need to support constructor's name to detect conflicts with older versions of this library.\n Symbol.toStringTag in value ? value[Symbol.toStringTag] : (_value$constructor = value.constructor) === null || _value$constructor === void 0 ? void 0 : _value$constructor.name;\n\n if (className === valueClassName) {\n var stringifiedValue = inspect(value);\n throw new Error(\"Cannot use \".concat(className, \" \\\"\").concat(stringifiedValue, \"\\\" from another module or realm.\\n\\nEnsure that there is only one instance of \\\"graphql\\\" in the node_modules\\ndirectory. If different versions of \\\"graphql\\\" are the dependencies of other\\nrelied on modules, use \\\"resolutions\\\" to ensure only one version is installed.\\n\\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\\n\\nDuplicate \\\"graphql\\\" modules cannot be used at the same time since different\\nversions may have different capabilities and behavior. The data from one\\nversion used in the function from another could produce confusing and\\nspurious results.\"));\n }\n }\n\n return false;\n};\n","/**\n * The set of allowed directive location values.\n */\nexport var DirectiveLocation = Object.freeze({\n // Request Definitions\n QUERY: 'QUERY',\n MUTATION: 'MUTATION',\n SUBSCRIPTION: 'SUBSCRIPTION',\n FIELD: 'FIELD',\n FRAGMENT_DEFINITION: 'FRAGMENT_DEFINITION',\n FRAGMENT_SPREAD: 'FRAGMENT_SPREAD',\n INLINE_FRAGMENT: 'INLINE_FRAGMENT',\n VARIABLE_DEFINITION: 'VARIABLE_DEFINITION',\n // Type System Definitions\n SCHEMA: 'SCHEMA',\n SCALAR: 'SCALAR',\n OBJECT: 'OBJECT',\n FIELD_DEFINITION: 'FIELD_DEFINITION',\n ARGUMENT_DEFINITION: 'ARGUMENT_DEFINITION',\n INTERFACE: 'INTERFACE',\n UNION: 'UNION',\n ENUM: 'ENUM',\n ENUM_VALUE: 'ENUM_VALUE',\n INPUT_OBJECT: 'INPUT_OBJECT',\n INPUT_FIELD_DEFINITION: 'INPUT_FIELD_DEFINITION'\n});\n/**\n * The enum type representing the directive location values.\n */\n","import { syntaxError } from \"../error/syntaxError.mjs\";\nimport { Token } from \"./ast.mjs\";\nimport { TokenKind } from \"./tokenKind.mjs\";\nimport { dedentBlockStringValue } from \"./blockString.mjs\";\n/**\n * Given a Source object, creates a Lexer for that source.\n * A Lexer is a stateful stream generator in that every time\n * it is advanced, it returns the next token in the Source. Assuming the\n * source lexes, the final Token emitted by the lexer will be of kind\n * EOF, after which the lexer will repeatedly return the same EOF token\n * whenever called.\n */\n\nexport var Lexer = /*#__PURE__*/function () {\n /**\n * The previously focused non-ignored token.\n */\n\n /**\n * The currently focused non-ignored token.\n */\n\n /**\n * The (1-indexed) line containing the current token.\n */\n\n /**\n * The character offset at which the current line begins.\n */\n function Lexer(source) {\n var startOfFileToken = new Token(TokenKind.SOF, 0, 0, 0, 0, null);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }\n /**\n * Advances the token stream to the next non-ignored token.\n */\n\n\n var _proto = Lexer.prototype;\n\n _proto.advance = function advance() {\n this.lastToken = this.token;\n var token = this.token = this.lookahead();\n return token;\n }\n /**\n * Looks ahead and returns the next non-ignored token, but does not change\n * the state of Lexer.\n */\n ;\n\n _proto.lookahead = function lookahead() {\n var token = this.token;\n\n if (token.kind !== TokenKind.EOF) {\n do {\n var _token$next;\n\n // Note: next is only mutable during parsing, so we cast to allow this.\n token = (_token$next = token.next) !== null && _token$next !== void 0 ? _token$next : token.next = readToken(this, token);\n } while (token.kind === TokenKind.COMMENT);\n }\n\n return token;\n };\n\n return Lexer;\n}();\n/**\n * @internal\n */\n\nexport function isPunctuatorTokenKind(kind) {\n return kind === TokenKind.BANG || kind === TokenKind.DOLLAR || kind === TokenKind.AMP || kind === TokenKind.PAREN_L || kind === TokenKind.PAREN_R || kind === TokenKind.SPREAD || kind === TokenKind.COLON || kind === TokenKind.EQUALS || kind === TokenKind.AT || kind === TokenKind.BRACKET_L || kind === TokenKind.BRACKET_R || kind === TokenKind.BRACE_L || kind === TokenKind.PIPE || kind === TokenKind.BRACE_R;\n}\n\nfunction printCharCode(code) {\n return (// NaN/undefined represents access beyond the end of the file.\n isNaN(code) ? TokenKind.EOF : // Trust JSON for ASCII.\n code < 0x007f ? JSON.stringify(String.fromCharCode(code)) : // Otherwise print the escaped form.\n \"\\\"\\\\u\".concat(('00' + code.toString(16).toUpperCase()).slice(-4), \"\\\"\")\n );\n}\n/**\n * Gets the next token from the source starting at the given position.\n *\n * This skips over whitespace until it finds the next lexable token, then lexes\n * punctuators immediately or calls the appropriate helper function for more\n * complicated tokens.\n */\n\n\nfunction readToken(lexer, prev) {\n var source = lexer.source;\n var body = source.body;\n var bodyLength = body.length;\n var pos = prev.end;\n\n while (pos < bodyLength) {\n var code = body.charCodeAt(pos);\n var _line = lexer.line;\n\n var _col = 1 + pos - lexer.lineStart; // SourceCharacter\n\n\n switch (code) {\n case 0xfeff: // \n\n case 9: // \\t\n\n case 32: // \n\n case 44:\n // ,\n ++pos;\n continue;\n\n case 10:\n // \\n\n ++pos;\n ++lexer.line;\n lexer.lineStart = pos;\n continue;\n\n case 13:\n // \\r\n if (body.charCodeAt(pos + 1) === 10) {\n pos += 2;\n } else {\n ++pos;\n }\n\n ++lexer.line;\n lexer.lineStart = pos;\n continue;\n\n case 33:\n // !\n return new Token(TokenKind.BANG, pos, pos + 1, _line, _col, prev);\n\n case 35:\n // #\n return readComment(source, pos, _line, _col, prev);\n\n case 36:\n // $\n return new Token(TokenKind.DOLLAR, pos, pos + 1, _line, _col, prev);\n\n case 38:\n // &\n return new Token(TokenKind.AMP, pos, pos + 1, _line, _col, prev);\n\n case 40:\n // (\n return new Token(TokenKind.PAREN_L, pos, pos + 1, _line, _col, prev);\n\n case 41:\n // )\n return new Token(TokenKind.PAREN_R, pos, pos + 1, _line, _col, prev);\n\n case 46:\n // .\n if (body.charCodeAt(pos + 1) === 46 && body.charCodeAt(pos + 2) === 46) {\n return new Token(TokenKind.SPREAD, pos, pos + 3, _line, _col, prev);\n }\n\n break;\n\n case 58:\n // :\n return new Token(TokenKind.COLON, pos, pos + 1, _line, _col, prev);\n\n case 61:\n // =\n return new Token(TokenKind.EQUALS, pos, pos + 1, _line, _col, prev);\n\n case 64:\n // @\n return new Token(TokenKind.AT, pos, pos + 1, _line, _col, prev);\n\n case 91:\n // [\n return new Token(TokenKind.BRACKET_L, pos, pos + 1, _line, _col, prev);\n\n case 93:\n // ]\n return new Token(TokenKind.BRACKET_R, pos, pos + 1, _line, _col, prev);\n\n case 123:\n // {\n return new Token(TokenKind.BRACE_L, pos, pos + 1, _line, _col, prev);\n\n case 124:\n // |\n return new Token(TokenKind.PIPE, pos, pos + 1, _line, _col, prev);\n\n case 125:\n // }\n return new Token(TokenKind.BRACE_R, pos, pos + 1, _line, _col, prev);\n\n case 34:\n // \"\n if (body.charCodeAt(pos + 1) === 34 && body.charCodeAt(pos + 2) === 34) {\n return readBlockString(source, pos, _line, _col, prev, lexer);\n }\n\n return readString(source, pos, _line, _col, prev);\n\n case 45: // -\n\n case 48: // 0\n\n case 49: // 1\n\n case 50: // 2\n\n case 51: // 3\n\n case 52: // 4\n\n case 53: // 5\n\n case 54: // 6\n\n case 55: // 7\n\n case 56: // 8\n\n case 57:\n // 9\n return readNumber(source, pos, code, _line, _col, prev);\n\n case 65: // A\n\n case 66: // B\n\n case 67: // C\n\n case 68: // D\n\n case 69: // E\n\n case 70: // F\n\n case 71: // G\n\n case 72: // H\n\n case 73: // I\n\n case 74: // J\n\n case 75: // K\n\n case 76: // L\n\n case 77: // M\n\n case 78: // N\n\n case 79: // O\n\n case 80: // P\n\n case 81: // Q\n\n case 82: // R\n\n case 83: // S\n\n case 84: // T\n\n case 85: // U\n\n case 86: // V\n\n case 87: // W\n\n case 88: // X\n\n case 89: // Y\n\n case 90: // Z\n\n case 95: // _\n\n case 97: // a\n\n case 98: // b\n\n case 99: // c\n\n case 100: // d\n\n case 101: // e\n\n case 102: // f\n\n case 103: // g\n\n case 104: // h\n\n case 105: // i\n\n case 106: // j\n\n case 107: // k\n\n case 108: // l\n\n case 109: // m\n\n case 110: // n\n\n case 111: // o\n\n case 112: // p\n\n case 113: // q\n\n case 114: // r\n\n case 115: // s\n\n case 116: // t\n\n case 117: // u\n\n case 118: // v\n\n case 119: // w\n\n case 120: // x\n\n case 121: // y\n\n case 122:\n // z\n return readName(source, pos, _line, _col, prev);\n }\n\n throw syntaxError(source, pos, unexpectedCharacterMessage(code));\n }\n\n var line = lexer.line;\n var col = 1 + pos - lexer.lineStart;\n return new Token(TokenKind.EOF, bodyLength, bodyLength, line, col, prev);\n}\n/**\n * Report a message that an unexpected character was encountered.\n */\n\n\nfunction unexpectedCharacterMessage(code) {\n if (code < 0x0020 && code !== 0x0009 && code !== 0x000a && code !== 0x000d) {\n return \"Cannot contain the invalid character \".concat(printCharCode(code), \".\");\n }\n\n if (code === 39) {\n // '\n return 'Unexpected single quote character (\\'), did you mean to use a double quote (\")?';\n }\n\n return \"Cannot parse the unexpected character \".concat(printCharCode(code), \".\");\n}\n/**\n * Reads a comment token from the source file.\n *\n * #[\\u0009\\u0020-\\uFFFF]*\n */\n\n\nfunction readComment(source, start, line, col, prev) {\n var body = source.body;\n var code;\n var position = start;\n\n do {\n code = body.charCodeAt(++position);\n } while (!isNaN(code) && ( // SourceCharacter but not LineTerminator\n code > 0x001f || code === 0x0009));\n\n return new Token(TokenKind.COMMENT, start, position, line, col, prev, body.slice(start + 1, position));\n}\n/**\n * Reads a number token from the source file, either a float\n * or an int depending on whether a decimal point appears.\n *\n * Int: -?(0|[1-9][0-9]*)\n * Float: -?(0|[1-9][0-9]*)(\\.[0-9]+)?((E|e)(+|-)?[0-9]+)?\n */\n\n\nfunction readNumber(source, start, firstCode, line, col, prev) {\n var body = source.body;\n var code = firstCode;\n var position = start;\n var isFloat = false;\n\n if (code === 45) {\n // -\n code = body.charCodeAt(++position);\n }\n\n if (code === 48) {\n // 0\n code = body.charCodeAt(++position);\n\n if (code >= 48 && code <= 57) {\n throw syntaxError(source, position, \"Invalid number, unexpected digit after 0: \".concat(printCharCode(code), \".\"));\n }\n } else {\n position = readDigits(source, position, code);\n code = body.charCodeAt(position);\n }\n\n if (code === 46) {\n // .\n isFloat = true;\n code = body.charCodeAt(++position);\n position = readDigits(source, position, code);\n code = body.charCodeAt(position);\n }\n\n if (code === 69 || code === 101) {\n // E e\n isFloat = true;\n code = body.charCodeAt(++position);\n\n if (code === 43 || code === 45) {\n // + -\n code = body.charCodeAt(++position);\n }\n\n position = readDigits(source, position, code);\n code = body.charCodeAt(position);\n } // Numbers cannot be followed by . or NameStart\n\n\n if (code === 46 || isNameStart(code)) {\n throw syntaxError(source, position, \"Invalid number, expected digit but got: \".concat(printCharCode(code), \".\"));\n }\n\n return new Token(isFloat ? TokenKind.FLOAT : TokenKind.INT, start, position, line, col, prev, body.slice(start, position));\n}\n/**\n * Returns the new position in the source after reading digits.\n */\n\n\nfunction readDigits(source, start, firstCode) {\n var body = source.body;\n var position = start;\n var code = firstCode;\n\n if (code >= 48 && code <= 57) {\n // 0 - 9\n do {\n code = body.charCodeAt(++position);\n } while (code >= 48 && code <= 57); // 0 - 9\n\n\n return position;\n }\n\n throw syntaxError(source, position, \"Invalid number, expected digit but got: \".concat(printCharCode(code), \".\"));\n}\n/**\n * Reads a string token from the source file.\n *\n * \"([^\"\\\\\\u000A\\u000D]|(\\\\(u[0-9a-fA-F]{4}|[\"\\\\/bfnrt])))*\"\n */\n\n\nfunction readString(source, start, line, col, prev) {\n var body = source.body;\n var position = start + 1;\n var chunkStart = position;\n var code = 0;\n var value = '';\n\n while (position < body.length && !isNaN(code = body.charCodeAt(position)) && // not LineTerminator\n code !== 0x000a && code !== 0x000d) {\n // Closing Quote (\")\n if (code === 34) {\n value += body.slice(chunkStart, position);\n return new Token(TokenKind.STRING, start, position + 1, line, col, prev, value);\n } // SourceCharacter\n\n\n if (code < 0x0020 && code !== 0x0009) {\n throw syntaxError(source, position, \"Invalid character within String: \".concat(printCharCode(code), \".\"));\n }\n\n ++position;\n\n if (code === 92) {\n // \\\n value += body.slice(chunkStart, position - 1);\n code = body.charCodeAt(position);\n\n switch (code) {\n case 34:\n value += '\"';\n break;\n\n case 47:\n value += '/';\n break;\n\n case 92:\n value += '\\\\';\n break;\n\n case 98:\n value += '\\b';\n break;\n\n case 102:\n value += '\\f';\n break;\n\n case 110:\n value += '\\n';\n break;\n\n case 114:\n value += '\\r';\n break;\n\n case 116:\n value += '\\t';\n break;\n\n case 117:\n {\n // uXXXX\n var charCode = uniCharCode(body.charCodeAt(position + 1), body.charCodeAt(position + 2), body.charCodeAt(position + 3), body.charCodeAt(position + 4));\n\n if (charCode < 0) {\n var invalidSequence = body.slice(position + 1, position + 5);\n throw syntaxError(source, position, \"Invalid character escape sequence: \\\\u\".concat(invalidSequence, \".\"));\n }\n\n value += String.fromCharCode(charCode);\n position += 4;\n break;\n }\n\n default:\n throw syntaxError(source, position, \"Invalid character escape sequence: \\\\\".concat(String.fromCharCode(code), \".\"));\n }\n\n ++position;\n chunkStart = position;\n }\n }\n\n throw syntaxError(source, position, 'Unterminated string.');\n}\n/**\n * Reads a block string token from the source file.\n *\n * \"\"\"(\"?\"?(\\\\\"\"\"|\\\\(?!=\"\"\")|[^\"\\\\]))*\"\"\"\n */\n\n\nfunction readBlockString(source, start, line, col, prev, lexer) {\n var body = source.body;\n var position = start + 3;\n var chunkStart = position;\n var code = 0;\n var rawValue = '';\n\n while (position < body.length && !isNaN(code = body.charCodeAt(position))) {\n // Closing Triple-Quote (\"\"\")\n if (code === 34 && body.charCodeAt(position + 1) === 34 && body.charCodeAt(position + 2) === 34) {\n rawValue += body.slice(chunkStart, position);\n return new Token(TokenKind.BLOCK_STRING, start, position + 3, line, col, prev, dedentBlockStringValue(rawValue));\n } // SourceCharacter\n\n\n if (code < 0x0020 && code !== 0x0009 && code !== 0x000a && code !== 0x000d) {\n throw syntaxError(source, position, \"Invalid character within String: \".concat(printCharCode(code), \".\"));\n }\n\n if (code === 10) {\n // new line\n ++position;\n ++lexer.line;\n lexer.lineStart = position;\n } else if (code === 13) {\n // carriage return\n if (body.charCodeAt(position + 1) === 10) {\n position += 2;\n } else {\n ++position;\n }\n\n ++lexer.line;\n lexer.lineStart = position;\n } else if ( // Escape Triple-Quote (\\\"\"\")\n code === 92 && body.charCodeAt(position + 1) === 34 && body.charCodeAt(position + 2) === 34 && body.charCodeAt(position + 3) === 34) {\n rawValue += body.slice(chunkStart, position) + '\"\"\"';\n position += 4;\n chunkStart = position;\n } else {\n ++position;\n }\n }\n\n throw syntaxError(source, position, 'Unterminated string.');\n}\n/**\n * Converts four hexadecimal chars to the integer that the\n * string represents. For example, uniCharCode('0','0','0','f')\n * will return 15, and uniCharCode('0','0','f','f') returns 255.\n *\n * Returns a negative number on error, if a char was invalid.\n *\n * This is implemented by noting that char2hex() returns -1 on error,\n * which means the result of ORing the char2hex() will also be negative.\n */\n\n\nfunction uniCharCode(a, b, c, d) {\n return char2hex(a) << 12 | char2hex(b) << 8 | char2hex(c) << 4 | char2hex(d);\n}\n/**\n * Converts a hex character to its integer value.\n * '0' becomes 0, '9' becomes 9\n * 'A' becomes 10, 'F' becomes 15\n * 'a' becomes 10, 'f' becomes 15\n *\n * Returns -1 on error.\n */\n\n\nfunction char2hex(a) {\n return a >= 48 && a <= 57 ? a - 48 // 0-9\n : a >= 65 && a <= 70 ? a - 55 // A-F\n : a >= 97 && a <= 102 ? a - 87 // a-f\n : -1;\n}\n/**\n * Reads an alphanumeric + underscore name from the source.\n *\n * [_A-Za-z][_0-9A-Za-z]*\n */\n\n\nfunction readName(source, start, line, col, prev) {\n var body = source.body;\n var bodyLength = body.length;\n var position = start + 1;\n var code = 0;\n\n while (position !== bodyLength && !isNaN(code = body.charCodeAt(position)) && (code === 95 || // _\n code >= 48 && code <= 57 || // 0-9\n code >= 65 && code <= 90 || // A-Z\n code >= 97 && code <= 122) // a-z\n ) {\n ++position;\n }\n\n return new Token(TokenKind.NAME, start, position, line, col, prev, body.slice(start, position));\n} // _ A-Z a-z\n\n\nfunction isNameStart(code) {\n return code === 95 || code >= 65 && code <= 90 || code >= 97 && code <= 122;\n}\n","/**\n * Produces the value of a block string from its parsed raw value, similar to\n * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc.\n *\n * This implements the GraphQL spec's BlockStringValue() static algorithm.\n *\n * @internal\n */\nexport function dedentBlockStringValue(rawString) {\n // Expand a block string's raw value into independent lines.\n var lines = rawString.split(/\\r\\n|[\\n\\r]/g); // Remove common indentation from all lines but first.\n\n var commonIndent = getBlockStringIndentation(rawString);\n\n if (commonIndent !== 0) {\n for (var i = 1; i < lines.length; i++) {\n lines[i] = lines[i].slice(commonIndent);\n }\n } // Remove leading and trailing blank lines.\n\n\n var startLine = 0;\n\n while (startLine < lines.length && isBlank(lines[startLine])) {\n ++startLine;\n }\n\n var endLine = lines.length;\n\n while (endLine > startLine && isBlank(lines[endLine - 1])) {\n --endLine;\n } // Return a string of the lines joined with U+000A.\n\n\n return lines.slice(startLine, endLine).join('\\n');\n}\n\nfunction isBlank(str) {\n for (var i = 0; i < str.length; ++i) {\n if (str[i] !== ' ' && str[i] !== '\\t') {\n return false;\n }\n }\n\n return true;\n}\n/**\n * @internal\n */\n\n\nexport function getBlockStringIndentation(value) {\n var _commonIndent;\n\n var isFirstLine = true;\n var isEmptyLine = true;\n var indent = 0;\n var commonIndent = null;\n\n for (var i = 0; i < value.length; ++i) {\n switch (value.charCodeAt(i)) {\n case 13:\n // \\r\n if (value.charCodeAt(i + 1) === 10) {\n ++i; // skip \\r\\n as one symbol\n }\n\n // falls through\n\n case 10:\n // \\n\n isFirstLine = false;\n isEmptyLine = true;\n indent = 0;\n break;\n\n case 9: // \\t\n\n case 32:\n // \n ++indent;\n break;\n\n default:\n if (isEmptyLine && !isFirstLine && (commonIndent === null || indent < commonIndent)) {\n commonIndent = indent;\n }\n\n isEmptyLine = false;\n }\n }\n\n return (_commonIndent = commonIndent) !== null && _commonIndent !== void 0 ? _commonIndent : 0;\n}\n/**\n * Print a block string in the indented block form by adding a leading and\n * trailing blank line. However, if a block string starts with whitespace and is\n * a single-line, adding a leading blank line would strip that whitespace.\n *\n * @internal\n */\n\nexport function printBlockString(value) {\n var indentation = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var preferMultipleLines = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var isSingleLine = value.indexOf('\\n') === -1;\n var hasLeadingSpace = value[0] === ' ' || value[0] === '\\t';\n var hasTrailingQuote = value[value.length - 1] === '\"';\n var hasTrailingSlash = value[value.length - 1] === '\\\\';\n var printAsMultipleLines = !isSingleLine || hasTrailingQuote || hasTrailingSlash || preferMultipleLines;\n var result = ''; // Format a multi-line block quote to account for leading space.\n\n if (printAsMultipleLines && !(isSingleLine && hasLeadingSpace)) {\n result += '\\n' + indentation;\n }\n\n result += indentation ? value.replace(/\\n/g, '\\n' + indentation) : value;\n\n if (printAsMultipleLines) {\n result += '\\n';\n }\n\n return '\"\"\"' + result.replace(/\"\"\"/g, '\\\\\"\"\"') + '\"\"\"';\n}\n","import devAssert from \"../jsutils/devAssert.mjs\";\nimport { GraphQLError } from \"../error/GraphQLError.mjs\";\nimport { visit, visitInParallel } from \"../language/visitor.mjs\";\nimport { assertValidSchema } from \"../type/validate.mjs\";\nimport { TypeInfo, visitWithTypeInfo } from \"../utilities/TypeInfo.mjs\";\nimport { specifiedRules, specifiedSDLRules } from \"./specifiedRules.mjs\";\nimport { SDLValidationContext, ValidationContext } from \"./ValidationContext.mjs\";\n/**\n * Implements the \"Validation\" section of the spec.\n *\n * Validation runs synchronously, returning an array of encountered errors, or\n * an empty array if no errors were encountered and the document is valid.\n *\n * A list of specific validation rules may be provided. If not provided, the\n * default list of rules defined by the GraphQL specification will be used.\n *\n * Each validation rules is a function which returns a visitor\n * (see the language/visitor API). Visitor methods are expected to return\n * GraphQLErrors, or Arrays of GraphQLErrors when invalid.\n *\n * Optionally a custom TypeInfo instance may be provided. If not provided, one\n * will be created from the provided schema.\n */\n\nexport function validate(schema, documentAST) {\n var rules = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : specifiedRules;\n var typeInfo = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : new TypeInfo(schema);\n var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {\n maxErrors: undefined\n };\n documentAST || devAssert(0, 'Must provide document.'); // If the schema used for validation is invalid, throw an error.\n\n assertValidSchema(schema);\n var abortObj = Object.freeze({});\n var errors = [];\n var context = new ValidationContext(schema, documentAST, typeInfo, function (error) {\n if (options.maxErrors != null && errors.length >= options.maxErrors) {\n errors.push(new GraphQLError('Too many validation errors, error limit reached. Validation aborted.'));\n throw abortObj;\n }\n\n errors.push(error);\n }); // This uses a specialized visitor which runs multiple visitors in parallel,\n // while maintaining the visitor skip and break API.\n\n var visitor = visitInParallel(rules.map(function (rule) {\n return rule(context);\n })); // Visit the whole document with each instance of all provided rules.\n\n try {\n visit(documentAST, visitWithTypeInfo(typeInfo, visitor));\n } catch (e) {\n if (e !== abortObj) {\n throw e;\n }\n }\n\n return errors;\n}\n/**\n * @internal\n */\n\nexport function validateSDL(documentAST, schemaToExtend) {\n var rules = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : specifiedSDLRules;\n var errors = [];\n var context = new SDLValidationContext(documentAST, schemaToExtend, function (error) {\n errors.push(error);\n });\n var visitors = rules.map(function (rule) {\n return rule(context);\n });\n visit(documentAST, visitInParallel(visitors));\n return errors;\n}\n/**\n * Utility function which asserts a SDL document is valid by throwing an error\n * if it is invalid.\n *\n * @internal\n */\n\nexport function assertValidSDL(documentAST) {\n var errors = validateSDL(documentAST);\n\n if (errors.length !== 0) {\n throw new Error(errors.map(function (error) {\n return error.message;\n }).join('\\n\\n'));\n }\n}\n/**\n * Utility function which asserts a SDL document is valid by throwing an error\n * if it is invalid.\n *\n * @internal\n */\n\nexport function assertValidSDLExtension(documentAST, schema) {\n var errors = validateSDL(documentAST, schema);\n\n if (errors.length !== 0) {\n throw new Error(errors.map(function (error) {\n return error.message;\n }).join('\\n\\n'));\n }\n}\n","import inspect from \"../jsutils/inspect.mjs\";\nimport { isNode } from \"./ast.mjs\";\n/**\n * A visitor is provided to visit, it contains the collection of\n * relevant functions to be called during the visitor's traversal.\n */\n\nexport var QueryDocumentKeys = {\n Name: [],\n Document: ['definitions'],\n OperationDefinition: ['name', 'variableDefinitions', 'directives', 'selectionSet'],\n VariableDefinition: ['variable', 'type', 'defaultValue', 'directives'],\n Variable: ['name'],\n SelectionSet: ['selections'],\n Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'],\n Argument: ['name', 'value'],\n FragmentSpread: ['name', 'directives'],\n InlineFragment: ['typeCondition', 'directives', 'selectionSet'],\n FragmentDefinition: ['name', // Note: fragment variable definitions are experimental and may be changed\n // or removed in the future.\n 'variableDefinitions', 'typeCondition', 'directives', 'selectionSet'],\n IntValue: [],\n FloatValue: [],\n StringValue: [],\n BooleanValue: [],\n NullValue: [],\n EnumValue: [],\n ListValue: ['values'],\n ObjectValue: ['fields'],\n ObjectField: ['name', 'value'],\n Directive: ['name', 'arguments'],\n NamedType: ['name'],\n ListType: ['type'],\n NonNullType: ['type'],\n SchemaDefinition: ['description', 'directives', 'operationTypes'],\n OperationTypeDefinition: ['type'],\n ScalarTypeDefinition: ['description', 'name', 'directives'],\n ObjectTypeDefinition: ['description', 'name', 'interfaces', 'directives', 'fields'],\n FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'],\n InputValueDefinition: ['description', 'name', 'type', 'defaultValue', 'directives'],\n InterfaceTypeDefinition: ['description', 'name', 'interfaces', 'directives', 'fields'],\n UnionTypeDefinition: ['description', 'name', 'directives', 'types'],\n EnumTypeDefinition: ['description', 'name', 'directives', 'values'],\n EnumValueDefinition: ['description', 'name', 'directives'],\n InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'],\n DirectiveDefinition: ['description', 'name', 'arguments', 'locations'],\n SchemaExtension: ['directives', 'operationTypes'],\n ScalarTypeExtension: ['name', 'directives'],\n ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n UnionTypeExtension: ['name', 'directives', 'types'],\n EnumTypeExtension: ['name', 'directives', 'values'],\n InputObjectTypeExtension: ['name', 'directives', 'fields']\n};\nexport var BREAK = Object.freeze({});\n/**\n * visit() will walk through an AST using a 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 * const editedAST = visit(ast, {\n * enter(node, key, parent, path, ancestors) {\n * // @return\n * // undefined: no action\n * // false: skip visiting this node\n * // visitor.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 * // visitor.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 the\n * visitor API:\n *\n * 1) Named visitors triggered when entering a node of 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\nexport function visit(root, visitor) {\n var visitorKeys = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : QueryDocumentKeys;\n\n /* eslint-disable no-undef-init */\n var stack = undefined;\n var inArray = Array.isArray(root);\n var keys = [root];\n var index = -1;\n var edits = [];\n var node = undefined;\n var key = undefined;\n var parent = undefined;\n var path = [];\n var ancestors = [];\n var newRoot = root;\n /* eslint-enable no-undef-init */\n\n do {\n index++;\n var isLeaving = index === keys.length;\n var isEdited = isLeaving && edits.length !== 0;\n\n if (isLeaving) {\n key = ancestors.length === 0 ? undefined : path[path.length - 1];\n node = parent;\n parent = ancestors.pop();\n\n if (isEdited) {\n if (inArray) {\n node = node.slice();\n } else {\n var clone = {};\n\n for (var _i2 = 0, _Object$keys2 = Object.keys(node); _i2 < _Object$keys2.length; _i2++) {\n var k = _Object$keys2[_i2];\n clone[k] = node[k];\n }\n\n node = clone;\n }\n\n var editOffset = 0;\n\n for (var ii = 0; ii < edits.length; ii++) {\n var editKey = edits[ii][0];\n var editValue = edits[ii][1];\n\n if (inArray) {\n editKey -= editOffset;\n }\n\n if (inArray && editValue === null) {\n node.splice(editKey, 1);\n editOffset++;\n } else {\n node[editKey] = editValue;\n }\n }\n }\n\n index = stack.index;\n keys = stack.keys;\n edits = stack.edits;\n inArray = stack.inArray;\n stack = stack.prev;\n } else {\n key = parent ? inArray ? index : keys[index] : undefined;\n node = parent ? parent[key] : newRoot;\n\n if (node === null || node === undefined) {\n continue;\n }\n\n if (parent) {\n path.push(key);\n }\n }\n\n var result = void 0;\n\n if (!Array.isArray(node)) {\n if (!isNode(node)) {\n throw new Error(\"Invalid AST Node: \".concat(inspect(node), \".\"));\n }\n\n var visitFn = getVisitFn(visitor, node.kind, isLeaving);\n\n if (visitFn) {\n result = visitFn.call(visitor, node, key, parent, path, ancestors);\n\n if (result === BREAK) {\n break;\n }\n\n if (result === false) {\n if (!isLeaving) {\n path.pop();\n continue;\n }\n } else if (result !== undefined) {\n edits.push([key, result]);\n\n if (!isLeaving) {\n if (isNode(result)) {\n node = result;\n } else {\n path.pop();\n continue;\n }\n }\n }\n }\n }\n\n if (result === undefined && isEdited) {\n edits.push([key, node]);\n }\n\n if (isLeaving) {\n path.pop();\n } else {\n var _visitorKeys$node$kin;\n\n stack = {\n inArray: inArray,\n index: index,\n keys: keys,\n edits: edits,\n prev: stack\n };\n inArray = Array.isArray(node);\n keys = inArray ? node : (_visitorKeys$node$kin = visitorKeys[node.kind]) !== null && _visitorKeys$node$kin !== void 0 ? _visitorKeys$node$kin : [];\n index = -1;\n edits = [];\n\n if (parent) {\n ancestors.push(parent);\n }\n\n parent = node;\n }\n } while (stack !== undefined);\n\n if (edits.length !== 0) {\n newRoot = edits[edits.length - 1][1];\n }\n\n return newRoot;\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 */\n\nexport function visitInParallel(visitors) {\n var skipping = new Array(visitors.length);\n return {\n enter: function enter(node) {\n for (var i = 0; i < visitors.length; i++) {\n if (skipping[i] == null) {\n var fn = getVisitFn(visitors[i], node.kind,\n /* isLeaving */\n false);\n\n if (fn) {\n var result = fn.apply(visitors[i], arguments);\n\n if (result === false) {\n skipping[i] = node;\n } else if (result === BREAK) {\n skipping[i] = BREAK;\n } else if (result !== undefined) {\n return result;\n }\n }\n }\n }\n },\n leave: function leave(node) {\n for (var i = 0; i < visitors.length; i++) {\n if (skipping[i] == null) {\n var fn = getVisitFn(visitors[i], node.kind,\n /* isLeaving */\n true);\n\n if (fn) {\n var result = fn.apply(visitors[i], arguments);\n\n if (result === BREAK) {\n skipping[i] = BREAK;\n } else if (result !== undefined && result !== false) {\n return result;\n }\n }\n } else if (skipping[i] === node) {\n skipping[i] = null;\n }\n }\n }\n };\n}\n/**\n * Given a visitor instance, if it is leaving or not, and a node kind, return\n * the function the visitor runtime should call.\n */\n\nexport function getVisitFn(visitor, kind, isLeaving) {\n var kindVisitor = visitor[kind];\n\n if (kindVisitor) {\n if (!isLeaving && typeof kindVisitor === 'function') {\n // { Kind() {} }\n return kindVisitor;\n }\n\n var kindSpecificVisitor = isLeaving ? kindVisitor.leave : kindVisitor.enter;\n\n if (typeof kindSpecificVisitor === 'function') {\n // { Kind: { enter() {}, leave() {} } }\n return kindSpecificVisitor;\n }\n } else {\n var specificVisitor = isLeaving ? visitor.leave : visitor.enter;\n\n if (specificVisitor) {\n if (typeof specificVisitor === 'function') {\n // { enter() {}, leave() {} }\n return specificVisitor;\n }\n\n var specificKindVisitor = specificVisitor[kind];\n\n if (typeof specificKindVisitor === 'function') {\n // { enter: { Kind() {} }, leave: { Kind() {} } }\n return specificKindVisitor;\n }\n }\n }\n}\n","import find from \"../polyfills/find.mjs\";\nimport objectValues from \"../polyfills/objectValues.mjs\";\nimport inspect from \"../jsutils/inspect.mjs\";\nimport { GraphQLError } from \"../error/GraphQLError.mjs\";\nimport { locatedError } from \"../error/locatedError.mjs\";\nimport { isValidNameError } from \"../utilities/assertValidName.mjs\";\nimport { isEqualType, isTypeSubTypeOf } from \"../utilities/typeComparators.mjs\";\nimport { assertSchema } from \"./schema.mjs\";\nimport { isIntrospectionType } from \"./introspection.mjs\";\nimport { isDirective, GraphQLDeprecatedDirective } from \"./directives.mjs\";\nimport { isObjectType, isInterfaceType, isUnionType, isEnumType, isInputObjectType, isNamedType, isNonNullType, isInputType, isOutputType, isRequiredArgument, isRequiredInputField } from \"./definition.mjs\";\n/**\n * Implements the \"Type Validation\" sub-sections of the specification's\n * \"Type System\" section.\n *\n * Validation runs synchronously, returning an array of encountered errors, or\n * an empty array if no errors were encountered and the Schema is valid.\n */\n\nexport function validateSchema(schema) {\n // First check to ensure the provided value is in fact a GraphQLSchema.\n assertSchema(schema); // If this Schema has already been validated, return the previous results.\n\n if (schema.__validationErrors) {\n return schema.__validationErrors;\n } // Validate the schema, producing a list of errors.\n\n\n var context = new SchemaValidationContext(schema);\n validateRootTypes(context);\n validateDirectives(context);\n validateTypes(context); // Persist the results of validation before returning to ensure validation\n // does not run multiple times for this schema.\n\n var errors = context.getErrors();\n schema.__validationErrors = errors;\n return errors;\n}\n/**\n * Utility function which asserts a schema is valid by throwing an error if\n * it is invalid.\n */\n\nexport function assertValidSchema(schema) {\n var errors = validateSchema(schema);\n\n if (errors.length !== 0) {\n throw new Error(errors.map(function (error) {\n return error.message;\n }).join('\\n\\n'));\n }\n}\n\nvar SchemaValidationContext = /*#__PURE__*/function () {\n function SchemaValidationContext(schema) {\n this._errors = [];\n this.schema = schema;\n }\n\n var _proto = SchemaValidationContext.prototype;\n\n _proto.reportError = function reportError(message, nodes) {\n var _nodes = Array.isArray(nodes) ? nodes.filter(Boolean) : nodes;\n\n this.addError(new GraphQLError(message, _nodes));\n };\n\n _proto.addError = function addError(error) {\n this._errors.push(error);\n };\n\n _proto.getErrors = function getErrors() {\n return this._errors;\n };\n\n return SchemaValidationContext;\n}();\n\nfunction validateRootTypes(context) {\n var schema = context.schema;\n var queryType = schema.getQueryType();\n\n if (!queryType) {\n context.reportError('Query root type must be provided.', schema.astNode);\n } else if (!isObjectType(queryType)) {\n var _getOperationTypeNode;\n\n context.reportError(\"Query root type must be Object type, it cannot be \".concat(inspect(queryType), \".\"), (_getOperationTypeNode = getOperationTypeNode(schema, 'query')) !== null && _getOperationTypeNode !== void 0 ? _getOperationTypeNode : queryType.astNode);\n }\n\n var mutationType = schema.getMutationType();\n\n if (mutationType && !isObjectType(mutationType)) {\n var _getOperationTypeNode2;\n\n context.reportError('Mutation root type must be Object type if provided, it cannot be ' + \"\".concat(inspect(mutationType), \".\"), (_getOperationTypeNode2 = getOperationTypeNode(schema, 'mutation')) !== null && _getOperationTypeNode2 !== void 0 ? _getOperationTypeNode2 : mutationType.astNode);\n }\n\n var subscriptionType = schema.getSubscriptionType();\n\n if (subscriptionType && !isObjectType(subscriptionType)) {\n var _getOperationTypeNode3;\n\n context.reportError('Subscription root type must be Object type if provided, it cannot be ' + \"\".concat(inspect(subscriptionType), \".\"), (_getOperationTypeNode3 = getOperationTypeNode(schema, 'subscription')) !== null && _getOperationTypeNode3 !== void 0 ? _getOperationTypeNode3 : subscriptionType.astNode);\n }\n}\n\nfunction getOperationTypeNode(schema, operation) {\n var operationNodes = getAllSubNodes(schema, function (node) {\n return node.operationTypes;\n });\n\n for (var _i2 = 0; _i2 < operationNodes.length; _i2++) {\n var node = operationNodes[_i2];\n\n if (node.operation === operation) {\n return node.type;\n }\n }\n\n return undefined;\n}\n\nfunction validateDirectives(context) {\n for (var _i4 = 0, _context$schema$getDi2 = context.schema.getDirectives(); _i4 < _context$schema$getDi2.length; _i4++) {\n var directive = _context$schema$getDi2[_i4];\n\n // Ensure all directives are in fact GraphQL directives.\n if (!isDirective(directive)) {\n context.reportError(\"Expected directive but got: \".concat(inspect(directive), \".\"), directive === null || directive === void 0 ? void 0 : directive.astNode);\n continue;\n } // Ensure they are named correctly.\n\n\n validateName(context, directive); // TODO: Ensure proper locations.\n // Ensure the arguments are valid.\n\n for (var _i6 = 0, _directive$args2 = directive.args; _i6 < _directive$args2.length; _i6++) {\n var arg = _directive$args2[_i6];\n // Ensure they are named correctly.\n validateName(context, arg); // Ensure the type is an input type.\n\n if (!isInputType(arg.type)) {\n context.reportError(\"The type of @\".concat(directive.name, \"(\").concat(arg.name, \":) must be Input Type \") + \"but got: \".concat(inspect(arg.type), \".\"), arg.astNode);\n }\n\n if (isRequiredArgument(arg) && arg.deprecationReason != null) {\n var _arg$astNode;\n\n context.reportError(\"Required argument @\".concat(directive.name, \"(\").concat(arg.name, \":) cannot be deprecated.\"), [getDeprecatedDirectiveNode(arg.astNode), // istanbul ignore next (TODO need to write coverage tests)\n (_arg$astNode = arg.astNode) === null || _arg$astNode === void 0 ? void 0 : _arg$astNode.type]);\n }\n }\n }\n}\n\nfunction validateName(context, node) {\n // Ensure names are valid, however introspection types opt out.\n var error = isValidNameError(node.name);\n\n if (error) {\n context.addError(locatedError(error, node.astNode));\n }\n}\n\nfunction validateTypes(context) {\n var validateInputObjectCircularRefs = createInputObjectCircularRefsValidator(context);\n var typeMap = context.schema.getTypeMap();\n\n for (var _i8 = 0, _objectValues2 = objectValues(typeMap); _i8 < _objectValues2.length; _i8++) {\n var type = _objectValues2[_i8];\n\n // Ensure all provided types are in fact GraphQL type.\n if (!isNamedType(type)) {\n context.reportError(\"Expected GraphQL named type but got: \".concat(inspect(type), \".\"), type.astNode);\n continue;\n } // Ensure it is named correctly (excluding introspection types).\n\n\n if (!isIntrospectionType(type)) {\n validateName(context, type);\n }\n\n if (isObjectType(type)) {\n // Ensure fields are valid\n validateFields(context, type); // Ensure objects implement the interfaces they claim to.\n\n validateInterfaces(context, type);\n } else if (isInterfaceType(type)) {\n // Ensure fields are valid.\n validateFields(context, type); // Ensure interfaces implement the interfaces they claim to.\n\n validateInterfaces(context, type);\n } else if (isUnionType(type)) {\n // Ensure Unions include valid member types.\n validateUnionMembers(context, type);\n } else if (isEnumType(type)) {\n // Ensure Enums have valid values.\n validateEnumValues(context, type);\n } else if (isInputObjectType(type)) {\n // Ensure Input Object fields are valid.\n validateInputFields(context, type); // Ensure Input Objects do not contain non-nullable circular references\n\n validateInputObjectCircularRefs(type);\n }\n }\n}\n\nfunction validateFields(context, type) {\n var fields = objectValues(type.getFields()); // Objects and Interfaces both must define one or more fields.\n\n if (fields.length === 0) {\n context.reportError(\"Type \".concat(type.name, \" must define one or more fields.\"), getAllNodes(type));\n }\n\n for (var _i10 = 0; _i10 < fields.length; _i10++) {\n var field = fields[_i10];\n // Ensure they are named correctly.\n validateName(context, field); // Ensure the type is an output type\n\n if (!isOutputType(field.type)) {\n var _field$astNode;\n\n context.reportError(\"The type of \".concat(type.name, \".\").concat(field.name, \" must be Output Type \") + \"but got: \".concat(inspect(field.type), \".\"), (_field$astNode = field.astNode) === null || _field$astNode === void 0 ? void 0 : _field$astNode.type);\n } // Ensure the arguments are valid\n\n\n for (var _i12 = 0, _field$args2 = field.args; _i12 < _field$args2.length; _i12++) {\n var arg = _field$args2[_i12];\n var argName = arg.name; // Ensure they are named correctly.\n\n validateName(context, arg); // Ensure the type is an input type\n\n if (!isInputType(arg.type)) {\n var _arg$astNode2;\n\n context.reportError(\"The type of \".concat(type.name, \".\").concat(field.name, \"(\").concat(argName, \":) must be Input \") + \"Type but got: \".concat(inspect(arg.type), \".\"), (_arg$astNode2 = arg.astNode) === null || _arg$astNode2 === void 0 ? void 0 : _arg$astNode2.type);\n }\n\n if (isRequiredArgument(arg) && arg.deprecationReason != null) {\n var _arg$astNode3;\n\n context.reportError(\"Required argument \".concat(type.name, \".\").concat(field.name, \"(\").concat(argName, \":) cannot be deprecated.\"), [getDeprecatedDirectiveNode(arg.astNode), // istanbul ignore next (TODO need to write coverage tests)\n (_arg$astNode3 = arg.astNode) === null || _arg$astNode3 === void 0 ? void 0 : _arg$astNode3.type]);\n }\n }\n }\n}\n\nfunction validateInterfaces(context, type) {\n var ifaceTypeNames = Object.create(null);\n\n for (var _i14 = 0, _type$getInterfaces2 = type.getInterfaces(); _i14 < _type$getInterfaces2.length; _i14++) {\n var iface = _type$getInterfaces2[_i14];\n\n if (!isInterfaceType(iface)) {\n context.reportError(\"Type \".concat(inspect(type), \" must only implement Interface types, \") + \"it cannot implement \".concat(inspect(iface), \".\"), getAllImplementsInterfaceNodes(type, iface));\n continue;\n }\n\n if (type === iface) {\n context.reportError(\"Type \".concat(type.name, \" cannot implement itself because it would create a circular reference.\"), getAllImplementsInterfaceNodes(type, iface));\n continue;\n }\n\n if (ifaceTypeNames[iface.name]) {\n context.reportError(\"Type \".concat(type.name, \" can only implement \").concat(iface.name, \" once.\"), getAllImplementsInterfaceNodes(type, iface));\n continue;\n }\n\n ifaceTypeNames[iface.name] = true;\n validateTypeImplementsAncestors(context, type, iface);\n validateTypeImplementsInterface(context, type, iface);\n }\n}\n\nfunction validateTypeImplementsInterface(context, type, iface) {\n var typeFieldMap = type.getFields(); // Assert each interface field is implemented.\n\n for (var _i16 = 0, _objectValues4 = objectValues(iface.getFields()); _i16 < _objectValues4.length; _i16++) {\n var ifaceField = _objectValues4[_i16];\n var fieldName = ifaceField.name;\n var typeField = typeFieldMap[fieldName]; // Assert interface field exists on type.\n\n if (!typeField) {\n context.reportError(\"Interface field \".concat(iface.name, \".\").concat(fieldName, \" expected but \").concat(type.name, \" does not provide it.\"), [ifaceField.astNode].concat(getAllNodes(type)));\n continue;\n } // Assert interface field type is satisfied by type field type, by being\n // a valid subtype. (covariant)\n\n\n if (!isTypeSubTypeOf(context.schema, typeField.type, ifaceField.type)) {\n var _ifaceField$astNode, _typeField$astNode;\n\n context.reportError(\"Interface field \".concat(iface.name, \".\").concat(fieldName, \" expects type \") + \"\".concat(inspect(ifaceField.type), \" but \").concat(type.name, \".\").concat(fieldName, \" \") + \"is type \".concat(inspect(typeField.type), \".\"), [// istanbul ignore next (TODO need to write coverage tests)\n (_ifaceField$astNode = ifaceField.astNode) === null || _ifaceField$astNode === void 0 ? void 0 : _ifaceField$astNode.type, // istanbul ignore next (TODO need to write coverage tests)\n (_typeField$astNode = typeField.astNode) === null || _typeField$astNode === void 0 ? void 0 : _typeField$astNode.type]);\n } // Assert each interface field arg is implemented.\n\n\n var _loop = function _loop(_i18, _ifaceField$args2) {\n var ifaceArg = _ifaceField$args2[_i18];\n var argName = ifaceArg.name;\n var typeArg = find(typeField.args, function (arg) {\n return arg.name === argName;\n }); // Assert interface field arg exists on object field.\n\n if (!typeArg) {\n context.reportError(\"Interface field argument \".concat(iface.name, \".\").concat(fieldName, \"(\").concat(argName, \":) expected but \").concat(type.name, \".\").concat(fieldName, \" does not provide it.\"), [ifaceArg.astNode, typeField.astNode]);\n return \"continue\";\n } // Assert interface field arg type matches object field arg type.\n // (invariant)\n // TODO: change to contravariant?\n\n\n if (!isEqualType(ifaceArg.type, typeArg.type)) {\n var _ifaceArg$astNode, _typeArg$astNode;\n\n context.reportError(\"Interface field argument \".concat(iface.name, \".\").concat(fieldName, \"(\").concat(argName, \":) \") + \"expects type \".concat(inspect(ifaceArg.type), \" but \") + \"\".concat(type.name, \".\").concat(fieldName, \"(\").concat(argName, \":) is type \") + \"\".concat(inspect(typeArg.type), \".\"), [// istanbul ignore next (TODO need to write coverage tests)\n (_ifaceArg$astNode = ifaceArg.astNode) === null || _ifaceArg$astNode === void 0 ? void 0 : _ifaceArg$astNode.type, // istanbul ignore next (TODO need to write coverage tests)\n (_typeArg$astNode = typeArg.astNode) === null || _typeArg$astNode === void 0 ? void 0 : _typeArg$astNode.type]);\n } // TODO: validate default values?\n\n };\n\n for (var _i18 = 0, _ifaceField$args2 = ifaceField.args; _i18 < _ifaceField$args2.length; _i18++) {\n var _ret = _loop(_i18, _ifaceField$args2);\n\n if (_ret === \"continue\") continue;\n } // Assert additional arguments must not be required.\n\n\n var _loop2 = function _loop2(_i20, _typeField$args2) {\n var typeArg = _typeField$args2[_i20];\n var argName = typeArg.name;\n var ifaceArg = find(ifaceField.args, function (arg) {\n return arg.name === argName;\n });\n\n if (!ifaceArg && isRequiredArgument(typeArg)) {\n context.reportError(\"Object field \".concat(type.name, \".\").concat(fieldName, \" includes required argument \").concat(argName, \" that is missing from the Interface field \").concat(iface.name, \".\").concat(fieldName, \".\"), [typeArg.astNode, ifaceField.astNode]);\n }\n };\n\n for (var _i20 = 0, _typeField$args2 = typeField.args; _i20 < _typeField$args2.length; _i20++) {\n _loop2(_i20, _typeField$args2);\n }\n }\n}\n\nfunction validateTypeImplementsAncestors(context, type, iface) {\n var ifaceInterfaces = type.getInterfaces();\n\n for (var _i22 = 0, _iface$getInterfaces2 = iface.getInterfaces(); _i22 < _iface$getInterfaces2.length; _i22++) {\n var transitive = _iface$getInterfaces2[_i22];\n\n if (ifaceInterfaces.indexOf(transitive) === -1) {\n context.reportError(transitive === type ? \"Type \".concat(type.name, \" cannot implement \").concat(iface.name, \" because it would create a circular reference.\") : \"Type \".concat(type.name, \" must implement \").concat(transitive.name, \" because it is implemented by \").concat(iface.name, \".\"), [].concat(getAllImplementsInterfaceNodes(iface, transitive), getAllImplementsInterfaceNodes(type, iface)));\n }\n }\n}\n\nfunction validateUnionMembers(context, union) {\n var memberTypes = union.getTypes();\n\n if (memberTypes.length === 0) {\n context.reportError(\"Union type \".concat(union.name, \" must define one or more member types.\"), getAllNodes(union));\n }\n\n var includedTypeNames = Object.create(null);\n\n for (var _i24 = 0; _i24 < memberTypes.length; _i24++) {\n var memberType = memberTypes[_i24];\n\n if (includedTypeNames[memberType.name]) {\n context.reportError(\"Union type \".concat(union.name, \" can only include type \").concat(memberType.name, \" once.\"), getUnionMemberTypeNodes(union, memberType.name));\n continue;\n }\n\n includedTypeNames[memberType.name] = true;\n\n if (!isObjectType(memberType)) {\n context.reportError(\"Union type \".concat(union.name, \" can only include Object types, \") + \"it cannot include \".concat(inspect(memberType), \".\"), getUnionMemberTypeNodes(union, String(memberType)));\n }\n }\n}\n\nfunction validateEnumValues(context, enumType) {\n var enumValues = enumType.getValues();\n\n if (enumValues.length === 0) {\n context.reportError(\"Enum type \".concat(enumType.name, \" must define one or more values.\"), getAllNodes(enumType));\n }\n\n for (var _i26 = 0; _i26 < enumValues.length; _i26++) {\n var enumValue = enumValues[_i26];\n var valueName = enumValue.name; // Ensure valid name.\n\n validateName(context, enumValue);\n\n if (valueName === 'true' || valueName === 'false' || valueName === 'null') {\n context.reportError(\"Enum type \".concat(enumType.name, \" cannot include value: \").concat(valueName, \".\"), enumValue.astNode);\n }\n }\n}\n\nfunction validateInputFields(context, inputObj) {\n var fields = objectValues(inputObj.getFields());\n\n if (fields.length === 0) {\n context.reportError(\"Input Object type \".concat(inputObj.name, \" must define one or more fields.\"), getAllNodes(inputObj));\n } // Ensure the arguments are valid\n\n\n for (var _i28 = 0; _i28 < fields.length; _i28++) {\n var field = fields[_i28];\n // Ensure they are named correctly.\n validateName(context, field); // Ensure the type is an input type\n\n if (!isInputType(field.type)) {\n var _field$astNode2;\n\n context.reportError(\"The type of \".concat(inputObj.name, \".\").concat(field.name, \" must be Input Type \") + \"but got: \".concat(inspect(field.type), \".\"), (_field$astNode2 = field.astNode) === null || _field$astNode2 === void 0 ? void 0 : _field$astNode2.type);\n }\n\n if (isRequiredInputField(field) && field.deprecationReason != null) {\n var _field$astNode3;\n\n context.reportError(\"Required input field \".concat(inputObj.name, \".\").concat(field.name, \" cannot be deprecated.\"), [getDeprecatedDirectiveNode(field.astNode), // istanbul ignore next (TODO need to write coverage tests)\n (_field$astNode3 = field.astNode) === null || _field$astNode3 === void 0 ? void 0 : _field$astNode3.type]);\n }\n }\n}\n\nfunction createInputObjectCircularRefsValidator(context) {\n // Modified copy of algorithm from 'src/validation/rules/NoFragmentCycles.js'.\n // Tracks already visited types to maintain O(N) and to ensure that cycles\n // are not redundantly reported.\n var visitedTypes = Object.create(null); // Array of types nodes used to produce meaningful errors\n\n var fieldPath = []; // Position in the type path\n\n var fieldPathIndexByTypeName = Object.create(null);\n return detectCycleRecursive; // This does a straight-forward DFS to find cycles.\n // It does not terminate when a cycle was found but continues to explore\n // the graph to find all possible cycles.\n\n function detectCycleRecursive(inputObj) {\n if (visitedTypes[inputObj.name]) {\n return;\n }\n\n visitedTypes[inputObj.name] = true;\n fieldPathIndexByTypeName[inputObj.name] = fieldPath.length;\n var fields = objectValues(inputObj.getFields());\n\n for (var _i30 = 0; _i30 < fields.length; _i30++) {\n var field = fields[_i30];\n\n if (isNonNullType(field.type) && isInputObjectType(field.type.ofType)) {\n var fieldType = field.type.ofType;\n var cycleIndex = fieldPathIndexByTypeName[fieldType.name];\n fieldPath.push(field);\n\n if (cycleIndex === undefined) {\n detectCycleRecursive(fieldType);\n } else {\n var cyclePath = fieldPath.slice(cycleIndex);\n var pathStr = cyclePath.map(function (fieldObj) {\n return fieldObj.name;\n }).join('.');\n context.reportError(\"Cannot reference Input Object \\\"\".concat(fieldType.name, \"\\\" within itself through a series of non-null fields: \\\"\").concat(pathStr, \"\\\".\"), cyclePath.map(function (fieldObj) {\n return fieldObj.astNode;\n }));\n }\n\n fieldPath.pop();\n }\n }\n\n fieldPathIndexByTypeName[inputObj.name] = undefined;\n }\n}\n\nfunction getAllNodes(object) {\n var astNode = object.astNode,\n extensionASTNodes = object.extensionASTNodes;\n return astNode ? extensionASTNodes ? [astNode].concat(extensionASTNodes) : [astNode] : extensionASTNodes !== null && extensionASTNodes !== void 0 ? extensionASTNodes : [];\n}\n\nfunction getAllSubNodes(object, getter) {\n var subNodes = [];\n\n for (var _i32 = 0, _getAllNodes2 = getAllNodes(object); _i32 < _getAllNodes2.length; _i32++) {\n var _getter;\n\n var node = _getAllNodes2[_i32];\n // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n subNodes = subNodes.concat((_getter = getter(node)) !== null && _getter !== void 0 ? _getter : []);\n }\n\n return subNodes;\n}\n\nfunction getAllImplementsInterfaceNodes(type, iface) {\n return getAllSubNodes(type, function (typeNode) {\n return typeNode.interfaces;\n }).filter(function (ifaceNode) {\n return ifaceNode.name.value === iface.name;\n });\n}\n\nfunction getUnionMemberTypeNodes(union, typeName) {\n return getAllSubNodes(union, function (unionNode) {\n return unionNode.types;\n }).filter(function (typeNode) {\n return typeNode.name.value === typeName;\n });\n}\n\nfunction getDeprecatedDirectiveNode(definitionNode) {\n var _definitionNode$direc;\n\n // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n return definitionNode === null || definitionNode === void 0 ? void 0 : (_definitionNode$direc = definitionNode.directives) === null || _definitionNode$direc === void 0 ? void 0 : _definitionNode$direc.find(function (node) {\n return node.name.value === GraphQLDeprecatedDirective.name;\n });\n}\n","/* eslint-disable no-redeclare */\n// $FlowFixMe[name-already-bound]\nvar find = Array.prototype.find ? function (list, predicate) {\n return Array.prototype.find.call(list, predicate);\n} : function (list, predicate) {\n for (var _i2 = 0; _i2 < list.length; _i2++) {\n var value = list[_i2];\n\n if (predicate(value)) {\n return value;\n }\n }\n};\nexport default find;\n","/* eslint-disable no-redeclare */\n// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441\nvar objectValues = Object.values || function (obj) {\n return Object.keys(obj).map(function (key) {\n return obj[key];\n });\n};\n\nexport default objectValues;\n","import inspect from \"../jsutils/inspect.mjs\";\nimport { GraphQLError } from \"./GraphQLError.mjs\";\n/**\n * Given an arbitrary value, presumably thrown while attempting to execute a\n * GraphQL operation, produce a new GraphQLError aware of the location in the\n * document responsible for the original Error.\n */\n\nexport function locatedError(rawOriginalError, nodes, path) {\n var _nodes;\n\n // Sometimes a non-error is thrown, wrap it as an Error instance to ensure a consistent Error interface.\n var originalError = rawOriginalError instanceof Error ? rawOriginalError : new Error('Unexpected error value: ' + inspect(rawOriginalError)); // Note: this uses a brand-check to support GraphQL errors originating from other contexts.\n\n if (Array.isArray(originalError.path)) {\n return originalError;\n }\n\n return new GraphQLError(originalError.message, (_nodes = originalError.nodes) !== null && _nodes !== void 0 ? _nodes : nodes, originalError.source, originalError.positions, path, originalError);\n}\n","import devAssert from \"../jsutils/devAssert.mjs\";\nimport { GraphQLError } from \"../error/GraphQLError.mjs\";\nvar NAME_RX = /^[_a-zA-Z][_a-zA-Z0-9]*$/;\n/**\n * Upholds the spec rules about naming.\n */\n\nexport function assertValidName(name) {\n var error = isValidNameError(name);\n\n if (error) {\n throw error;\n }\n\n return name;\n}\n/**\n * Returns an Error if a name is invalid.\n */\n\nexport function isValidNameError(name) {\n typeof name === 'string' || devAssert(0, 'Expected name to be a string.');\n\n if (name.length > 1 && name[0] === '_' && name[1] === '_') {\n return new GraphQLError(\"Name \\\"\".concat(name, \"\\\" must not begin with \\\"__\\\", which is reserved by GraphQL introspection.\"));\n }\n\n if (!NAME_RX.test(name)) {\n return new GraphQLError(\"Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but \\\"\".concat(name, \"\\\" does not.\"));\n }\n}\n","import { isInterfaceType, isObjectType, isListType, isNonNullType, isAbstractType } from \"../type/definition.mjs\";\n/**\n * Provided two types, return true if the types are equal (invariant).\n */\n\nexport function isEqualType(typeA, typeB) {\n // Equivalent types are equal.\n if (typeA === typeB) {\n return true;\n } // If either type is non-null, the other must also be non-null.\n\n\n if (isNonNullType(typeA) && isNonNullType(typeB)) {\n return isEqualType(typeA.ofType, typeB.ofType);\n } // If either type is a list, the other must also be a list.\n\n\n if (isListType(typeA) && isListType(typeB)) {\n return isEqualType(typeA.ofType, typeB.ofType);\n } // Otherwise the types are not equal.\n\n\n return false;\n}\n/**\n * Provided a type and a super type, return true if the first type is either\n * equal or a subset of the second super type (covariant).\n */\n\nexport function isTypeSubTypeOf(schema, maybeSubType, superType) {\n // Equivalent type is a valid subtype\n if (maybeSubType === superType) {\n return true;\n } // If superType is non-null, maybeSubType must also be non-null.\n\n\n if (isNonNullType(superType)) {\n if (isNonNullType(maybeSubType)) {\n return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType);\n }\n\n return false;\n }\n\n if (isNonNullType(maybeSubType)) {\n // If superType is nullable, maybeSubType may be non-null or nullable.\n return isTypeSubTypeOf(schema, maybeSubType.ofType, superType);\n } // If superType type is a list, maybeSubType type must also be a list.\n\n\n if (isListType(superType)) {\n if (isListType(maybeSubType)) {\n return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType);\n }\n\n return false;\n }\n\n if (isListType(maybeSubType)) {\n // If superType is not a list, maybeSubType must also be not a list.\n return false;\n } // If superType type is an abstract type, check if it is super type of maybeSubType.\n // Otherwise, the child type is not a valid subtype of the parent type.\n\n\n return isAbstractType(superType) && (isInterfaceType(maybeSubType) || isObjectType(maybeSubType)) && schema.isSubType(superType, maybeSubType);\n}\n/**\n * Provided two composite types, determine if they \"overlap\". Two composite\n * types overlap when the Sets of possible concrete types for each intersect.\n *\n * This is often used to determine if a fragment of a given type could possibly\n * be visited in a context of another type.\n *\n * This function is commutative.\n */\n\nexport function doTypesOverlap(schema, typeA, typeB) {\n // Equivalent types overlap\n if (typeA === typeB) {\n return true;\n }\n\n if (isAbstractType(typeA)) {\n if (isAbstractType(typeB)) {\n // If both types are abstract, then determine if there is any intersection\n // between possible concrete types of each.\n return schema.getPossibleTypes(typeA).some(function (type) {\n return schema.isSubType(typeB, type);\n });\n } // Determine if the latter type is a possible concrete type of the former.\n\n\n return schema.isSubType(typeA, typeB);\n }\n\n if (isAbstractType(typeB)) {\n // Determine if the former type is a possible concrete type of the latter.\n return schema.isSubType(typeB, typeA);\n } // Otherwise the types do not overlap.\n\n\n return false;\n}\n","function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nimport objectEntries from \"../polyfills/objectEntries.mjs\";\nimport { SYMBOL_TO_STRING_TAG } from \"../polyfills/symbols.mjs\";\nimport inspect from \"../jsutils/inspect.mjs\";\nimport keyMap from \"../jsutils/keyMap.mjs\";\nimport mapValue from \"../jsutils/mapValue.mjs\";\nimport toObjMap from \"../jsutils/toObjMap.mjs\";\nimport devAssert from \"../jsutils/devAssert.mjs\";\nimport keyValMap from \"../jsutils/keyValMap.mjs\";\nimport instanceOf from \"../jsutils/instanceOf.mjs\";\nimport didYouMean from \"../jsutils/didYouMean.mjs\";\nimport isObjectLike from \"../jsutils/isObjectLike.mjs\";\nimport identityFunc from \"../jsutils/identityFunc.mjs\";\nimport defineInspect from \"../jsutils/defineInspect.mjs\";\nimport suggestionList from \"../jsutils/suggestionList.mjs\";\nimport { GraphQLError } from \"../error/GraphQLError.mjs\";\nimport { Kind } from \"../language/kinds.mjs\";\nimport { print } from \"../language/printer.mjs\";\nimport { valueFromASTUntyped } from \"../utilities/valueFromASTUntyped.mjs\";\nexport function isType(type) {\n return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isInputObjectType(type) || isListType(type) || isNonNullType(type);\n}\nexport function assertType(type) {\n if (!isType(type)) {\n throw new Error(\"Expected \".concat(inspect(type), \" to be a GraphQL type.\"));\n }\n\n return type;\n}\n/**\n * There are predicates for each kind of GraphQL type.\n */\n\n// eslint-disable-next-line no-redeclare\nexport function isScalarType(type) {\n return instanceOf(type, GraphQLScalarType);\n}\nexport function assertScalarType(type) {\n if (!isScalarType(type)) {\n throw new Error(\"Expected \".concat(inspect(type), \" to be a GraphQL Scalar type.\"));\n }\n\n return type;\n}\n// eslint-disable-next-line no-redeclare\nexport function isObjectType(type) {\n return instanceOf(type, GraphQLObjectType);\n}\nexport function assertObjectType(type) {\n if (!isObjectType(type)) {\n throw new Error(\"Expected \".concat(inspect(type), \" to be a GraphQL Object type.\"));\n }\n\n return type;\n}\n// eslint-disable-next-line no-redeclare\nexport function isInterfaceType(type) {\n return instanceOf(type, GraphQLInterfaceType);\n}\nexport function assertInterfaceType(type) {\n if (!isInterfaceType(type)) {\n throw new Error(\"Expected \".concat(inspect(type), \" to be a GraphQL Interface type.\"));\n }\n\n return type;\n}\n// eslint-disable-next-line no-redeclare\nexport function isUnionType(type) {\n return instanceOf(type, GraphQLUnionType);\n}\nexport function assertUnionType(type) {\n if (!isUnionType(type)) {\n throw new Error(\"Expected \".concat(inspect(type), \" to be a GraphQL Union type.\"));\n }\n\n return type;\n}\n// eslint-disable-next-line no-redeclare\nexport function isEnumType(type) {\n return instanceOf(type, GraphQLEnumType);\n}\nexport function assertEnumType(type) {\n if (!isEnumType(type)) {\n throw new Error(\"Expected \".concat(inspect(type), \" to be a GraphQL Enum type.\"));\n }\n\n return type;\n}\n// eslint-disable-next-line no-redeclare\nexport function isInputObjectType(type) {\n return instanceOf(type, GraphQLInputObjectType);\n}\nexport function assertInputObjectType(type) {\n if (!isInputObjectType(type)) {\n throw new Error(\"Expected \".concat(inspect(type), \" to be a GraphQL Input Object type.\"));\n }\n\n return type;\n}\n// eslint-disable-next-line no-redeclare\nexport function isListType(type) {\n return instanceOf(type, GraphQLList);\n}\nexport function assertListType(type) {\n if (!isListType(type)) {\n throw new Error(\"Expected \".concat(inspect(type), \" to be a GraphQL List type.\"));\n }\n\n return type;\n}\n// eslint-disable-next-line no-redeclare\nexport function isNonNullType(type) {\n return instanceOf(type, GraphQLNonNull);\n}\nexport function assertNonNullType(type) {\n if (!isNonNullType(type)) {\n throw new Error(\"Expected \".concat(inspect(type), \" to be a GraphQL Non-Null type.\"));\n }\n\n return type;\n}\n/**\n * These types may be used as input types for arguments and directives.\n */\n\nexport function isInputType(type) {\n return isScalarType(type) || isEnumType(type) || isInputObjectType(type) || isWrappingType(type) && isInputType(type.ofType);\n}\nexport function assertInputType(type) {\n if (!isInputType(type)) {\n throw new Error(\"Expected \".concat(inspect(type), \" to be a GraphQL input type.\"));\n }\n\n return type;\n}\n/**\n * These types may be used as output types as the result of fields.\n */\n\nexport function isOutputType(type) {\n return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isWrappingType(type) && isOutputType(type.ofType);\n}\nexport function assertOutputType(type) {\n if (!isOutputType(type)) {\n throw new Error(\"Expected \".concat(inspect(type), \" to be a GraphQL output type.\"));\n }\n\n return type;\n}\n/**\n * These types may describe types which may be leaf values.\n */\n\nexport function isLeafType(type) {\n return isScalarType(type) || isEnumType(type);\n}\nexport function assertLeafType(type) {\n if (!isLeafType(type)) {\n throw new Error(\"Expected \".concat(inspect(type), \" to be a GraphQL leaf type.\"));\n }\n\n return type;\n}\n/**\n * These types may describe the parent context of a selection set.\n */\n\nexport function isCompositeType(type) {\n return isObjectType(type) || isInterfaceType(type) || isUnionType(type);\n}\nexport function assertCompositeType(type) {\n if (!isCompositeType(type)) {\n throw new Error(\"Expected \".concat(inspect(type), \" to be a GraphQL composite type.\"));\n }\n\n return type;\n}\n/**\n * These types may describe the parent context of a selection set.\n */\n\nexport function isAbstractType(type) {\n return isInterfaceType(type) || isUnionType(type);\n}\nexport function assertAbstractType(type) {\n if (!isAbstractType(type)) {\n throw new Error(\"Expected \".concat(inspect(type), \" to be a GraphQL abstract type.\"));\n }\n\n return type;\n}\n/**\n * List Type Wrapper\n *\n * A list is a wrapping type which points to another type.\n * Lists are often created within the context of defining the fields of\n * an object type.\n *\n * Example:\n *\n * const PersonType = new GraphQLObjectType({\n * name: 'Person',\n * fields: () => ({\n * parents: { type: new GraphQLList(PersonType) },\n * children: { type: new GraphQLList(PersonType) },\n * })\n * })\n *\n */\n// FIXME: workaround to fix issue with Babel parser\n\n/* ::\ndeclare class GraphQLList<+T: GraphQLType> {\n +ofType: T;\n static (ofType: T): GraphQLList;\n // Note: constructors cannot be used for covariant types. Drop the \"new\".\n constructor(ofType: GraphQLType): void;\n}\n*/\n\nexport function GraphQLList(ofType) {\n // istanbul ignore else (to be removed in v16.0.0)\n if (this instanceof GraphQLList) {\n this.ofType = assertType(ofType);\n } else {\n return new GraphQLList(ofType);\n }\n} // Need to cast through any to alter the prototype.\n\nGraphQLList.prototype.toString = function toString() {\n return '[' + String(this.ofType) + ']';\n};\n\nGraphQLList.prototype.toJSON = function toJSON() {\n return this.toString();\n};\n\nObject.defineProperty(GraphQLList.prototype, SYMBOL_TO_STRING_TAG, {\n get: function get() {\n return 'GraphQLList';\n }\n}); // Print a simplified form when appearing in `inspect` and `util.inspect`.\n\ndefineInspect(GraphQLList);\n/**\n * Non-Null Type Wrapper\n *\n * A non-null is a wrapping type which points to another type.\n * Non-null types enforce that their values are never null and can ensure\n * an error is raised if this ever occurs during a request. It is useful for\n * fields which you can make a strong guarantee on non-nullability, for example\n * usually the id field of a database row will never be null.\n *\n * Example:\n *\n * const RowType = new GraphQLObjectType({\n * name: 'Row',\n * fields: () => ({\n * id: { type: new GraphQLNonNull(GraphQLString) },\n * })\n * })\n *\n * Note: the enforcement of non-nullability occurs within the executor.\n */\n// FIXME: workaround to fix issue with Babel parser\n\n/* ::\ndeclare class GraphQLNonNull<+T: GraphQLNullableType> {\n +ofType: T;\n static (ofType: T): GraphQLNonNull;\n // Note: constructors cannot be used for covariant types. Drop the \"new\".\n constructor(ofType: GraphQLType): void;\n}\n*/\n\nexport function GraphQLNonNull(ofType) {\n // istanbul ignore else (to be removed in v16.0.0)\n if (this instanceof GraphQLNonNull) {\n this.ofType = assertNullableType(ofType);\n } else {\n return new GraphQLNonNull(ofType);\n }\n} // Need to cast through any to alter the prototype.\n\nGraphQLNonNull.prototype.toString = function toString() {\n return String(this.ofType) + '!';\n};\n\nGraphQLNonNull.prototype.toJSON = function toJSON() {\n return this.toString();\n};\n\nObject.defineProperty(GraphQLNonNull.prototype, SYMBOL_TO_STRING_TAG, {\n get: function get() {\n return 'GraphQLNonNull';\n }\n}); // Print a simplified form when appearing in `inspect` and `util.inspect`.\n\ndefineInspect(GraphQLNonNull);\n/**\n * These types wrap and modify other types\n */\n\nexport function isWrappingType(type) {\n return isListType(type) || isNonNullType(type);\n}\nexport function assertWrappingType(type) {\n if (!isWrappingType(type)) {\n throw new Error(\"Expected \".concat(inspect(type), \" to be a GraphQL wrapping type.\"));\n }\n\n return type;\n}\n/**\n * These types can all accept null as a value.\n */\n\nexport function isNullableType(type) {\n return isType(type) && !isNonNullType(type);\n}\nexport function assertNullableType(type) {\n if (!isNullableType(type)) {\n throw new Error(\"Expected \".concat(inspect(type), \" to be a GraphQL nullable type.\"));\n }\n\n return type;\n}\n/* eslint-disable no-redeclare */\n\nexport function getNullableType(type) {\n /* eslint-enable no-redeclare */\n if (type) {\n return isNonNullType(type) ? type.ofType : type;\n }\n}\n/**\n * These named types do not include modifiers like List or NonNull.\n */\n\nexport function isNamedType(type) {\n return isScalarType(type) || isObjectType(type) || isInterfaceType(type) || isUnionType(type) || isEnumType(type) || isInputObjectType(type);\n}\nexport function assertNamedType(type) {\n if (!isNamedType(type)) {\n throw new Error(\"Expected \".concat(inspect(type), \" to be a GraphQL named type.\"));\n }\n\n return type;\n}\n/* eslint-disable no-redeclare */\n\nexport function getNamedType(type) {\n /* eslint-enable no-redeclare */\n if (type) {\n var unwrappedType = type;\n\n while (isWrappingType(unwrappedType)) {\n unwrappedType = unwrappedType.ofType;\n }\n\n return unwrappedType;\n }\n}\n/**\n * Used while defining GraphQL types to allow for circular references in\n * otherwise immutable type definitions.\n */\n\nfunction resolveThunk(thunk) {\n // $FlowFixMe[incompatible-use]\n return typeof thunk === 'function' ? thunk() : thunk;\n}\n\nfunction undefineIfEmpty(arr) {\n return arr && arr.length > 0 ? arr : undefined;\n}\n/**\n * Scalar Type Definition\n *\n * The leaf values of any request and input values to arguments are\n * Scalars (or Enums) and are defined with a name and a series of functions\n * used to parse input from ast or variables and to ensure validity.\n *\n * If a type's serialize function does not return a value (i.e. it returns\n * `undefined`) then an error will be raised and a `null` value will be returned\n * in the response. If the serialize function returns `null`, then no error will\n * be included in the response.\n *\n * Example:\n *\n * const OddType = new GraphQLScalarType({\n * name: 'Odd',\n * serialize(value) {\n * if (value % 2 === 1) {\n * return value;\n * }\n * }\n * });\n *\n */\n\n\nexport var GraphQLScalarType = /*#__PURE__*/function () {\n function GraphQLScalarType(config) {\n var _config$parseValue, _config$serialize, _config$parseLiteral;\n\n var parseValue = (_config$parseValue = config.parseValue) !== null && _config$parseValue !== void 0 ? _config$parseValue : identityFunc;\n this.name = config.name;\n this.description = config.description;\n this.specifiedByUrl = config.specifiedByUrl;\n this.serialize = (_config$serialize = config.serialize) !== null && _config$serialize !== void 0 ? _config$serialize : identityFunc;\n this.parseValue = parseValue;\n this.parseLiteral = (_config$parseLiteral = config.parseLiteral) !== null && _config$parseLiteral !== void 0 ? _config$parseLiteral : function (node, variables) {\n return parseValue(valueFromASTUntyped(node, variables));\n };\n this.extensions = config.extensions && toObjMap(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes = undefineIfEmpty(config.extensionASTNodes);\n typeof config.name === 'string' || devAssert(0, 'Must provide name.');\n config.specifiedByUrl == null || typeof config.specifiedByUrl === 'string' || devAssert(0, \"\".concat(this.name, \" must provide \\\"specifiedByUrl\\\" as a string, \") + \"but got: \".concat(inspect(config.specifiedByUrl), \".\"));\n config.serialize == null || typeof config.serialize === 'function' || devAssert(0, \"\".concat(this.name, \" must provide \\\"serialize\\\" function. If this custom Scalar is also used as an input type, ensure \\\"parseValue\\\" and \\\"parseLiteral\\\" functions are also provided.\"));\n\n if (config.parseLiteral) {\n typeof config.parseValue === 'function' && typeof config.parseLiteral === 'function' || devAssert(0, \"\".concat(this.name, \" must provide both \\\"parseValue\\\" and \\\"parseLiteral\\\" functions.\"));\n }\n }\n\n var _proto = GraphQLScalarType.prototype;\n\n _proto.toConfig = function toConfig() {\n var _this$extensionASTNod;\n\n return {\n name: this.name,\n description: this.description,\n specifiedByUrl: this.specifiedByUrl,\n serialize: this.serialize,\n parseValue: this.parseValue,\n parseLiteral: this.parseLiteral,\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: (_this$extensionASTNod = this.extensionASTNodes) !== null && _this$extensionASTNod !== void 0 ? _this$extensionASTNod : []\n };\n };\n\n _proto.toString = function toString() {\n return this.name;\n };\n\n _proto.toJSON = function toJSON() {\n return this.toString();\n } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet\n ;\n\n _createClass(GraphQLScalarType, [{\n key: SYMBOL_TO_STRING_TAG,\n get: function get() {\n return 'GraphQLScalarType';\n }\n }]);\n\n return GraphQLScalarType;\n}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.\n\ndefineInspect(GraphQLScalarType);\n\n/**\n * Object Type Definition\n *\n * Almost all of the GraphQL types you define will be object types. Object types\n * have a name, but most importantly describe their fields.\n *\n * Example:\n *\n * const AddressType = new GraphQLObjectType({\n * name: 'Address',\n * fields: {\n * street: { type: GraphQLString },\n * number: { type: GraphQLInt },\n * formatted: {\n * type: GraphQLString,\n * resolve(obj) {\n * return obj.number + ' ' + obj.street\n * }\n * }\n * }\n * });\n *\n * When two types need to refer to each other, or a type needs to refer to\n * itself in a field, you can use a function expression (aka a closure or a\n * thunk) to supply the fields lazily.\n *\n * Example:\n *\n * const PersonType = new GraphQLObjectType({\n * name: 'Person',\n * fields: () => ({\n * name: { type: GraphQLString },\n * bestFriend: { type: PersonType },\n * })\n * });\n *\n */\nexport var GraphQLObjectType = /*#__PURE__*/function () {\n function GraphQLObjectType(config) {\n this.name = config.name;\n this.description = config.description;\n this.isTypeOf = config.isTypeOf;\n this.extensions = config.extensions && toObjMap(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes = undefineIfEmpty(config.extensionASTNodes);\n this._fields = defineFieldMap.bind(undefined, config);\n this._interfaces = defineInterfaces.bind(undefined, config);\n typeof config.name === 'string' || devAssert(0, 'Must provide name.');\n config.isTypeOf == null || typeof config.isTypeOf === 'function' || devAssert(0, \"\".concat(this.name, \" must provide \\\"isTypeOf\\\" as a function, \") + \"but got: \".concat(inspect(config.isTypeOf), \".\"));\n }\n\n var _proto2 = GraphQLObjectType.prototype;\n\n _proto2.getFields = function getFields() {\n if (typeof this._fields === 'function') {\n this._fields = this._fields();\n }\n\n return this._fields;\n };\n\n _proto2.getInterfaces = function getInterfaces() {\n if (typeof this._interfaces === 'function') {\n this._interfaces = this._interfaces();\n }\n\n return this._interfaces;\n };\n\n _proto2.toConfig = function toConfig() {\n return {\n name: this.name,\n description: this.description,\n interfaces: this.getInterfaces(),\n fields: fieldsToFieldsConfig(this.getFields()),\n isTypeOf: this.isTypeOf,\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: this.extensionASTNodes || []\n };\n };\n\n _proto2.toString = function toString() {\n return this.name;\n };\n\n _proto2.toJSON = function toJSON() {\n return this.toString();\n } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet\n ;\n\n _createClass(GraphQLObjectType, [{\n key: SYMBOL_TO_STRING_TAG,\n get: function get() {\n return 'GraphQLObjectType';\n }\n }]);\n\n return GraphQLObjectType;\n}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.\n\ndefineInspect(GraphQLObjectType);\n\nfunction defineInterfaces(config) {\n var _resolveThunk;\n\n var interfaces = (_resolveThunk = resolveThunk(config.interfaces)) !== null && _resolveThunk !== void 0 ? _resolveThunk : [];\n Array.isArray(interfaces) || devAssert(0, \"\".concat(config.name, \" interfaces must be an Array or a function which returns an Array.\"));\n return interfaces;\n}\n\nfunction defineFieldMap(config) {\n var fieldMap = resolveThunk(config.fields);\n isPlainObj(fieldMap) || devAssert(0, \"\".concat(config.name, \" fields must be an object with field names as keys or a function which returns such an object.\"));\n return mapValue(fieldMap, function (fieldConfig, fieldName) {\n var _fieldConfig$args;\n\n isPlainObj(fieldConfig) || devAssert(0, \"\".concat(config.name, \".\").concat(fieldName, \" field config must be an object.\"));\n !('isDeprecated' in fieldConfig) || devAssert(0, \"\".concat(config.name, \".\").concat(fieldName, \" should provide \\\"deprecationReason\\\" instead of \\\"isDeprecated\\\".\"));\n fieldConfig.resolve == null || typeof fieldConfig.resolve === 'function' || devAssert(0, \"\".concat(config.name, \".\").concat(fieldName, \" field resolver must be a function if \") + \"provided, but got: \".concat(inspect(fieldConfig.resolve), \".\"));\n var argsConfig = (_fieldConfig$args = fieldConfig.args) !== null && _fieldConfig$args !== void 0 ? _fieldConfig$args : {};\n isPlainObj(argsConfig) || devAssert(0, \"\".concat(config.name, \".\").concat(fieldName, \" args must be an object with argument names as keys.\"));\n var args = objectEntries(argsConfig).map(function (_ref) {\n var argName = _ref[0],\n argConfig = _ref[1];\n return {\n name: argName,\n description: argConfig.description,\n type: argConfig.type,\n defaultValue: argConfig.defaultValue,\n deprecationReason: argConfig.deprecationReason,\n extensions: argConfig.extensions && toObjMap(argConfig.extensions),\n astNode: argConfig.astNode\n };\n });\n return {\n name: fieldName,\n description: fieldConfig.description,\n type: fieldConfig.type,\n args: args,\n resolve: fieldConfig.resolve,\n subscribe: fieldConfig.subscribe,\n isDeprecated: fieldConfig.deprecationReason != null,\n deprecationReason: fieldConfig.deprecationReason,\n extensions: fieldConfig.extensions && toObjMap(fieldConfig.extensions),\n astNode: fieldConfig.astNode\n };\n });\n}\n\nfunction isPlainObj(obj) {\n return isObjectLike(obj) && !Array.isArray(obj);\n}\n\nfunction fieldsToFieldsConfig(fields) {\n return mapValue(fields, function (field) {\n return {\n description: field.description,\n type: field.type,\n args: argsToArgsConfig(field.args),\n resolve: field.resolve,\n subscribe: field.subscribe,\n deprecationReason: field.deprecationReason,\n extensions: field.extensions,\n astNode: field.astNode\n };\n });\n}\n/**\n * @internal\n */\n\n\nexport function argsToArgsConfig(args) {\n return keyValMap(args, function (arg) {\n return arg.name;\n }, function (arg) {\n return {\n description: arg.description,\n type: arg.type,\n defaultValue: arg.defaultValue,\n deprecationReason: arg.deprecationReason,\n extensions: arg.extensions,\n astNode: arg.astNode\n };\n });\n}\nexport function isRequiredArgument(arg) {\n return isNonNullType(arg.type) && arg.defaultValue === undefined;\n}\n\n/**\n * Interface Type Definition\n *\n * When a field can return one of a heterogeneous set of types, a Interface type\n * is used to describe what types are possible, what fields are in common across\n * all types, as well as a function to determine which type is actually used\n * when the field is resolved.\n *\n * Example:\n *\n * const EntityType = new GraphQLInterfaceType({\n * name: 'Entity',\n * fields: {\n * name: { type: GraphQLString }\n * }\n * });\n *\n */\nexport var GraphQLInterfaceType = /*#__PURE__*/function () {\n function GraphQLInterfaceType(config) {\n this.name = config.name;\n this.description = config.description;\n this.resolveType = config.resolveType;\n this.extensions = config.extensions && toObjMap(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes = undefineIfEmpty(config.extensionASTNodes);\n this._fields = defineFieldMap.bind(undefined, config);\n this._interfaces = defineInterfaces.bind(undefined, config);\n typeof config.name === 'string' || devAssert(0, 'Must provide name.');\n config.resolveType == null || typeof config.resolveType === 'function' || devAssert(0, \"\".concat(this.name, \" must provide \\\"resolveType\\\" as a function, \") + \"but got: \".concat(inspect(config.resolveType), \".\"));\n }\n\n var _proto3 = GraphQLInterfaceType.prototype;\n\n _proto3.getFields = function getFields() {\n if (typeof this._fields === 'function') {\n this._fields = this._fields();\n }\n\n return this._fields;\n };\n\n _proto3.getInterfaces = function getInterfaces() {\n if (typeof this._interfaces === 'function') {\n this._interfaces = this._interfaces();\n }\n\n return this._interfaces;\n };\n\n _proto3.toConfig = function toConfig() {\n var _this$extensionASTNod2;\n\n return {\n name: this.name,\n description: this.description,\n interfaces: this.getInterfaces(),\n fields: fieldsToFieldsConfig(this.getFields()),\n resolveType: this.resolveType,\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: (_this$extensionASTNod2 = this.extensionASTNodes) !== null && _this$extensionASTNod2 !== void 0 ? _this$extensionASTNod2 : []\n };\n };\n\n _proto3.toString = function toString() {\n return this.name;\n };\n\n _proto3.toJSON = function toJSON() {\n return this.toString();\n } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet\n ;\n\n _createClass(GraphQLInterfaceType, [{\n key: SYMBOL_TO_STRING_TAG,\n get: function get() {\n return 'GraphQLInterfaceType';\n }\n }]);\n\n return GraphQLInterfaceType;\n}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.\n\ndefineInspect(GraphQLInterfaceType);\n\n/**\n * Union Type Definition\n *\n * When a field can return one of a heterogeneous set of types, a Union type\n * is used to describe what types are possible as well as providing a function\n * to determine which type is actually used when the field is resolved.\n *\n * Example:\n *\n * const PetType = new GraphQLUnionType({\n * name: 'Pet',\n * types: [ DogType, CatType ],\n * resolveType(value) {\n * if (value instanceof Dog) {\n * return DogType;\n * }\n * if (value instanceof Cat) {\n * return CatType;\n * }\n * }\n * });\n *\n */\nexport var GraphQLUnionType = /*#__PURE__*/function () {\n function GraphQLUnionType(config) {\n this.name = config.name;\n this.description = config.description;\n this.resolveType = config.resolveType;\n this.extensions = config.extensions && toObjMap(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes = undefineIfEmpty(config.extensionASTNodes);\n this._types = defineTypes.bind(undefined, config);\n typeof config.name === 'string' || devAssert(0, 'Must provide name.');\n config.resolveType == null || typeof config.resolveType === 'function' || devAssert(0, \"\".concat(this.name, \" must provide \\\"resolveType\\\" as a function, \") + \"but got: \".concat(inspect(config.resolveType), \".\"));\n }\n\n var _proto4 = GraphQLUnionType.prototype;\n\n _proto4.getTypes = function getTypes() {\n if (typeof this._types === 'function') {\n this._types = this._types();\n }\n\n return this._types;\n };\n\n _proto4.toConfig = function toConfig() {\n var _this$extensionASTNod3;\n\n return {\n name: this.name,\n description: this.description,\n types: this.getTypes(),\n resolveType: this.resolveType,\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: (_this$extensionASTNod3 = this.extensionASTNodes) !== null && _this$extensionASTNod3 !== void 0 ? _this$extensionASTNod3 : []\n };\n };\n\n _proto4.toString = function toString() {\n return this.name;\n };\n\n _proto4.toJSON = function toJSON() {\n return this.toString();\n } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet\n ;\n\n _createClass(GraphQLUnionType, [{\n key: SYMBOL_TO_STRING_TAG,\n get: function get() {\n return 'GraphQLUnionType';\n }\n }]);\n\n return GraphQLUnionType;\n}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.\n\ndefineInspect(GraphQLUnionType);\n\nfunction defineTypes(config) {\n var types = resolveThunk(config.types);\n Array.isArray(types) || devAssert(0, \"Must provide Array of types or a function which returns such an array for Union \".concat(config.name, \".\"));\n return types;\n}\n\n/**\n * Enum Type Definition\n *\n * Some leaf values of requests and input values are Enums. GraphQL serializes\n * Enum values as strings, however internally Enums can be represented by any\n * kind of type, often integers.\n *\n * Example:\n *\n * const RGBType = new GraphQLEnumType({\n * name: 'RGB',\n * values: {\n * RED: { value: 0 },\n * GREEN: { value: 1 },\n * BLUE: { value: 2 }\n * }\n * });\n *\n * Note: If a value is not provided in a definition, the name of the enum value\n * will be used as its internal value.\n */\nexport var GraphQLEnumType\n/* */\n= /*#__PURE__*/function () {\n function GraphQLEnumType(config) {\n this.name = config.name;\n this.description = config.description;\n this.extensions = config.extensions && toObjMap(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes = undefineIfEmpty(config.extensionASTNodes);\n this._values = defineEnumValues(this.name, config.values);\n this._valueLookup = new Map(this._values.map(function (enumValue) {\n return [enumValue.value, enumValue];\n }));\n this._nameLookup = keyMap(this._values, function (value) {\n return value.name;\n });\n typeof config.name === 'string' || devAssert(0, 'Must provide name.');\n }\n\n var _proto5 = GraphQLEnumType.prototype;\n\n _proto5.getValues = function getValues() {\n return this._values;\n };\n\n _proto5.getValue = function getValue(name) {\n return this._nameLookup[name];\n };\n\n _proto5.serialize = function serialize(outputValue) {\n var enumValue = this._valueLookup.get(outputValue);\n\n if (enumValue === undefined) {\n throw new GraphQLError(\"Enum \\\"\".concat(this.name, \"\\\" cannot represent value: \").concat(inspect(outputValue)));\n }\n\n return enumValue.name;\n };\n\n _proto5.parseValue = function parseValue(inputValue)\n /* T */\n {\n if (typeof inputValue !== 'string') {\n var valueStr = inspect(inputValue);\n throw new GraphQLError(\"Enum \\\"\".concat(this.name, \"\\\" cannot represent non-string value: \").concat(valueStr, \".\") + didYouMeanEnumValue(this, valueStr));\n }\n\n var enumValue = this.getValue(inputValue);\n\n if (enumValue == null) {\n throw new GraphQLError(\"Value \\\"\".concat(inputValue, \"\\\" does not exist in \\\"\").concat(this.name, \"\\\" enum.\") + didYouMeanEnumValue(this, inputValue));\n }\n\n return enumValue.value;\n };\n\n _proto5.parseLiteral = function parseLiteral(valueNode, _variables)\n /* T */\n {\n // Note: variables will be resolved to a value before calling this function.\n if (valueNode.kind !== Kind.ENUM) {\n var valueStr = print(valueNode);\n throw new GraphQLError(\"Enum \\\"\".concat(this.name, \"\\\" cannot represent non-enum value: \").concat(valueStr, \".\") + didYouMeanEnumValue(this, valueStr), valueNode);\n }\n\n var enumValue = this.getValue(valueNode.value);\n\n if (enumValue == null) {\n var _valueStr = print(valueNode);\n\n throw new GraphQLError(\"Value \\\"\".concat(_valueStr, \"\\\" does not exist in \\\"\").concat(this.name, \"\\\" enum.\") + didYouMeanEnumValue(this, _valueStr), valueNode);\n }\n\n return enumValue.value;\n };\n\n _proto5.toConfig = function toConfig() {\n var _this$extensionASTNod4;\n\n var values = keyValMap(this.getValues(), function (value) {\n return value.name;\n }, function (value) {\n return {\n description: value.description,\n value: value.value,\n deprecationReason: value.deprecationReason,\n extensions: value.extensions,\n astNode: value.astNode\n };\n });\n return {\n name: this.name,\n description: this.description,\n values: values,\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: (_this$extensionASTNod4 = this.extensionASTNodes) !== null && _this$extensionASTNod4 !== void 0 ? _this$extensionASTNod4 : []\n };\n };\n\n _proto5.toString = function toString() {\n return this.name;\n };\n\n _proto5.toJSON = function toJSON() {\n return this.toString();\n } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet\n ;\n\n _createClass(GraphQLEnumType, [{\n key: SYMBOL_TO_STRING_TAG,\n get: function get() {\n return 'GraphQLEnumType';\n }\n }]);\n\n return GraphQLEnumType;\n}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.\n\ndefineInspect(GraphQLEnumType);\n\nfunction didYouMeanEnumValue(enumType, unknownValueStr) {\n var allNames = enumType.getValues().map(function (value) {\n return value.name;\n });\n var suggestedValues = suggestionList(unknownValueStr, allNames);\n return didYouMean('the enum value', suggestedValues);\n}\n\nfunction defineEnumValues(typeName, valueMap) {\n isPlainObj(valueMap) || devAssert(0, \"\".concat(typeName, \" values must be an object with value names as keys.\"));\n return objectEntries(valueMap).map(function (_ref2) {\n var valueName = _ref2[0],\n valueConfig = _ref2[1];\n isPlainObj(valueConfig) || devAssert(0, \"\".concat(typeName, \".\").concat(valueName, \" must refer to an object with a \\\"value\\\" key \") + \"representing an internal value but got: \".concat(inspect(valueConfig), \".\"));\n !('isDeprecated' in valueConfig) || devAssert(0, \"\".concat(typeName, \".\").concat(valueName, \" should provide \\\"deprecationReason\\\" instead of \\\"isDeprecated\\\".\"));\n return {\n name: valueName,\n description: valueConfig.description,\n value: valueConfig.value !== undefined ? valueConfig.value : valueName,\n isDeprecated: valueConfig.deprecationReason != null,\n deprecationReason: valueConfig.deprecationReason,\n extensions: valueConfig.extensions && toObjMap(valueConfig.extensions),\n astNode: valueConfig.astNode\n };\n });\n}\n\n/**\n * Input Object Type Definition\n *\n * An input object defines a structured collection of fields which may be\n * supplied to a field argument.\n *\n * Using `NonNull` will ensure that a value must be provided by the query\n *\n * Example:\n *\n * const GeoPoint = new GraphQLInputObjectType({\n * name: 'GeoPoint',\n * fields: {\n * lat: { type: new GraphQLNonNull(GraphQLFloat) },\n * lon: { type: new GraphQLNonNull(GraphQLFloat) },\n * alt: { type: GraphQLFloat, defaultValue: 0 },\n * }\n * });\n *\n */\nexport var GraphQLInputObjectType = /*#__PURE__*/function () {\n function GraphQLInputObjectType(config) {\n this.name = config.name;\n this.description = config.description;\n this.extensions = config.extensions && toObjMap(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes = undefineIfEmpty(config.extensionASTNodes);\n this._fields = defineInputFieldMap.bind(undefined, config);\n typeof config.name === 'string' || devAssert(0, 'Must provide name.');\n }\n\n var _proto6 = GraphQLInputObjectType.prototype;\n\n _proto6.getFields = function getFields() {\n if (typeof this._fields === 'function') {\n this._fields = this._fields();\n }\n\n return this._fields;\n };\n\n _proto6.toConfig = function toConfig() {\n var _this$extensionASTNod5;\n\n var fields = mapValue(this.getFields(), function (field) {\n return {\n description: field.description,\n type: field.type,\n defaultValue: field.defaultValue,\n deprecationReason: field.deprecationReason,\n extensions: field.extensions,\n astNode: field.astNode\n };\n });\n return {\n name: this.name,\n description: this.description,\n fields: fields,\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: (_this$extensionASTNod5 = this.extensionASTNodes) !== null && _this$extensionASTNod5 !== void 0 ? _this$extensionASTNod5 : []\n };\n };\n\n _proto6.toString = function toString() {\n return this.name;\n };\n\n _proto6.toJSON = function toJSON() {\n return this.toString();\n } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet\n ;\n\n _createClass(GraphQLInputObjectType, [{\n key: SYMBOL_TO_STRING_TAG,\n get: function get() {\n return 'GraphQLInputObjectType';\n }\n }]);\n\n return GraphQLInputObjectType;\n}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.\n\ndefineInspect(GraphQLInputObjectType);\n\nfunction defineInputFieldMap(config) {\n var fieldMap = resolveThunk(config.fields);\n isPlainObj(fieldMap) || devAssert(0, \"\".concat(config.name, \" fields must be an object with field names as keys or a function which returns such an object.\"));\n return mapValue(fieldMap, function (fieldConfig, fieldName) {\n !('resolve' in fieldConfig) || devAssert(0, \"\".concat(config.name, \".\").concat(fieldName, \" field has a resolve property, but Input Types cannot define resolvers.\"));\n return {\n name: fieldName,\n description: fieldConfig.description,\n type: fieldConfig.type,\n defaultValue: fieldConfig.defaultValue,\n deprecationReason: fieldConfig.deprecationReason,\n extensions: fieldConfig.extensions && toObjMap(fieldConfig.extensions),\n astNode: fieldConfig.astNode\n };\n });\n}\n\nexport function isRequiredInputField(field) {\n return isNonNullType(field.type) && field.defaultValue === undefined;\n}\n","/* eslint-disable no-redeclare */\n// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441\nvar objectEntries = Object.entries || function (obj) {\n return Object.keys(obj).map(function (key) {\n return [key, obj[key]];\n });\n};\n\nexport default objectEntries;\n","/**\n * Creates a keyed JS object from an array, given a function to produce the keys\n * for each value in the array.\n *\n * This provides a convenient lookup for the array items if the key function\n * produces unique results.\n *\n * const phoneBook = [\n * { name: 'Jon', num: '555-1234' },\n * { name: 'Jenny', num: '867-5309' }\n * ]\n *\n * // { Jon: { name: 'Jon', num: '555-1234' },\n * // Jenny: { name: 'Jenny', num: '867-5309' } }\n * const entriesByName = keyMap(\n * phoneBook,\n * entry => entry.name\n * )\n *\n * // { name: 'Jenny', num: '857-6309' }\n * const jennyEntry = entriesByName['Jenny']\n *\n */\nexport default function keyMap(list, keyFn) {\n return list.reduce(function (map, item) {\n map[keyFn(item)] = item;\n return map;\n }, Object.create(null));\n}\n","import objectEntries from \"../polyfills/objectEntries.mjs\";\n\n/**\n * Creates an object map with the same keys as `map` and values generated by\n * running each value of `map` thru `fn`.\n */\nexport default function mapValue(map, fn) {\n var result = Object.create(null);\n\n for (var _i2 = 0, _objectEntries2 = objectEntries(map); _i2 < _objectEntries2.length; _i2++) {\n var _ref2 = _objectEntries2[_i2];\n var _key = _ref2[0];\n var _value = _ref2[1];\n result[_key] = fn(_value, _key);\n }\n\n return result;\n}\n","import objectEntries from \"../polyfills/objectEntries.mjs\";\nexport default function toObjMap(obj) {\n /* eslint-enable no-redeclare */\n if (Object.getPrototypeOf(obj) === null) {\n return obj;\n }\n\n var map = Object.create(null);\n\n for (var _i2 = 0, _objectEntries2 = objectEntries(obj); _i2 < _objectEntries2.length; _i2++) {\n var _ref2 = _objectEntries2[_i2];\n var key = _ref2[0];\n var value = _ref2[1];\n map[key] = value;\n }\n\n return map;\n}\n","/**\n * Creates a keyed JS object from an array, given a function to produce the keys\n * and a function to produce the values from each item in the array.\n *\n * const phoneBook = [\n * { name: 'Jon', num: '555-1234' },\n * { name: 'Jenny', num: '867-5309' }\n * ]\n *\n * // { Jon: '555-1234', Jenny: '867-5309' }\n * const phonesByName = keyValMap(\n * phoneBook,\n * entry => entry.name,\n * entry => entry.num\n * )\n *\n */\nexport default function keyValMap(list, keyFn, valFn) {\n return list.reduce(function (map, item) {\n map[keyFn(item)] = valFn(item);\n return map;\n }, Object.create(null));\n}\n","var MAX_SUGGESTIONS = 5;\n/**\n * Given [ A, B, C ] return ' Did you mean A, B, or C?'.\n */\n\n// eslint-disable-next-line no-redeclare\nexport default function didYouMean(firstArg, secondArg) {\n var _ref = typeof firstArg === 'string' ? [firstArg, secondArg] : [undefined, firstArg],\n subMessage = _ref[0],\n suggestionsArg = _ref[1];\n\n var message = ' Did you mean ';\n\n if (subMessage) {\n message += subMessage + ' ';\n }\n\n var suggestions = suggestionsArg.map(function (x) {\n return \"\\\"\".concat(x, \"\\\"\");\n });\n\n switch (suggestions.length) {\n case 0:\n return '';\n\n case 1:\n return message + suggestions[0] + '?';\n\n case 2:\n return message + suggestions[0] + ' or ' + suggestions[1] + '?';\n }\n\n var selected = suggestions.slice(0, MAX_SUGGESTIONS);\n var lastItem = selected.pop();\n return message + selected.join(', ') + ', or ' + lastItem + '?';\n}\n","/**\n * Returns the first argument it receives.\n */\nexport default function identityFunc(x) {\n return x;\n}\n","import naturalCompare from \"./naturalCompare.mjs\";\n/**\n * Given an invalid input string and a list of valid options, returns a filtered\n * list of valid options sorted based on their similarity with the input.\n */\n\nexport default function suggestionList(input, options) {\n var optionsByDistance = Object.create(null);\n var lexicalDistance = new LexicalDistance(input);\n var threshold = Math.floor(input.length * 0.4) + 1;\n\n for (var _i2 = 0; _i2 < options.length; _i2++) {\n var option = options[_i2];\n var distance = lexicalDistance.measure(option, threshold);\n\n if (distance !== undefined) {\n optionsByDistance[option] = distance;\n }\n }\n\n return Object.keys(optionsByDistance).sort(function (a, b) {\n var distanceDiff = optionsByDistance[a] - optionsByDistance[b];\n return distanceDiff !== 0 ? distanceDiff : naturalCompare(a, b);\n });\n}\n/**\n * Computes the lexical distance between strings A and B.\n *\n * The \"distance\" between two strings is given by counting the minimum number\n * of edits needed to transform string A into string B. An edit can be an\n * insertion, deletion, or substitution of a single character, or a swap of two\n * adjacent characters.\n *\n * Includes a custom alteration from Damerau-Levenshtein to treat case changes\n * as a single edit which helps identify mis-cased values with an edit distance\n * of 1.\n *\n * This distance can be useful for detecting typos in input or sorting\n */\n\nvar LexicalDistance = /*#__PURE__*/function () {\n function LexicalDistance(input) {\n this._input = input;\n this._inputLowerCase = input.toLowerCase();\n this._inputArray = stringToArray(this._inputLowerCase);\n this._rows = [new Array(input.length + 1).fill(0), new Array(input.length + 1).fill(0), new Array(input.length + 1).fill(0)];\n }\n\n var _proto = LexicalDistance.prototype;\n\n _proto.measure = function measure(option, threshold) {\n if (this._input === option) {\n return 0;\n }\n\n var optionLowerCase = option.toLowerCase(); // Any case change counts as a single edit\n\n if (this._inputLowerCase === optionLowerCase) {\n return 1;\n }\n\n var a = stringToArray(optionLowerCase);\n var b = this._inputArray;\n\n if (a.length < b.length) {\n var tmp = a;\n a = b;\n b = tmp;\n }\n\n var aLength = a.length;\n var bLength = b.length;\n\n if (aLength - bLength > threshold) {\n return undefined;\n }\n\n var rows = this._rows;\n\n for (var j = 0; j <= bLength; j++) {\n rows[0][j] = j;\n }\n\n for (var i = 1; i <= aLength; i++) {\n var upRow = rows[(i - 1) % 3];\n var currentRow = rows[i % 3];\n var smallestCell = currentRow[0] = i;\n\n for (var _j = 1; _j <= bLength; _j++) {\n var cost = a[i - 1] === b[_j - 1] ? 0 : 1;\n var currentCell = Math.min(upRow[_j] + 1, // delete\n currentRow[_j - 1] + 1, // insert\n upRow[_j - 1] + cost // substitute\n );\n\n if (i > 1 && _j > 1 && a[i - 1] === b[_j - 2] && a[i - 2] === b[_j - 1]) {\n // transposition\n var doubleDiagonalCell = rows[(i - 2) % 3][_j - 2];\n currentCell = Math.min(currentCell, doubleDiagonalCell + 1);\n }\n\n if (currentCell < smallestCell) {\n smallestCell = currentCell;\n }\n\n currentRow[_j] = currentCell;\n } // Early exit, since distance can't go smaller than smallest element of the previous row.\n\n\n if (smallestCell > threshold) {\n return undefined;\n }\n }\n\n var distance = rows[aLength % 3][bLength];\n return distance <= threshold ? distance : undefined;\n };\n\n return LexicalDistance;\n}();\n\nfunction stringToArray(str) {\n var strLength = str.length;\n var array = new Array(strLength);\n\n for (var i = 0; i < strLength; ++i) {\n array[i] = str.charCodeAt(i);\n }\n\n return array;\n}\n","/**\n * Returns a number indicating whether a reference string comes before, or after,\n * or is the same as the given string in natural sort order.\n *\n * See: https://en.wikipedia.org/wiki/Natural_sort_order\n *\n */\nexport default function naturalCompare(aStr, bStr) {\n var aIdx = 0;\n var bIdx = 0;\n\n while (aIdx < aStr.length && bIdx < bStr.length) {\n var aChar = aStr.charCodeAt(aIdx);\n var bChar = bStr.charCodeAt(bIdx);\n\n if (isDigit(aChar) && isDigit(bChar)) {\n var aNum = 0;\n\n do {\n ++aIdx;\n aNum = aNum * 10 + aChar - DIGIT_0;\n aChar = aStr.charCodeAt(aIdx);\n } while (isDigit(aChar) && aNum > 0);\n\n var bNum = 0;\n\n do {\n ++bIdx;\n bNum = bNum * 10 + bChar - DIGIT_0;\n bChar = bStr.charCodeAt(bIdx);\n } while (isDigit(bChar) && bNum > 0);\n\n if (aNum < bNum) {\n return -1;\n }\n\n if (aNum > bNum) {\n return 1;\n }\n } else {\n if (aChar < bChar) {\n return -1;\n }\n\n if (aChar > bChar) {\n return 1;\n }\n\n ++aIdx;\n ++bIdx;\n }\n }\n\n return aStr.length - bStr.length;\n}\nvar DIGIT_0 = 48;\nvar DIGIT_9 = 57;\n\nfunction isDigit(code) {\n return !isNaN(code) && DIGIT_0 <= code && code <= DIGIT_9;\n}\n","import { visit } from \"./visitor.mjs\";\nimport { printBlockString } from \"./blockString.mjs\";\n/**\n * Converts an AST into a string, using one set of reasonable\n * formatting rules.\n */\n\nexport function print(ast) {\n return visit(ast, {\n leave: printDocASTReducer\n });\n}\nvar MAX_LINE_LENGTH = 80; // TODO: provide better type coverage in future\n\nvar printDocASTReducer = {\n Name: function Name(node) {\n return node.value;\n },\n Variable: function Variable(node) {\n return '$' + node.name;\n },\n // Document\n Document: function Document(node) {\n return join(node.definitions, '\\n\\n') + '\\n';\n },\n OperationDefinition: function OperationDefinition(node) {\n var op = node.operation;\n var name = node.name;\n var varDefs = wrap('(', join(node.variableDefinitions, ', '), ')');\n var directives = join(node.directives, ' ');\n var selectionSet = node.selectionSet; // Anonymous queries with no directives or variable definitions can use\n // the query short form.\n\n return !name && !directives && !varDefs && op === 'query' ? selectionSet : join([op, join([name, varDefs]), directives, selectionSet], ' ');\n },\n VariableDefinition: function VariableDefinition(_ref) {\n var variable = _ref.variable,\n type = _ref.type,\n defaultValue = _ref.defaultValue,\n directives = _ref.directives;\n return variable + ': ' + type + wrap(' = ', defaultValue) + wrap(' ', join(directives, ' '));\n },\n SelectionSet: function SelectionSet(_ref2) {\n var selections = _ref2.selections;\n return block(selections);\n },\n Field: function Field(_ref3) {\n var alias = _ref3.alias,\n name = _ref3.name,\n args = _ref3.arguments,\n directives = _ref3.directives,\n selectionSet = _ref3.selectionSet;\n var prefix = wrap('', alias, ': ') + name;\n var argsLine = prefix + wrap('(', join(args, ', '), ')');\n\n if (argsLine.length > MAX_LINE_LENGTH) {\n argsLine = prefix + wrap('(\\n', indent(join(args, '\\n')), '\\n)');\n }\n\n return join([argsLine, join(directives, ' '), selectionSet], ' ');\n },\n Argument: function Argument(_ref4) {\n var name = _ref4.name,\n value = _ref4.value;\n return name + ': ' + value;\n },\n // Fragments\n FragmentSpread: function FragmentSpread(_ref5) {\n var name = _ref5.name,\n directives = _ref5.directives;\n return '...' + name + wrap(' ', join(directives, ' '));\n },\n InlineFragment: function InlineFragment(_ref6) {\n var typeCondition = _ref6.typeCondition,\n directives = _ref6.directives,\n selectionSet = _ref6.selectionSet;\n return join(['...', wrap('on ', typeCondition), join(directives, ' '), selectionSet], ' ');\n },\n FragmentDefinition: function FragmentDefinition(_ref7) {\n var name = _ref7.name,\n typeCondition = _ref7.typeCondition,\n variableDefinitions = _ref7.variableDefinitions,\n directives = _ref7.directives,\n selectionSet = _ref7.selectionSet;\n return (// Note: fragment variable definitions are experimental and may be changed\n // or removed in the future.\n \"fragment \".concat(name).concat(wrap('(', join(variableDefinitions, ', '), ')'), \" \") + \"on \".concat(typeCondition, \" \").concat(wrap('', join(directives, ' '), ' ')) + selectionSet\n );\n },\n // Value\n IntValue: function IntValue(_ref8) {\n var value = _ref8.value;\n return value;\n },\n FloatValue: function FloatValue(_ref9) {\n var value = _ref9.value;\n return value;\n },\n StringValue: function StringValue(_ref10, key) {\n var value = _ref10.value,\n isBlockString = _ref10.block;\n return isBlockString ? printBlockString(value, key === 'description' ? '' : ' ') : JSON.stringify(value);\n },\n BooleanValue: function BooleanValue(_ref11) {\n var value = _ref11.value;\n return value ? 'true' : 'false';\n },\n NullValue: function NullValue() {\n return 'null';\n },\n EnumValue: function EnumValue(_ref12) {\n var value = _ref12.value;\n return value;\n },\n ListValue: function ListValue(_ref13) {\n var values = _ref13.values;\n return '[' + join(values, ', ') + ']';\n },\n ObjectValue: function ObjectValue(_ref14) {\n var fields = _ref14.fields;\n return '{' + join(fields, ', ') + '}';\n },\n ObjectField: function ObjectField(_ref15) {\n var name = _ref15.name,\n value = _ref15.value;\n return name + ': ' + value;\n },\n // Directive\n Directive: function Directive(_ref16) {\n var name = _ref16.name,\n args = _ref16.arguments;\n return '@' + name + wrap('(', join(args, ', '), ')');\n },\n // Type\n NamedType: function NamedType(_ref17) {\n var name = _ref17.name;\n return name;\n },\n ListType: function ListType(_ref18) {\n var type = _ref18.type;\n return '[' + type + ']';\n },\n NonNullType: function NonNullType(_ref19) {\n var type = _ref19.type;\n return type + '!';\n },\n // Type System Definitions\n SchemaDefinition: addDescription(function (_ref20) {\n var directives = _ref20.directives,\n operationTypes = _ref20.operationTypes;\n return join(['schema', join(directives, ' '), block(operationTypes)], ' ');\n }),\n OperationTypeDefinition: function OperationTypeDefinition(_ref21) {\n var operation = _ref21.operation,\n type = _ref21.type;\n return operation + ': ' + type;\n },\n ScalarTypeDefinition: addDescription(function (_ref22) {\n var name = _ref22.name,\n directives = _ref22.directives;\n return join(['scalar', name, join(directives, ' ')], ' ');\n }),\n ObjectTypeDefinition: addDescription(function (_ref23) {\n var name = _ref23.name,\n interfaces = _ref23.interfaces,\n directives = _ref23.directives,\n fields = _ref23.fields;\n return join(['type', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ');\n }),\n FieldDefinition: addDescription(function (_ref24) {\n var name = _ref24.name,\n args = _ref24.arguments,\n type = _ref24.type,\n directives = _ref24.directives;\n return name + (hasMultilineItems(args) ? wrap('(\\n', indent(join(args, '\\n')), '\\n)') : wrap('(', join(args, ', '), ')')) + ': ' + type + wrap(' ', join(directives, ' '));\n }),\n InputValueDefinition: addDescription(function (_ref25) {\n var name = _ref25.name,\n type = _ref25.type,\n defaultValue = _ref25.defaultValue,\n directives = _ref25.directives;\n return join([name + ': ' + type, wrap('= ', defaultValue), join(directives, ' ')], ' ');\n }),\n InterfaceTypeDefinition: addDescription(function (_ref26) {\n var name = _ref26.name,\n interfaces = _ref26.interfaces,\n directives = _ref26.directives,\n fields = _ref26.fields;\n return join(['interface', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ');\n }),\n UnionTypeDefinition: addDescription(function (_ref27) {\n var name = _ref27.name,\n directives = _ref27.directives,\n types = _ref27.types;\n return join(['union', name, join(directives, ' '), types && types.length !== 0 ? '= ' + join(types, ' | ') : ''], ' ');\n }),\n EnumTypeDefinition: addDescription(function (_ref28) {\n var name = _ref28.name,\n directives = _ref28.directives,\n values = _ref28.values;\n return join(['enum', name, join(directives, ' '), block(values)], ' ');\n }),\n EnumValueDefinition: addDescription(function (_ref29) {\n var name = _ref29.name,\n directives = _ref29.directives;\n return join([name, join(directives, ' ')], ' ');\n }),\n InputObjectTypeDefinition: addDescription(function (_ref30) {\n var name = _ref30.name,\n directives = _ref30.directives,\n fields = _ref30.fields;\n return join(['input', name, join(directives, ' '), block(fields)], ' ');\n }),\n DirectiveDefinition: addDescription(function (_ref31) {\n var name = _ref31.name,\n args = _ref31.arguments,\n repeatable = _ref31.repeatable,\n locations = _ref31.locations;\n return 'directive @' + name + (hasMultilineItems(args) ? wrap('(\\n', indent(join(args, '\\n')), '\\n)') : wrap('(', join(args, ', '), ')')) + (repeatable ? ' repeatable' : '') + ' on ' + join(locations, ' | ');\n }),\n SchemaExtension: function SchemaExtension(_ref32) {\n var directives = _ref32.directives,\n operationTypes = _ref32.operationTypes;\n return join(['extend schema', join(directives, ' '), block(operationTypes)], ' ');\n },\n ScalarTypeExtension: function ScalarTypeExtension(_ref33) {\n var name = _ref33.name,\n directives = _ref33.directives;\n return join(['extend scalar', name, join(directives, ' ')], ' ');\n },\n ObjectTypeExtension: function ObjectTypeExtension(_ref34) {\n var name = _ref34.name,\n interfaces = _ref34.interfaces,\n directives = _ref34.directives,\n fields = _ref34.fields;\n return join(['extend type', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ');\n },\n InterfaceTypeExtension: function InterfaceTypeExtension(_ref35) {\n var name = _ref35.name,\n interfaces = _ref35.interfaces,\n directives = _ref35.directives,\n fields = _ref35.fields;\n return join(['extend interface', name, wrap('implements ', join(interfaces, ' & ')), join(directives, ' '), block(fields)], ' ');\n },\n UnionTypeExtension: function UnionTypeExtension(_ref36) {\n var name = _ref36.name,\n directives = _ref36.directives,\n types = _ref36.types;\n return join(['extend union', name, join(directives, ' '), types && types.length !== 0 ? '= ' + join(types, ' | ') : ''], ' ');\n },\n EnumTypeExtension: function EnumTypeExtension(_ref37) {\n var name = _ref37.name,\n directives = _ref37.directives,\n values = _ref37.values;\n return join(['extend enum', name, join(directives, ' '), block(values)], ' ');\n },\n InputObjectTypeExtension: function InputObjectTypeExtension(_ref38) {\n var name = _ref38.name,\n directives = _ref38.directives,\n fields = _ref38.fields;\n return join(['extend input', name, join(directives, ' '), block(fields)], ' ');\n }\n};\n\nfunction addDescription(cb) {\n return function (node) {\n return join([node.description, cb(node)], '\\n');\n };\n}\n/**\n * Given maybeArray, print an empty string if it is null or empty, otherwise\n * print all items together separated by separator if provided\n */\n\n\nfunction join(maybeArray) {\n var _maybeArray$filter$jo;\n\n var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter(function (x) {\n return x;\n }).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : '';\n}\n/**\n * Given array, print each item on its own line, wrapped in an\n * indented \"{ }\" block.\n */\n\n\nfunction block(array) {\n return wrap('{\\n', indent(join(array, '\\n')), '\\n}');\n}\n/**\n * If maybeString is not null or empty, then wrap with start and end, otherwise print an empty string.\n */\n\n\nfunction wrap(start, maybeString) {\n var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n return maybeString != null && maybeString !== '' ? start + maybeString + end : '';\n}\n\nfunction indent(str) {\n return wrap(' ', str.replace(/\\n/g, '\\n '));\n}\n\nfunction isMultiline(str) {\n return str.indexOf('\\n') !== -1;\n}\n\nfunction hasMultilineItems(maybeArray) {\n return maybeArray != null && maybeArray.some(isMultiline);\n}\n","import inspect from \"../jsutils/inspect.mjs\";\nimport invariant from \"../jsutils/invariant.mjs\";\nimport keyValMap from \"../jsutils/keyValMap.mjs\";\nimport { Kind } from \"../language/kinds.mjs\";\n\n/**\n * Produces a JavaScript value given a GraphQL Value AST.\n *\n * Unlike `valueFromAST()`, no type is provided. The resulting JavaScript value\n * will reflect the provided GraphQL value AST.\n *\n * | GraphQL Value | JavaScript Value |\n * | -------------------- | ---------------- |\n * | Input Object | Object |\n * | List | Array |\n * | Boolean | Boolean |\n * | String / Enum | String |\n * | Int / Float | Number |\n * | Null | null |\n *\n */\nexport function valueFromASTUntyped(valueNode, variables) {\n switch (valueNode.kind) {\n case Kind.NULL:\n return null;\n\n case Kind.INT:\n return parseInt(valueNode.value, 10);\n\n case Kind.FLOAT:\n return parseFloat(valueNode.value);\n\n case Kind.STRING:\n case Kind.ENUM:\n case Kind.BOOLEAN:\n return valueNode.value;\n\n case Kind.LIST:\n return valueNode.values.map(function (node) {\n return valueFromASTUntyped(node, variables);\n });\n\n case Kind.OBJECT:\n return keyValMap(valueNode.fields, function (field) {\n return field.name.value;\n }, function (field) {\n return valueFromASTUntyped(field.value, variables);\n });\n\n case Kind.VARIABLE:\n return variables === null || variables === void 0 ? void 0 : variables[valueNode.name.value];\n } // istanbul ignore next (Not reachable. All possible value nodes have been considered)\n\n\n false || invariant(0, 'Unexpected value node: ' + inspect(valueNode));\n}\n","function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nimport find from \"../polyfills/find.mjs\";\nimport arrayFrom from \"../polyfills/arrayFrom.mjs\";\nimport objectValues from \"../polyfills/objectValues.mjs\";\nimport { SYMBOL_TO_STRING_TAG } from \"../polyfills/symbols.mjs\";\nimport inspect from \"../jsutils/inspect.mjs\";\nimport toObjMap from \"../jsutils/toObjMap.mjs\";\nimport devAssert from \"../jsutils/devAssert.mjs\";\nimport instanceOf from \"../jsutils/instanceOf.mjs\";\nimport isObjectLike from \"../jsutils/isObjectLike.mjs\";\nimport { __Schema } from \"./introspection.mjs\";\nimport { GraphQLDirective, isDirective, specifiedDirectives } from \"./directives.mjs\";\nimport { isObjectType, isInterfaceType, isUnionType, isInputObjectType, getNamedType } from \"./definition.mjs\";\n/**\n * Test if the given value is a GraphQL schema.\n */\n\n// eslint-disable-next-line no-redeclare\nexport function isSchema(schema) {\n return instanceOf(schema, GraphQLSchema);\n}\nexport function assertSchema(schema) {\n if (!isSchema(schema)) {\n throw new Error(\"Expected \".concat(inspect(schema), \" to be a GraphQL schema.\"));\n }\n\n return schema;\n}\n/**\n * Schema Definition\n *\n * A Schema is created by supplying the root types of each type of operation,\n * query and mutation (optional). A schema definition is then supplied to the\n * validator and executor.\n *\n * Example:\n *\n * const MyAppSchema = new GraphQLSchema({\n * query: MyAppQueryRootType,\n * mutation: MyAppMutationRootType,\n * })\n *\n * Note: When the schema is constructed, by default only the types that are\n * reachable by traversing the root types are included, other types must be\n * explicitly referenced.\n *\n * Example:\n *\n * const characterInterface = new GraphQLInterfaceType({\n * name: 'Character',\n * ...\n * });\n *\n * const humanType = new GraphQLObjectType({\n * name: 'Human',\n * interfaces: [characterInterface],\n * ...\n * });\n *\n * const droidType = new GraphQLObjectType({\n * name: 'Droid',\n * interfaces: [characterInterface],\n * ...\n * });\n *\n * const schema = new GraphQLSchema({\n * query: new GraphQLObjectType({\n * name: 'Query',\n * fields: {\n * hero: { type: characterInterface, ... },\n * }\n * }),\n * ...\n * // Since this schema references only the `Character` interface it's\n * // necessary to explicitly list the types that implement it if\n * // you want them to be included in the final schema.\n * types: [humanType, droidType],\n * })\n *\n * Note: If an array of `directives` are provided to GraphQLSchema, that will be\n * the exact list of directives represented and allowed. If `directives` is not\n * provided then a default set of the specified directives (e.g. @include and\n * @skip) will be used. If you wish to provide *additional* directives to these\n * specified directives, you must explicitly declare them. Example:\n *\n * const MyAppSchema = new GraphQLSchema({\n * ...\n * directives: specifiedDirectives.concat([ myCustomDirective ]),\n * })\n *\n */\n\nexport var GraphQLSchema = /*#__PURE__*/function () {\n // Used as a cache for validateSchema().\n function GraphQLSchema(config) {\n var _config$directives;\n\n // If this schema was built from a source known to be valid, then it may be\n // marked with assumeValid to avoid an additional type system validation.\n this.__validationErrors = config.assumeValid === true ? [] : undefined; // Check for common mistakes during construction to produce early errors.\n\n isObjectLike(config) || devAssert(0, 'Must provide configuration object.');\n !config.types || Array.isArray(config.types) || devAssert(0, \"\\\"types\\\" must be Array if provided but got: \".concat(inspect(config.types), \".\"));\n !config.directives || Array.isArray(config.directives) || devAssert(0, '\"directives\" must be Array if provided but got: ' + \"\".concat(inspect(config.directives), \".\"));\n this.description = config.description;\n this.extensions = config.extensions && toObjMap(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes = config.extensionASTNodes;\n this._queryType = config.query;\n this._mutationType = config.mutation;\n this._subscriptionType = config.subscription; // Provide specified directives (e.g. @include and @skip) by default.\n\n this._directives = (_config$directives = config.directives) !== null && _config$directives !== void 0 ? _config$directives : specifiedDirectives; // To preserve order of user-provided types, we add first to add them to\n // the set of \"collected\" types, so `collectReferencedTypes` ignore them.\n\n var allReferencedTypes = new Set(config.types);\n\n if (config.types != null) {\n for (var _i2 = 0, _config$types2 = config.types; _i2 < _config$types2.length; _i2++) {\n var type = _config$types2[_i2];\n // When we ready to process this type, we remove it from \"collected\" types\n // and then add it together with all dependent types in the correct position.\n allReferencedTypes.delete(type);\n collectReferencedTypes(type, allReferencedTypes);\n }\n }\n\n if (this._queryType != null) {\n collectReferencedTypes(this._queryType, allReferencedTypes);\n }\n\n if (this._mutationType != null) {\n collectReferencedTypes(this._mutationType, allReferencedTypes);\n }\n\n if (this._subscriptionType != null) {\n collectReferencedTypes(this._subscriptionType, allReferencedTypes);\n }\n\n for (var _i4 = 0, _this$_directives2 = this._directives; _i4 < _this$_directives2.length; _i4++) {\n var directive = _this$_directives2[_i4];\n\n // Directives are not validated until validateSchema() is called.\n if (isDirective(directive)) {\n for (var _i6 = 0, _directive$args2 = directive.args; _i6 < _directive$args2.length; _i6++) {\n var arg = _directive$args2[_i6];\n collectReferencedTypes(arg.type, allReferencedTypes);\n }\n }\n }\n\n collectReferencedTypes(__Schema, allReferencedTypes); // Storing the resulting map for reference by the schema.\n\n this._typeMap = Object.create(null);\n this._subTypeMap = Object.create(null); // Keep track of all implementations by interface name.\n\n this._implementationsMap = Object.create(null);\n\n for (var _i8 = 0, _arrayFrom2 = arrayFrom(allReferencedTypes); _i8 < _arrayFrom2.length; _i8++) {\n var namedType = _arrayFrom2[_i8];\n\n if (namedType == null) {\n continue;\n }\n\n var typeName = namedType.name;\n typeName || devAssert(0, 'One of the provided types for building the Schema is missing a name.');\n\n if (this._typeMap[typeName] !== undefined) {\n throw new Error(\"Schema must contain uniquely named types but contains multiple types named \\\"\".concat(typeName, \"\\\".\"));\n }\n\n this._typeMap[typeName] = namedType;\n\n if (isInterfaceType(namedType)) {\n // Store implementations by interface.\n for (var _i10 = 0, _namedType$getInterfa2 = namedType.getInterfaces(); _i10 < _namedType$getInterfa2.length; _i10++) {\n var iface = _namedType$getInterfa2[_i10];\n\n if (isInterfaceType(iface)) {\n var implementations = this._implementationsMap[iface.name];\n\n if (implementations === undefined) {\n implementations = this._implementationsMap[iface.name] = {\n objects: [],\n interfaces: []\n };\n }\n\n implementations.interfaces.push(namedType);\n }\n }\n } else if (isObjectType(namedType)) {\n // Store implementations by objects.\n for (var _i12 = 0, _namedType$getInterfa4 = namedType.getInterfaces(); _i12 < _namedType$getInterfa4.length; _i12++) {\n var _iface = _namedType$getInterfa4[_i12];\n\n if (isInterfaceType(_iface)) {\n var _implementations = this._implementationsMap[_iface.name];\n\n if (_implementations === undefined) {\n _implementations = this._implementationsMap[_iface.name] = {\n objects: [],\n interfaces: []\n };\n }\n\n _implementations.objects.push(namedType);\n }\n }\n }\n }\n }\n\n var _proto = GraphQLSchema.prototype;\n\n _proto.getQueryType = function getQueryType() {\n return this._queryType;\n };\n\n _proto.getMutationType = function getMutationType() {\n return this._mutationType;\n };\n\n _proto.getSubscriptionType = function getSubscriptionType() {\n return this._subscriptionType;\n };\n\n _proto.getTypeMap = function getTypeMap() {\n return this._typeMap;\n };\n\n _proto.getType = function getType(name) {\n return this.getTypeMap()[name];\n };\n\n _proto.getPossibleTypes = function getPossibleTypes(abstractType) {\n return isUnionType(abstractType) ? abstractType.getTypes() : this.getImplementations(abstractType).objects;\n };\n\n _proto.getImplementations = function getImplementations(interfaceType) {\n var implementations = this._implementationsMap[interfaceType.name];\n return implementations !== null && implementations !== void 0 ? implementations : {\n objects: [],\n interfaces: []\n };\n } // @deprecated: use isSubType instead - will be removed in v16.\n ;\n\n _proto.isPossibleType = function isPossibleType(abstractType, possibleType) {\n return this.isSubType(abstractType, possibleType);\n };\n\n _proto.isSubType = function isSubType(abstractType, maybeSubType) {\n var map = this._subTypeMap[abstractType.name];\n\n if (map === undefined) {\n map = Object.create(null);\n\n if (isUnionType(abstractType)) {\n for (var _i14 = 0, _abstractType$getType2 = abstractType.getTypes(); _i14 < _abstractType$getType2.length; _i14++) {\n var type = _abstractType$getType2[_i14];\n map[type.name] = true;\n }\n } else {\n var implementations = this.getImplementations(abstractType);\n\n for (var _i16 = 0, _implementations$obje2 = implementations.objects; _i16 < _implementations$obje2.length; _i16++) {\n var _type = _implementations$obje2[_i16];\n map[_type.name] = true;\n }\n\n for (var _i18 = 0, _implementations$inte2 = implementations.interfaces; _i18 < _implementations$inte2.length; _i18++) {\n var _type2 = _implementations$inte2[_i18];\n map[_type2.name] = true;\n }\n }\n\n this._subTypeMap[abstractType.name] = map;\n }\n\n return map[maybeSubType.name] !== undefined;\n };\n\n _proto.getDirectives = function getDirectives() {\n return this._directives;\n };\n\n _proto.getDirective = function getDirective(name) {\n return find(this.getDirectives(), function (directive) {\n return directive.name === name;\n });\n };\n\n _proto.toConfig = function toConfig() {\n var _this$extensionASTNod;\n\n return {\n description: this.description,\n query: this.getQueryType(),\n mutation: this.getMutationType(),\n subscription: this.getSubscriptionType(),\n types: objectValues(this.getTypeMap()),\n directives: this.getDirectives().slice(),\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: (_this$extensionASTNod = this.extensionASTNodes) !== null && _this$extensionASTNod !== void 0 ? _this$extensionASTNod : [],\n assumeValid: this.__validationErrors !== undefined\n };\n } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet\n ;\n\n _createClass(GraphQLSchema, [{\n key: SYMBOL_TO_STRING_TAG,\n get: function get() {\n return 'GraphQLSchema';\n }\n }]);\n\n return GraphQLSchema;\n}();\n\nfunction collectReferencedTypes(type, typeSet) {\n var namedType = getNamedType(type);\n\n if (!typeSet.has(namedType)) {\n typeSet.add(namedType);\n\n if (isUnionType(namedType)) {\n for (var _i20 = 0, _namedType$getTypes2 = namedType.getTypes(); _i20 < _namedType$getTypes2.length; _i20++) {\n var memberType = _namedType$getTypes2[_i20];\n collectReferencedTypes(memberType, typeSet);\n }\n } else if (isObjectType(namedType) || isInterfaceType(namedType)) {\n for (var _i22 = 0, _namedType$getInterfa6 = namedType.getInterfaces(); _i22 < _namedType$getInterfa6.length; _i22++) {\n var interfaceType = _namedType$getInterfa6[_i22];\n collectReferencedTypes(interfaceType, typeSet);\n }\n\n for (var _i24 = 0, _objectValues2 = objectValues(namedType.getFields()); _i24 < _objectValues2.length; _i24++) {\n var field = _objectValues2[_i24];\n collectReferencedTypes(field.type, typeSet);\n\n for (var _i26 = 0, _field$args2 = field.args; _i26 < _field$args2.length; _i26++) {\n var arg = _field$args2[_i26];\n collectReferencedTypes(arg.type, typeSet);\n }\n }\n } else if (isInputObjectType(namedType)) {\n for (var _i28 = 0, _objectValues4 = objectValues(namedType.getFields()); _i28 < _objectValues4.length; _i28++) {\n var _field = _objectValues4[_i28];\n collectReferencedTypes(_field.type, typeSet);\n }\n }\n }\n\n return typeSet;\n}\n","import { SYMBOL_ITERATOR } from \"./symbols.mjs\";\n\n/* eslint-disable no-redeclare */\n// $FlowFixMe[name-already-bound]\nvar arrayFrom = Array.from || function (obj, mapFn, thisArg) {\n if (obj == null) {\n throw new TypeError('Array.from requires an array-like object - not null or undefined');\n } // Is Iterable?\n\n\n var iteratorMethod = obj[SYMBOL_ITERATOR];\n\n if (typeof iteratorMethod === 'function') {\n var iterator = iteratorMethod.call(obj);\n var result = [];\n var step;\n\n for (var i = 0; !(step = iterator.next()).done; ++i) {\n result.push(mapFn.call(thisArg, step.value, i)); // Infinite Iterators could cause forEach to run forever.\n // After a very large number of iterations, produce an error.\n // istanbul ignore if (Too big to actually test)\n\n if (i > 9999999) {\n throw new TypeError('Near-infinite iteration.');\n }\n }\n\n return result;\n } // Is Array like?\n\n\n var length = obj.length;\n\n if (typeof length === 'number' && length >= 0 && length % 1 === 0) {\n var _result = [];\n\n for (var _i = 0; _i < length; ++_i) {\n if (Object.prototype.hasOwnProperty.call(obj, _i)) {\n _result.push(mapFn.call(thisArg, obj[_i], _i));\n }\n }\n\n return _result;\n }\n\n return [];\n};\n\nexport default arrayFrom;\n","import objectValues from \"../polyfills/objectValues.mjs\";\nimport inspect from \"../jsutils/inspect.mjs\";\nimport invariant from \"../jsutils/invariant.mjs\";\nimport { print } from \"../language/printer.mjs\";\nimport { DirectiveLocation } from \"../language/directiveLocation.mjs\";\nimport { astFromValue } from \"../utilities/astFromValue.mjs\";\nimport { GraphQLString, GraphQLBoolean } from \"./scalars.mjs\";\nimport { GraphQLList, GraphQLNonNull, GraphQLObjectType, GraphQLEnumType, isScalarType, isObjectType, isInterfaceType, isUnionType, isEnumType, isInputObjectType, isListType, isNonNullType, isAbstractType } from \"./definition.mjs\";\nexport var __Schema = new GraphQLObjectType({\n name: '__Schema',\n description: 'A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.',\n fields: function fields() {\n return {\n description: {\n type: GraphQLString,\n resolve: function resolve(schema) {\n return schema.description;\n }\n },\n types: {\n description: 'A list of all types supported by this server.',\n type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__Type))),\n resolve: function resolve(schema) {\n return objectValues(schema.getTypeMap());\n }\n },\n queryType: {\n description: 'The type that query operations will be rooted at.',\n type: new GraphQLNonNull(__Type),\n resolve: function resolve(schema) {\n return schema.getQueryType();\n }\n },\n mutationType: {\n description: 'If this server supports mutation, the type that mutation operations will be rooted at.',\n type: __Type,\n resolve: function resolve(schema) {\n return schema.getMutationType();\n }\n },\n subscriptionType: {\n description: 'If this server support subscription, the type that subscription operations will be rooted at.',\n type: __Type,\n resolve: function resolve(schema) {\n return schema.getSubscriptionType();\n }\n },\n directives: {\n description: 'A list of all directives supported by this server.',\n type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__Directive))),\n resolve: function resolve(schema) {\n return schema.getDirectives();\n }\n }\n };\n }\n});\nexport var __Directive = new GraphQLObjectType({\n name: '__Directive',\n description: \"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\\n\\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.\",\n fields: function fields() {\n return {\n name: {\n type: new GraphQLNonNull(GraphQLString),\n resolve: function resolve(directive) {\n return directive.name;\n }\n },\n description: {\n type: GraphQLString,\n resolve: function resolve(directive) {\n return directive.description;\n }\n },\n isRepeatable: {\n type: new GraphQLNonNull(GraphQLBoolean),\n resolve: function resolve(directive) {\n return directive.isRepeatable;\n }\n },\n locations: {\n type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__DirectiveLocation))),\n resolve: function resolve(directive) {\n return directive.locations;\n }\n },\n args: {\n type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__InputValue))),\n args: {\n includeDeprecated: {\n type: GraphQLBoolean,\n defaultValue: false\n }\n },\n resolve: function resolve(field, _ref) {\n var includeDeprecated = _ref.includeDeprecated;\n return includeDeprecated ? field.args : field.args.filter(function (arg) {\n return arg.deprecationReason == null;\n });\n }\n }\n };\n }\n});\nexport var __DirectiveLocation = new GraphQLEnumType({\n name: '__DirectiveLocation',\n description: 'A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.',\n values: {\n QUERY: {\n value: DirectiveLocation.QUERY,\n description: 'Location adjacent to a query operation.'\n },\n MUTATION: {\n value: DirectiveLocation.MUTATION,\n description: 'Location adjacent to a mutation operation.'\n },\n SUBSCRIPTION: {\n value: DirectiveLocation.SUBSCRIPTION,\n description: 'Location adjacent to a subscription operation.'\n },\n FIELD: {\n value: DirectiveLocation.FIELD,\n description: 'Location adjacent to a field.'\n },\n FRAGMENT_DEFINITION: {\n value: DirectiveLocation.FRAGMENT_DEFINITION,\n description: 'Location adjacent to a fragment definition.'\n },\n FRAGMENT_SPREAD: {\n value: DirectiveLocation.FRAGMENT_SPREAD,\n description: 'Location adjacent to a fragment spread.'\n },\n INLINE_FRAGMENT: {\n value: DirectiveLocation.INLINE_FRAGMENT,\n description: 'Location adjacent to an inline fragment.'\n },\n VARIABLE_DEFINITION: {\n value: DirectiveLocation.VARIABLE_DEFINITION,\n description: 'Location adjacent to a variable definition.'\n },\n SCHEMA: {\n value: DirectiveLocation.SCHEMA,\n description: 'Location adjacent to a schema definition.'\n },\n SCALAR: {\n value: DirectiveLocation.SCALAR,\n description: 'Location adjacent to a scalar definition.'\n },\n OBJECT: {\n value: DirectiveLocation.OBJECT,\n description: 'Location adjacent to an object type definition.'\n },\n FIELD_DEFINITION: {\n value: DirectiveLocation.FIELD_DEFINITION,\n description: 'Location adjacent to a field definition.'\n },\n ARGUMENT_DEFINITION: {\n value: DirectiveLocation.ARGUMENT_DEFINITION,\n description: 'Location adjacent to an argument definition.'\n },\n INTERFACE: {\n value: DirectiveLocation.INTERFACE,\n description: 'Location adjacent to an interface definition.'\n },\n UNION: {\n value: DirectiveLocation.UNION,\n description: 'Location adjacent to a union definition.'\n },\n ENUM: {\n value: DirectiveLocation.ENUM,\n description: 'Location adjacent to an enum definition.'\n },\n ENUM_VALUE: {\n value: DirectiveLocation.ENUM_VALUE,\n description: 'Location adjacent to an enum value definition.'\n },\n INPUT_OBJECT: {\n value: DirectiveLocation.INPUT_OBJECT,\n description: 'Location adjacent to an input object type definition.'\n },\n INPUT_FIELD_DEFINITION: {\n value: DirectiveLocation.INPUT_FIELD_DEFINITION,\n description: 'Location adjacent to an input object field definition.'\n }\n }\n});\nexport var __Type = new GraphQLObjectType({\n name: '__Type',\n description: 'The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\\n\\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.',\n fields: function fields() {\n return {\n kind: {\n type: new GraphQLNonNull(__TypeKind),\n resolve: function resolve(type) {\n if (isScalarType(type)) {\n return TypeKind.SCALAR;\n }\n\n if (isObjectType(type)) {\n return TypeKind.OBJECT;\n }\n\n if (isInterfaceType(type)) {\n return TypeKind.INTERFACE;\n }\n\n if (isUnionType(type)) {\n return TypeKind.UNION;\n }\n\n if (isEnumType(type)) {\n return TypeKind.ENUM;\n }\n\n if (isInputObjectType(type)) {\n return TypeKind.INPUT_OBJECT;\n }\n\n if (isListType(type)) {\n return TypeKind.LIST;\n } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')\n\n\n if (isNonNullType(type)) {\n return TypeKind.NON_NULL;\n } // istanbul ignore next (Not reachable. All possible types have been considered)\n\n\n false || invariant(0, \"Unexpected type: \\\"\".concat(inspect(type), \"\\\".\"));\n }\n },\n name: {\n type: GraphQLString,\n resolve: function resolve(type) {\n return type.name !== undefined ? type.name : undefined;\n }\n },\n description: {\n type: GraphQLString,\n resolve: function resolve(type) {\n return type.description !== undefined ? type.description : undefined;\n }\n },\n specifiedByUrl: {\n type: GraphQLString,\n resolve: function resolve(obj) {\n return obj.specifiedByUrl !== undefined ? obj.specifiedByUrl : undefined;\n }\n },\n fields: {\n type: new GraphQLList(new GraphQLNonNull(__Field)),\n args: {\n includeDeprecated: {\n type: GraphQLBoolean,\n defaultValue: false\n }\n },\n resolve: function resolve(type, _ref2) {\n var includeDeprecated = _ref2.includeDeprecated;\n\n if (isObjectType(type) || isInterfaceType(type)) {\n var fields = objectValues(type.getFields());\n return includeDeprecated ? fields : fields.filter(function (field) {\n return field.deprecationReason == null;\n });\n }\n }\n },\n interfaces: {\n type: new GraphQLList(new GraphQLNonNull(__Type)),\n resolve: function resolve(type) {\n if (isObjectType(type) || isInterfaceType(type)) {\n return type.getInterfaces();\n }\n }\n },\n possibleTypes: {\n type: new GraphQLList(new GraphQLNonNull(__Type)),\n resolve: function resolve(type, _args, _context, _ref3) {\n var schema = _ref3.schema;\n\n if (isAbstractType(type)) {\n return schema.getPossibleTypes(type);\n }\n }\n },\n enumValues: {\n type: new GraphQLList(new GraphQLNonNull(__EnumValue)),\n args: {\n includeDeprecated: {\n type: GraphQLBoolean,\n defaultValue: false\n }\n },\n resolve: function resolve(type, _ref4) {\n var includeDeprecated = _ref4.includeDeprecated;\n\n if (isEnumType(type)) {\n var values = type.getValues();\n return includeDeprecated ? values : values.filter(function (field) {\n return field.deprecationReason == null;\n });\n }\n }\n },\n inputFields: {\n type: new GraphQLList(new GraphQLNonNull(__InputValue)),\n args: {\n includeDeprecated: {\n type: GraphQLBoolean,\n defaultValue: false\n }\n },\n resolve: function resolve(type, _ref5) {\n var includeDeprecated = _ref5.includeDeprecated;\n\n if (isInputObjectType(type)) {\n var values = objectValues(type.getFields());\n return includeDeprecated ? values : values.filter(function (field) {\n return field.deprecationReason == null;\n });\n }\n }\n },\n ofType: {\n type: __Type,\n resolve: function resolve(type) {\n return type.ofType !== undefined ? type.ofType : undefined;\n }\n }\n };\n }\n});\nexport var __Field = new GraphQLObjectType({\n name: '__Field',\n description: 'Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.',\n fields: function fields() {\n return {\n name: {\n type: new GraphQLNonNull(GraphQLString),\n resolve: function resolve(field) {\n return field.name;\n }\n },\n description: {\n type: GraphQLString,\n resolve: function resolve(field) {\n return field.description;\n }\n },\n args: {\n type: new GraphQLNonNull(new GraphQLList(new GraphQLNonNull(__InputValue))),\n args: {\n includeDeprecated: {\n type: GraphQLBoolean,\n defaultValue: false\n }\n },\n resolve: function resolve(field, _ref6) {\n var includeDeprecated = _ref6.includeDeprecated;\n return includeDeprecated ? field.args : field.args.filter(function (arg) {\n return arg.deprecationReason == null;\n });\n }\n },\n type: {\n type: new GraphQLNonNull(__Type),\n resolve: function resolve(field) {\n return field.type;\n }\n },\n isDeprecated: {\n type: new GraphQLNonNull(GraphQLBoolean),\n resolve: function resolve(field) {\n return field.deprecationReason != null;\n }\n },\n deprecationReason: {\n type: GraphQLString,\n resolve: function resolve(field) {\n return field.deprecationReason;\n }\n }\n };\n }\n});\nexport var __InputValue = new GraphQLObjectType({\n name: '__InputValue',\n description: 'Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.',\n fields: function fields() {\n return {\n name: {\n type: new GraphQLNonNull(GraphQLString),\n resolve: function resolve(inputValue) {\n return inputValue.name;\n }\n },\n description: {\n type: GraphQLString,\n resolve: function resolve(inputValue) {\n return inputValue.description;\n }\n },\n type: {\n type: new GraphQLNonNull(__Type),\n resolve: function resolve(inputValue) {\n return inputValue.type;\n }\n },\n defaultValue: {\n type: GraphQLString,\n description: 'A GraphQL-formatted string representing the default value for this input value.',\n resolve: function resolve(inputValue) {\n var type = inputValue.type,\n defaultValue = inputValue.defaultValue;\n var valueAST = astFromValue(defaultValue, type);\n return valueAST ? print(valueAST) : null;\n }\n },\n isDeprecated: {\n type: new GraphQLNonNull(GraphQLBoolean),\n resolve: function resolve(field) {\n return field.deprecationReason != null;\n }\n },\n deprecationReason: {\n type: GraphQLString,\n resolve: function resolve(obj) {\n return obj.deprecationReason;\n }\n }\n };\n }\n});\nexport var __EnumValue = new GraphQLObjectType({\n name: '__EnumValue',\n description: 'One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.',\n fields: function fields() {\n return {\n name: {\n type: new GraphQLNonNull(GraphQLString),\n resolve: function resolve(enumValue) {\n return enumValue.name;\n }\n },\n description: {\n type: GraphQLString,\n resolve: function resolve(enumValue) {\n return enumValue.description;\n }\n },\n isDeprecated: {\n type: new GraphQLNonNull(GraphQLBoolean),\n resolve: function resolve(enumValue) {\n return enumValue.deprecationReason != null;\n }\n },\n deprecationReason: {\n type: GraphQLString,\n resolve: function resolve(enumValue) {\n return enumValue.deprecationReason;\n }\n }\n };\n }\n});\nexport var TypeKind = Object.freeze({\n SCALAR: 'SCALAR',\n OBJECT: 'OBJECT',\n INTERFACE: 'INTERFACE',\n UNION: 'UNION',\n ENUM: 'ENUM',\n INPUT_OBJECT: 'INPUT_OBJECT',\n LIST: 'LIST',\n NON_NULL: 'NON_NULL'\n});\nexport var __TypeKind = new GraphQLEnumType({\n name: '__TypeKind',\n description: 'An enum describing what kind of type a given `__Type` is.',\n values: {\n SCALAR: {\n value: TypeKind.SCALAR,\n description: 'Indicates this type is a scalar.'\n },\n OBJECT: {\n value: TypeKind.OBJECT,\n description: 'Indicates this type is an object. `fields` and `interfaces` are valid fields.'\n },\n INTERFACE: {\n value: TypeKind.INTERFACE,\n description: 'Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.'\n },\n UNION: {\n value: TypeKind.UNION,\n description: 'Indicates this type is a union. `possibleTypes` is a valid field.'\n },\n ENUM: {\n value: TypeKind.ENUM,\n description: 'Indicates this type is an enum. `enumValues` is a valid field.'\n },\n INPUT_OBJECT: {\n value: TypeKind.INPUT_OBJECT,\n description: 'Indicates this type is an input object. `inputFields` is a valid field.'\n },\n LIST: {\n value: TypeKind.LIST,\n description: 'Indicates this type is a list. `ofType` is a valid field.'\n },\n NON_NULL: {\n value: TypeKind.NON_NULL,\n description: 'Indicates this type is a non-null. `ofType` is a valid field.'\n }\n }\n});\n/**\n * Note that these are GraphQLField and not GraphQLFieldConfig,\n * so the format for args is different.\n */\n\nexport var SchemaMetaFieldDef = {\n name: '__schema',\n type: new GraphQLNonNull(__Schema),\n description: 'Access the current type schema of this server.',\n args: [],\n resolve: function resolve(_source, _args, _context, _ref7) {\n var schema = _ref7.schema;\n return schema;\n },\n isDeprecated: false,\n deprecationReason: undefined,\n extensions: undefined,\n astNode: undefined\n};\nexport var TypeMetaFieldDef = {\n name: '__type',\n type: __Type,\n description: 'Request the type information of a single type.',\n args: [{\n name: 'name',\n description: undefined,\n type: new GraphQLNonNull(GraphQLString),\n defaultValue: undefined,\n deprecationReason: undefined,\n extensions: undefined,\n astNode: undefined\n }],\n resolve: function resolve(_source, _ref8, _context, _ref9) {\n var name = _ref8.name;\n var schema = _ref9.schema;\n return schema.getType(name);\n },\n isDeprecated: false,\n deprecationReason: undefined,\n extensions: undefined,\n astNode: undefined\n};\nexport var TypeNameMetaFieldDef = {\n name: '__typename',\n type: new GraphQLNonNull(GraphQLString),\n description: 'The name of the current Object type at runtime.',\n args: [],\n resolve: function resolve(_source, _args, _context, _ref10) {\n var parentType = _ref10.parentType;\n return parentType.name;\n },\n isDeprecated: false,\n deprecationReason: undefined,\n extensions: undefined,\n astNode: undefined\n};\nexport var introspectionTypes = Object.freeze([__Schema, __Directive, __DirectiveLocation, __Type, __Field, __InputValue, __EnumValue, __TypeKind]);\nexport function isIntrospectionType(type) {\n return introspectionTypes.some(function (_ref11) {\n var name = _ref11.name;\n return type.name === name;\n });\n}\n","import isFinite from \"../polyfills/isFinite.mjs\";\nimport objectValues from \"../polyfills/objectValues.mjs\";\nimport inspect from \"../jsutils/inspect.mjs\";\nimport invariant from \"../jsutils/invariant.mjs\";\nimport isObjectLike from \"../jsutils/isObjectLike.mjs\";\nimport safeArrayFrom from \"../jsutils/safeArrayFrom.mjs\";\nimport { Kind } from \"../language/kinds.mjs\";\nimport { GraphQLID } from \"../type/scalars.mjs\";\nimport { isLeafType, isEnumType, isInputObjectType, isListType, isNonNullType } from \"../type/definition.mjs\";\n/**\n * Produces a GraphQL Value AST given a JavaScript object.\n * Function will match JavaScript/JSON values to GraphQL AST schema format\n * by using suggested GraphQLInputType. For example:\n *\n * astFromValue(\"value\", GraphQLString)\n *\n * A GraphQL type must be provided, which will be used to interpret different\n * JavaScript values.\n *\n * | JSON Value | GraphQL Value |\n * | ------------- | -------------------- |\n * | Object | Input Object |\n * | Array | List |\n * | Boolean | Boolean |\n * | String | String / Enum Value |\n * | Number | Int / Float |\n * | Mixed | Enum Value |\n * | null | NullValue |\n *\n */\n\nexport function astFromValue(value, type) {\n if (isNonNullType(type)) {\n var astValue = astFromValue(value, type.ofType);\n\n if ((astValue === null || astValue === void 0 ? void 0 : astValue.kind) === Kind.NULL) {\n return null;\n }\n\n return astValue;\n } // only explicit null, not undefined, NaN\n\n\n if (value === null) {\n return {\n kind: Kind.NULL\n };\n } // undefined\n\n\n if (value === undefined) {\n return null;\n } // Convert JavaScript array to GraphQL list. If the GraphQLType is a list, but\n // the value is not an array, convert the value using the list's item type.\n\n\n if (isListType(type)) {\n var itemType = type.ofType;\n var items = safeArrayFrom(value);\n\n if (items != null) {\n var valuesNodes = [];\n\n for (var _i2 = 0; _i2 < items.length; _i2++) {\n var item = items[_i2];\n var itemNode = astFromValue(item, itemType);\n\n if (itemNode != null) {\n valuesNodes.push(itemNode);\n }\n }\n\n return {\n kind: Kind.LIST,\n values: valuesNodes\n };\n }\n\n return astFromValue(value, itemType);\n } // Populate the fields of the input object by creating ASTs from each value\n // in the JavaScript object according to the fields in the input type.\n\n\n if (isInputObjectType(type)) {\n if (!isObjectLike(value)) {\n return null;\n }\n\n var fieldNodes = [];\n\n for (var _i4 = 0, _objectValues2 = objectValues(type.getFields()); _i4 < _objectValues2.length; _i4++) {\n var field = _objectValues2[_i4];\n var fieldValue = astFromValue(value[field.name], field.type);\n\n if (fieldValue) {\n fieldNodes.push({\n kind: Kind.OBJECT_FIELD,\n name: {\n kind: Kind.NAME,\n value: field.name\n },\n value: fieldValue\n });\n }\n }\n\n return {\n kind: Kind.OBJECT,\n fields: fieldNodes\n };\n } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')\n\n\n if (isLeafType(type)) {\n // Since value is an internally represented value, it must be serialized\n // to an externally represented value before converting into an AST.\n var serialized = type.serialize(value);\n\n if (serialized == null) {\n return null;\n } // Others serialize based on their corresponding JavaScript scalar types.\n\n\n if (typeof serialized === 'boolean') {\n return {\n kind: Kind.BOOLEAN,\n value: serialized\n };\n } // JavaScript numbers can be Int or Float values.\n\n\n if (typeof serialized === 'number' && isFinite(serialized)) {\n var stringNum = String(serialized);\n return integerStringRegExp.test(stringNum) ? {\n kind: Kind.INT,\n value: stringNum\n } : {\n kind: Kind.FLOAT,\n value: stringNum\n };\n }\n\n if (typeof serialized === 'string') {\n // Enum types use Enum literals.\n if (isEnumType(type)) {\n return {\n kind: Kind.ENUM,\n value: serialized\n };\n } // ID types can use Int literals.\n\n\n if (type === GraphQLID && integerStringRegExp.test(serialized)) {\n return {\n kind: Kind.INT,\n value: serialized\n };\n }\n\n return {\n kind: Kind.STRING,\n value: serialized\n };\n }\n\n throw new TypeError(\"Cannot convert value to AST: \".concat(inspect(serialized), \".\"));\n } // istanbul ignore next (Not reachable. All possible input types have been considered)\n\n\n false || invariant(0, 'Unexpected input type: ' + inspect(type));\n}\n/**\n * IntValue:\n * - NegativeSign? 0\n * - NegativeSign? NonZeroDigit ( Digit+ )?\n */\n\nvar integerStringRegExp = /^-?(?:0|[1-9][0-9]*)$/;\n","/* eslint-disable no-redeclare */\n// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441\nvar isFinitePolyfill = Number.isFinite || function (value) {\n return typeof value === 'number' && isFinite(value);\n};\n\nexport default isFinitePolyfill;\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport { SYMBOL_ITERATOR } from \"../polyfills/symbols.mjs\";\n/**\n * Safer version of `Array.from` that return `null` if value isn't convertible to array.\n * Also protects against Array-like objects without items.\n *\n * @example\n *\n * safeArrayFrom([ 1, 2, 3 ]) // [1, 2, 3]\n * safeArrayFrom('ABC') // null\n * safeArrayFrom({ length: 1 }) // null\n * safeArrayFrom({ length: 1, 0: 'Alpha' }) // ['Alpha']\n * safeArrayFrom({ key: 'value' }) // null\n * safeArrayFrom(new Map()) // []\n *\n */\n\nexport default function safeArrayFrom(collection) {\n var mapFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (item) {\n return item;\n };\n\n if (collection == null || _typeof(collection) !== 'object') {\n return null;\n }\n\n if (Array.isArray(collection)) {\n return collection.map(mapFn);\n } // Is Iterable?\n\n\n var iteratorMethod = collection[SYMBOL_ITERATOR];\n\n if (typeof iteratorMethod === 'function') {\n // $FlowFixMe[incompatible-use]\n var iterator = iteratorMethod.call(collection);\n var result = [];\n var step;\n\n for (var i = 0; !(step = iterator.next()).done; ++i) {\n result.push(mapFn(step.value, i));\n }\n\n return result;\n } // Is Array like?\n\n\n var length = collection.length;\n\n if (typeof length === 'number' && length >= 0 && length % 1 === 0) {\n var _result = [];\n\n for (var _i = 0; _i < length; ++_i) {\n if (!Object.prototype.hasOwnProperty.call(collection, _i)) {\n return null;\n }\n\n _result.push(mapFn(collection[String(_i)], _i));\n }\n\n return _result;\n }\n\n return null;\n}\n","import isFinite from \"../polyfills/isFinite.mjs\";\nimport isInteger from \"../polyfills/isInteger.mjs\";\nimport inspect from \"../jsutils/inspect.mjs\";\nimport isObjectLike from \"../jsutils/isObjectLike.mjs\";\nimport { Kind } from \"../language/kinds.mjs\";\nimport { print } from \"../language/printer.mjs\";\nimport { GraphQLError } from \"../error/GraphQLError.mjs\";\nimport { GraphQLScalarType } from \"./definition.mjs\"; // As per the GraphQL Spec, Integers are only treated as valid when a valid\n// 32-bit signed integer, providing the broadest support across platforms.\n//\n// n.b. JavaScript's integers are safe between -(2^53 - 1) and 2^53 - 1 because\n// they are internally represented as IEEE 754 doubles.\n\nvar MAX_INT = 2147483647;\nvar MIN_INT = -2147483648;\n\nfunction serializeInt(outputValue) {\n var coercedValue = serializeObject(outputValue);\n\n if (typeof coercedValue === 'boolean') {\n return coercedValue ? 1 : 0;\n }\n\n var num = coercedValue;\n\n if (typeof coercedValue === 'string' && coercedValue !== '') {\n num = Number(coercedValue);\n }\n\n if (!isInteger(num)) {\n throw new GraphQLError(\"Int cannot represent non-integer value: \".concat(inspect(coercedValue)));\n }\n\n if (num > MAX_INT || num < MIN_INT) {\n throw new GraphQLError('Int cannot represent non 32-bit signed integer value: ' + inspect(coercedValue));\n }\n\n return num;\n}\n\nfunction coerceInt(inputValue) {\n if (!isInteger(inputValue)) {\n throw new GraphQLError(\"Int cannot represent non-integer value: \".concat(inspect(inputValue)));\n }\n\n if (inputValue > MAX_INT || inputValue < MIN_INT) {\n throw new GraphQLError(\"Int cannot represent non 32-bit signed integer value: \".concat(inputValue));\n }\n\n return inputValue;\n}\n\nexport var GraphQLInt = new GraphQLScalarType({\n name: 'Int',\n description: 'The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.',\n serialize: serializeInt,\n parseValue: coerceInt,\n parseLiteral: function parseLiteral(valueNode) {\n if (valueNode.kind !== Kind.INT) {\n throw new GraphQLError(\"Int cannot represent non-integer value: \".concat(print(valueNode)), valueNode);\n }\n\n var num = parseInt(valueNode.value, 10);\n\n if (num > MAX_INT || num < MIN_INT) {\n throw new GraphQLError(\"Int cannot represent non 32-bit signed integer value: \".concat(valueNode.value), valueNode);\n }\n\n return num;\n }\n});\n\nfunction serializeFloat(outputValue) {\n var coercedValue = serializeObject(outputValue);\n\n if (typeof coercedValue === 'boolean') {\n return coercedValue ? 1 : 0;\n }\n\n var num = coercedValue;\n\n if (typeof coercedValue === 'string' && coercedValue !== '') {\n num = Number(coercedValue);\n }\n\n if (!isFinite(num)) {\n throw new GraphQLError(\"Float cannot represent non numeric value: \".concat(inspect(coercedValue)));\n }\n\n return num;\n}\n\nfunction coerceFloat(inputValue) {\n if (!isFinite(inputValue)) {\n throw new GraphQLError(\"Float cannot represent non numeric value: \".concat(inspect(inputValue)));\n }\n\n return inputValue;\n}\n\nexport var GraphQLFloat = new GraphQLScalarType({\n name: 'Float',\n description: 'The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).',\n serialize: serializeFloat,\n parseValue: coerceFloat,\n parseLiteral: function parseLiteral(valueNode) {\n if (valueNode.kind !== Kind.FLOAT && valueNode.kind !== Kind.INT) {\n throw new GraphQLError(\"Float cannot represent non numeric value: \".concat(print(valueNode)), valueNode);\n }\n\n return parseFloat(valueNode.value);\n }\n}); // Support serializing objects with custom valueOf() or toJSON() functions -\n// a common way to represent a complex value which can be represented as\n// a string (ex: MongoDB id objects).\n\nfunction serializeObject(outputValue) {\n if (isObjectLike(outputValue)) {\n if (typeof outputValue.valueOf === 'function') {\n var valueOfResult = outputValue.valueOf();\n\n if (!isObjectLike(valueOfResult)) {\n return valueOfResult;\n }\n }\n\n if (typeof outputValue.toJSON === 'function') {\n // $FlowFixMe[incompatible-use]\n return outputValue.toJSON();\n }\n }\n\n return outputValue;\n}\n\nfunction serializeString(outputValue) {\n var coercedValue = serializeObject(outputValue); // Serialize string, boolean and number values to a string, but do not\n // attempt to coerce object, function, symbol, or other types as strings.\n\n if (typeof coercedValue === 'string') {\n return coercedValue;\n }\n\n if (typeof coercedValue === 'boolean') {\n return coercedValue ? 'true' : 'false';\n }\n\n if (isFinite(coercedValue)) {\n return coercedValue.toString();\n }\n\n throw new GraphQLError(\"String cannot represent value: \".concat(inspect(outputValue)));\n}\n\nfunction coerceString(inputValue) {\n if (typeof inputValue !== 'string') {\n throw new GraphQLError(\"String cannot represent a non string value: \".concat(inspect(inputValue)));\n }\n\n return inputValue;\n}\n\nexport var GraphQLString = new GraphQLScalarType({\n name: 'String',\n description: 'The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.',\n serialize: serializeString,\n parseValue: coerceString,\n parseLiteral: function parseLiteral(valueNode) {\n if (valueNode.kind !== Kind.STRING) {\n throw new GraphQLError(\"String cannot represent a non string value: \".concat(print(valueNode)), valueNode);\n }\n\n return valueNode.value;\n }\n});\n\nfunction serializeBoolean(outputValue) {\n var coercedValue = serializeObject(outputValue);\n\n if (typeof coercedValue === 'boolean') {\n return coercedValue;\n }\n\n if (isFinite(coercedValue)) {\n return coercedValue !== 0;\n }\n\n throw new GraphQLError(\"Boolean cannot represent a non boolean value: \".concat(inspect(coercedValue)));\n}\n\nfunction coerceBoolean(inputValue) {\n if (typeof inputValue !== 'boolean') {\n throw new GraphQLError(\"Boolean cannot represent a non boolean value: \".concat(inspect(inputValue)));\n }\n\n return inputValue;\n}\n\nexport var GraphQLBoolean = new GraphQLScalarType({\n name: 'Boolean',\n description: 'The `Boolean` scalar type represents `true` or `false`.',\n serialize: serializeBoolean,\n parseValue: coerceBoolean,\n parseLiteral: function parseLiteral(valueNode) {\n if (valueNode.kind !== Kind.BOOLEAN) {\n throw new GraphQLError(\"Boolean cannot represent a non boolean value: \".concat(print(valueNode)), valueNode);\n }\n\n return valueNode.value;\n }\n});\n\nfunction serializeID(outputValue) {\n var coercedValue = serializeObject(outputValue);\n\n if (typeof coercedValue === 'string') {\n return coercedValue;\n }\n\n if (isInteger(coercedValue)) {\n return String(coercedValue);\n }\n\n throw new GraphQLError(\"ID cannot represent value: \".concat(inspect(outputValue)));\n}\n\nfunction coerceID(inputValue) {\n if (typeof inputValue === 'string') {\n return inputValue;\n }\n\n if (isInteger(inputValue)) {\n return inputValue.toString();\n }\n\n throw new GraphQLError(\"ID cannot represent value: \".concat(inspect(inputValue)));\n}\n\nexport var GraphQLID = new GraphQLScalarType({\n name: 'ID',\n description: 'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"4\"`) or integer (such as `4`) input value will be accepted as an ID.',\n serialize: serializeID,\n parseValue: coerceID,\n parseLiteral: function parseLiteral(valueNode) {\n if (valueNode.kind !== Kind.STRING && valueNode.kind !== Kind.INT) {\n throw new GraphQLError('ID cannot represent a non-string and non-integer value: ' + print(valueNode), valueNode);\n }\n\n return valueNode.value;\n }\n});\nexport var specifiedScalarTypes = Object.freeze([GraphQLString, GraphQLInt, GraphQLFloat, GraphQLBoolean, GraphQLID]);\nexport function isSpecifiedScalarType(type) {\n return specifiedScalarTypes.some(function (_ref) {\n var name = _ref.name;\n return type.name === name;\n });\n}\n","/* eslint-disable no-redeclare */\n// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441\nvar isInteger = Number.isInteger || function (value) {\n return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\n};\n\nexport default isInteger;\n","function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nimport objectEntries from \"../polyfills/objectEntries.mjs\";\nimport { SYMBOL_TO_STRING_TAG } from \"../polyfills/symbols.mjs\";\nimport inspect from \"../jsutils/inspect.mjs\";\nimport toObjMap from \"../jsutils/toObjMap.mjs\";\nimport devAssert from \"../jsutils/devAssert.mjs\";\nimport instanceOf from \"../jsutils/instanceOf.mjs\";\nimport isObjectLike from \"../jsutils/isObjectLike.mjs\";\nimport defineInspect from \"../jsutils/defineInspect.mjs\";\nimport { DirectiveLocation } from \"../language/directiveLocation.mjs\";\nimport { GraphQLString, GraphQLBoolean } from \"./scalars.mjs\";\nimport { argsToArgsConfig, GraphQLNonNull } from \"./definition.mjs\";\n/**\n * Test if the given value is a GraphQL directive.\n */\n\n// eslint-disable-next-line no-redeclare\nexport function isDirective(directive) {\n return instanceOf(directive, GraphQLDirective);\n}\nexport function assertDirective(directive) {\n if (!isDirective(directive)) {\n throw new Error(\"Expected \".concat(inspect(directive), \" to be a GraphQL directive.\"));\n }\n\n return directive;\n}\n/**\n * Directives are used by the GraphQL runtime as a way of modifying execution\n * behavior. Type system creators will usually not create these directly.\n */\n\nexport var GraphQLDirective = /*#__PURE__*/function () {\n function GraphQLDirective(config) {\n var _config$isRepeatable, _config$args;\n\n this.name = config.name;\n this.description = config.description;\n this.locations = config.locations;\n this.isRepeatable = (_config$isRepeatable = config.isRepeatable) !== null && _config$isRepeatable !== void 0 ? _config$isRepeatable : false;\n this.extensions = config.extensions && toObjMap(config.extensions);\n this.astNode = config.astNode;\n config.name || devAssert(0, 'Directive must be named.');\n Array.isArray(config.locations) || devAssert(0, \"@\".concat(config.name, \" locations must be an Array.\"));\n var args = (_config$args = config.args) !== null && _config$args !== void 0 ? _config$args : {};\n isObjectLike(args) && !Array.isArray(args) || devAssert(0, \"@\".concat(config.name, \" args must be an object with argument names as keys.\"));\n this.args = objectEntries(args).map(function (_ref) {\n var argName = _ref[0],\n argConfig = _ref[1];\n return {\n name: argName,\n description: argConfig.description,\n type: argConfig.type,\n defaultValue: argConfig.defaultValue,\n deprecationReason: argConfig.deprecationReason,\n extensions: argConfig.extensions && toObjMap(argConfig.extensions),\n astNode: argConfig.astNode\n };\n });\n }\n\n var _proto = GraphQLDirective.prototype;\n\n _proto.toConfig = function toConfig() {\n return {\n name: this.name,\n description: this.description,\n locations: this.locations,\n args: argsToArgsConfig(this.args),\n isRepeatable: this.isRepeatable,\n extensions: this.extensions,\n astNode: this.astNode\n };\n };\n\n _proto.toString = function toString() {\n return '@' + this.name;\n };\n\n _proto.toJSON = function toJSON() {\n return this.toString();\n } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet\n ;\n\n _createClass(GraphQLDirective, [{\n key: SYMBOL_TO_STRING_TAG,\n get: function get() {\n return 'GraphQLDirective';\n }\n }]);\n\n return GraphQLDirective;\n}(); // Print a simplified form when appearing in `inspect` and `util.inspect`.\n\ndefineInspect(GraphQLDirective);\n\n/**\n * Used to conditionally include fields or fragments.\n */\nexport var GraphQLIncludeDirective = new GraphQLDirective({\n name: 'include',\n description: 'Directs the executor to include this field or fragment only when the `if` argument is true.',\n locations: [DirectiveLocation.FIELD, DirectiveLocation.FRAGMENT_SPREAD, DirectiveLocation.INLINE_FRAGMENT],\n args: {\n if: {\n type: new GraphQLNonNull(GraphQLBoolean),\n description: 'Included when true.'\n }\n }\n});\n/**\n * Used to conditionally skip (exclude) fields or fragments.\n */\n\nexport var GraphQLSkipDirective = new GraphQLDirective({\n name: 'skip',\n description: 'Directs the executor to skip this field or fragment when the `if` argument is true.',\n locations: [DirectiveLocation.FIELD, DirectiveLocation.FRAGMENT_SPREAD, DirectiveLocation.INLINE_FRAGMENT],\n args: {\n if: {\n type: new GraphQLNonNull(GraphQLBoolean),\n description: 'Skipped when true.'\n }\n }\n});\n/**\n * Constant string used for default reason for a deprecation.\n */\n\nexport var DEFAULT_DEPRECATION_REASON = 'No longer supported';\n/**\n * Used to declare element of a GraphQL schema as deprecated.\n */\n\nexport var GraphQLDeprecatedDirective = new GraphQLDirective({\n name: 'deprecated',\n description: 'Marks an element of a GraphQL schema as no longer supported.',\n locations: [DirectiveLocation.FIELD_DEFINITION, DirectiveLocation.ARGUMENT_DEFINITION, DirectiveLocation.INPUT_FIELD_DEFINITION, DirectiveLocation.ENUM_VALUE],\n args: {\n reason: {\n type: GraphQLString,\n description: 'Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).',\n defaultValue: DEFAULT_DEPRECATION_REASON\n }\n }\n});\n/**\n * Used to provide a URL for specifying the behaviour of custom scalar definitions.\n */\n\nexport var GraphQLSpecifiedByDirective = new GraphQLDirective({\n name: 'specifiedBy',\n description: 'Exposes a URL that specifies the behaviour of this scalar.',\n locations: [DirectiveLocation.SCALAR],\n args: {\n url: {\n type: new GraphQLNonNull(GraphQLString),\n description: 'The URL that specifies the behaviour of this scalar.'\n }\n }\n});\n/**\n * The full list of specified directives.\n */\n\nexport var specifiedDirectives = Object.freeze([GraphQLIncludeDirective, GraphQLSkipDirective, GraphQLDeprecatedDirective, GraphQLSpecifiedByDirective]);\nexport function isSpecifiedDirective(directive) {\n return specifiedDirectives.some(function (_ref2) {\n var name = _ref2.name;\n return name === directive.name;\n });\n}\n","import find from \"../polyfills/find.mjs\";\nimport { Kind } from \"../language/kinds.mjs\";\nimport { isNode } from \"../language/ast.mjs\";\nimport { getVisitFn } from \"../language/visitor.mjs\";\nimport { isObjectType, isInterfaceType, isEnumType, isInputObjectType, isListType, isCompositeType, isInputType, isOutputType, getNullableType, getNamedType } from \"../type/definition.mjs\";\nimport { SchemaMetaFieldDef, TypeMetaFieldDef, TypeNameMetaFieldDef } from \"../type/introspection.mjs\";\nimport { typeFromAST } from \"./typeFromAST.mjs\";\n/**\n * TypeInfo is a utility class which, given a GraphQL schema, can keep track\n * of the current field and type definitions at any point in a GraphQL document\n * AST during a recursive descent by calling `enter(node)` and `leave(node)`.\n */\n\nexport var TypeInfo = /*#__PURE__*/function () {\n function TypeInfo(schema, // NOTE: this experimental optional second parameter is only needed in order\n // to support non-spec-compliant code bases. You should never need to use it.\n // It may disappear in the future.\n getFieldDefFn, // Initial type may be provided in rare cases to facilitate traversals\n // beginning somewhere other than documents.\n initialType) {\n this._schema = schema;\n this._typeStack = [];\n this._parentTypeStack = [];\n this._inputTypeStack = [];\n this._fieldDefStack = [];\n this._defaultValueStack = [];\n this._directive = null;\n this._argument = null;\n this._enumValue = null;\n this._getFieldDef = getFieldDefFn !== null && getFieldDefFn !== void 0 ? getFieldDefFn : getFieldDef;\n\n if (initialType) {\n if (isInputType(initialType)) {\n this._inputTypeStack.push(initialType);\n }\n\n if (isCompositeType(initialType)) {\n this._parentTypeStack.push(initialType);\n }\n\n if (isOutputType(initialType)) {\n this._typeStack.push(initialType);\n }\n }\n }\n\n var _proto = TypeInfo.prototype;\n\n _proto.getType = function getType() {\n if (this._typeStack.length > 0) {\n return this._typeStack[this._typeStack.length - 1];\n }\n };\n\n _proto.getParentType = function getParentType() {\n if (this._parentTypeStack.length > 0) {\n return this._parentTypeStack[this._parentTypeStack.length - 1];\n }\n };\n\n _proto.getInputType = function getInputType() {\n if (this._inputTypeStack.length > 0) {\n return this._inputTypeStack[this._inputTypeStack.length - 1];\n }\n };\n\n _proto.getParentInputType = function getParentInputType() {\n if (this._inputTypeStack.length > 1) {\n return this._inputTypeStack[this._inputTypeStack.length - 2];\n }\n };\n\n _proto.getFieldDef = function getFieldDef() {\n if (this._fieldDefStack.length > 0) {\n return this._fieldDefStack[this._fieldDefStack.length - 1];\n }\n };\n\n _proto.getDefaultValue = function getDefaultValue() {\n if (this._defaultValueStack.length > 0) {\n return this._defaultValueStack[this._defaultValueStack.length - 1];\n }\n };\n\n _proto.getDirective = function getDirective() {\n return this._directive;\n };\n\n _proto.getArgument = function getArgument() {\n return this._argument;\n };\n\n _proto.getEnumValue = function getEnumValue() {\n return this._enumValue;\n };\n\n _proto.enter = function enter(node) {\n var schema = this._schema; // Note: many of the types below are explicitly typed as \"mixed\" to drop\n // any assumptions of a valid schema to ensure runtime types are properly\n // checked before continuing since TypeInfo is used as part of validation\n // which occurs before guarantees of schema and document validity.\n\n switch (node.kind) {\n case Kind.SELECTION_SET:\n {\n var namedType = getNamedType(this.getType());\n\n this._parentTypeStack.push(isCompositeType(namedType) ? namedType : undefined);\n\n break;\n }\n\n case Kind.FIELD:\n {\n var parentType = this.getParentType();\n var fieldDef;\n var fieldType;\n\n if (parentType) {\n fieldDef = this._getFieldDef(schema, parentType, node);\n\n if (fieldDef) {\n fieldType = fieldDef.type;\n }\n }\n\n this._fieldDefStack.push(fieldDef);\n\n this._typeStack.push(isOutputType(fieldType) ? fieldType : undefined);\n\n break;\n }\n\n case Kind.DIRECTIVE:\n this._directive = schema.getDirective(node.name.value);\n break;\n\n case Kind.OPERATION_DEFINITION:\n {\n var type;\n\n switch (node.operation) {\n case 'query':\n type = schema.getQueryType();\n break;\n\n case 'mutation':\n type = schema.getMutationType();\n break;\n\n case 'subscription':\n type = schema.getSubscriptionType();\n break;\n }\n\n this._typeStack.push(isObjectType(type) ? type : undefined);\n\n break;\n }\n\n case Kind.INLINE_FRAGMENT:\n case Kind.FRAGMENT_DEFINITION:\n {\n var typeConditionAST = node.typeCondition;\n var outputType = typeConditionAST ? typeFromAST(schema, typeConditionAST) : getNamedType(this.getType());\n\n this._typeStack.push(isOutputType(outputType) ? outputType : undefined);\n\n break;\n }\n\n case Kind.VARIABLE_DEFINITION:\n {\n var inputType = typeFromAST(schema, node.type);\n\n this._inputTypeStack.push(isInputType(inputType) ? inputType : undefined);\n\n break;\n }\n\n case Kind.ARGUMENT:\n {\n var _this$getDirective;\n\n var argDef;\n var argType;\n var fieldOrDirective = (_this$getDirective = this.getDirective()) !== null && _this$getDirective !== void 0 ? _this$getDirective : this.getFieldDef();\n\n if (fieldOrDirective) {\n argDef = find(fieldOrDirective.args, function (arg) {\n return arg.name === node.name.value;\n });\n\n if (argDef) {\n argType = argDef.type;\n }\n }\n\n this._argument = argDef;\n\n this._defaultValueStack.push(argDef ? argDef.defaultValue : undefined);\n\n this._inputTypeStack.push(isInputType(argType) ? argType : undefined);\n\n break;\n }\n\n case Kind.LIST:\n {\n var listType = getNullableType(this.getInputType());\n var itemType = isListType(listType) ? listType.ofType : listType; // List positions never have a default value.\n\n this._defaultValueStack.push(undefined);\n\n this._inputTypeStack.push(isInputType(itemType) ? itemType : undefined);\n\n break;\n }\n\n case Kind.OBJECT_FIELD:\n {\n var objectType = getNamedType(this.getInputType());\n var inputFieldType;\n var inputField;\n\n if (isInputObjectType(objectType)) {\n inputField = objectType.getFields()[node.name.value];\n\n if (inputField) {\n inputFieldType = inputField.type;\n }\n }\n\n this._defaultValueStack.push(inputField ? inputField.defaultValue : undefined);\n\n this._inputTypeStack.push(isInputType(inputFieldType) ? inputFieldType : undefined);\n\n break;\n }\n\n case Kind.ENUM:\n {\n var enumType = getNamedType(this.getInputType());\n var enumValue;\n\n if (isEnumType(enumType)) {\n enumValue = enumType.getValue(node.value);\n }\n\n this._enumValue = enumValue;\n break;\n }\n }\n };\n\n _proto.leave = function leave(node) {\n switch (node.kind) {\n case Kind.SELECTION_SET:\n this._parentTypeStack.pop();\n\n break;\n\n case Kind.FIELD:\n this._fieldDefStack.pop();\n\n this._typeStack.pop();\n\n break;\n\n case Kind.DIRECTIVE:\n this._directive = null;\n break;\n\n case Kind.OPERATION_DEFINITION:\n case Kind.INLINE_FRAGMENT:\n case Kind.FRAGMENT_DEFINITION:\n this._typeStack.pop();\n\n break;\n\n case Kind.VARIABLE_DEFINITION:\n this._inputTypeStack.pop();\n\n break;\n\n case Kind.ARGUMENT:\n this._argument = null;\n\n this._defaultValueStack.pop();\n\n this._inputTypeStack.pop();\n\n break;\n\n case Kind.LIST:\n case Kind.OBJECT_FIELD:\n this._defaultValueStack.pop();\n\n this._inputTypeStack.pop();\n\n break;\n\n case Kind.ENUM:\n this._enumValue = null;\n break;\n }\n };\n\n return TypeInfo;\n}();\n/**\n * Not exactly the same as the executor's definition of getFieldDef, in this\n * statically evaluated environment we do not always have an Object type,\n * and need to handle Interface and Union types.\n */\n\nfunction getFieldDef(schema, parentType, fieldNode) {\n var name = fieldNode.name.value;\n\n if (name === SchemaMetaFieldDef.name && schema.getQueryType() === parentType) {\n return SchemaMetaFieldDef;\n }\n\n if (name === TypeMetaFieldDef.name && schema.getQueryType() === parentType) {\n return TypeMetaFieldDef;\n }\n\n if (name === TypeNameMetaFieldDef.name && isCompositeType(parentType)) {\n return TypeNameMetaFieldDef;\n }\n\n if (isObjectType(parentType) || isInterfaceType(parentType)) {\n return parentType.getFields()[name];\n }\n}\n/**\n * Creates a new visitor instance which maintains a provided TypeInfo instance\n * along with visiting visitor.\n */\n\n\nexport function visitWithTypeInfo(typeInfo, visitor) {\n return {\n enter: function enter(node) {\n typeInfo.enter(node);\n var fn = getVisitFn(visitor, node.kind,\n /* isLeaving */\n false);\n\n if (fn) {\n var result = fn.apply(visitor, arguments);\n\n if (result !== undefined) {\n typeInfo.leave(node);\n\n if (isNode(result)) {\n typeInfo.enter(result);\n }\n }\n\n return result;\n }\n },\n leave: function leave(node) {\n var fn = getVisitFn(visitor, node.kind,\n /* isLeaving */\n true);\n var result;\n\n if (fn) {\n result = fn.apply(visitor, arguments);\n }\n\n typeInfo.leave(node);\n return result;\n }\n };\n}\n","import inspect from \"../jsutils/inspect.mjs\";\nimport invariant from \"../jsutils/invariant.mjs\";\nimport { Kind } from \"../language/kinds.mjs\";\nimport { GraphQLList, GraphQLNonNull } from \"../type/definition.mjs\";\n/**\n * Given a Schema and an AST node describing a type, return a GraphQLType\n * definition which applies to that type. For example, if provided the parsed\n * AST node for `[User]`, a GraphQLList instance will be returned, containing\n * the type called \"User\" found in the schema. If a type called \"User\" is not\n * found in the schema, then undefined will be returned.\n */\n\n/* eslint-disable no-redeclare */\n\nexport function typeFromAST(schema, typeNode) {\n /* eslint-enable no-redeclare */\n var innerType;\n\n if (typeNode.kind === Kind.LIST_TYPE) {\n innerType = typeFromAST(schema, typeNode.type);\n return innerType && new GraphQLList(innerType);\n }\n\n if (typeNode.kind === Kind.NON_NULL_TYPE) {\n innerType = typeFromAST(schema, typeNode.type);\n return innerType && new GraphQLNonNull(innerType);\n } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')\n\n\n if (typeNode.kind === Kind.NAMED_TYPE) {\n return schema.getType(typeNode.name.value);\n } // istanbul ignore next (Not reachable. All possible type nodes have been considered)\n\n\n false || invariant(0, 'Unexpected type node: ' + inspect(typeNode));\n}\n","// Spec Section: \"Executable Definitions\"\nimport { ExecutableDefinitionsRule } from \"./rules/ExecutableDefinitionsRule.mjs\"; // Spec Section: \"Operation Name Uniqueness\"\n\nimport { UniqueOperationNamesRule } from \"./rules/UniqueOperationNamesRule.mjs\"; // Spec Section: \"Lone Anonymous Operation\"\n\nimport { LoneAnonymousOperationRule } from \"./rules/LoneAnonymousOperationRule.mjs\"; // Spec Section: \"Subscriptions with Single Root Field\"\n\nimport { SingleFieldSubscriptionsRule } from \"./rules/SingleFieldSubscriptionsRule.mjs\"; // Spec Section: \"Fragment Spread Type Existence\"\n\nimport { KnownTypeNamesRule } from \"./rules/KnownTypeNamesRule.mjs\"; // Spec Section: \"Fragments on Composite Types\"\n\nimport { FragmentsOnCompositeTypesRule } from \"./rules/FragmentsOnCompositeTypesRule.mjs\"; // Spec Section: \"Variables are Input Types\"\n\nimport { VariablesAreInputTypesRule } from \"./rules/VariablesAreInputTypesRule.mjs\"; // Spec Section: \"Leaf Field Selections\"\n\nimport { ScalarLeafsRule } from \"./rules/ScalarLeafsRule.mjs\"; // Spec Section: \"Field Selections on Objects, Interfaces, and Unions Types\"\n\nimport { FieldsOnCorrectTypeRule } from \"./rules/FieldsOnCorrectTypeRule.mjs\"; // Spec Section: \"Fragment Name Uniqueness\"\n\nimport { UniqueFragmentNamesRule } from \"./rules/UniqueFragmentNamesRule.mjs\"; // Spec Section: \"Fragment spread target defined\"\n\nimport { KnownFragmentNamesRule } from \"./rules/KnownFragmentNamesRule.mjs\"; // Spec Section: \"Fragments must be used\"\n\nimport { NoUnusedFragmentsRule } from \"./rules/NoUnusedFragmentsRule.mjs\"; // Spec Section: \"Fragment spread is possible\"\n\nimport { PossibleFragmentSpreadsRule } from \"./rules/PossibleFragmentSpreadsRule.mjs\"; // Spec Section: \"Fragments must not form cycles\"\n\nimport { NoFragmentCyclesRule } from \"./rules/NoFragmentCyclesRule.mjs\"; // Spec Section: \"Variable Uniqueness\"\n\nimport { UniqueVariableNamesRule } from \"./rules/UniqueVariableNamesRule.mjs\"; // Spec Section: \"All Variable Used Defined\"\n\nimport { NoUndefinedVariablesRule } from \"./rules/NoUndefinedVariablesRule.mjs\"; // Spec Section: \"All Variables Used\"\n\nimport { NoUnusedVariablesRule } from \"./rules/NoUnusedVariablesRule.mjs\"; // Spec Section: \"Directives Are Defined\"\n\nimport { KnownDirectivesRule } from \"./rules/KnownDirectivesRule.mjs\"; // Spec Section: \"Directives Are Unique Per Location\"\n\nimport { UniqueDirectivesPerLocationRule } from \"./rules/UniqueDirectivesPerLocationRule.mjs\"; // Spec Section: \"Argument Names\"\n\nimport { KnownArgumentNamesRule, KnownArgumentNamesOnDirectivesRule } from \"./rules/KnownArgumentNamesRule.mjs\"; // Spec Section: \"Argument Uniqueness\"\n\nimport { UniqueArgumentNamesRule } from \"./rules/UniqueArgumentNamesRule.mjs\"; // Spec Section: \"Value Type Correctness\"\n\nimport { ValuesOfCorrectTypeRule } from \"./rules/ValuesOfCorrectTypeRule.mjs\"; // Spec Section: \"Argument Optionality\"\n\nimport { ProvidedRequiredArgumentsRule, ProvidedRequiredArgumentsOnDirectivesRule } from \"./rules/ProvidedRequiredArgumentsRule.mjs\"; // Spec Section: \"All Variable Usages Are Allowed\"\n\nimport { VariablesInAllowedPositionRule } from \"./rules/VariablesInAllowedPositionRule.mjs\"; // Spec Section: \"Field Selection Merging\"\n\nimport { OverlappingFieldsCanBeMergedRule } from \"./rules/OverlappingFieldsCanBeMergedRule.mjs\"; // Spec Section: \"Input Object Field Uniqueness\"\n\nimport { UniqueInputFieldNamesRule } from \"./rules/UniqueInputFieldNamesRule.mjs\"; // SDL-specific validation rules\n\nimport { LoneSchemaDefinitionRule } from \"./rules/LoneSchemaDefinitionRule.mjs\";\nimport { UniqueOperationTypesRule } from \"./rules/UniqueOperationTypesRule.mjs\";\nimport { UniqueTypeNamesRule } from \"./rules/UniqueTypeNamesRule.mjs\";\nimport { UniqueEnumValueNamesRule } from \"./rules/UniqueEnumValueNamesRule.mjs\";\nimport { UniqueFieldDefinitionNamesRule } from \"./rules/UniqueFieldDefinitionNamesRule.mjs\";\nimport { UniqueDirectiveNamesRule } from \"./rules/UniqueDirectiveNamesRule.mjs\";\nimport { PossibleTypeExtensionsRule } from \"./rules/PossibleTypeExtensionsRule.mjs\";\n/**\n * This set includes all validation rules defined by the GraphQL spec.\n *\n * The order of the rules in this list has been adjusted to lead to the\n * most clear output when encountering multiple validation errors.\n */\n\nexport var specifiedRules = Object.freeze([ExecutableDefinitionsRule, UniqueOperationNamesRule, LoneAnonymousOperationRule, SingleFieldSubscriptionsRule, KnownTypeNamesRule, FragmentsOnCompositeTypesRule, VariablesAreInputTypesRule, ScalarLeafsRule, FieldsOnCorrectTypeRule, UniqueFragmentNamesRule, KnownFragmentNamesRule, NoUnusedFragmentsRule, PossibleFragmentSpreadsRule, NoFragmentCyclesRule, UniqueVariableNamesRule, NoUndefinedVariablesRule, NoUnusedVariablesRule, KnownDirectivesRule, UniqueDirectivesPerLocationRule, KnownArgumentNamesRule, UniqueArgumentNamesRule, ValuesOfCorrectTypeRule, ProvidedRequiredArgumentsRule, VariablesInAllowedPositionRule, OverlappingFieldsCanBeMergedRule, UniqueInputFieldNamesRule]);\n/**\n * @internal\n */\n\nexport var specifiedSDLRules = Object.freeze([LoneSchemaDefinitionRule, UniqueOperationTypesRule, UniqueTypeNamesRule, UniqueEnumValueNamesRule, UniqueFieldDefinitionNamesRule, UniqueDirectiveNamesRule, KnownTypeNamesRule, KnownDirectivesRule, UniqueDirectivesPerLocationRule, PossibleTypeExtensionsRule, KnownArgumentNamesOnDirectivesRule, UniqueArgumentNamesRule, UniqueInputFieldNamesRule, ProvidedRequiredArgumentsOnDirectivesRule]);\n","import { GraphQLError } from \"../../error/GraphQLError.mjs\";\nimport { Kind } from \"../../language/kinds.mjs\";\nimport { isExecutableDefinitionNode } from \"../../language/predicates.mjs\";\n\n/**\n * Executable definitions\n *\n * A GraphQL document is only valid for execution if all definitions are either\n * operation or fragment definitions.\n */\nexport function ExecutableDefinitionsRule(context) {\n return {\n Document: function Document(node) {\n for (var _i2 = 0, _node$definitions2 = node.definitions; _i2 < _node$definitions2.length; _i2++) {\n var definition = _node$definitions2[_i2];\n\n if (!isExecutableDefinitionNode(definition)) {\n var defName = definition.kind === Kind.SCHEMA_DEFINITION || definition.kind === Kind.SCHEMA_EXTENSION ? 'schema' : '\"' + definition.name.value + '\"';\n context.reportError(new GraphQLError(\"The \".concat(defName, \" definition is not executable.\"), definition));\n }\n }\n\n return false;\n }\n };\n}\n","import { Kind } from \"./kinds.mjs\";\nexport function isDefinitionNode(node) {\n return isExecutableDefinitionNode(node) || isTypeSystemDefinitionNode(node) || isTypeSystemExtensionNode(node);\n}\nexport function isExecutableDefinitionNode(node) {\n return node.kind === Kind.OPERATION_DEFINITION || node.kind === Kind.FRAGMENT_DEFINITION;\n}\nexport function isSelectionNode(node) {\n return node.kind === Kind.FIELD || node.kind === Kind.FRAGMENT_SPREAD || node.kind === Kind.INLINE_FRAGMENT;\n}\nexport function isValueNode(node) {\n return node.kind === Kind.VARIABLE || node.kind === Kind.INT || node.kind === Kind.FLOAT || node.kind === Kind.STRING || node.kind === Kind.BOOLEAN || node.kind === Kind.NULL || node.kind === Kind.ENUM || node.kind === Kind.LIST || node.kind === Kind.OBJECT;\n}\nexport function isTypeNode(node) {\n return node.kind === Kind.NAMED_TYPE || node.kind === Kind.LIST_TYPE || node.kind === Kind.NON_NULL_TYPE;\n}\nexport function isTypeSystemDefinitionNode(node) {\n return node.kind === Kind.SCHEMA_DEFINITION || isTypeDefinitionNode(node) || node.kind === Kind.DIRECTIVE_DEFINITION;\n}\nexport function isTypeDefinitionNode(node) {\n return node.kind === Kind.SCALAR_TYPE_DEFINITION || node.kind === Kind.OBJECT_TYPE_DEFINITION || node.kind === Kind.INTERFACE_TYPE_DEFINITION || node.kind === Kind.UNION_TYPE_DEFINITION || node.kind === Kind.ENUM_TYPE_DEFINITION || node.kind === Kind.INPUT_OBJECT_TYPE_DEFINITION;\n}\nexport function isTypeSystemExtensionNode(node) {\n return node.kind === Kind.SCHEMA_EXTENSION || isTypeExtensionNode(node);\n}\nexport function isTypeExtensionNode(node) {\n return node.kind === Kind.SCALAR_TYPE_EXTENSION || node.kind === Kind.OBJECT_TYPE_EXTENSION || node.kind === Kind.INTERFACE_TYPE_EXTENSION || node.kind === Kind.UNION_TYPE_EXTENSION || node.kind === Kind.ENUM_TYPE_EXTENSION || node.kind === Kind.INPUT_OBJECT_TYPE_EXTENSION;\n}\n","import { GraphQLError } from \"../../error/GraphQLError.mjs\";\n\n/**\n * Unique operation names\n *\n * A GraphQL document is only valid if all defined operations have unique names.\n */\nexport function UniqueOperationNamesRule(context) {\n var knownOperationNames = Object.create(null);\n return {\n OperationDefinition: function OperationDefinition(node) {\n var operationName = node.name;\n\n if (operationName) {\n if (knownOperationNames[operationName.value]) {\n context.reportError(new GraphQLError(\"There can be only one operation named \\\"\".concat(operationName.value, \"\\\".\"), [knownOperationNames[operationName.value], operationName]));\n } else {\n knownOperationNames[operationName.value] = operationName;\n }\n }\n\n return false;\n },\n FragmentDefinition: function FragmentDefinition() {\n return false;\n }\n };\n}\n","import { GraphQLError } from \"../../error/GraphQLError.mjs\";\nimport { Kind } from \"../../language/kinds.mjs\";\n\n/**\n * Lone anonymous operation\n *\n * A GraphQL document is only valid if when it contains an anonymous operation\n * (the query short-hand) that it contains only that one operation definition.\n */\nexport function LoneAnonymousOperationRule(context) {\n var operationCount = 0;\n return {\n Document: function Document(node) {\n operationCount = node.definitions.filter(function (definition) {\n return definition.kind === Kind.OPERATION_DEFINITION;\n }).length;\n },\n OperationDefinition: function OperationDefinition(node) {\n if (!node.name && operationCount > 1) {\n context.reportError(new GraphQLError('This anonymous operation must be the only defined operation.', node));\n }\n }\n };\n}\n","import { GraphQLError } from \"../../error/GraphQLError.mjs\";\n\n/**\n * Subscriptions must only include one field.\n *\n * A GraphQL subscription is valid only if it contains a single root field.\n */\nexport function SingleFieldSubscriptionsRule(context) {\n return {\n OperationDefinition: function OperationDefinition(node) {\n if (node.operation === 'subscription') {\n if (node.selectionSet.selections.length !== 1) {\n context.reportError(new GraphQLError(node.name ? \"Subscription \\\"\".concat(node.name.value, \"\\\" must select only one top level field.\") : 'Anonymous Subscription must select only one top level field.', node.selectionSet.selections.slice(1)));\n }\n }\n }\n };\n}\n","import didYouMean from \"../../jsutils/didYouMean.mjs\";\nimport suggestionList from \"../../jsutils/suggestionList.mjs\";\nimport { GraphQLError } from \"../../error/GraphQLError.mjs\";\nimport { isTypeDefinitionNode, isTypeSystemDefinitionNode, isTypeSystemExtensionNode } from \"../../language/predicates.mjs\";\nimport { specifiedScalarTypes } from \"../../type/scalars.mjs\";\nimport { introspectionTypes } from \"../../type/introspection.mjs\";\n\n/**\n * Known type names\n *\n * A GraphQL document is only valid if referenced types (specifically\n * variable definitions and fragment conditions) are defined by the type schema.\n */\nexport function KnownTypeNamesRule(context) {\n var schema = context.getSchema();\n var existingTypesMap = schema ? schema.getTypeMap() : Object.create(null);\n var definedTypes = Object.create(null);\n\n for (var _i2 = 0, _context$getDocument$2 = context.getDocument().definitions; _i2 < _context$getDocument$2.length; _i2++) {\n var def = _context$getDocument$2[_i2];\n\n if (isTypeDefinitionNode(def)) {\n definedTypes[def.name.value] = true;\n }\n }\n\n var typeNames = Object.keys(existingTypesMap).concat(Object.keys(definedTypes));\n return {\n NamedType: function NamedType(node, _1, parent, _2, ancestors) {\n var typeName = node.name.value;\n\n if (!existingTypesMap[typeName] && !definedTypes[typeName]) {\n var _ancestors$;\n\n var definitionNode = (_ancestors$ = ancestors[2]) !== null && _ancestors$ !== void 0 ? _ancestors$ : parent;\n var isSDL = definitionNode != null && isSDLNode(definitionNode);\n\n if (isSDL && isStandardTypeName(typeName)) {\n return;\n }\n\n var suggestedTypes = suggestionList(typeName, isSDL ? standardTypeNames.concat(typeNames) : typeNames);\n context.reportError(new GraphQLError(\"Unknown type \\\"\".concat(typeName, \"\\\".\") + didYouMean(suggestedTypes), node));\n }\n }\n };\n}\nvar standardTypeNames = [].concat(specifiedScalarTypes, introspectionTypes).map(function (type) {\n return type.name;\n});\n\nfunction isStandardTypeName(typeName) {\n return standardTypeNames.indexOf(typeName) !== -1;\n}\n\nfunction isSDLNode(value) {\n return !Array.isArray(value) && (isTypeSystemDefinitionNode(value) || isTypeSystemExtensionNode(value));\n}\n","import { GraphQLError } from \"../../error/GraphQLError.mjs\";\nimport { print } from \"../../language/printer.mjs\";\nimport { isCompositeType } from \"../../type/definition.mjs\";\nimport { typeFromAST } from \"../../utilities/typeFromAST.mjs\";\n\n/**\n * Fragments on composite type\n *\n * Fragments use a type condition to determine if they apply, since fragments\n * can only be spread into a composite type (object, interface, or union), the\n * type condition must also be a composite type.\n */\nexport function FragmentsOnCompositeTypesRule(context) {\n return {\n InlineFragment: function InlineFragment(node) {\n var typeCondition = node.typeCondition;\n\n if (typeCondition) {\n var type = typeFromAST(context.getSchema(), typeCondition);\n\n if (type && !isCompositeType(type)) {\n var typeStr = print(typeCondition);\n context.reportError(new GraphQLError(\"Fragment cannot condition on non composite type \\\"\".concat(typeStr, \"\\\".\"), typeCondition));\n }\n }\n },\n FragmentDefinition: function FragmentDefinition(node) {\n var type = typeFromAST(context.getSchema(), node.typeCondition);\n\n if (type && !isCompositeType(type)) {\n var typeStr = print(node.typeCondition);\n context.reportError(new GraphQLError(\"Fragment \\\"\".concat(node.name.value, \"\\\" cannot condition on non composite type \\\"\").concat(typeStr, \"\\\".\"), node.typeCondition));\n }\n }\n };\n}\n","import { GraphQLError } from \"../../error/GraphQLError.mjs\";\nimport { print } from \"../../language/printer.mjs\";\nimport { isInputType } from \"../../type/definition.mjs\";\nimport { typeFromAST } from \"../../utilities/typeFromAST.mjs\";\n\n/**\n * Variables are input types\n *\n * A GraphQL operation is only valid if all the variables it defines are of\n * input types (scalar, enum, or input object).\n */\nexport function VariablesAreInputTypesRule(context) {\n return {\n VariableDefinition: function VariableDefinition(node) {\n var type = typeFromAST(context.getSchema(), node.type);\n\n if (type && !isInputType(type)) {\n var variableName = node.variable.name.value;\n var typeName = print(node.type);\n context.reportError(new GraphQLError(\"Variable \\\"$\".concat(variableName, \"\\\" cannot be non-input type \\\"\").concat(typeName, \"\\\".\"), node.type));\n }\n }\n };\n}\n","import inspect from \"../../jsutils/inspect.mjs\";\nimport { GraphQLError } from \"../../error/GraphQLError.mjs\";\nimport { getNamedType, isLeafType } from \"../../type/definition.mjs\";\n\n/**\n * Scalar leafs\n *\n * A GraphQL document is valid only if all leaf fields (fields without\n * sub selections) are of scalar or enum types.\n */\nexport function ScalarLeafsRule(context) {\n return {\n Field: function Field(node) {\n var type = context.getType();\n var selectionSet = node.selectionSet;\n\n if (type) {\n if (isLeafType(getNamedType(type))) {\n if (selectionSet) {\n var fieldName = node.name.value;\n var typeStr = inspect(type);\n context.reportError(new GraphQLError(\"Field \\\"\".concat(fieldName, \"\\\" must not have a selection since type \\\"\").concat(typeStr, \"\\\" has no subfields.\"), selectionSet));\n }\n } else if (!selectionSet) {\n var _fieldName = node.name.value;\n\n var _typeStr = inspect(type);\n\n context.reportError(new GraphQLError(\"Field \\\"\".concat(_fieldName, \"\\\" of type \\\"\").concat(_typeStr, \"\\\" must have a selection of subfields. Did you mean \\\"\").concat(_fieldName, \" { ... }\\\"?\"), node));\n }\n }\n }\n };\n}\n","import arrayFrom from \"../../polyfills/arrayFrom.mjs\";\nimport didYouMean from \"../../jsutils/didYouMean.mjs\";\nimport suggestionList from \"../../jsutils/suggestionList.mjs\";\nimport naturalCompare from \"../../jsutils/naturalCompare.mjs\";\nimport { GraphQLError } from \"../../error/GraphQLError.mjs\";\nimport { isObjectType, isInterfaceType, isAbstractType } from \"../../type/definition.mjs\";\n\n/**\n * Fields on correct type\n *\n * A GraphQL document is only valid if all fields selected are defined by the\n * parent type, or are an allowed meta field such as __typename.\n */\nexport function FieldsOnCorrectTypeRule(context) {\n return {\n Field: function Field(node) {\n var type = context.getParentType();\n\n if (type) {\n var fieldDef = context.getFieldDef();\n\n if (!fieldDef) {\n // This field doesn't exist, lets look for suggestions.\n var schema = context.getSchema();\n var fieldName = node.name.value; // First determine if there are any suggested types to condition on.\n\n var suggestion = didYouMean('to use an inline fragment on', getSuggestedTypeNames(schema, type, fieldName)); // If there are no suggested types, then perhaps this was a typo?\n\n if (suggestion === '') {\n suggestion = didYouMean(getSuggestedFieldNames(type, fieldName));\n } // Report an error, including helpful suggestions.\n\n\n context.reportError(new GraphQLError(\"Cannot query field \\\"\".concat(fieldName, \"\\\" on type \\\"\").concat(type.name, \"\\\".\") + suggestion, node));\n }\n }\n }\n };\n}\n/**\n * Go through all of the implementations of type, as well as the interfaces that\n * they implement. If any of those types include the provided field, suggest them,\n * sorted by how often the type is referenced.\n */\n\nfunction getSuggestedTypeNames(schema, type, fieldName) {\n if (!isAbstractType(type)) {\n // Must be an Object type, which does not have possible fields.\n return [];\n }\n\n var suggestedTypes = new Set();\n var usageCount = Object.create(null);\n\n for (var _i2 = 0, _schema$getPossibleTy2 = schema.getPossibleTypes(type); _i2 < _schema$getPossibleTy2.length; _i2++) {\n var possibleType = _schema$getPossibleTy2[_i2];\n\n if (!possibleType.getFields()[fieldName]) {\n continue;\n } // This object type defines this field.\n\n\n suggestedTypes.add(possibleType);\n usageCount[possibleType.name] = 1;\n\n for (var _i4 = 0, _possibleType$getInte2 = possibleType.getInterfaces(); _i4 < _possibleType$getInte2.length; _i4++) {\n var _usageCount$possibleI;\n\n var possibleInterface = _possibleType$getInte2[_i4];\n\n if (!possibleInterface.getFields()[fieldName]) {\n continue;\n } // This interface type defines this field.\n\n\n suggestedTypes.add(possibleInterface);\n usageCount[possibleInterface.name] = ((_usageCount$possibleI = usageCount[possibleInterface.name]) !== null && _usageCount$possibleI !== void 0 ? _usageCount$possibleI : 0) + 1;\n }\n }\n\n return arrayFrom(suggestedTypes).sort(function (typeA, typeB) {\n // Suggest both interface and object types based on how common they are.\n var usageCountDiff = usageCount[typeB.name] - usageCount[typeA.name];\n\n if (usageCountDiff !== 0) {\n return usageCountDiff;\n } // Suggest super types first followed by subtypes\n\n\n if (isInterfaceType(typeA) && schema.isSubType(typeA, typeB)) {\n return -1;\n }\n\n if (isInterfaceType(typeB) && schema.isSubType(typeB, typeA)) {\n return 1;\n }\n\n return naturalCompare(typeA.name, typeB.name);\n }).map(function (x) {\n return x.name;\n });\n}\n/**\n * For the field name provided, determine if there are any similar field names\n * that may be the result of a typo.\n */\n\n\nfunction getSuggestedFieldNames(type, fieldName) {\n if (isObjectType(type) || isInterfaceType(type)) {\n var possibleFieldNames = Object.keys(type.getFields());\n return suggestionList(fieldName, possibleFieldNames);\n } // Otherwise, must be a Union type, which does not define fields.\n\n\n return [];\n}\n","import { GraphQLError } from \"../../error/GraphQLError.mjs\";\n\n/**\n * Unique fragment names\n *\n * A GraphQL document is only valid if all defined fragments have unique names.\n */\nexport function UniqueFragmentNamesRule(context) {\n var knownFragmentNames = Object.create(null);\n return {\n OperationDefinition: function OperationDefinition() {\n return false;\n },\n FragmentDefinition: function FragmentDefinition(node) {\n var fragmentName = node.name.value;\n\n if (knownFragmentNames[fragmentName]) {\n context.reportError(new GraphQLError(\"There can be only one fragment named \\\"\".concat(fragmentName, \"\\\".\"), [knownFragmentNames[fragmentName], node.name]));\n } else {\n knownFragmentNames[fragmentName] = node.name;\n }\n\n return false;\n }\n };\n}\n","import { GraphQLError } from \"../../error/GraphQLError.mjs\";\n\n/**\n * Known fragment names\n *\n * A GraphQL document is only valid if all `...Fragment` fragment spreads refer\n * to fragments defined in the same document.\n */\nexport function KnownFragmentNamesRule(context) {\n return {\n FragmentSpread: function FragmentSpread(node) {\n var fragmentName = node.name.value;\n var fragment = context.getFragment(fragmentName);\n\n if (!fragment) {\n context.reportError(new GraphQLError(\"Unknown fragment \\\"\".concat(fragmentName, \"\\\".\"), node.name));\n }\n }\n };\n}\n","import { GraphQLError } from \"../../error/GraphQLError.mjs\";\n\n/**\n * No unused fragments\n *\n * A GraphQL document is only valid if all fragment definitions are spread\n * within operations, or spread within other fragments spread within operations.\n */\nexport function NoUnusedFragmentsRule(context) {\n var operationDefs = [];\n var fragmentDefs = [];\n return {\n OperationDefinition: function OperationDefinition(node) {\n operationDefs.push(node);\n return false;\n },\n FragmentDefinition: function FragmentDefinition(node) {\n fragmentDefs.push(node);\n return false;\n },\n Document: {\n leave: function leave() {\n var fragmentNameUsed = Object.create(null);\n\n for (var _i2 = 0; _i2 < operationDefs.length; _i2++) {\n var operation = operationDefs[_i2];\n\n for (var _i4 = 0, _context$getRecursive2 = context.getRecursivelyReferencedFragments(operation); _i4 < _context$getRecursive2.length; _i4++) {\n var fragment = _context$getRecursive2[_i4];\n fragmentNameUsed[fragment.name.value] = true;\n }\n }\n\n for (var _i6 = 0; _i6 < fragmentDefs.length; _i6++) {\n var fragmentDef = fragmentDefs[_i6];\n var fragName = fragmentDef.name.value;\n\n if (fragmentNameUsed[fragName] !== true) {\n context.reportError(new GraphQLError(\"Fragment \\\"\".concat(fragName, \"\\\" is never used.\"), fragmentDef));\n }\n }\n }\n }\n };\n}\n","import inspect from \"../../jsutils/inspect.mjs\";\nimport { GraphQLError } from \"../../error/GraphQLError.mjs\";\nimport { isCompositeType } from \"../../type/definition.mjs\";\nimport { typeFromAST } from \"../../utilities/typeFromAST.mjs\";\nimport { doTypesOverlap } from \"../../utilities/typeComparators.mjs\";\n\n/**\n * Possible fragment spread\n *\n * A fragment spread is only valid if the type condition could ever possibly\n * be true: if there is a non-empty intersection of the possible parent types,\n * and possible types which pass the type condition.\n */\nexport function PossibleFragmentSpreadsRule(context) {\n return {\n InlineFragment: function InlineFragment(node) {\n var fragType = context.getType();\n var parentType = context.getParentType();\n\n if (isCompositeType(fragType) && isCompositeType(parentType) && !doTypesOverlap(context.getSchema(), fragType, parentType)) {\n var parentTypeStr = inspect(parentType);\n var fragTypeStr = inspect(fragType);\n context.reportError(new GraphQLError(\"Fragment cannot be spread here as objects of type \\\"\".concat(parentTypeStr, \"\\\" can never be of type \\\"\").concat(fragTypeStr, \"\\\".\"), node));\n }\n },\n FragmentSpread: function FragmentSpread(node) {\n var fragName = node.name.value;\n var fragType = getFragmentType(context, fragName);\n var parentType = context.getParentType();\n\n if (fragType && parentType && !doTypesOverlap(context.getSchema(), fragType, parentType)) {\n var parentTypeStr = inspect(parentType);\n var fragTypeStr = inspect(fragType);\n context.reportError(new GraphQLError(\"Fragment \\\"\".concat(fragName, \"\\\" cannot be spread here as objects of type \\\"\").concat(parentTypeStr, \"\\\" can never be of type \\\"\").concat(fragTypeStr, \"\\\".\"), node));\n }\n }\n };\n}\n\nfunction getFragmentType(context, name) {\n var frag = context.getFragment(name);\n\n if (frag) {\n var type = typeFromAST(context.getSchema(), frag.typeCondition);\n\n if (isCompositeType(type)) {\n return type;\n }\n }\n}\n","import { GraphQLError } from \"../../error/GraphQLError.mjs\";\nexport function NoFragmentCyclesRule(context) {\n // Tracks already visited fragments to maintain O(N) and to ensure that cycles\n // are not redundantly reported.\n var visitedFrags = Object.create(null); // Array of AST nodes used to produce meaningful errors\n\n var spreadPath = []; // Position in the spread path\n\n var spreadPathIndexByName = Object.create(null);\n return {\n OperationDefinition: function OperationDefinition() {\n return false;\n },\n FragmentDefinition: function FragmentDefinition(node) {\n detectCycleRecursive(node);\n return false;\n }\n }; // This does a straight-forward DFS to find cycles.\n // It does not terminate when a cycle was found but continues to explore\n // the graph to find all possible cycles.\n\n function detectCycleRecursive(fragment) {\n if (visitedFrags[fragment.name.value]) {\n return;\n }\n\n var fragmentName = fragment.name.value;\n visitedFrags[fragmentName] = true;\n var spreadNodes = context.getFragmentSpreads(fragment.selectionSet);\n\n if (spreadNodes.length === 0) {\n return;\n }\n\n spreadPathIndexByName[fragmentName] = spreadPath.length;\n\n for (var _i2 = 0; _i2 < spreadNodes.length; _i2++) {\n var spreadNode = spreadNodes[_i2];\n var spreadName = spreadNode.name.value;\n var cycleIndex = spreadPathIndexByName[spreadName];\n spreadPath.push(spreadNode);\n\n if (cycleIndex === undefined) {\n var spreadFragment = context.getFragment(spreadName);\n\n if (spreadFragment) {\n detectCycleRecursive(spreadFragment);\n }\n } else {\n var cyclePath = spreadPath.slice(cycleIndex);\n var viaPath = cyclePath.slice(0, -1).map(function (s) {\n return '\"' + s.name.value + '\"';\n }).join(', ');\n context.reportError(new GraphQLError(\"Cannot spread fragment \\\"\".concat(spreadName, \"\\\" within itself\") + (viaPath !== '' ? \" via \".concat(viaPath, \".\") : '.'), cyclePath));\n }\n\n spreadPath.pop();\n }\n\n spreadPathIndexByName[fragmentName] = undefined;\n }\n}\n","import { GraphQLError } from \"../../error/GraphQLError.mjs\";\n\n/**\n * Unique variable names\n *\n * A GraphQL operation is only valid if all its variables are uniquely named.\n */\nexport function UniqueVariableNamesRule(context) {\n var knownVariableNames = Object.create(null);\n return {\n OperationDefinition: function OperationDefinition() {\n knownVariableNames = Object.create(null);\n },\n VariableDefinition: function VariableDefinition(node) {\n var variableName = node.variable.name.value;\n\n if (knownVariableNames[variableName]) {\n context.reportError(new GraphQLError(\"There can be only one variable named \\\"$\".concat(variableName, \"\\\".\"), [knownVariableNames[variableName], node.variable.name]));\n } else {\n knownVariableNames[variableName] = node.variable.name;\n }\n }\n };\n}\n","import { GraphQLError } from \"../../error/GraphQLError.mjs\";\n\n/**\n * No undefined variables\n *\n * A GraphQL operation is only valid if all variables encountered, both directly\n * and via fragment spreads, are defined by that operation.\n */\nexport function NoUndefinedVariablesRule(context) {\n var variableNameDefined = Object.create(null);\n return {\n OperationDefinition: {\n enter: function enter() {\n variableNameDefined = Object.create(null);\n },\n leave: function leave(operation) {\n var usages = context.getRecursiveVariableUsages(operation);\n\n for (var _i2 = 0; _i2 < usages.length; _i2++) {\n var _ref2 = usages[_i2];\n var node = _ref2.node;\n var varName = node.name.value;\n\n if (variableNameDefined[varName] !== true) {\n context.reportError(new GraphQLError(operation.name ? \"Variable \\\"$\".concat(varName, \"\\\" is not defined by operation \\\"\").concat(operation.name.value, \"\\\".\") : \"Variable \\\"$\".concat(varName, \"\\\" is not defined.\"), [node, operation]));\n }\n }\n }\n },\n VariableDefinition: function VariableDefinition(node) {\n variableNameDefined[node.variable.name.value] = true;\n }\n };\n}\n","import { GraphQLError } from \"../../error/GraphQLError.mjs\";\n\n/**\n * No unused variables\n *\n * A GraphQL operation is only valid if all variables defined by an operation\n * are used, either directly or within a spread fragment.\n */\nexport function NoUnusedVariablesRule(context) {\n var variableDefs = [];\n return {\n OperationDefinition: {\n enter: function enter() {\n variableDefs = [];\n },\n leave: function leave(operation) {\n var variableNameUsed = Object.create(null);\n var usages = context.getRecursiveVariableUsages(operation);\n\n for (var _i2 = 0; _i2 < usages.length; _i2++) {\n var _ref2 = usages[_i2];\n var node = _ref2.node;\n variableNameUsed[node.name.value] = true;\n }\n\n for (var _i4 = 0, _variableDefs2 = variableDefs; _i4 < _variableDefs2.length; _i4++) {\n var variableDef = _variableDefs2[_i4];\n var variableName = variableDef.variable.name.value;\n\n if (variableNameUsed[variableName] !== true) {\n context.reportError(new GraphQLError(operation.name ? \"Variable \\\"$\".concat(variableName, \"\\\" is never used in operation \\\"\").concat(operation.name.value, \"\\\".\") : \"Variable \\\"$\".concat(variableName, \"\\\" is never used.\"), variableDef));\n }\n }\n }\n },\n VariableDefinition: function VariableDefinition(def) {\n variableDefs.push(def);\n }\n };\n}\n","import inspect from \"../../jsutils/inspect.mjs\";\nimport invariant from \"../../jsutils/invariant.mjs\";\nimport { GraphQLError } from \"../../error/GraphQLError.mjs\";\nimport { Kind } from \"../../language/kinds.mjs\";\nimport { DirectiveLocation } from \"../../language/directiveLocation.mjs\";\nimport { specifiedDirectives } from \"../../type/directives.mjs\";\n\n/**\n * Known directives\n *\n * A GraphQL document is only valid if all `@directives` are known by the\n * schema and legally positioned.\n */\nexport function KnownDirectivesRule(context) {\n var locationsMap = Object.create(null);\n var schema = context.getSchema();\n var definedDirectives = schema ? schema.getDirectives() : specifiedDirectives;\n\n for (var _i2 = 0; _i2 < definedDirectives.length; _i2++) {\n var directive = definedDirectives[_i2];\n locationsMap[directive.name] = directive.locations;\n }\n\n var astDefinitions = context.getDocument().definitions;\n\n for (var _i4 = 0; _i4 < astDefinitions.length; _i4++) {\n var def = astDefinitions[_i4];\n\n if (def.kind === Kind.DIRECTIVE_DEFINITION) {\n locationsMap[def.name.value] = def.locations.map(function (name) {\n return name.value;\n });\n }\n }\n\n return {\n Directive: function Directive(node, _key, _parent, _path, ancestors) {\n var name = node.name.value;\n var locations = locationsMap[name];\n\n if (!locations) {\n context.reportError(new GraphQLError(\"Unknown directive \\\"@\".concat(name, \"\\\".\"), node));\n return;\n }\n\n var candidateLocation = getDirectiveLocationForASTPath(ancestors);\n\n if (candidateLocation && locations.indexOf(candidateLocation) === -1) {\n context.reportError(new GraphQLError(\"Directive \\\"@\".concat(name, \"\\\" may not be used on \").concat(candidateLocation, \".\"), node));\n }\n }\n };\n}\n\nfunction getDirectiveLocationForASTPath(ancestors) {\n var appliedTo = ancestors[ancestors.length - 1];\n !Array.isArray(appliedTo) || invariant(0);\n\n switch (appliedTo.kind) {\n case Kind.OPERATION_DEFINITION:\n return getDirectiveLocationForOperation(appliedTo.operation);\n\n case Kind.FIELD:\n return DirectiveLocation.FIELD;\n\n case Kind.FRAGMENT_SPREAD:\n return DirectiveLocation.FRAGMENT_SPREAD;\n\n case Kind.INLINE_FRAGMENT:\n return DirectiveLocation.INLINE_FRAGMENT;\n\n case Kind.FRAGMENT_DEFINITION:\n return DirectiveLocation.FRAGMENT_DEFINITION;\n\n case Kind.VARIABLE_DEFINITION:\n return DirectiveLocation.VARIABLE_DEFINITION;\n\n case Kind.SCHEMA_DEFINITION:\n case Kind.SCHEMA_EXTENSION:\n return DirectiveLocation.SCHEMA;\n\n case Kind.SCALAR_TYPE_DEFINITION:\n case Kind.SCALAR_TYPE_EXTENSION:\n return DirectiveLocation.SCALAR;\n\n case Kind.OBJECT_TYPE_DEFINITION:\n case Kind.OBJECT_TYPE_EXTENSION:\n return DirectiveLocation.OBJECT;\n\n case Kind.FIELD_DEFINITION:\n return DirectiveLocation.FIELD_DEFINITION;\n\n case Kind.INTERFACE_TYPE_DEFINITION:\n case Kind.INTERFACE_TYPE_EXTENSION:\n return DirectiveLocation.INTERFACE;\n\n case Kind.UNION_TYPE_DEFINITION:\n case Kind.UNION_TYPE_EXTENSION:\n return DirectiveLocation.UNION;\n\n case Kind.ENUM_TYPE_DEFINITION:\n case Kind.ENUM_TYPE_EXTENSION:\n return DirectiveLocation.ENUM;\n\n case Kind.ENUM_VALUE_DEFINITION:\n return DirectiveLocation.ENUM_VALUE;\n\n case Kind.INPUT_OBJECT_TYPE_DEFINITION:\n case Kind.INPUT_OBJECT_TYPE_EXTENSION:\n return DirectiveLocation.INPUT_OBJECT;\n\n case Kind.INPUT_VALUE_DEFINITION:\n {\n var parentNode = ancestors[ancestors.length - 3];\n return parentNode.kind === Kind.INPUT_OBJECT_TYPE_DEFINITION ? DirectiveLocation.INPUT_FIELD_DEFINITION : DirectiveLocation.ARGUMENT_DEFINITION;\n }\n }\n}\n\nfunction getDirectiveLocationForOperation(operation) {\n switch (operation) {\n case 'query':\n return DirectiveLocation.QUERY;\n\n case 'mutation':\n return DirectiveLocation.MUTATION;\n\n case 'subscription':\n return DirectiveLocation.SUBSCRIPTION;\n } // istanbul ignore next (Not reachable. All possible types have been considered)\n\n\n false || invariant(0, 'Unexpected operation: ' + inspect(operation));\n}\n","import { GraphQLError } from \"../../error/GraphQLError.mjs\";\nimport { Kind } from \"../../language/kinds.mjs\";\nimport { isTypeDefinitionNode, isTypeExtensionNode } from \"../../language/predicates.mjs\";\nimport { specifiedDirectives } from \"../../type/directives.mjs\";\n\n/**\n * Unique directive names per location\n *\n * A GraphQL document is only valid if all non-repeatable directives at\n * a given location are uniquely named.\n */\nexport function UniqueDirectivesPerLocationRule(context) {\n var uniqueDirectiveMap = Object.create(null);\n var schema = context.getSchema();\n var definedDirectives = schema ? schema.getDirectives() : specifiedDirectives;\n\n for (var _i2 = 0; _i2 < definedDirectives.length; _i2++) {\n var directive = definedDirectives[_i2];\n uniqueDirectiveMap[directive.name] = !directive.isRepeatable;\n }\n\n var astDefinitions = context.getDocument().definitions;\n\n for (var _i4 = 0; _i4 < astDefinitions.length; _i4++) {\n var def = astDefinitions[_i4];\n\n if (def.kind === Kind.DIRECTIVE_DEFINITION) {\n uniqueDirectiveMap[def.name.value] = !def.repeatable;\n }\n }\n\n var schemaDirectives = Object.create(null);\n var typeDirectivesMap = Object.create(null);\n return {\n // Many different AST nodes may contain directives. Rather than listing\n // them all, just listen for entering any node, and check to see if it\n // defines any directives.\n enter: function enter(node) {\n if (node.directives == null) {\n return;\n }\n\n var seenDirectives;\n\n if (node.kind === Kind.SCHEMA_DEFINITION || node.kind === Kind.SCHEMA_EXTENSION) {\n seenDirectives = schemaDirectives;\n } else if (isTypeDefinitionNode(node) || isTypeExtensionNode(node)) {\n var typeName = node.name.value;\n seenDirectives = typeDirectivesMap[typeName];\n\n if (seenDirectives === undefined) {\n typeDirectivesMap[typeName] = seenDirectives = Object.create(null);\n }\n } else {\n seenDirectives = Object.create(null);\n }\n\n for (var _i6 = 0, _node$directives2 = node.directives; _i6 < _node$directives2.length; _i6++) {\n var _directive = _node$directives2[_i6];\n var directiveName = _directive.name.value;\n\n if (uniqueDirectiveMap[directiveName]) {\n if (seenDirectives[directiveName]) {\n context.reportError(new GraphQLError(\"The directive \\\"@\".concat(directiveName, \"\\\" can only be used once at this location.\"), [seenDirectives[directiveName], _directive]));\n } else {\n seenDirectives[directiveName] = _directive;\n }\n }\n }\n }\n };\n}\n","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport didYouMean from \"../../jsutils/didYouMean.mjs\";\nimport suggestionList from \"../../jsutils/suggestionList.mjs\";\nimport { GraphQLError } from \"../../error/GraphQLError.mjs\";\nimport { Kind } from \"../../language/kinds.mjs\";\nimport { specifiedDirectives } from \"../../type/directives.mjs\";\n\n/**\n * Known argument names\n *\n * A GraphQL field is only valid if all supplied arguments are defined by\n * that field.\n */\nexport function KnownArgumentNamesRule(context) {\n return _objectSpread(_objectSpread({}, KnownArgumentNamesOnDirectivesRule(context)), {}, {\n Argument: function Argument(argNode) {\n var argDef = context.getArgument();\n var fieldDef = context.getFieldDef();\n var parentType = context.getParentType();\n\n if (!argDef && fieldDef && parentType) {\n var argName = argNode.name.value;\n var knownArgsNames = fieldDef.args.map(function (arg) {\n return arg.name;\n });\n var suggestions = suggestionList(argName, knownArgsNames);\n context.reportError(new GraphQLError(\"Unknown argument \\\"\".concat(argName, \"\\\" on field \\\"\").concat(parentType.name, \".\").concat(fieldDef.name, \"\\\".\") + didYouMean(suggestions), argNode));\n }\n }\n });\n}\n/**\n * @internal\n */\n\nexport function KnownArgumentNamesOnDirectivesRule(context) {\n var directiveArgs = Object.create(null);\n var schema = context.getSchema();\n var definedDirectives = schema ? schema.getDirectives() : specifiedDirectives;\n\n for (var _i2 = 0; _i2 < definedDirectives.length; _i2++) {\n var directive = definedDirectives[_i2];\n directiveArgs[directive.name] = directive.args.map(function (arg) {\n return arg.name;\n });\n }\n\n var astDefinitions = context.getDocument().definitions;\n\n for (var _i4 = 0; _i4 < astDefinitions.length; _i4++) {\n var def = astDefinitions[_i4];\n\n if (def.kind === Kind.DIRECTIVE_DEFINITION) {\n var _def$arguments;\n\n // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n var argsNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : [];\n directiveArgs[def.name.value] = argsNodes.map(function (arg) {\n return arg.name.value;\n });\n }\n }\n\n return {\n Directive: function Directive(directiveNode) {\n var directiveName = directiveNode.name.value;\n var knownArgs = directiveArgs[directiveName];\n\n if (directiveNode.arguments && knownArgs) {\n for (var _i6 = 0, _directiveNode$argume2 = directiveNode.arguments; _i6 < _directiveNode$argume2.length; _i6++) {\n var argNode = _directiveNode$argume2[_i6];\n var argName = argNode.name.value;\n\n if (knownArgs.indexOf(argName) === -1) {\n var suggestions = suggestionList(argName, knownArgs);\n context.reportError(new GraphQLError(\"Unknown argument \\\"\".concat(argName, \"\\\" on directive \\\"@\").concat(directiveName, \"\\\".\") + didYouMean(suggestions), argNode));\n }\n }\n }\n\n return false;\n }\n };\n}\n","import { GraphQLError } from \"../../error/GraphQLError.mjs\";\n\n/**\n * Unique argument names\n *\n * A GraphQL field or directive is only valid if all supplied arguments are\n * uniquely named.\n */\nexport function UniqueArgumentNamesRule(context) {\n var knownArgNames = Object.create(null);\n return {\n Field: function Field() {\n knownArgNames = Object.create(null);\n },\n Directive: function Directive() {\n knownArgNames = Object.create(null);\n },\n Argument: function Argument(node) {\n var argName = node.name.value;\n\n if (knownArgNames[argName]) {\n context.reportError(new GraphQLError(\"There can be only one argument named \\\"\".concat(argName, \"\\\".\"), [knownArgNames[argName], node.name]));\n } else {\n knownArgNames[argName] = node.name;\n }\n\n return false;\n }\n };\n}\n","import objectValues from \"../../polyfills/objectValues.mjs\";\nimport keyMap from \"../../jsutils/keyMap.mjs\";\nimport inspect from \"../../jsutils/inspect.mjs\";\nimport didYouMean from \"../../jsutils/didYouMean.mjs\";\nimport suggestionList from \"../../jsutils/suggestionList.mjs\";\nimport { GraphQLError } from \"../../error/GraphQLError.mjs\";\nimport { print } from \"../../language/printer.mjs\";\nimport { isLeafType, isInputObjectType, isListType, isNonNullType, isRequiredInputField, getNullableType, getNamedType } from \"../../type/definition.mjs\";\n\n/**\n * Value literals of correct type\n *\n * A GraphQL document is only valid if all value literals are of the type\n * expected at their position.\n */\nexport function ValuesOfCorrectTypeRule(context) {\n return {\n ListValue: function ListValue(node) {\n // Note: TypeInfo will traverse into a list's item type, so look to the\n // parent input type to check if it is a list.\n var type = getNullableType(context.getParentInputType());\n\n if (!isListType(type)) {\n isValidValueNode(context, node);\n return false; // Don't traverse further.\n }\n },\n ObjectValue: function ObjectValue(node) {\n var type = getNamedType(context.getInputType());\n\n if (!isInputObjectType(type)) {\n isValidValueNode(context, node);\n return false; // Don't traverse further.\n } // Ensure every required field exists.\n\n\n var fieldNodeMap = keyMap(node.fields, function (field) {\n return field.name.value;\n });\n\n for (var _i2 = 0, _objectValues2 = objectValues(type.getFields()); _i2 < _objectValues2.length; _i2++) {\n var fieldDef = _objectValues2[_i2];\n var fieldNode = fieldNodeMap[fieldDef.name];\n\n if (!fieldNode && isRequiredInputField(fieldDef)) {\n var typeStr = inspect(fieldDef.type);\n context.reportError(new GraphQLError(\"Field \\\"\".concat(type.name, \".\").concat(fieldDef.name, \"\\\" of required type \\\"\").concat(typeStr, \"\\\" was not provided.\"), node));\n }\n }\n },\n ObjectField: function ObjectField(node) {\n var parentType = getNamedType(context.getParentInputType());\n var fieldType = context.getInputType();\n\n if (!fieldType && isInputObjectType(parentType)) {\n var suggestions = suggestionList(node.name.value, Object.keys(parentType.getFields()));\n context.reportError(new GraphQLError(\"Field \\\"\".concat(node.name.value, \"\\\" is not defined by type \\\"\").concat(parentType.name, \"\\\".\") + didYouMean(suggestions), node));\n }\n },\n NullValue: function NullValue(node) {\n var type = context.getInputType();\n\n if (isNonNullType(type)) {\n context.reportError(new GraphQLError(\"Expected value of type \\\"\".concat(inspect(type), \"\\\", found \").concat(print(node), \".\"), node));\n }\n },\n EnumValue: function EnumValue(node) {\n return isValidValueNode(context, node);\n },\n IntValue: function IntValue(node) {\n return isValidValueNode(context, node);\n },\n FloatValue: function FloatValue(node) {\n return isValidValueNode(context, node);\n },\n StringValue: function StringValue(node) {\n return isValidValueNode(context, node);\n },\n BooleanValue: function BooleanValue(node) {\n return isValidValueNode(context, node);\n }\n };\n}\n/**\n * Any value literal may be a valid representation of a Scalar, depending on\n * that scalar type.\n */\n\nfunction isValidValueNode(context, node) {\n // Report any error at the full type expected by the location.\n var locationType = context.getInputType();\n\n if (!locationType) {\n return;\n }\n\n var type = getNamedType(locationType);\n\n if (!isLeafType(type)) {\n var typeStr = inspect(locationType);\n context.reportError(new GraphQLError(\"Expected value of type \\\"\".concat(typeStr, \"\\\", found \").concat(print(node), \".\"), node));\n return;\n } // Scalars and Enums determine if a literal value is valid via parseLiteral(),\n // which may throw or return an invalid value to indicate failure.\n\n\n try {\n var parseResult = type.parseLiteral(node, undefined\n /* variables */\n );\n\n if (parseResult === undefined) {\n var _typeStr = inspect(locationType);\n\n context.reportError(new GraphQLError(\"Expected value of type \\\"\".concat(_typeStr, \"\\\", found \").concat(print(node), \".\"), node));\n }\n } catch (error) {\n var _typeStr2 = inspect(locationType);\n\n if (error instanceof GraphQLError) {\n context.reportError(error);\n } else {\n context.reportError(new GraphQLError(\"Expected value of type \\\"\".concat(_typeStr2, \"\\\", found \").concat(print(node), \"; \") + error.message, node, undefined, undefined, undefined, error));\n }\n }\n}\n","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport inspect from \"../../jsutils/inspect.mjs\";\nimport keyMap from \"../../jsutils/keyMap.mjs\";\nimport { GraphQLError } from \"../../error/GraphQLError.mjs\";\nimport { Kind } from \"../../language/kinds.mjs\";\nimport { print } from \"../../language/printer.mjs\";\nimport { specifiedDirectives } from \"../../type/directives.mjs\";\nimport { isType, isRequiredArgument } from \"../../type/definition.mjs\";\n\n/**\n * Provided required arguments\n *\n * A field or directive is only valid if all required (non-null without a\n * default value) field arguments have been provided.\n */\nexport function ProvidedRequiredArgumentsRule(context) {\n return _objectSpread(_objectSpread({}, ProvidedRequiredArgumentsOnDirectivesRule(context)), {}, {\n Field: {\n // Validate on leave to allow for deeper errors to appear first.\n leave: function leave(fieldNode) {\n var _fieldNode$arguments;\n\n var fieldDef = context.getFieldDef();\n\n if (!fieldDef) {\n return false;\n } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n\n\n var argNodes = (_fieldNode$arguments = fieldNode.arguments) !== null && _fieldNode$arguments !== void 0 ? _fieldNode$arguments : [];\n var argNodeMap = keyMap(argNodes, function (arg) {\n return arg.name.value;\n });\n\n for (var _i2 = 0, _fieldDef$args2 = fieldDef.args; _i2 < _fieldDef$args2.length; _i2++) {\n var argDef = _fieldDef$args2[_i2];\n var argNode = argNodeMap[argDef.name];\n\n if (!argNode && isRequiredArgument(argDef)) {\n var argTypeStr = inspect(argDef.type);\n context.reportError(new GraphQLError(\"Field \\\"\".concat(fieldDef.name, \"\\\" argument \\\"\").concat(argDef.name, \"\\\" of type \\\"\").concat(argTypeStr, \"\\\" is required, but it was not provided.\"), fieldNode));\n }\n }\n }\n }\n });\n}\n/**\n * @internal\n */\n\nexport function ProvidedRequiredArgumentsOnDirectivesRule(context) {\n var requiredArgsMap = Object.create(null);\n var schema = context.getSchema();\n var definedDirectives = schema ? schema.getDirectives() : specifiedDirectives;\n\n for (var _i4 = 0; _i4 < definedDirectives.length; _i4++) {\n var directive = definedDirectives[_i4];\n requiredArgsMap[directive.name] = keyMap(directive.args.filter(isRequiredArgument), function (arg) {\n return arg.name;\n });\n }\n\n var astDefinitions = context.getDocument().definitions;\n\n for (var _i6 = 0; _i6 < astDefinitions.length; _i6++) {\n var def = astDefinitions[_i6];\n\n if (def.kind === Kind.DIRECTIVE_DEFINITION) {\n var _def$arguments;\n\n // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n var argNodes = (_def$arguments = def.arguments) !== null && _def$arguments !== void 0 ? _def$arguments : [];\n requiredArgsMap[def.name.value] = keyMap(argNodes.filter(isRequiredArgumentNode), function (arg) {\n return arg.name.value;\n });\n }\n }\n\n return {\n Directive: {\n // Validate on leave to allow for deeper errors to appear first.\n leave: function leave(directiveNode) {\n var directiveName = directiveNode.name.value;\n var requiredArgs = requiredArgsMap[directiveName];\n\n if (requiredArgs) {\n var _directiveNode$argume;\n\n // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n var _argNodes = (_directiveNode$argume = directiveNode.arguments) !== null && _directiveNode$argume !== void 0 ? _directiveNode$argume : [];\n\n var argNodeMap = keyMap(_argNodes, function (arg) {\n return arg.name.value;\n });\n\n for (var _i8 = 0, _Object$keys2 = Object.keys(requiredArgs); _i8 < _Object$keys2.length; _i8++) {\n var argName = _Object$keys2[_i8];\n\n if (!argNodeMap[argName]) {\n var argType = requiredArgs[argName].type;\n var argTypeStr = isType(argType) ? inspect(argType) : print(argType);\n context.reportError(new GraphQLError(\"Directive \\\"@\".concat(directiveName, \"\\\" argument \\\"\").concat(argName, \"\\\" of type \\\"\").concat(argTypeStr, \"\\\" is required, but it was not provided.\"), directiveNode));\n }\n }\n }\n }\n }\n };\n}\n\nfunction isRequiredArgumentNode(arg) {\n return arg.type.kind === Kind.NON_NULL_TYPE && arg.defaultValue == null;\n}\n","import inspect from \"../../jsutils/inspect.mjs\";\nimport { GraphQLError } from \"../../error/GraphQLError.mjs\";\nimport { Kind } from \"../../language/kinds.mjs\";\nimport { isNonNullType } from \"../../type/definition.mjs\";\nimport { typeFromAST } from \"../../utilities/typeFromAST.mjs\";\nimport { isTypeSubTypeOf } from \"../../utilities/typeComparators.mjs\";\n\n/**\n * Variables passed to field arguments conform to type\n */\nexport function VariablesInAllowedPositionRule(context) {\n var varDefMap = Object.create(null);\n return {\n OperationDefinition: {\n enter: function enter() {\n varDefMap = Object.create(null);\n },\n leave: function leave(operation) {\n var usages = context.getRecursiveVariableUsages(operation);\n\n for (var _i2 = 0; _i2 < usages.length; _i2++) {\n var _ref2 = usages[_i2];\n var node = _ref2.node;\n var type = _ref2.type;\n var defaultValue = _ref2.defaultValue;\n var varName = node.name.value;\n var varDef = varDefMap[varName];\n\n if (varDef && type) {\n // A var type is allowed if it is the same or more strict (e.g. is\n // a subtype of) than the expected type. It can be more strict if\n // the variable type is non-null when the expected type is nullable.\n // If both are list types, the variable item type can be more strict\n // than the expected item type (contravariant).\n var schema = context.getSchema();\n var varType = typeFromAST(schema, varDef.type);\n\n if (varType && !allowedVariableUsage(schema, varType, varDef.defaultValue, type, defaultValue)) {\n var varTypeStr = inspect(varType);\n var typeStr = inspect(type);\n context.reportError(new GraphQLError(\"Variable \\\"$\".concat(varName, \"\\\" of type \\\"\").concat(varTypeStr, \"\\\" used in position expecting type \\\"\").concat(typeStr, \"\\\".\"), [varDef, node]));\n }\n }\n }\n }\n },\n VariableDefinition: function VariableDefinition(node) {\n varDefMap[node.variable.name.value] = node;\n }\n };\n}\n/**\n * Returns true if the variable is allowed in the location it was found,\n * which includes considering if default values exist for either the variable\n * or the location at which it is located.\n */\n\nfunction allowedVariableUsage(schema, varType, varDefaultValue, locationType, locationDefaultValue) {\n if (isNonNullType(locationType) && !isNonNullType(varType)) {\n var hasNonNullVariableDefaultValue = varDefaultValue != null && varDefaultValue.kind !== Kind.NULL;\n var hasLocationDefaultValue = locationDefaultValue !== undefined;\n\n if (!hasNonNullVariableDefaultValue && !hasLocationDefaultValue) {\n return false;\n }\n\n var nullableLocationType = locationType.ofType;\n return isTypeSubTypeOf(schema, varType, nullableLocationType);\n }\n\n return isTypeSubTypeOf(schema, varType, locationType);\n}\n","import find from \"../../polyfills/find.mjs\";\nimport objectEntries from \"../../polyfills/objectEntries.mjs\";\nimport inspect from \"../../jsutils/inspect.mjs\";\nimport { GraphQLError } from \"../../error/GraphQLError.mjs\";\nimport { Kind } from \"../../language/kinds.mjs\";\nimport { print } from \"../../language/printer.mjs\";\nimport { getNamedType, isNonNullType, isLeafType, isObjectType, isListType, isInterfaceType } from \"../../type/definition.mjs\";\nimport { typeFromAST } from \"../../utilities/typeFromAST.mjs\";\n\nfunction reasonMessage(reason) {\n if (Array.isArray(reason)) {\n return reason.map(function (_ref) {\n var responseName = _ref[0],\n subReason = _ref[1];\n return \"subfields \\\"\".concat(responseName, \"\\\" conflict because \") + reasonMessage(subReason);\n }).join(' and ');\n }\n\n return reason;\n}\n/**\n * Overlapping fields can be merged\n *\n * A selection set is only valid if all fields (including spreading any\n * fragments) either correspond to distinct response names or can be merged\n * without ambiguity.\n */\n\n\nexport function OverlappingFieldsCanBeMergedRule(context) {\n // A memoization for when two fragments are compared \"between\" each other for\n // conflicts. Two fragments may be compared many times, so memoizing this can\n // dramatically improve the performance of this validator.\n var comparedFragmentPairs = new PairSet(); // A cache for the \"field map\" and list of fragment names found in any given\n // selection set. Selection sets may be asked for this information multiple\n // times, so this improves the performance of this validator.\n\n var cachedFieldsAndFragmentNames = new Map();\n return {\n SelectionSet: function SelectionSet(selectionSet) {\n var conflicts = findConflictsWithinSelectionSet(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, context.getParentType(), selectionSet);\n\n for (var _i2 = 0; _i2 < conflicts.length; _i2++) {\n var _ref3 = conflicts[_i2];\n var _ref2$ = _ref3[0];\n var responseName = _ref2$[0];\n var reason = _ref2$[1];\n var fields1 = _ref3[1];\n var fields2 = _ref3[2];\n var reasonMsg = reasonMessage(reason);\n context.reportError(new GraphQLError(\"Fields \\\"\".concat(responseName, \"\\\" conflict because \").concat(reasonMsg, \". Use different aliases on the fields to fetch both if this was intentional.\"), fields1.concat(fields2)));\n }\n }\n };\n}\n\n/**\n * Algorithm:\n *\n * Conflicts occur when two fields exist in a query which will produce the same\n * response name, but represent differing values, thus creating a conflict.\n * The algorithm below finds all conflicts via making a series of comparisons\n * between fields. In order to compare as few fields as possible, this makes\n * a series of comparisons \"within\" sets of fields and \"between\" sets of fields.\n *\n * Given any selection set, a collection produces both a set of fields by\n * also including all inline fragments, as well as a list of fragments\n * referenced by fragment spreads.\n *\n * A) Each selection set represented in the document first compares \"within\" its\n * collected set of fields, finding any conflicts between every pair of\n * overlapping fields.\n * Note: This is the *only time* that a the fields \"within\" a set are compared\n * to each other. After this only fields \"between\" sets are compared.\n *\n * B) Also, if any fragment is referenced in a selection set, then a\n * comparison is made \"between\" the original set of fields and the\n * referenced fragment.\n *\n * C) Also, if multiple fragments are referenced, then comparisons\n * are made \"between\" each referenced fragment.\n *\n * D) When comparing \"between\" a set of fields and a referenced fragment, first\n * a comparison is made between each field in the original set of fields and\n * each field in the the referenced set of fields.\n *\n * E) Also, if any fragment is referenced in the referenced selection set,\n * then a comparison is made \"between\" the original set of fields and the\n * referenced fragment (recursively referring to step D).\n *\n * F) When comparing \"between\" two fragments, first a comparison is made between\n * each field in the first referenced set of fields and each field in the the\n * second referenced set of fields.\n *\n * G) Also, any fragments referenced by the first must be compared to the\n * second, and any fragments referenced by the second must be compared to the\n * first (recursively referring to step F).\n *\n * H) When comparing two fields, if both have selection sets, then a comparison\n * is made \"between\" both selection sets, first comparing the set of fields in\n * the first selection set with the set of fields in the second.\n *\n * I) Also, if any fragment is referenced in either selection set, then a\n * comparison is made \"between\" the other set of fields and the\n * referenced fragment.\n *\n * J) Also, if two fragments are referenced in both selection sets, then a\n * comparison is made \"between\" the two fragments.\n *\n */\n// Find all conflicts found \"within\" a selection set, including those found\n// via spreading in fragments. Called when visiting each SelectionSet in the\n// GraphQL Document.\nfunction findConflictsWithinSelectionSet(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentType, selectionSet) {\n var conflicts = [];\n\n var _getFieldsAndFragment = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType, selectionSet),\n fieldMap = _getFieldsAndFragment[0],\n fragmentNames = _getFieldsAndFragment[1]; // (A) Find find all conflicts \"within\" the fields of this selection set.\n // Note: this is the *only place* `collectConflictsWithin` is called.\n\n\n collectConflictsWithin(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, fieldMap);\n\n if (fragmentNames.length !== 0) {\n // (B) Then collect conflicts between these fields and those represented by\n // each spread fragment name found.\n for (var i = 0; i < fragmentNames.length; i++) {\n collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, false, fieldMap, fragmentNames[i]); // (C) Then compare this fragment with all other fragments found in this\n // selection set to collect conflicts between fragments spread together.\n // This compares each item in the list of fragment names to every other\n // item in that same list (except for itself).\n\n for (var j = i + 1; j < fragmentNames.length; j++) {\n collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, false, fragmentNames[i], fragmentNames[j]);\n }\n }\n }\n\n return conflicts;\n} // Collect all conflicts found between a set of fields and a fragment reference\n// including via spreading in any nested fragments.\n\n\nfunction collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fragmentName) {\n var fragment = context.getFragment(fragmentName);\n\n if (!fragment) {\n return;\n }\n\n var _getReferencedFieldsA = getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment),\n fieldMap2 = _getReferencedFieldsA[0],\n fragmentNames2 = _getReferencedFieldsA[1]; // Do not compare a fragment's fieldMap to itself.\n\n\n if (fieldMap === fieldMap2) {\n return;\n } // (D) First collect any conflicts between the provided collection of fields\n // and the collection of fields represented by the given fragment.\n\n\n collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fieldMap2); // (E) Then collect any conflicts between the provided collection of fields\n // and any fragment names found in the given fragment.\n\n for (var i = 0; i < fragmentNames2.length; i++) {\n collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap, fragmentNames2[i]);\n }\n} // Collect all conflicts found between two fragments, including via spreading in\n// any nested fragments.\n\n\nfunction collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, fragmentName2) {\n // No need to compare a fragment to itself.\n if (fragmentName1 === fragmentName2) {\n return;\n } // Memoize so two fragments are not compared for conflicts more than once.\n\n\n if (comparedFragmentPairs.has(fragmentName1, fragmentName2, areMutuallyExclusive)) {\n return;\n }\n\n comparedFragmentPairs.add(fragmentName1, fragmentName2, areMutuallyExclusive);\n var fragment1 = context.getFragment(fragmentName1);\n var fragment2 = context.getFragment(fragmentName2);\n\n if (!fragment1 || !fragment2) {\n return;\n }\n\n var _getReferencedFieldsA2 = getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment1),\n fieldMap1 = _getReferencedFieldsA2[0],\n fragmentNames1 = _getReferencedFieldsA2[1];\n\n var _getReferencedFieldsA3 = getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment2),\n fieldMap2 = _getReferencedFieldsA3[0],\n fragmentNames2 = _getReferencedFieldsA3[1]; // (F) First, collect all conflicts between these two collections of fields\n // (not including any nested fragments).\n\n\n collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fieldMap2); // (G) Then collect conflicts between the first fragment and any nested\n // fragments spread in the second fragment.\n\n for (var j = 0; j < fragmentNames2.length; j++) {\n collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentName1, fragmentNames2[j]);\n } // (G) Then collect conflicts between the second fragment and any nested\n // fragments spread in the first fragment.\n\n\n for (var i = 0; i < fragmentNames1.length; i++) {\n collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentNames1[i], fragmentName2);\n }\n} // Find all conflicts found between two selection sets, including those found\n// via spreading in fragments. Called when determining if conflicts exist\n// between the sub-fields of two overlapping fields.\n\n\nfunction findConflictsBetweenSubSelectionSets(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, parentType1, selectionSet1, parentType2, selectionSet2) {\n var conflicts = [];\n\n var _getFieldsAndFragment2 = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType1, selectionSet1),\n fieldMap1 = _getFieldsAndFragment2[0],\n fragmentNames1 = _getFieldsAndFragment2[1];\n\n var _getFieldsAndFragment3 = getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType2, selectionSet2),\n fieldMap2 = _getFieldsAndFragment3[0],\n fragmentNames2 = _getFieldsAndFragment3[1]; // (H) First, collect all conflicts between these two collections of field.\n\n\n collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fieldMap2); // (I) Then collect conflicts between the first collection of fields and\n // those referenced by each fragment name associated with the second.\n\n if (fragmentNames2.length !== 0) {\n for (var j = 0; j < fragmentNames2.length; j++) {\n collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap1, fragmentNames2[j]);\n }\n } // (I) Then collect conflicts between the second collection of fields and\n // those referenced by each fragment name associated with the first.\n\n\n if (fragmentNames1.length !== 0) {\n for (var i = 0; i < fragmentNames1.length; i++) {\n collectConflictsBetweenFieldsAndFragment(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fieldMap2, fragmentNames1[i]);\n }\n } // (J) Also collect conflicts between any fragment names by the first and\n // fragment names by the second. This compares each item in the first set of\n // names to each item in the second set of names.\n\n\n for (var _i3 = 0; _i3 < fragmentNames1.length; _i3++) {\n for (var _j = 0; _j < fragmentNames2.length; _j++) {\n collectConflictsBetweenFragments(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, fragmentNames1[_i3], fragmentNames2[_j]);\n }\n }\n\n return conflicts;\n} // Collect all Conflicts \"within\" one collection of fields.\n\n\nfunction collectConflictsWithin(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, fieldMap) {\n // A field map is a keyed collection, where each key represents a response\n // name and the value at that key is a list of all fields which provide that\n // response name. For every response name, if there are multiple fields, they\n // must be compared to find a potential conflict.\n for (var _i5 = 0, _objectEntries2 = objectEntries(fieldMap); _i5 < _objectEntries2.length; _i5++) {\n var _ref5 = _objectEntries2[_i5];\n var responseName = _ref5[0];\n var fields = _ref5[1];\n\n // This compares every field in the list to every other field in this list\n // (except to itself). If the list only has one item, nothing needs to\n // be compared.\n if (fields.length > 1) {\n for (var i = 0; i < fields.length; i++) {\n for (var j = i + 1; j < fields.length; j++) {\n var conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, false, // within one collection is never mutually exclusive\n responseName, fields[i], fields[j]);\n\n if (conflict) {\n conflicts.push(conflict);\n }\n }\n }\n }\n }\n} // Collect all Conflicts between two collections of fields. This is similar to,\n// but different from the `collectConflictsWithin` function above. This check\n// assumes that `collectConflictsWithin` has already been called on each\n// provided collection of fields. This is true because this validator traverses\n// each individual selection set.\n\n\nfunction collectConflictsBetween(context, conflicts, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, fieldMap1, fieldMap2) {\n // A field map is a keyed collection, where each key represents a response\n // name and the value at that key is a list of all fields which provide that\n // response name. For any response name which appears in both provided field\n // maps, each field from the first field map must be compared to every field\n // in the second field map to find potential conflicts.\n for (var _i7 = 0, _Object$keys2 = Object.keys(fieldMap1); _i7 < _Object$keys2.length; _i7++) {\n var responseName = _Object$keys2[_i7];\n var fields2 = fieldMap2[responseName];\n\n if (fields2) {\n var fields1 = fieldMap1[responseName];\n\n for (var i = 0; i < fields1.length; i++) {\n for (var j = 0; j < fields2.length; j++) {\n var conflict = findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, fields1[i], fields2[j]);\n\n if (conflict) {\n conflicts.push(conflict);\n }\n }\n }\n }\n }\n} // Determines if there is a conflict between two particular fields, including\n// comparing their sub-fields.\n\n\nfunction findConflict(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, parentFieldsAreMutuallyExclusive, responseName, field1, field2) {\n var parentType1 = field1[0],\n node1 = field1[1],\n def1 = field1[2];\n var parentType2 = field2[0],\n node2 = field2[1],\n def2 = field2[2]; // If it is known that two fields could not possibly apply at the same\n // time, due to the parent types, then it is safe to permit them to diverge\n // in aliased field or arguments used as they will not present any ambiguity\n // by differing.\n // It is known that two parent types could never overlap if they are\n // different Object types. Interface or Union types might overlap - if not\n // in the current state of the schema, then perhaps in some future version,\n // thus may not safely diverge.\n\n var areMutuallyExclusive = parentFieldsAreMutuallyExclusive || parentType1 !== parentType2 && isObjectType(parentType1) && isObjectType(parentType2);\n\n if (!areMutuallyExclusive) {\n var _node1$arguments, _node2$arguments;\n\n // Two aliases must refer to the same field.\n var name1 = node1.name.value;\n var name2 = node2.name.value;\n\n if (name1 !== name2) {\n return [[responseName, \"\\\"\".concat(name1, \"\\\" and \\\"\").concat(name2, \"\\\" are different fields\")], [node1], [node2]];\n } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n\n\n var args1 = (_node1$arguments = node1.arguments) !== null && _node1$arguments !== void 0 ? _node1$arguments : []; // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n\n var args2 = (_node2$arguments = node2.arguments) !== null && _node2$arguments !== void 0 ? _node2$arguments : []; // Two field calls must have the same arguments.\n\n if (!sameArguments(args1, args2)) {\n return [[responseName, 'they have differing arguments'], [node1], [node2]];\n }\n } // The return type for each field.\n\n\n var type1 = def1 === null || def1 === void 0 ? void 0 : def1.type;\n var type2 = def2 === null || def2 === void 0 ? void 0 : def2.type;\n\n if (type1 && type2 && doTypesConflict(type1, type2)) {\n return [[responseName, \"they return conflicting types \\\"\".concat(inspect(type1), \"\\\" and \\\"\").concat(inspect(type2), \"\\\"\")], [node1], [node2]];\n } // Collect and compare sub-fields. Use the same \"visited fragment names\" list\n // for both collections so fields in a fragment reference are never\n // compared to themselves.\n\n\n var selectionSet1 = node1.selectionSet;\n var selectionSet2 = node2.selectionSet;\n\n if (selectionSet1 && selectionSet2) {\n var conflicts = findConflictsBetweenSubSelectionSets(context, cachedFieldsAndFragmentNames, comparedFragmentPairs, areMutuallyExclusive, getNamedType(type1), selectionSet1, getNamedType(type2), selectionSet2);\n return subfieldConflicts(conflicts, responseName, node1, node2);\n }\n}\n\nfunction sameArguments(arguments1, arguments2) {\n if (arguments1.length !== arguments2.length) {\n return false;\n }\n\n return arguments1.every(function (argument1) {\n var argument2 = find(arguments2, function (argument) {\n return argument.name.value === argument1.name.value;\n });\n\n if (!argument2) {\n return false;\n }\n\n return sameValue(argument1.value, argument2.value);\n });\n}\n\nfunction sameValue(value1, value2) {\n return print(value1) === print(value2);\n} // Two types conflict if both types could not apply to a value simultaneously.\n// Composite types are ignored as their individual field types will be compared\n// later recursively. However List and Non-Null types must match.\n\n\nfunction doTypesConflict(type1, type2) {\n if (isListType(type1)) {\n return isListType(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true;\n }\n\n if (isListType(type2)) {\n return true;\n }\n\n if (isNonNullType(type1)) {\n return isNonNullType(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true;\n }\n\n if (isNonNullType(type2)) {\n return true;\n }\n\n if (isLeafType(type1) || isLeafType(type2)) {\n return type1 !== type2;\n }\n\n return false;\n} // Given a selection set, return the collection of fields (a mapping of response\n// name to field nodes and definitions) as well as a list of fragment names\n// referenced via fragment spreads.\n\n\nfunction getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, parentType, selectionSet) {\n var cached = cachedFieldsAndFragmentNames.get(selectionSet);\n\n if (!cached) {\n var nodeAndDefs = Object.create(null);\n var fragmentNames = Object.create(null);\n\n _collectFieldsAndFragmentNames(context, parentType, selectionSet, nodeAndDefs, fragmentNames);\n\n cached = [nodeAndDefs, Object.keys(fragmentNames)];\n cachedFieldsAndFragmentNames.set(selectionSet, cached);\n }\n\n return cached;\n} // Given a reference to a fragment, return the represented collection of fields\n// as well as a list of nested fragment names referenced via fragment spreads.\n\n\nfunction getReferencedFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragment) {\n // Short-circuit building a type from the node if possible.\n var cached = cachedFieldsAndFragmentNames.get(fragment.selectionSet);\n\n if (cached) {\n return cached;\n }\n\n var fragmentType = typeFromAST(context.getSchema(), fragment.typeCondition);\n return getFieldsAndFragmentNames(context, cachedFieldsAndFragmentNames, fragmentType, fragment.selectionSet);\n}\n\nfunction _collectFieldsAndFragmentNames(context, parentType, selectionSet, nodeAndDefs, fragmentNames) {\n for (var _i9 = 0, _selectionSet$selecti2 = selectionSet.selections; _i9 < _selectionSet$selecti2.length; _i9++) {\n var selection = _selectionSet$selecti2[_i9];\n\n switch (selection.kind) {\n case Kind.FIELD:\n {\n var fieldName = selection.name.value;\n var fieldDef = void 0;\n\n if (isObjectType(parentType) || isInterfaceType(parentType)) {\n fieldDef = parentType.getFields()[fieldName];\n }\n\n var responseName = selection.alias ? selection.alias.value : fieldName;\n\n if (!nodeAndDefs[responseName]) {\n nodeAndDefs[responseName] = [];\n }\n\n nodeAndDefs[responseName].push([parentType, selection, fieldDef]);\n break;\n }\n\n case Kind.FRAGMENT_SPREAD:\n fragmentNames[selection.name.value] = true;\n break;\n\n case Kind.INLINE_FRAGMENT:\n {\n var typeCondition = selection.typeCondition;\n var inlineFragmentType = typeCondition ? typeFromAST(context.getSchema(), typeCondition) : parentType;\n\n _collectFieldsAndFragmentNames(context, inlineFragmentType, selection.selectionSet, nodeAndDefs, fragmentNames);\n\n break;\n }\n }\n }\n} // Given a series of Conflicts which occurred between two sub-fields, generate\n// a single Conflict.\n\n\nfunction subfieldConflicts(conflicts, responseName, node1, node2) {\n if (conflicts.length > 0) {\n return [[responseName, conflicts.map(function (_ref6) {\n var reason = _ref6[0];\n return reason;\n })], conflicts.reduce(function (allFields, _ref7) {\n var fields1 = _ref7[1];\n return allFields.concat(fields1);\n }, [node1]), conflicts.reduce(function (allFields, _ref8) {\n var fields2 = _ref8[2];\n return allFields.concat(fields2);\n }, [node2])];\n }\n}\n/**\n * A way to keep track of pairs of things when the ordering of the pair does\n * not matter. We do this by maintaining a sort of double adjacency sets.\n */\n\n\nvar PairSet = /*#__PURE__*/function () {\n function PairSet() {\n this._data = Object.create(null);\n }\n\n var _proto = PairSet.prototype;\n\n _proto.has = function has(a, b, areMutuallyExclusive) {\n var first = this._data[a];\n var result = first && first[b];\n\n if (result === undefined) {\n return false;\n } // areMutuallyExclusive being false is a superset of being true,\n // hence if we want to know if this PairSet \"has\" these two with no\n // exclusivity, we have to ensure it was added as such.\n\n\n if (areMutuallyExclusive === false) {\n return result === false;\n }\n\n return true;\n };\n\n _proto.add = function add(a, b, areMutuallyExclusive) {\n this._pairSetAdd(a, b, areMutuallyExclusive);\n\n this._pairSetAdd(b, a, areMutuallyExclusive);\n };\n\n _proto._pairSetAdd = function _pairSetAdd(a, b, areMutuallyExclusive) {\n var map = this._data[a];\n\n if (!map) {\n map = Object.create(null);\n this._data[a] = map;\n }\n\n map[b] = areMutuallyExclusive;\n };\n\n return PairSet;\n}();\n","import { GraphQLError } from \"../../error/GraphQLError.mjs\";\n\n/**\n * Unique input field names\n *\n * A GraphQL input object value is only valid if all supplied fields are\n * uniquely named.\n */\nexport function UniqueInputFieldNamesRule(context) {\n var knownNameStack = [];\n var knownNames = Object.create(null);\n return {\n ObjectValue: {\n enter: function enter() {\n knownNameStack.push(knownNames);\n knownNames = Object.create(null);\n },\n leave: function leave() {\n knownNames = knownNameStack.pop();\n }\n },\n ObjectField: function ObjectField(node) {\n var fieldName = node.name.value;\n\n if (knownNames[fieldName]) {\n context.reportError(new GraphQLError(\"There can be only one input field named \\\"\".concat(fieldName, \"\\\".\"), [knownNames[fieldName], node.name]));\n } else {\n knownNames[fieldName] = node.name;\n }\n }\n };\n}\n","import { GraphQLError } from \"../../error/GraphQLError.mjs\";\n\n/**\n * Lone Schema definition\n *\n * A GraphQL document is only valid if it contains only one schema definition.\n */\nexport function LoneSchemaDefinitionRule(context) {\n var _ref, _ref2, _oldSchema$astNode;\n\n var oldSchema = context.getSchema();\n var alreadyDefined = (_ref = (_ref2 = (_oldSchema$astNode = oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.astNode) !== null && _oldSchema$astNode !== void 0 ? _oldSchema$astNode : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getQueryType()) !== null && _ref2 !== void 0 ? _ref2 : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getMutationType()) !== null && _ref !== void 0 ? _ref : oldSchema === null || oldSchema === void 0 ? void 0 : oldSchema.getSubscriptionType();\n var schemaDefinitionsCount = 0;\n return {\n SchemaDefinition: function SchemaDefinition(node) {\n if (alreadyDefined) {\n context.reportError(new GraphQLError('Cannot define a new schema within a schema extension.', node));\n return;\n }\n\n if (schemaDefinitionsCount > 0) {\n context.reportError(new GraphQLError('Must provide only one schema definition.', node));\n }\n\n ++schemaDefinitionsCount;\n }\n };\n}\n","import { GraphQLError } from \"../../error/GraphQLError.mjs\";\n\n/**\n * Unique operation types\n *\n * A GraphQL document is only valid if it has only one type per operation.\n */\nexport function UniqueOperationTypesRule(context) {\n var schema = context.getSchema();\n var definedOperationTypes = Object.create(null);\n var existingOperationTypes = schema ? {\n query: schema.getQueryType(),\n mutation: schema.getMutationType(),\n subscription: schema.getSubscriptionType()\n } : {};\n return {\n SchemaDefinition: checkOperationTypes,\n SchemaExtension: checkOperationTypes\n };\n\n function checkOperationTypes(node) {\n var _node$operationTypes;\n\n // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n var operationTypesNodes = (_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !== void 0 ? _node$operationTypes : [];\n\n for (var _i2 = 0; _i2 < operationTypesNodes.length; _i2++) {\n var operationType = operationTypesNodes[_i2];\n var operation = operationType.operation;\n var alreadyDefinedOperationType = definedOperationTypes[operation];\n\n if (existingOperationTypes[operation]) {\n context.reportError(new GraphQLError(\"Type for \".concat(operation, \" already defined in the schema. It cannot be redefined.\"), operationType));\n } else if (alreadyDefinedOperationType) {\n context.reportError(new GraphQLError(\"There can be only one \".concat(operation, \" type in schema.\"), [alreadyDefinedOperationType, operationType]));\n } else {\n definedOperationTypes[operation] = operationType;\n }\n }\n\n return false;\n }\n}\n","import { GraphQLError } from \"../../error/GraphQLError.mjs\";\n\n/**\n * Unique type names\n *\n * A GraphQL document is only valid if all defined types have unique names.\n */\nexport function UniqueTypeNamesRule(context) {\n var knownTypeNames = Object.create(null);\n var schema = context.getSchema();\n return {\n ScalarTypeDefinition: checkTypeName,\n ObjectTypeDefinition: checkTypeName,\n InterfaceTypeDefinition: checkTypeName,\n UnionTypeDefinition: checkTypeName,\n EnumTypeDefinition: checkTypeName,\n InputObjectTypeDefinition: checkTypeName\n };\n\n function checkTypeName(node) {\n var typeName = node.name.value;\n\n if (schema !== null && schema !== void 0 && schema.getType(typeName)) {\n context.reportError(new GraphQLError(\"Type \\\"\".concat(typeName, \"\\\" already exists in the schema. It cannot also be defined in this type definition.\"), node.name));\n return;\n }\n\n if (knownTypeNames[typeName]) {\n context.reportError(new GraphQLError(\"There can be only one type named \\\"\".concat(typeName, \"\\\".\"), [knownTypeNames[typeName], node.name]));\n } else {\n knownTypeNames[typeName] = node.name;\n }\n\n return false;\n }\n}\n","import { GraphQLError } from \"../../error/GraphQLError.mjs\";\nimport { isEnumType } from \"../../type/definition.mjs\";\n\n/**\n * Unique enum value names\n *\n * A GraphQL enum type is only valid if all its values are uniquely named.\n */\nexport function UniqueEnumValueNamesRule(context) {\n var schema = context.getSchema();\n var existingTypeMap = schema ? schema.getTypeMap() : Object.create(null);\n var knownValueNames = Object.create(null);\n return {\n EnumTypeDefinition: checkValueUniqueness,\n EnumTypeExtension: checkValueUniqueness\n };\n\n function checkValueUniqueness(node) {\n var _node$values;\n\n var typeName = node.name.value;\n\n if (!knownValueNames[typeName]) {\n knownValueNames[typeName] = Object.create(null);\n } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n\n\n var valueNodes = (_node$values = node.values) !== null && _node$values !== void 0 ? _node$values : [];\n var valueNames = knownValueNames[typeName];\n\n for (var _i2 = 0; _i2 < valueNodes.length; _i2++) {\n var valueDef = valueNodes[_i2];\n var valueName = valueDef.name.value;\n var existingType = existingTypeMap[typeName];\n\n if (isEnumType(existingType) && existingType.getValue(valueName)) {\n context.reportError(new GraphQLError(\"Enum value \\\"\".concat(typeName, \".\").concat(valueName, \"\\\" already exists in the schema. It cannot also be defined in this type extension.\"), valueDef.name));\n } else if (valueNames[valueName]) {\n context.reportError(new GraphQLError(\"Enum value \\\"\".concat(typeName, \".\").concat(valueName, \"\\\" can only be defined once.\"), [valueNames[valueName], valueDef.name]));\n } else {\n valueNames[valueName] = valueDef.name;\n }\n }\n\n return false;\n }\n}\n","import { GraphQLError } from \"../../error/GraphQLError.mjs\";\nimport { isObjectType, isInterfaceType, isInputObjectType } from \"../../type/definition.mjs\";\n\n/**\n * Unique field definition names\n *\n * A GraphQL complex type is only valid if all its fields are uniquely named.\n */\nexport function UniqueFieldDefinitionNamesRule(context) {\n var schema = context.getSchema();\n var existingTypeMap = schema ? schema.getTypeMap() : Object.create(null);\n var knownFieldNames = Object.create(null);\n return {\n InputObjectTypeDefinition: checkFieldUniqueness,\n InputObjectTypeExtension: checkFieldUniqueness,\n InterfaceTypeDefinition: checkFieldUniqueness,\n InterfaceTypeExtension: checkFieldUniqueness,\n ObjectTypeDefinition: checkFieldUniqueness,\n ObjectTypeExtension: checkFieldUniqueness\n };\n\n function checkFieldUniqueness(node) {\n var _node$fields;\n\n var typeName = node.name.value;\n\n if (!knownFieldNames[typeName]) {\n knownFieldNames[typeName] = Object.create(null);\n } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n\n\n var fieldNodes = (_node$fields = node.fields) !== null && _node$fields !== void 0 ? _node$fields : [];\n var fieldNames = knownFieldNames[typeName];\n\n for (var _i2 = 0; _i2 < fieldNodes.length; _i2++) {\n var fieldDef = fieldNodes[_i2];\n var fieldName = fieldDef.name.value;\n\n if (hasField(existingTypeMap[typeName], fieldName)) {\n context.reportError(new GraphQLError(\"Field \\\"\".concat(typeName, \".\").concat(fieldName, \"\\\" already exists in the schema. It cannot also be defined in this type extension.\"), fieldDef.name));\n } else if (fieldNames[fieldName]) {\n context.reportError(new GraphQLError(\"Field \\\"\".concat(typeName, \".\").concat(fieldName, \"\\\" can only be defined once.\"), [fieldNames[fieldName], fieldDef.name]));\n } else {\n fieldNames[fieldName] = fieldDef.name;\n }\n }\n\n return false;\n }\n}\n\nfunction hasField(type, fieldName) {\n if (isObjectType(type) || isInterfaceType(type) || isInputObjectType(type)) {\n return type.getFields()[fieldName] != null;\n }\n\n return false;\n}\n","import { GraphQLError } from \"../../error/GraphQLError.mjs\";\n\n/**\n * Unique directive names\n *\n * A GraphQL document is only valid if all defined directives have unique names.\n */\nexport function UniqueDirectiveNamesRule(context) {\n var knownDirectiveNames = Object.create(null);\n var schema = context.getSchema();\n return {\n DirectiveDefinition: function DirectiveDefinition(node) {\n var directiveName = node.name.value;\n\n if (schema !== null && schema !== void 0 && schema.getDirective(directiveName)) {\n context.reportError(new GraphQLError(\"Directive \\\"@\".concat(directiveName, \"\\\" already exists in the schema. It cannot be redefined.\"), node.name));\n return;\n }\n\n if (knownDirectiveNames[directiveName]) {\n context.reportError(new GraphQLError(\"There can be only one directive named \\\"@\".concat(directiveName, \"\\\".\"), [knownDirectiveNames[directiveName], node.name]));\n } else {\n knownDirectiveNames[directiveName] = node.name;\n }\n\n return false;\n }\n };\n}\n","var _defKindToExtKind;\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport inspect from \"../../jsutils/inspect.mjs\";\nimport invariant from \"../../jsutils/invariant.mjs\";\nimport didYouMean from \"../../jsutils/didYouMean.mjs\";\nimport suggestionList from \"../../jsutils/suggestionList.mjs\";\nimport { GraphQLError } from \"../../error/GraphQLError.mjs\";\nimport { Kind } from \"../../language/kinds.mjs\";\nimport { isTypeDefinitionNode } from \"../../language/predicates.mjs\";\nimport { isScalarType, isObjectType, isInterfaceType, isUnionType, isEnumType, isInputObjectType } from \"../../type/definition.mjs\";\n\n/**\n * Possible type extension\n *\n * A type extension is only valid if the type is defined and has the same kind.\n */\nexport function PossibleTypeExtensionsRule(context) {\n var schema = context.getSchema();\n var definedTypes = Object.create(null);\n\n for (var _i2 = 0, _context$getDocument$2 = context.getDocument().definitions; _i2 < _context$getDocument$2.length; _i2++) {\n var def = _context$getDocument$2[_i2];\n\n if (isTypeDefinitionNode(def)) {\n definedTypes[def.name.value] = def;\n }\n }\n\n return {\n ScalarTypeExtension: checkExtension,\n ObjectTypeExtension: checkExtension,\n InterfaceTypeExtension: checkExtension,\n UnionTypeExtension: checkExtension,\n EnumTypeExtension: checkExtension,\n InputObjectTypeExtension: checkExtension\n };\n\n function checkExtension(node) {\n var typeName = node.name.value;\n var defNode = definedTypes[typeName];\n var existingType = schema === null || schema === void 0 ? void 0 : schema.getType(typeName);\n var expectedKind;\n\n if (defNode) {\n expectedKind = defKindToExtKind[defNode.kind];\n } else if (existingType) {\n expectedKind = typeToExtKind(existingType);\n }\n\n if (expectedKind) {\n if (expectedKind !== node.kind) {\n var kindStr = extensionKindToTypeName(node.kind);\n context.reportError(new GraphQLError(\"Cannot extend non-\".concat(kindStr, \" type \\\"\").concat(typeName, \"\\\".\"), defNode ? [defNode, node] : node));\n }\n } else {\n var allTypeNames = Object.keys(definedTypes);\n\n if (schema) {\n allTypeNames = allTypeNames.concat(Object.keys(schema.getTypeMap()));\n }\n\n var suggestedTypes = suggestionList(typeName, allTypeNames);\n context.reportError(new GraphQLError(\"Cannot extend type \\\"\".concat(typeName, \"\\\" because it is not defined.\") + didYouMean(suggestedTypes), node.name));\n }\n }\n}\nvar defKindToExtKind = (_defKindToExtKind = {}, _defineProperty(_defKindToExtKind, Kind.SCALAR_TYPE_DEFINITION, Kind.SCALAR_TYPE_EXTENSION), _defineProperty(_defKindToExtKind, Kind.OBJECT_TYPE_DEFINITION, Kind.OBJECT_TYPE_EXTENSION), _defineProperty(_defKindToExtKind, Kind.INTERFACE_TYPE_DEFINITION, Kind.INTERFACE_TYPE_EXTENSION), _defineProperty(_defKindToExtKind, Kind.UNION_TYPE_DEFINITION, Kind.UNION_TYPE_EXTENSION), _defineProperty(_defKindToExtKind, Kind.ENUM_TYPE_DEFINITION, Kind.ENUM_TYPE_EXTENSION), _defineProperty(_defKindToExtKind, Kind.INPUT_OBJECT_TYPE_DEFINITION, Kind.INPUT_OBJECT_TYPE_EXTENSION), _defKindToExtKind);\n\nfunction typeToExtKind(type) {\n if (isScalarType(type)) {\n return Kind.SCALAR_TYPE_EXTENSION;\n }\n\n if (isObjectType(type)) {\n return Kind.OBJECT_TYPE_EXTENSION;\n }\n\n if (isInterfaceType(type)) {\n return Kind.INTERFACE_TYPE_EXTENSION;\n }\n\n if (isUnionType(type)) {\n return Kind.UNION_TYPE_EXTENSION;\n }\n\n if (isEnumType(type)) {\n return Kind.ENUM_TYPE_EXTENSION;\n } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')\n\n\n if (isInputObjectType(type)) {\n return Kind.INPUT_OBJECT_TYPE_EXTENSION;\n } // istanbul ignore next (Not reachable. All possible types have been considered)\n\n\n false || invariant(0, 'Unexpected type: ' + inspect(type));\n}\n\nfunction extensionKindToTypeName(kind) {\n switch (kind) {\n case Kind.SCALAR_TYPE_EXTENSION:\n return 'scalar';\n\n case Kind.OBJECT_TYPE_EXTENSION:\n return 'object';\n\n case Kind.INTERFACE_TYPE_EXTENSION:\n return 'interface';\n\n case Kind.UNION_TYPE_EXTENSION:\n return 'union';\n\n case Kind.ENUM_TYPE_EXTENSION:\n return 'enum';\n\n case Kind.INPUT_OBJECT_TYPE_EXTENSION:\n return 'input object';\n } // istanbul ignore next (Not reachable. All possible types have been considered)\n\n\n false || invariant(0, 'Unexpected kind: ' + inspect(kind));\n}\n","function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nimport { Kind } from \"../language/kinds.mjs\";\nimport { visit } from \"../language/visitor.mjs\";\nimport { TypeInfo, visitWithTypeInfo } from \"../utilities/TypeInfo.mjs\";\n\n/**\n * An instance of this class is passed as the \"this\" context to all validators,\n * allowing access to commonly useful contextual information from within a\n * validation rule.\n */\nexport var ASTValidationContext = /*#__PURE__*/function () {\n function ASTValidationContext(ast, onError) {\n this._ast = ast;\n this._fragments = undefined;\n this._fragmentSpreads = new Map();\n this._recursivelyReferencedFragments = new Map();\n this._onError = onError;\n }\n\n var _proto = ASTValidationContext.prototype;\n\n _proto.reportError = function reportError(error) {\n this._onError(error);\n };\n\n _proto.getDocument = function getDocument() {\n return this._ast;\n };\n\n _proto.getFragment = function getFragment(name) {\n var fragments = this._fragments;\n\n if (!fragments) {\n this._fragments = fragments = this.getDocument().definitions.reduce(function (frags, statement) {\n if (statement.kind === Kind.FRAGMENT_DEFINITION) {\n frags[statement.name.value] = statement;\n }\n\n return frags;\n }, Object.create(null));\n }\n\n return fragments[name];\n };\n\n _proto.getFragmentSpreads = function getFragmentSpreads(node) {\n var spreads = this._fragmentSpreads.get(node);\n\n if (!spreads) {\n spreads = [];\n var setsToVisit = [node];\n\n while (setsToVisit.length !== 0) {\n var set = setsToVisit.pop();\n\n for (var _i2 = 0, _set$selections2 = set.selections; _i2 < _set$selections2.length; _i2++) {\n var selection = _set$selections2[_i2];\n\n if (selection.kind === Kind.FRAGMENT_SPREAD) {\n spreads.push(selection);\n } else if (selection.selectionSet) {\n setsToVisit.push(selection.selectionSet);\n }\n }\n }\n\n this._fragmentSpreads.set(node, spreads);\n }\n\n return spreads;\n };\n\n _proto.getRecursivelyReferencedFragments = function getRecursivelyReferencedFragments(operation) {\n var fragments = this._recursivelyReferencedFragments.get(operation);\n\n if (!fragments) {\n fragments = [];\n var collectedNames = Object.create(null);\n var nodesToVisit = [operation.selectionSet];\n\n while (nodesToVisit.length !== 0) {\n var node = nodesToVisit.pop();\n\n for (var _i4 = 0, _this$getFragmentSpre2 = this.getFragmentSpreads(node); _i4 < _this$getFragmentSpre2.length; _i4++) {\n var spread = _this$getFragmentSpre2[_i4];\n var fragName = spread.name.value;\n\n if (collectedNames[fragName] !== true) {\n collectedNames[fragName] = true;\n var fragment = this.getFragment(fragName);\n\n if (fragment) {\n fragments.push(fragment);\n nodesToVisit.push(fragment.selectionSet);\n }\n }\n }\n }\n\n this._recursivelyReferencedFragments.set(operation, fragments);\n }\n\n return fragments;\n };\n\n return ASTValidationContext;\n}();\nexport var SDLValidationContext = /*#__PURE__*/function (_ASTValidationContext) {\n _inheritsLoose(SDLValidationContext, _ASTValidationContext);\n\n function SDLValidationContext(ast, schema, onError) {\n var _this;\n\n _this = _ASTValidationContext.call(this, ast, onError) || this;\n _this._schema = schema;\n return _this;\n }\n\n var _proto2 = SDLValidationContext.prototype;\n\n _proto2.getSchema = function getSchema() {\n return this._schema;\n };\n\n return SDLValidationContext;\n}(ASTValidationContext);\nexport var ValidationContext = /*#__PURE__*/function (_ASTValidationContext2) {\n _inheritsLoose(ValidationContext, _ASTValidationContext2);\n\n function ValidationContext(schema, ast, typeInfo, onError) {\n var _this2;\n\n _this2 = _ASTValidationContext2.call(this, ast, onError) || this;\n _this2._schema = schema;\n _this2._typeInfo = typeInfo;\n _this2._variableUsages = new Map();\n _this2._recursiveVariableUsages = new Map();\n return _this2;\n }\n\n var _proto3 = ValidationContext.prototype;\n\n _proto3.getSchema = function getSchema() {\n return this._schema;\n };\n\n _proto3.getVariableUsages = function getVariableUsages(node) {\n var usages = this._variableUsages.get(node);\n\n if (!usages) {\n var newUsages = [];\n var typeInfo = new TypeInfo(this._schema);\n visit(node, visitWithTypeInfo(typeInfo, {\n VariableDefinition: function VariableDefinition() {\n return false;\n },\n Variable: function Variable(variable) {\n newUsages.push({\n node: variable,\n type: typeInfo.getInputType(),\n defaultValue: typeInfo.getDefaultValue()\n });\n }\n }));\n usages = newUsages;\n\n this._variableUsages.set(node, usages);\n }\n\n return usages;\n };\n\n _proto3.getRecursiveVariableUsages = function getRecursiveVariableUsages(operation) {\n var usages = this._recursiveVariableUsages.get(operation);\n\n if (!usages) {\n usages = this.getVariableUsages(operation);\n\n for (var _i6 = 0, _this$getRecursivelyR2 = this.getRecursivelyReferencedFragments(operation); _i6 < _this$getRecursivelyR2.length; _i6++) {\n var frag = _this$getRecursivelyR2[_i6];\n usages = usages.concat(this.getVariableUsages(frag));\n }\n\n this._recursiveVariableUsages.set(operation, usages);\n }\n\n return usages;\n };\n\n _proto3.getType = function getType() {\n return this._typeInfo.getType();\n };\n\n _proto3.getParentType = function getParentType() {\n return this._typeInfo.getParentType();\n };\n\n _proto3.getInputType = function getInputType() {\n return this._typeInfo.getInputType();\n };\n\n _proto3.getParentInputType = function getParentInputType() {\n return this._typeInfo.getParentInputType();\n };\n\n _proto3.getFieldDef = function getFieldDef() {\n return this._typeInfo.getFieldDef();\n };\n\n _proto3.getDirective = function getDirective() {\n return this._typeInfo.getDirective();\n };\n\n _proto3.getArgument = function getArgument() {\n return this._typeInfo.getArgument();\n };\n\n _proto3.getEnumValue = function getEnumValue() {\n return this._typeInfo.getEnumValue();\n };\n\n return ValidationContext;\n}(ASTValidationContext);\n","import inspect from \"../jsutils/inspect.mjs\";\nimport memoize3 from \"../jsutils/memoize3.mjs\";\nimport invariant from \"../jsutils/invariant.mjs\";\nimport devAssert from \"../jsutils/devAssert.mjs\";\nimport isPromise from \"../jsutils/isPromise.mjs\";\nimport isObjectLike from \"../jsutils/isObjectLike.mjs\";\nimport safeArrayFrom from \"../jsutils/safeArrayFrom.mjs\";\nimport promiseReduce from \"../jsutils/promiseReduce.mjs\";\nimport promiseForObject from \"../jsutils/promiseForObject.mjs\";\nimport { addPath, pathToArray } from \"../jsutils/Path.mjs\";\nimport { GraphQLError } from \"../error/GraphQLError.mjs\";\nimport { locatedError } from \"../error/locatedError.mjs\";\nimport { Kind } from \"../language/kinds.mjs\";\nimport { assertValidSchema } from \"../type/validate.mjs\";\nimport { SchemaMetaFieldDef, TypeMetaFieldDef, TypeNameMetaFieldDef } from \"../type/introspection.mjs\";\nimport { GraphQLIncludeDirective, GraphQLSkipDirective } from \"../type/directives.mjs\";\nimport { isNamedType, isObjectType, isAbstractType, isLeafType, isListType, isNonNullType } from \"../type/definition.mjs\";\nimport { typeFromAST } from \"../utilities/typeFromAST.mjs\";\nimport { getOperationRootType } from \"../utilities/getOperationRootType.mjs\";\nimport { getVariableValues, getArgumentValues, getDirectiveValues } from \"./values.mjs\";\n/**\n * Terminology\n *\n * \"Definitions\" are the generic name for top-level statements in the document.\n * Examples of this include:\n * 1) Operations (such as a query)\n * 2) Fragments\n *\n * \"Operations\" are a generic name for requests in the document.\n * Examples of this include:\n * 1) query,\n * 2) mutation\n *\n * \"Selections\" are the definitions that can appear legally and at\n * single level of the query. These include:\n * 1) field references e.g \"a\"\n * 2) fragment \"spreads\" e.g. \"...c\"\n * 3) inline fragment \"spreads\" e.g. \"...on Type { a }\"\n */\n\n/**\n * Data that must be available at all points during query execution.\n *\n * Namely, schema of the type system that is currently executing,\n * and the fragments defined in the query document\n */\n\nexport function execute(argsOrSchema, document, rootValue, contextValue, variableValues, operationName, fieldResolver, typeResolver) {\n /* eslint-enable no-redeclare */\n // Extract arguments from object args if provided.\n return arguments.length === 1 ? executeImpl(argsOrSchema) : executeImpl({\n schema: argsOrSchema,\n document: document,\n rootValue: rootValue,\n contextValue: contextValue,\n variableValues: variableValues,\n operationName: operationName,\n fieldResolver: fieldResolver,\n typeResolver: typeResolver\n });\n}\n/**\n * Also implements the \"Evaluating requests\" section of the GraphQL specification.\n * However, it guarantees to complete synchronously (or throw an error) assuming\n * that all field resolvers are also synchronous.\n */\n\nexport function executeSync(args) {\n var result = executeImpl(args); // Assert that the execution was synchronous.\n\n if (isPromise(result)) {\n throw new Error('GraphQL execution failed to complete synchronously.');\n }\n\n return result;\n}\n\nfunction executeImpl(args) {\n var schema = args.schema,\n document = args.document,\n rootValue = args.rootValue,\n contextValue = args.contextValue,\n variableValues = args.variableValues,\n operationName = args.operationName,\n fieldResolver = args.fieldResolver,\n typeResolver = args.typeResolver; // If arguments are missing or incorrect, throw an error.\n\n assertValidExecutionArguments(schema, document, variableValues); // If a valid execution context cannot be created due to incorrect arguments,\n // a \"Response\" with only errors is returned.\n\n var exeContext = buildExecutionContext(schema, document, rootValue, contextValue, variableValues, operationName, fieldResolver, typeResolver); // Return early errors if execution context failed.\n\n if (Array.isArray(exeContext)) {\n return {\n errors: exeContext\n };\n } // Return a Promise that will eventually resolve to the data described by\n // The \"Response\" section of the GraphQL specification.\n //\n // If errors are encountered while executing a GraphQL field, only that\n // field and its descendants will be omitted, and sibling fields will still\n // be executed. An execution which encounters errors will still result in a\n // resolved Promise.\n\n\n var data = executeOperation(exeContext, exeContext.operation, rootValue);\n return buildResponse(exeContext, data);\n}\n/**\n * Given a completed execution context and data, build the { errors, data }\n * response defined by the \"Response\" section of the GraphQL specification.\n */\n\n\nfunction buildResponse(exeContext, data) {\n if (isPromise(data)) {\n return data.then(function (resolved) {\n return buildResponse(exeContext, resolved);\n });\n }\n\n return exeContext.errors.length === 0 ? {\n data: data\n } : {\n errors: exeContext.errors,\n data: data\n };\n}\n/**\n * Essential assertions before executing to provide developer feedback for\n * improper use of the GraphQL library.\n *\n * @internal\n */\n\n\nexport function assertValidExecutionArguments(schema, document, rawVariableValues) {\n document || devAssert(0, 'Must provide document.'); // If the schema used for execution is invalid, throw an error.\n\n assertValidSchema(schema); // Variables, if provided, must be an object.\n\n rawVariableValues == null || isObjectLike(rawVariableValues) || devAssert(0, 'Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.');\n}\n/**\n * Constructs a ExecutionContext object from the arguments passed to\n * execute, which we will pass throughout the other execution methods.\n *\n * Throws a GraphQLError if a valid execution context cannot be created.\n *\n * @internal\n */\n\nexport function buildExecutionContext(schema, document, rootValue, contextValue, rawVariableValues, operationName, fieldResolver, typeResolver) {\n var _definition$name, _operation$variableDe;\n\n var operation;\n var fragments = Object.create(null);\n\n for (var _i2 = 0, _document$definitions2 = document.definitions; _i2 < _document$definitions2.length; _i2++) {\n var definition = _document$definitions2[_i2];\n\n switch (definition.kind) {\n case Kind.OPERATION_DEFINITION:\n if (operationName == null) {\n if (operation !== undefined) {\n return [new GraphQLError('Must provide operation name if query contains multiple operations.')];\n }\n\n operation = definition;\n } else if (((_definition$name = definition.name) === null || _definition$name === void 0 ? void 0 : _definition$name.value) === operationName) {\n operation = definition;\n }\n\n break;\n\n case Kind.FRAGMENT_DEFINITION:\n fragments[definition.name.value] = definition;\n break;\n }\n }\n\n if (!operation) {\n if (operationName != null) {\n return [new GraphQLError(\"Unknown operation named \\\"\".concat(operationName, \"\\\".\"))];\n }\n\n return [new GraphQLError('Must provide an operation.')];\n } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n\n\n var variableDefinitions = (_operation$variableDe = operation.variableDefinitions) !== null && _operation$variableDe !== void 0 ? _operation$variableDe : [];\n var coercedVariableValues = getVariableValues(schema, variableDefinitions, rawVariableValues !== null && rawVariableValues !== void 0 ? rawVariableValues : {}, {\n maxErrors: 50\n });\n\n if (coercedVariableValues.errors) {\n return coercedVariableValues.errors;\n }\n\n return {\n schema: schema,\n fragments: fragments,\n rootValue: rootValue,\n contextValue: contextValue,\n operation: operation,\n variableValues: coercedVariableValues.coerced,\n fieldResolver: fieldResolver !== null && fieldResolver !== void 0 ? fieldResolver : defaultFieldResolver,\n typeResolver: typeResolver !== null && typeResolver !== void 0 ? typeResolver : defaultTypeResolver,\n errors: []\n };\n}\n/**\n * Implements the \"Evaluating operations\" section of the spec.\n */\n\nfunction executeOperation(exeContext, operation, rootValue) {\n var type = getOperationRootType(exeContext.schema, operation);\n var fields = collectFields(exeContext, type, operation.selectionSet, Object.create(null), Object.create(null));\n var path = undefined; // Errors from sub-fields of a NonNull type may propagate to the top level,\n // at which point we still log the error and null the parent field, which\n // in this case is the entire response.\n\n try {\n var result = operation.operation === 'mutation' ? executeFieldsSerially(exeContext, type, rootValue, path, fields) : executeFields(exeContext, type, rootValue, path, fields);\n\n if (isPromise(result)) {\n return result.then(undefined, function (error) {\n exeContext.errors.push(error);\n return Promise.resolve(null);\n });\n }\n\n return result;\n } catch (error) {\n exeContext.errors.push(error);\n return null;\n }\n}\n/**\n * Implements the \"Evaluating selection sets\" section of the spec\n * for \"write\" mode.\n */\n\n\nfunction executeFieldsSerially(exeContext, parentType, sourceValue, path, fields) {\n return promiseReduce(Object.keys(fields), function (results, responseName) {\n var fieldNodes = fields[responseName];\n var fieldPath = addPath(path, responseName, parentType.name);\n var result = resolveField(exeContext, parentType, sourceValue, fieldNodes, fieldPath);\n\n if (result === undefined) {\n return results;\n }\n\n if (isPromise(result)) {\n return result.then(function (resolvedResult) {\n results[responseName] = resolvedResult;\n return results;\n });\n }\n\n results[responseName] = result;\n return results;\n }, Object.create(null));\n}\n/**\n * Implements the \"Evaluating selection sets\" section of the spec\n * for \"read\" mode.\n */\n\n\nfunction executeFields(exeContext, parentType, sourceValue, path, fields) {\n var results = Object.create(null);\n var containsPromise = false;\n\n for (var _i4 = 0, _Object$keys2 = Object.keys(fields); _i4 < _Object$keys2.length; _i4++) {\n var responseName = _Object$keys2[_i4];\n var fieldNodes = fields[responseName];\n var fieldPath = addPath(path, responseName, parentType.name);\n var result = resolveField(exeContext, parentType, sourceValue, fieldNodes, fieldPath);\n\n if (result !== undefined) {\n results[responseName] = result;\n\n if (isPromise(result)) {\n containsPromise = true;\n }\n }\n } // If there are no promises, we can just return the object\n\n\n if (!containsPromise) {\n return results;\n } // Otherwise, results is a map from field name to the result of resolving that\n // field, which is possibly a promise. Return a promise that will return this\n // same map, but with any promises replaced with the values they resolved to.\n\n\n return promiseForObject(results);\n}\n/**\n * Given a selectionSet, adds all of the fields in that selection to\n * the passed in map of fields, and returns it at the end.\n *\n * CollectFields requires the \"runtime type\" of an object. For a field which\n * returns an Interface or Union type, the \"runtime type\" will be the actual\n * Object type returned by that field.\n *\n * @internal\n */\n\n\nexport function collectFields(exeContext, runtimeType, selectionSet, fields, visitedFragmentNames) {\n for (var _i6 = 0, _selectionSet$selecti2 = selectionSet.selections; _i6 < _selectionSet$selecti2.length; _i6++) {\n var selection = _selectionSet$selecti2[_i6];\n\n switch (selection.kind) {\n case Kind.FIELD:\n {\n if (!shouldIncludeNode(exeContext, selection)) {\n continue;\n }\n\n var name = getFieldEntryKey(selection);\n\n if (!fields[name]) {\n fields[name] = [];\n }\n\n fields[name].push(selection);\n break;\n }\n\n case Kind.INLINE_FRAGMENT:\n {\n if (!shouldIncludeNode(exeContext, selection) || !doesFragmentConditionMatch(exeContext, selection, runtimeType)) {\n continue;\n }\n\n collectFields(exeContext, runtimeType, selection.selectionSet, fields, visitedFragmentNames);\n break;\n }\n\n case Kind.FRAGMENT_SPREAD:\n {\n var fragName = selection.name.value;\n\n if (visitedFragmentNames[fragName] || !shouldIncludeNode(exeContext, selection)) {\n continue;\n }\n\n visitedFragmentNames[fragName] = true;\n var fragment = exeContext.fragments[fragName];\n\n if (!fragment || !doesFragmentConditionMatch(exeContext, fragment, runtimeType)) {\n continue;\n }\n\n collectFields(exeContext, runtimeType, fragment.selectionSet, fields, visitedFragmentNames);\n break;\n }\n }\n }\n\n return fields;\n}\n/**\n * Determines if a field should be included based on the @include and @skip\n * directives, where @skip has higher precedence than @include.\n */\n\nfunction shouldIncludeNode(exeContext, node) {\n var skip = getDirectiveValues(GraphQLSkipDirective, node, exeContext.variableValues);\n\n if ((skip === null || skip === void 0 ? void 0 : skip.if) === true) {\n return false;\n }\n\n var include = getDirectiveValues(GraphQLIncludeDirective, node, exeContext.variableValues);\n\n if ((include === null || include === void 0 ? void 0 : include.if) === false) {\n return false;\n }\n\n return true;\n}\n/**\n * Determines if a fragment is applicable to the given type.\n */\n\n\nfunction doesFragmentConditionMatch(exeContext, fragment, type) {\n var typeConditionNode = fragment.typeCondition;\n\n if (!typeConditionNode) {\n return true;\n }\n\n var conditionalType = typeFromAST(exeContext.schema, typeConditionNode);\n\n if (conditionalType === type) {\n return true;\n }\n\n if (isAbstractType(conditionalType)) {\n return exeContext.schema.isSubType(conditionalType, type);\n }\n\n return false;\n}\n/**\n * Implements the logic to compute the key of a given field's entry\n */\n\n\nfunction getFieldEntryKey(node) {\n return node.alias ? node.alias.value : node.name.value;\n}\n/**\n * Resolves the field on the given source object. In particular, this\n * figures out the value that the field returns by calling its resolve function,\n * then calls completeValue to complete promises, serialize scalars, or execute\n * the sub-selection-set for objects.\n */\n\n\nfunction resolveField(exeContext, parentType, source, fieldNodes, path) {\n var _fieldDef$resolve;\n\n var fieldNode = fieldNodes[0];\n var fieldName = fieldNode.name.value;\n var fieldDef = getFieldDef(exeContext.schema, parentType, fieldName);\n\n if (!fieldDef) {\n return;\n }\n\n var returnType = fieldDef.type;\n var resolveFn = (_fieldDef$resolve = fieldDef.resolve) !== null && _fieldDef$resolve !== void 0 ? _fieldDef$resolve : exeContext.fieldResolver;\n var info = buildResolveInfo(exeContext, fieldDef, fieldNodes, parentType, path); // Get the resolve function, regardless of if its result is normal or abrupt (error).\n\n try {\n // Build a JS object of arguments from the field.arguments AST, using the\n // variables scope to fulfill any variable references.\n // TODO: find a way to memoize, in case this field is within a List type.\n var args = getArgumentValues(fieldDef, fieldNodes[0], exeContext.variableValues); // The resolve function's optional third argument is a context value that\n // is provided to every resolve function within an execution. It is commonly\n // used to represent an authenticated user, or request-specific caches.\n\n var _contextValue = exeContext.contextValue;\n var result = resolveFn(source, args, _contextValue, info);\n var completed;\n\n if (isPromise(result)) {\n completed = result.then(function (resolved) {\n return completeValue(exeContext, returnType, fieldNodes, info, path, resolved);\n });\n } else {\n completed = completeValue(exeContext, returnType, fieldNodes, info, path, result);\n }\n\n if (isPromise(completed)) {\n // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n return completed.then(undefined, function (rawError) {\n var error = locatedError(rawError, fieldNodes, pathToArray(path));\n return handleFieldError(error, returnType, exeContext);\n });\n }\n\n return completed;\n } catch (rawError) {\n var error = locatedError(rawError, fieldNodes, pathToArray(path));\n return handleFieldError(error, returnType, exeContext);\n }\n}\n/**\n * @internal\n */\n\n\nexport function buildResolveInfo(exeContext, fieldDef, fieldNodes, parentType, path) {\n // The resolve function's optional fourth argument is a collection of\n // information about the current execution state.\n return {\n fieldName: fieldDef.name,\n fieldNodes: fieldNodes,\n returnType: fieldDef.type,\n parentType: parentType,\n path: path,\n schema: exeContext.schema,\n fragments: exeContext.fragments,\n rootValue: exeContext.rootValue,\n operation: exeContext.operation,\n variableValues: exeContext.variableValues\n };\n}\n\nfunction handleFieldError(error, returnType, exeContext) {\n // If the field type is non-nullable, then it is resolved without any\n // protection from errors, however it still properly locates the error.\n if (isNonNullType(returnType)) {\n throw error;\n } // Otherwise, error protection is applied, logging the error and resolving\n // a null value for this field if one is encountered.\n\n\n exeContext.errors.push(error);\n return null;\n}\n/**\n * Implements the instructions for completeValue as defined in the\n * \"Field entries\" section of the spec.\n *\n * If the field type is Non-Null, then this recursively completes the value\n * for the inner type. It throws a field error if that completion returns null,\n * as per the \"Nullability\" section of the spec.\n *\n * If the field type is a List, then this recursively completes the value\n * for the inner type on each item in the list.\n *\n * If the field type is a Scalar or Enum, ensures the completed value is a legal\n * value of the type by calling the `serialize` method of GraphQL type\n * definition.\n *\n * If the field is an abstract type, determine the runtime type of the value\n * and then complete based on that type\n *\n * Otherwise, the field type expects a sub-selection set, and will complete the\n * value by evaluating all sub-selections.\n */\n\n\nfunction completeValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If result is an Error, throw a located error.\n if (result instanceof Error) {\n throw result;\n } // If field type is NonNull, complete for inner type, and throw field error\n // if result is null.\n\n\n if (isNonNullType(returnType)) {\n var completed = completeValue(exeContext, returnType.ofType, fieldNodes, info, path, result);\n\n if (completed === null) {\n throw new Error(\"Cannot return null for non-nullable field \".concat(info.parentType.name, \".\").concat(info.fieldName, \".\"));\n }\n\n return completed;\n } // If result value is null or undefined then return null.\n\n\n if (result == null) {\n return null;\n } // If field type is List, complete each item in the list with the inner type\n\n\n if (isListType(returnType)) {\n return completeListValue(exeContext, returnType, fieldNodes, info, path, result);\n } // If field type is a leaf type, Scalar or Enum, serialize to a valid value,\n // returning null if serialization is not possible.\n\n\n if (isLeafType(returnType)) {\n return completeLeafValue(returnType, result);\n } // If field type is an abstract type, Interface or Union, determine the\n // runtime Object type and complete for that type.\n\n\n if (isAbstractType(returnType)) {\n return completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result);\n } // If field type is Object, execute and complete all sub-selections.\n // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')\n\n\n if (isObjectType(returnType)) {\n return completeObjectValue(exeContext, returnType, fieldNodes, info, path, result);\n } // istanbul ignore next (Not reachable. All possible output types have been considered)\n\n\n false || invariant(0, 'Cannot complete value of unexpected output type: ' + inspect(returnType));\n}\n/**\n * Complete a list value by completing each item in the list with the\n * inner type\n */\n\n\nfunction completeListValue(exeContext, returnType, fieldNodes, info, path, result) {\n // This is specified as a simple map, however we're optimizing the path\n // where the list contains no Promises by avoiding creating another Promise.\n var itemType = returnType.ofType;\n var containsPromise = false;\n var completedResults = safeArrayFrom(result, function (item, index) {\n // No need to modify the info object containing the path,\n // since from here on it is not ever accessed by resolver functions.\n var itemPath = addPath(path, index, undefined);\n\n try {\n var completedItem;\n\n if (isPromise(item)) {\n completedItem = item.then(function (resolved) {\n return completeValue(exeContext, itemType, fieldNodes, info, itemPath, resolved);\n });\n } else {\n completedItem = completeValue(exeContext, itemType, fieldNodes, info, itemPath, item);\n }\n\n if (isPromise(completedItem)) {\n containsPromise = true; // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n\n return completedItem.then(undefined, function (rawError) {\n var error = locatedError(rawError, fieldNodes, pathToArray(itemPath));\n return handleFieldError(error, itemType, exeContext);\n });\n }\n\n return completedItem;\n } catch (rawError) {\n var error = locatedError(rawError, fieldNodes, pathToArray(itemPath));\n return handleFieldError(error, itemType, exeContext);\n }\n });\n\n if (completedResults == null) {\n throw new GraphQLError(\"Expected Iterable, but did not find one for field \\\"\".concat(info.parentType.name, \".\").concat(info.fieldName, \"\\\".\"));\n }\n\n return containsPromise ? Promise.all(completedResults) : completedResults;\n}\n/**\n * Complete a Scalar or Enum by serializing to a valid value, returning\n * null if serialization is not possible.\n */\n\n\nfunction completeLeafValue(returnType, result) {\n var serializedResult = returnType.serialize(result);\n\n if (serializedResult === undefined) {\n throw new Error(\"Expected a value of type \\\"\".concat(inspect(returnType), \"\\\" but \") + \"received: \".concat(inspect(result)));\n }\n\n return serializedResult;\n}\n/**\n * Complete a value of an abstract type by determining the runtime object type\n * of that value, then complete the value for that type.\n */\n\n\nfunction completeAbstractValue(exeContext, returnType, fieldNodes, info, path, result) {\n var _returnType$resolveTy;\n\n var resolveTypeFn = (_returnType$resolveTy = returnType.resolveType) !== null && _returnType$resolveTy !== void 0 ? _returnType$resolveTy : exeContext.typeResolver;\n var contextValue = exeContext.contextValue;\n var runtimeType = resolveTypeFn(result, contextValue, info, returnType);\n\n if (isPromise(runtimeType)) {\n return runtimeType.then(function (resolvedRuntimeType) {\n return completeObjectValue(exeContext, ensureValidRuntimeType(resolvedRuntimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n });\n }\n\n return completeObjectValue(exeContext, ensureValidRuntimeType(runtimeType, exeContext, returnType, fieldNodes, info, result), fieldNodes, info, path, result);\n}\n\nfunction ensureValidRuntimeType(runtimeTypeOrName, exeContext, returnType, fieldNodes, info, result) {\n if (runtimeTypeOrName == null) {\n throw new GraphQLError(\"Abstract type \\\"\".concat(returnType.name, \"\\\" must resolve to an Object type at runtime for field \\\"\").concat(info.parentType.name, \".\").concat(info.fieldName, \"\\\". Either the \\\"\").concat(returnType.name, \"\\\" type should provide a \\\"resolveType\\\" function or each possible type should provide an \\\"isTypeOf\\\" function.\"), fieldNodes);\n } // FIXME: temporary workaround until support for passing object types would be removed in v16.0.0\n\n\n var runtimeTypeName = isNamedType(runtimeTypeOrName) ? runtimeTypeOrName.name : runtimeTypeOrName;\n\n if (typeof runtimeTypeName !== 'string') {\n throw new GraphQLError(\"Abstract type \\\"\".concat(returnType.name, \"\\\" must resolve to an Object type at runtime for field \\\"\").concat(info.parentType.name, \".\").concat(info.fieldName, \"\\\" with \") + \"value \".concat(inspect(result), \", received \\\"\").concat(inspect(runtimeTypeOrName), \"\\\".\"));\n }\n\n var runtimeType = exeContext.schema.getType(runtimeTypeName);\n\n if (runtimeType == null) {\n throw new GraphQLError(\"Abstract type \\\"\".concat(returnType.name, \"\\\" was resolve to a type \\\"\").concat(runtimeTypeName, \"\\\" that does not exist inside schema.\"), fieldNodes);\n }\n\n if (!isObjectType(runtimeType)) {\n throw new GraphQLError(\"Abstract type \\\"\".concat(returnType.name, \"\\\" was resolve to a non-object type \\\"\").concat(runtimeTypeName, \"\\\".\"), fieldNodes);\n }\n\n if (!exeContext.schema.isSubType(returnType, runtimeType)) {\n throw new GraphQLError(\"Runtime Object type \\\"\".concat(runtimeType.name, \"\\\" is not a possible type for \\\"\").concat(returnType.name, \"\\\".\"), fieldNodes);\n }\n\n return runtimeType;\n}\n/**\n * Complete an Object value by executing all sub-selections.\n */\n\n\nfunction completeObjectValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If there is an isTypeOf predicate function, call it with the\n // current result. If isTypeOf returns false, then raise an error rather\n // than continuing execution.\n if (returnType.isTypeOf) {\n var isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info);\n\n if (isPromise(isTypeOf)) {\n return isTypeOf.then(function (resolvedIsTypeOf) {\n if (!resolvedIsTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result);\n });\n }\n\n if (!isTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n }\n\n return collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result);\n}\n\nfunction invalidReturnTypeError(returnType, result, fieldNodes) {\n return new GraphQLError(\"Expected value of type \\\"\".concat(returnType.name, \"\\\" but got: \").concat(inspect(result), \".\"), fieldNodes);\n}\n\nfunction collectAndExecuteSubfields(exeContext, returnType, fieldNodes, path, result) {\n // Collect sub-fields to execute to complete this value.\n var subFieldNodes = collectSubfields(exeContext, returnType, fieldNodes);\n return executeFields(exeContext, returnType, result, path, subFieldNodes);\n}\n/**\n * A memoized collection of relevant subfields with regard to the return\n * type. Memoizing ensures the subfields are not repeatedly calculated, which\n * saves overhead when resolving lists of values.\n */\n\n\nvar collectSubfields = memoize3(_collectSubfields);\n\nfunction _collectSubfields(exeContext, returnType, fieldNodes) {\n var subFieldNodes = Object.create(null);\n var visitedFragmentNames = Object.create(null);\n\n for (var _i8 = 0; _i8 < fieldNodes.length; _i8++) {\n var node = fieldNodes[_i8];\n\n if (node.selectionSet) {\n subFieldNodes = collectFields(exeContext, returnType, node.selectionSet, subFieldNodes, visitedFragmentNames);\n }\n }\n\n return subFieldNodes;\n}\n/**\n * If a resolveType function is not given, then a default resolve behavior is\n * used which attempts two strategies:\n *\n * First, See if the provided value has a `__typename` field defined, if so, use\n * that value as name of the resolved type.\n *\n * Otherwise, test each possible type for the abstract type by calling\n * isTypeOf for the object being coerced, returning the first type that matches.\n */\n\n\nexport var defaultTypeResolver = function defaultTypeResolver(value, contextValue, info, abstractType) {\n // First, look for `__typename`.\n if (isObjectLike(value) && typeof value.__typename === 'string') {\n return value.__typename;\n } // Otherwise, test each possible type.\n\n\n var possibleTypes = info.schema.getPossibleTypes(abstractType);\n var promisedIsTypeOfResults = [];\n\n for (var i = 0; i < possibleTypes.length; i++) {\n var type = possibleTypes[i];\n\n if (type.isTypeOf) {\n var isTypeOfResult = type.isTypeOf(value, contextValue, info);\n\n if (isPromise(isTypeOfResult)) {\n promisedIsTypeOfResults[i] = isTypeOfResult;\n } else if (isTypeOfResult) {\n return type.name;\n }\n }\n }\n\n if (promisedIsTypeOfResults.length) {\n return Promise.all(promisedIsTypeOfResults).then(function (isTypeOfResults) {\n for (var _i9 = 0; _i9 < isTypeOfResults.length; _i9++) {\n if (isTypeOfResults[_i9]) {\n return possibleTypes[_i9].name;\n }\n }\n });\n }\n};\n/**\n * If a resolve function is not given, then a default resolve behavior is used\n * which takes the property of the source object of the same name as the field\n * and returns it as the result, or if it's a function, returns the result\n * of calling that function while passing along args and context value.\n */\n\nexport var defaultFieldResolver = function defaultFieldResolver(source, args, contextValue, info) {\n // ensure source is a value for which property access is acceptable.\n if (isObjectLike(source) || typeof source === 'function') {\n var property = source[info.fieldName];\n\n if (typeof property === 'function') {\n return source[info.fieldName](args, contextValue, info);\n }\n\n return property;\n }\n};\n/**\n * This method looks up the field on the given type definition.\n * It has special casing for the three introspection fields,\n * __schema, __type and __typename. __typename is special because\n * it can always be queried as a field, even in situations where no\n * other fields are allowed, like on a Union. __schema and __type\n * could get automatically added to the query type, but that would\n * require mutating type definitions, which would cause issues.\n *\n * @internal\n */\n\nexport function getFieldDef(schema, parentType, fieldName) {\n if (fieldName === SchemaMetaFieldDef.name && schema.getQueryType() === parentType) {\n return SchemaMetaFieldDef;\n } else if (fieldName === TypeMetaFieldDef.name && schema.getQueryType() === parentType) {\n return TypeMetaFieldDef;\n } else if (fieldName === TypeNameMetaFieldDef.name) {\n return TypeNameMetaFieldDef;\n }\n\n return parentType.getFields()[fieldName];\n}\n","/**\n * Memoizes the provided three-argument function.\n */\nexport default function memoize3(fn) {\n var cache0;\n return function memoized(a1, a2, a3) {\n if (!cache0) {\n cache0 = new WeakMap();\n }\n\n var cache1 = cache0.get(a1);\n var cache2;\n\n if (cache1) {\n cache2 = cache1.get(a2);\n\n if (cache2) {\n var cachedValue = cache2.get(a3);\n\n if (cachedValue !== undefined) {\n return cachedValue;\n }\n }\n } else {\n cache1 = new WeakMap();\n cache0.set(a1, cache1);\n }\n\n if (!cache2) {\n cache2 = new WeakMap();\n cache1.set(a2, cache2);\n }\n\n var newValue = fn(a1, a2, a3);\n cache2.set(a3, newValue);\n return newValue;\n };\n}\n","import isPromise from \"./isPromise.mjs\";\n/**\n * Similar to Array.prototype.reduce(), however the reducing callback may return\n * a Promise, in which case reduction will continue after each promise resolves.\n *\n * If the callback does not return a Promise, then this function will also not\n * return a Promise.\n */\n\nexport default function promiseReduce(values, callback, initialValue) {\n return values.reduce(function (previous, value) {\n return isPromise(previous) ? previous.then(function (resolved) {\n return callback(resolved, value);\n }) : callback(previous, value);\n }, initialValue);\n}\n","/**\n * This function transforms a JS object `ObjMap>` into\n * a `Promise>`\n *\n * This is akin to bluebird's `Promise.props`, but implemented only using\n * `Promise.all` so it will work with any implementation of ES6 promises.\n */\nexport default function promiseForObject(object) {\n var keys = Object.keys(object);\n var valuesAndPromises = keys.map(function (name) {\n return object[name];\n });\n return Promise.all(valuesAndPromises).then(function (values) {\n return values.reduce(function (resolvedObject, value, i) {\n resolvedObject[keys[i]] = value;\n return resolvedObject;\n }, Object.create(null));\n });\n}\n","/**\n * Given a Path and a key, return a new Path containing the new key.\n */\nexport function addPath(prev, key, typename) {\n return {\n prev: prev,\n key: key,\n typename: typename\n };\n}\n/**\n * Given a Path, return an Array of the path keys.\n */\n\nexport function pathToArray(path) {\n var flattened = [];\n var curr = path;\n\n while (curr) {\n flattened.push(curr.key);\n curr = curr.prev;\n }\n\n return flattened.reverse();\n}\n","import { GraphQLError } from \"../error/GraphQLError.mjs\";\n\n/**\n * Extracts the root type of the operation from the schema.\n */\nexport function getOperationRootType(schema, operation) {\n if (operation.operation === 'query') {\n var queryType = schema.getQueryType();\n\n if (!queryType) {\n throw new GraphQLError('Schema does not define the required query root type.', operation);\n }\n\n return queryType;\n }\n\n if (operation.operation === 'mutation') {\n var mutationType = schema.getMutationType();\n\n if (!mutationType) {\n throw new GraphQLError('Schema is not configured for mutations.', operation);\n }\n\n return mutationType;\n }\n\n if (operation.operation === 'subscription') {\n var subscriptionType = schema.getSubscriptionType();\n\n if (!subscriptionType) {\n throw new GraphQLError('Schema is not configured for subscriptions.', operation);\n }\n\n return subscriptionType;\n }\n\n throw new GraphQLError('Can only have query, mutation and subscription operations.', operation);\n}\n","import find from \"../polyfills/find.mjs\";\nimport keyMap from \"../jsutils/keyMap.mjs\";\nimport inspect from \"../jsutils/inspect.mjs\";\nimport printPathArray from \"../jsutils/printPathArray.mjs\";\nimport { GraphQLError } from \"../error/GraphQLError.mjs\";\nimport { Kind } from \"../language/kinds.mjs\";\nimport { print } from \"../language/printer.mjs\";\nimport { isInputType, isNonNullType } from \"../type/definition.mjs\";\nimport { typeFromAST } from \"../utilities/typeFromAST.mjs\";\nimport { valueFromAST } from \"../utilities/valueFromAST.mjs\";\nimport { coerceInputValue } from \"../utilities/coerceInputValue.mjs\";\n\n/**\n * Prepares an object map of variableValues of the correct type based on the\n * provided variable definitions and arbitrary input. If the input cannot be\n * parsed to match the variable definitions, a GraphQLError will be thrown.\n *\n * Note: The returned value is a plain Object with a prototype, since it is\n * exposed to user code. Care should be taken to not pull values from the\n * Object prototype.\n *\n * @internal\n */\nexport function getVariableValues(schema, varDefNodes, inputs, options) {\n var errors = [];\n var maxErrors = options === null || options === void 0 ? void 0 : options.maxErrors;\n\n try {\n var coerced = coerceVariableValues(schema, varDefNodes, inputs, function (error) {\n if (maxErrors != null && errors.length >= maxErrors) {\n throw new GraphQLError('Too many errors processing variables, error limit reached. Execution aborted.');\n }\n\n errors.push(error);\n });\n\n if (errors.length === 0) {\n return {\n coerced: coerced\n };\n }\n } catch (error) {\n errors.push(error);\n }\n\n return {\n errors: errors\n };\n}\n\nfunction coerceVariableValues(schema, varDefNodes, inputs, onError) {\n var coercedValues = {};\n\n var _loop = function _loop(_i2) {\n var varDefNode = varDefNodes[_i2];\n var varName = varDefNode.variable.name.value;\n var varType = typeFromAST(schema, varDefNode.type);\n\n if (!isInputType(varType)) {\n // Must use input types for variables. This should be caught during\n // validation, however is checked again here for safety.\n var varTypeStr = print(varDefNode.type);\n onError(new GraphQLError(\"Variable \\\"$\".concat(varName, \"\\\" expected value of type \\\"\").concat(varTypeStr, \"\\\" which cannot be used as an input type.\"), varDefNode.type));\n return \"continue\";\n }\n\n if (!hasOwnProperty(inputs, varName)) {\n if (varDefNode.defaultValue) {\n coercedValues[varName] = valueFromAST(varDefNode.defaultValue, varType);\n } else if (isNonNullType(varType)) {\n var _varTypeStr = inspect(varType);\n\n onError(new GraphQLError(\"Variable \\\"$\".concat(varName, \"\\\" of required type \\\"\").concat(_varTypeStr, \"\\\" was not provided.\"), varDefNode));\n }\n\n return \"continue\";\n }\n\n var value = inputs[varName];\n\n if (value === null && isNonNullType(varType)) {\n var _varTypeStr2 = inspect(varType);\n\n onError(new GraphQLError(\"Variable \\\"$\".concat(varName, \"\\\" of non-null type \\\"\").concat(_varTypeStr2, \"\\\" must not be null.\"), varDefNode));\n return \"continue\";\n }\n\n coercedValues[varName] = coerceInputValue(value, varType, function (path, invalidValue, error) {\n var prefix = \"Variable \\\"$\".concat(varName, \"\\\" got invalid value \") + inspect(invalidValue);\n\n if (path.length > 0) {\n prefix += \" at \\\"\".concat(varName).concat(printPathArray(path), \"\\\"\");\n }\n\n onError(new GraphQLError(prefix + '; ' + error.message, varDefNode, undefined, undefined, undefined, error.originalError));\n });\n };\n\n for (var _i2 = 0; _i2 < varDefNodes.length; _i2++) {\n var _ret = _loop(_i2);\n\n if (_ret === \"continue\") continue;\n }\n\n return coercedValues;\n}\n/**\n * Prepares an object map of argument values given a list of argument\n * definitions and list of argument AST nodes.\n *\n * Note: The returned value is a plain Object with a prototype, since it is\n * exposed to user code. Care should be taken to not pull values from the\n * Object prototype.\n *\n * @internal\n */\n\n\nexport function getArgumentValues(def, node, variableValues) {\n var _node$arguments;\n\n var coercedValues = {}; // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n\n var argumentNodes = (_node$arguments = node.arguments) !== null && _node$arguments !== void 0 ? _node$arguments : [];\n var argNodeMap = keyMap(argumentNodes, function (arg) {\n return arg.name.value;\n });\n\n for (var _i4 = 0, _def$args2 = def.args; _i4 < _def$args2.length; _i4++) {\n var argDef = _def$args2[_i4];\n var name = argDef.name;\n var argType = argDef.type;\n var argumentNode = argNodeMap[name];\n\n if (!argumentNode) {\n if (argDef.defaultValue !== undefined) {\n coercedValues[name] = argDef.defaultValue;\n } else if (isNonNullType(argType)) {\n throw new GraphQLError(\"Argument \\\"\".concat(name, \"\\\" of required type \\\"\").concat(inspect(argType), \"\\\" \") + 'was not provided.', node);\n }\n\n continue;\n }\n\n var valueNode = argumentNode.value;\n var isNull = valueNode.kind === Kind.NULL;\n\n if (valueNode.kind === Kind.VARIABLE) {\n var variableName = valueNode.name.value;\n\n if (variableValues == null || !hasOwnProperty(variableValues, variableName)) {\n if (argDef.defaultValue !== undefined) {\n coercedValues[name] = argDef.defaultValue;\n } else if (isNonNullType(argType)) {\n throw new GraphQLError(\"Argument \\\"\".concat(name, \"\\\" of required type \\\"\").concat(inspect(argType), \"\\\" \") + \"was provided the variable \\\"$\".concat(variableName, \"\\\" which was not provided a runtime value.\"), valueNode);\n }\n\n continue;\n }\n\n isNull = variableValues[variableName] == null;\n }\n\n if (isNull && isNonNullType(argType)) {\n throw new GraphQLError(\"Argument \\\"\".concat(name, \"\\\" of non-null type \\\"\").concat(inspect(argType), \"\\\" \") + 'must not be null.', valueNode);\n }\n\n var coercedValue = valueFromAST(valueNode, argType, variableValues);\n\n if (coercedValue === undefined) {\n // Note: ValuesOfCorrectTypeRule validation should catch this before\n // execution. This is a runtime check to ensure execution does not\n // continue with an invalid argument value.\n throw new GraphQLError(\"Argument \\\"\".concat(name, \"\\\" has invalid value \").concat(print(valueNode), \".\"), valueNode);\n }\n\n coercedValues[name] = coercedValue;\n }\n\n return coercedValues;\n}\n/**\n * Prepares an object map of argument values given a directive definition\n * and a AST node which may contain directives. Optionally also accepts a map\n * of variable values.\n *\n * If the directive does not exist on the node, returns undefined.\n *\n * Note: The returned value is a plain Object with a prototype, since it is\n * exposed to user code. Care should be taken to not pull values from the\n * Object prototype.\n */\n\nexport function getDirectiveValues(directiveDef, node, variableValues) {\n var directiveNode = node.directives && find(node.directives, function (directive) {\n return directive.name.value === directiveDef.name;\n });\n\n if (directiveNode) {\n return getArgumentValues(directiveDef, directiveNode, variableValues);\n }\n}\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n","/**\n * Build a string describing the path.\n */\nexport default function printPathArray(path) {\n return path.map(function (key) {\n return typeof key === 'number' ? '[' + key.toString() + ']' : '.' + key;\n }).join('');\n}\n","import objectValues from \"../polyfills/objectValues.mjs\";\nimport keyMap from \"../jsutils/keyMap.mjs\";\nimport inspect from \"../jsutils/inspect.mjs\";\nimport invariant from \"../jsutils/invariant.mjs\";\nimport { Kind } from \"../language/kinds.mjs\";\nimport { isLeafType, isInputObjectType, isListType, isNonNullType } from \"../type/definition.mjs\";\n/**\n * Produces a JavaScript value given a GraphQL Value AST.\n *\n * A GraphQL type must be provided, which will be used to interpret different\n * GraphQL Value literals.\n *\n * Returns `undefined` when the value could not be validly coerced according to\n * the provided type.\n *\n * | GraphQL Value | JSON Value |\n * | -------------------- | ------------- |\n * | Input Object | Object |\n * | List | Array |\n * | Boolean | Boolean |\n * | String | String |\n * | Int / Float | Number |\n * | Enum Value | Mixed |\n * | NullValue | null |\n *\n */\n\nexport function valueFromAST(valueNode, type, variables) {\n if (!valueNode) {\n // When there is no node, then there is also no value.\n // Importantly, this is different from returning the value null.\n return;\n }\n\n if (valueNode.kind === Kind.VARIABLE) {\n var variableName = valueNode.name.value;\n\n if (variables == null || variables[variableName] === undefined) {\n // No valid return value.\n return;\n }\n\n var variableValue = variables[variableName];\n\n if (variableValue === null && isNonNullType(type)) {\n return; // Invalid: intentionally return no value.\n } // Note: This does no further checking that this variable is correct.\n // This assumes that this query has been validated and the variable\n // usage here is of the correct type.\n\n\n return variableValue;\n }\n\n if (isNonNullType(type)) {\n if (valueNode.kind === Kind.NULL) {\n return; // Invalid: intentionally return no value.\n }\n\n return valueFromAST(valueNode, type.ofType, variables);\n }\n\n if (valueNode.kind === Kind.NULL) {\n // This is explicitly returning the value null.\n return null;\n }\n\n if (isListType(type)) {\n var itemType = type.ofType;\n\n if (valueNode.kind === Kind.LIST) {\n var coercedValues = [];\n\n for (var _i2 = 0, _valueNode$values2 = valueNode.values; _i2 < _valueNode$values2.length; _i2++) {\n var itemNode = _valueNode$values2[_i2];\n\n if (isMissingVariable(itemNode, variables)) {\n // If an array contains a missing variable, it is either coerced to\n // null or if the item type is non-null, it considered invalid.\n if (isNonNullType(itemType)) {\n return; // Invalid: intentionally return no value.\n }\n\n coercedValues.push(null);\n } else {\n var itemValue = valueFromAST(itemNode, itemType, variables);\n\n if (itemValue === undefined) {\n return; // Invalid: intentionally return no value.\n }\n\n coercedValues.push(itemValue);\n }\n }\n\n return coercedValues;\n }\n\n var coercedValue = valueFromAST(valueNode, itemType, variables);\n\n if (coercedValue === undefined) {\n return; // Invalid: intentionally return no value.\n }\n\n return [coercedValue];\n }\n\n if (isInputObjectType(type)) {\n if (valueNode.kind !== Kind.OBJECT) {\n return; // Invalid: intentionally return no value.\n }\n\n var coercedObj = Object.create(null);\n var fieldNodes = keyMap(valueNode.fields, function (field) {\n return field.name.value;\n });\n\n for (var _i4 = 0, _objectValues2 = objectValues(type.getFields()); _i4 < _objectValues2.length; _i4++) {\n var field = _objectValues2[_i4];\n var fieldNode = fieldNodes[field.name];\n\n if (!fieldNode || isMissingVariable(fieldNode.value, variables)) {\n if (field.defaultValue !== undefined) {\n coercedObj[field.name] = field.defaultValue;\n } else if (isNonNullType(field.type)) {\n return; // Invalid: intentionally return no value.\n }\n\n continue;\n }\n\n var fieldValue = valueFromAST(fieldNode.value, field.type, variables);\n\n if (fieldValue === undefined) {\n return; // Invalid: intentionally return no value.\n }\n\n coercedObj[field.name] = fieldValue;\n }\n\n return coercedObj;\n } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')\n\n\n if (isLeafType(type)) {\n // Scalars and Enums fulfill parsing a literal value via parseLiteral().\n // Invalid values represent a failure to parse correctly, in which case\n // no value is returned.\n var result;\n\n try {\n result = type.parseLiteral(valueNode, variables);\n } catch (_error) {\n return; // Invalid: intentionally return no value.\n }\n\n if (result === undefined) {\n return; // Invalid: intentionally return no value.\n }\n\n return result;\n } // istanbul ignore next (Not reachable. All possible input types have been considered)\n\n\n false || invariant(0, 'Unexpected input type: ' + inspect(type));\n} // Returns true if the provided valueNode is a variable which is not defined\n// in the set of variables.\n\nfunction isMissingVariable(valueNode, variables) {\n return valueNode.kind === Kind.VARIABLE && (variables == null || variables[valueNode.name.value] === undefined);\n}\n","import objectValues from \"../polyfills/objectValues.mjs\";\nimport inspect from \"../jsutils/inspect.mjs\";\nimport invariant from \"../jsutils/invariant.mjs\";\nimport didYouMean from \"../jsutils/didYouMean.mjs\";\nimport isObjectLike from \"../jsutils/isObjectLike.mjs\";\nimport safeArrayFrom from \"../jsutils/safeArrayFrom.mjs\";\nimport suggestionList from \"../jsutils/suggestionList.mjs\";\nimport printPathArray from \"../jsutils/printPathArray.mjs\";\nimport { addPath, pathToArray } from \"../jsutils/Path.mjs\";\nimport { GraphQLError } from \"../error/GraphQLError.mjs\";\nimport { isLeafType, isInputObjectType, isListType, isNonNullType } from \"../type/definition.mjs\";\n\n/**\n * Coerces a JavaScript value given a GraphQL Input Type.\n */\nexport function coerceInputValue(inputValue, type) {\n var onError = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultOnError;\n return coerceInputValueImpl(inputValue, type, onError);\n}\n\nfunction defaultOnError(path, invalidValue, error) {\n var errorPrefix = 'Invalid value ' + inspect(invalidValue);\n\n if (path.length > 0) {\n errorPrefix += \" at \\\"value\".concat(printPathArray(path), \"\\\"\");\n }\n\n error.message = errorPrefix + ': ' + error.message;\n throw error;\n}\n\nfunction coerceInputValueImpl(inputValue, type, onError, path) {\n if (isNonNullType(type)) {\n if (inputValue != null) {\n return coerceInputValueImpl(inputValue, type.ofType, onError, path);\n }\n\n onError(pathToArray(path), inputValue, new GraphQLError(\"Expected non-nullable type \\\"\".concat(inspect(type), \"\\\" not to be null.\")));\n return;\n }\n\n if (inputValue == null) {\n // Explicitly return the value null.\n return null;\n }\n\n if (isListType(type)) {\n var itemType = type.ofType;\n var coercedList = safeArrayFrom(inputValue, function (itemValue, index) {\n var itemPath = addPath(path, index, undefined);\n return coerceInputValueImpl(itemValue, itemType, onError, itemPath);\n });\n\n if (coercedList != null) {\n return coercedList;\n } // Lists accept a non-list value as a list of one.\n\n\n return [coerceInputValueImpl(inputValue, itemType, onError, path)];\n }\n\n if (isInputObjectType(type)) {\n if (!isObjectLike(inputValue)) {\n onError(pathToArray(path), inputValue, new GraphQLError(\"Expected type \\\"\".concat(type.name, \"\\\" to be an object.\")));\n return;\n }\n\n var coercedValue = {};\n var fieldDefs = type.getFields();\n\n for (var _i2 = 0, _objectValues2 = objectValues(fieldDefs); _i2 < _objectValues2.length; _i2++) {\n var field = _objectValues2[_i2];\n var fieldValue = inputValue[field.name];\n\n if (fieldValue === undefined) {\n if (field.defaultValue !== undefined) {\n coercedValue[field.name] = field.defaultValue;\n } else if (isNonNullType(field.type)) {\n var typeStr = inspect(field.type);\n onError(pathToArray(path), inputValue, new GraphQLError(\"Field \\\"\".concat(field.name, \"\\\" of required type \\\"\").concat(typeStr, \"\\\" was not provided.\")));\n }\n\n continue;\n }\n\n coercedValue[field.name] = coerceInputValueImpl(fieldValue, field.type, onError, addPath(path, field.name, type.name));\n } // Ensure every provided field is defined.\n\n\n for (var _i4 = 0, _Object$keys2 = Object.keys(inputValue); _i4 < _Object$keys2.length; _i4++) {\n var fieldName = _Object$keys2[_i4];\n\n if (!fieldDefs[fieldName]) {\n var suggestions = suggestionList(fieldName, Object.keys(type.getFields()));\n onError(pathToArray(path), inputValue, new GraphQLError(\"Field \\\"\".concat(fieldName, \"\\\" is not defined by type \\\"\").concat(type.name, \"\\\".\") + didYouMean(suggestions)));\n }\n }\n\n return coercedValue;\n } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')\n\n\n if (isLeafType(type)) {\n var parseResult; // Scalars and Enums determine if a input value is valid via parseValue(),\n // which can throw to indicate failure. If it throws, maintain a reference\n // to the original error.\n\n try {\n parseResult = type.parseValue(inputValue);\n } catch (error) {\n if (error instanceof GraphQLError) {\n onError(pathToArray(path), inputValue, error);\n } else {\n onError(pathToArray(path), inputValue, new GraphQLError(\"Expected type \\\"\".concat(type.name, \"\\\". \") + error.message, undefined, undefined, undefined, undefined, error));\n }\n\n return;\n }\n\n if (parseResult === undefined) {\n onError(pathToArray(path), inputValue, new GraphQLError(\"Expected type \\\"\".concat(type.name, \"\\\".\")));\n }\n\n return parseResult;\n } // istanbul ignore next (Not reachable. All possible input types have been considered)\n\n\n false || invariant(0, 'Unexpected input type: ' + inspect(type));\n}\n","export { // Predicate\nisSchema // Assertion\n, assertSchema // GraphQL Schema definition\n, GraphQLSchema } from \"./schema.mjs\";\nexport { // Predicates\nisType, isScalarType, isObjectType, isInterfaceType, isUnionType, isEnumType, isInputObjectType, isListType, isNonNullType, isInputType, isOutputType, isLeafType, isCompositeType, isAbstractType, isWrappingType, isNullableType, isNamedType, isRequiredArgument, isRequiredInputField // Assertions\n, assertType, assertScalarType, assertObjectType, assertInterfaceType, assertUnionType, assertEnumType, assertInputObjectType, assertListType, assertNonNullType, assertInputType, assertOutputType, assertLeafType, assertCompositeType, assertAbstractType, assertWrappingType, assertNullableType, assertNamedType // Un-modifiers\n, getNullableType, getNamedType // Definitions\n, GraphQLScalarType, GraphQLObjectType, GraphQLInterfaceType, GraphQLUnionType, GraphQLEnumType, GraphQLInputObjectType // Type Wrappers\n, GraphQLList, GraphQLNonNull } from \"./definition.mjs\";\nexport { // Predicate\nisDirective // Assertion\n, assertDirective // Directives Definition\n, GraphQLDirective // Built-in Directives defined by the Spec\n, isSpecifiedDirective, specifiedDirectives, GraphQLIncludeDirective, GraphQLSkipDirective, GraphQLDeprecatedDirective, GraphQLSpecifiedByDirective // Constant Deprecation Reason\n, DEFAULT_DEPRECATION_REASON } from \"./directives.mjs\";\n// Common built-in scalar instances.\nexport { // Predicate\nisSpecifiedScalarType // Standard GraphQL Scalars\n, specifiedScalarTypes, GraphQLInt, GraphQLFloat, GraphQLString, GraphQLBoolean, GraphQLID } from \"./scalars.mjs\";\nexport { // Predicate\nisIntrospectionType // GraphQL Types for introspection.\n, introspectionTypes, __Schema, __Directive, __DirectiveLocation, __Type, __Field, __InputValue, __EnumValue, __TypeKind // \"Enum\" of Type Kinds\n, TypeKind // Meta-field definitions.\n, SchemaMetaFieldDef, TypeMetaFieldDef, TypeNameMetaFieldDef } from \"./introspection.mjs\";\n// Validate GraphQL schema.\nexport { validateSchema, assertValidSchema } from \"./validate.mjs\";\n","export { Source } from \"./source.mjs\";\nexport { getLocation } from \"./location.mjs\";\nexport { printLocation, printSourceLocation } from \"./printLocation.mjs\";\nexport { Kind } from \"./kinds.mjs\";\nexport { TokenKind } from \"./tokenKind.mjs\";\nexport { Lexer } from \"./lexer.mjs\";\nexport { parse, parseValue, parseType } from \"./parser.mjs\";\nexport { print } from \"./printer.mjs\";\nexport { visit, visitInParallel, getVisitFn, BREAK } from \"./visitor.mjs\";\nexport { Location, Token } from \"./ast.mjs\";\nexport { isDefinitionNode, isExecutableDefinitionNode, isSelectionNode, isValueNode, isTypeNode, isTypeSystemDefinitionNode, isTypeDefinitionNode, isTypeSystemExtensionNode, isTypeExtensionNode } from \"./predicates.mjs\";\nexport { DirectiveLocation } from \"./directiveLocation.mjs\";\n","export { pathToArray as responsePathAsArray } from \"../jsutils/Path.mjs\";\nexport { execute, executeSync, defaultFieldResolver, defaultTypeResolver } from \"./execute.mjs\";\nexport { getDirectiveValues } from \"./values.mjs\";\n","export { subscribe, createSourceEventStream } from \"./subscribe.mjs\";\n","import inspect from \"../jsutils/inspect.mjs\";\nimport isAsyncIterable from \"../jsutils/isAsyncIterable.mjs\";\nimport { addPath, pathToArray } from \"../jsutils/Path.mjs\";\nimport { GraphQLError } from \"../error/GraphQLError.mjs\";\nimport { locatedError } from \"../error/locatedError.mjs\";\nimport { getArgumentValues } from \"../execution/values.mjs\";\nimport { assertValidExecutionArguments, buildExecutionContext, buildResolveInfo, collectFields, execute, getFieldDef } from \"../execution/execute.mjs\";\nimport { getOperationRootType } from \"../utilities/getOperationRootType.mjs\";\nimport mapAsyncIterator from \"./mapAsyncIterator.mjs\";\nexport function subscribe(argsOrSchema, document, rootValue, contextValue, variableValues, operationName, fieldResolver, subscribeFieldResolver) {\n /* eslint-enable no-redeclare */\n // Extract arguments from object args if provided.\n return arguments.length === 1 ? subscribeImpl(argsOrSchema) : subscribeImpl({\n schema: argsOrSchema,\n document: document,\n rootValue: rootValue,\n contextValue: contextValue,\n variableValues: variableValues,\n operationName: operationName,\n fieldResolver: fieldResolver,\n subscribeFieldResolver: subscribeFieldResolver\n });\n}\n/**\n * This function checks if the error is a GraphQLError. If it is, report it as\n * an ExecutionResult, containing only errors and no data. Otherwise treat the\n * error as a system-class error and re-throw it.\n */\n\nfunction reportGraphQLError(error) {\n if (error instanceof GraphQLError) {\n return {\n errors: [error]\n };\n }\n\n throw error;\n}\n\nfunction subscribeImpl(args) {\n var schema = args.schema,\n document = args.document,\n rootValue = args.rootValue,\n contextValue = args.contextValue,\n variableValues = args.variableValues,\n operationName = args.operationName,\n fieldResolver = args.fieldResolver,\n subscribeFieldResolver = args.subscribeFieldResolver;\n var sourcePromise = createSourceEventStream(schema, document, rootValue, contextValue, variableValues, operationName, subscribeFieldResolver); // For each payload yielded from a subscription, map it over the normal\n // GraphQL `execute` function, with `payload` as the rootValue.\n // This implements the \"MapSourceToResponseEvent\" algorithm described in\n // the GraphQL specification. The `execute` function provides the\n // \"ExecuteSubscriptionEvent\" algorithm, as it is nearly identical to the\n // \"ExecuteQuery\" algorithm, for which `execute` is also used.\n\n var mapSourceToResponse = function mapSourceToResponse(payload) {\n return execute({\n schema: schema,\n document: document,\n rootValue: payload,\n contextValue: contextValue,\n variableValues: variableValues,\n operationName: operationName,\n fieldResolver: fieldResolver\n });\n }; // Resolve the Source Stream, then map every source value to a\n // ExecutionResult value as described above.\n\n\n return sourcePromise.then(function (resultOrStream) {\n return (// Note: Flow can't refine isAsyncIterable, so explicit casts are used.\n isAsyncIterable(resultOrStream) ? mapAsyncIterator(resultOrStream, mapSourceToResponse, reportGraphQLError) : resultOrStream\n );\n });\n}\n/**\n * Implements the \"CreateSourceEventStream\" algorithm described in the\n * GraphQL specification, resolving the subscription source event stream.\n *\n * Returns a Promise which resolves to either an AsyncIterable (if successful)\n * or an ExecutionResult (error). The promise will be rejected if the schema or\n * other arguments to this function are invalid, or if the resolved event stream\n * is not an async iterable.\n *\n * If the client-provided arguments to this function do not result in a\n * compliant subscription, a GraphQL Response (ExecutionResult) with\n * descriptive errors and no data will be returned.\n *\n * If the the source stream could not be created due to faulty subscription\n * resolver logic or underlying systems, the promise will resolve to a single\n * ExecutionResult containing `errors` and no `data`.\n *\n * If the operation succeeded, the promise resolves to the AsyncIterable for the\n * event stream returned by the resolver.\n *\n * A Source Event Stream represents a sequence of events, each of which triggers\n * a GraphQL execution for that event.\n *\n * This may be useful when hosting the stateful subscription service in a\n * different process or machine than the stateless GraphQL execution engine,\n * or otherwise separating these two steps. For more on this, see the\n * \"Supporting Subscriptions at Scale\" information in the GraphQL specification.\n */\n\n\nexport function createSourceEventStream(schema, document, rootValue, contextValue, variableValues, operationName, fieldResolver) {\n // If arguments are missing or incorrectly typed, this is an internal\n // developer mistake which should throw an early error.\n assertValidExecutionArguments(schema, document, variableValues);\n return new Promise(function (resolve) {\n // If a valid context cannot be created due to incorrect arguments,\n // this will throw an error.\n var exeContext = buildExecutionContext(schema, document, rootValue, contextValue, variableValues, operationName, fieldResolver);\n resolve( // Return early errors if execution context failed.\n Array.isArray(exeContext) ? {\n errors: exeContext\n } : executeSubscription(exeContext));\n }).catch(reportGraphQLError);\n}\n\nfunction executeSubscription(exeContext) {\n var schema = exeContext.schema,\n operation = exeContext.operation,\n variableValues = exeContext.variableValues,\n rootValue = exeContext.rootValue;\n var type = getOperationRootType(schema, operation);\n var fields = collectFields(exeContext, type, operation.selectionSet, Object.create(null), Object.create(null));\n var responseNames = Object.keys(fields);\n var responseName = responseNames[0];\n var fieldNodes = fields[responseName];\n var fieldNode = fieldNodes[0];\n var fieldName = fieldNode.name.value;\n var fieldDef = getFieldDef(schema, type, fieldName);\n\n if (!fieldDef) {\n throw new GraphQLError(\"The subscription field \\\"\".concat(fieldName, \"\\\" is not defined.\"), fieldNodes);\n }\n\n var path = addPath(undefined, responseName, type.name);\n var info = buildResolveInfo(exeContext, fieldDef, fieldNodes, type, path); // Coerce to Promise for easier error handling and consistent return type.\n\n return new Promise(function (resolveResult) {\n var _fieldDef$subscribe;\n\n // Implements the \"ResolveFieldEventStream\" algorithm from GraphQL specification.\n // It differs from \"ResolveFieldValue\" due to providing a different `resolveFn`.\n // Build a JS object of arguments from the field.arguments AST, using the\n // variables scope to fulfill any variable references.\n var args = getArgumentValues(fieldDef, fieldNodes[0], variableValues); // The resolve function's optional third argument is a context value that\n // is provided to every resolve function within an execution. It is commonly\n // used to represent an authenticated user, or request-specific caches.\n\n var contextValue = exeContext.contextValue; // Call the `subscribe()` resolver or the default resolver to produce an\n // AsyncIterable yielding raw payloads.\n\n var resolveFn = (_fieldDef$subscribe = fieldDef.subscribe) !== null && _fieldDef$subscribe !== void 0 ? _fieldDef$subscribe : exeContext.fieldResolver;\n resolveResult(resolveFn(rootValue, args, contextValue, info));\n }).then(function (eventStream) {\n if (eventStream instanceof Error) {\n throw locatedError(eventStream, fieldNodes, pathToArray(path));\n } // Assert field returned an event stream, otherwise yield an error.\n\n\n if (!isAsyncIterable(eventStream)) {\n throw new Error('Subscription field must return Async Iterable. ' + \"Received: \".concat(inspect(eventStream), \".\"));\n }\n\n return eventStream;\n }, function (error) {\n throw locatedError(error, fieldNodes, pathToArray(path));\n });\n}\n","import { SYMBOL_ASYNC_ITERATOR } from \"../polyfills/symbols.mjs\";\n/**\n * Returns true if the provided object implements the AsyncIterator protocol via\n * either implementing a `Symbol.asyncIterator` or `\"@@asyncIterator\"` method.\n */\n\n// eslint-disable-next-line no-redeclare\nexport default function isAsyncIterable(maybeAsyncIterable) {\n return typeof (maybeAsyncIterable === null || maybeAsyncIterable === void 0 ? void 0 : maybeAsyncIterable[SYMBOL_ASYNC_ITERATOR]) === 'function';\n}\n","function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { SYMBOL_ASYNC_ITERATOR } from \"../polyfills/symbols.mjs\";\n\n/**\n * Given an AsyncIterable and a callback function, return an AsyncIterator\n * which produces values mapped via calling the callback function.\n */\nexport default function mapAsyncIterator(iterable, callback, rejectCallback) {\n // $FlowFixMe[prop-missing]\n var iteratorMethod = iterable[SYMBOL_ASYNC_ITERATOR];\n var iterator = iteratorMethod.call(iterable);\n var $return;\n var abruptClose;\n\n if (typeof iterator.return === 'function') {\n $return = iterator.return;\n\n abruptClose = function abruptClose(error) {\n var rethrow = function rethrow() {\n return Promise.reject(error);\n };\n\n return $return.call(iterator).then(rethrow, rethrow);\n };\n }\n\n function mapResult(result) {\n return result.done ? result : asyncMapValue(result.value, callback).then(iteratorResult, abruptClose);\n }\n\n var mapReject;\n\n if (rejectCallback) {\n // Capture rejectCallback to ensure it cannot be null.\n var reject = rejectCallback;\n\n mapReject = function mapReject(error) {\n return asyncMapValue(error, reject).then(iteratorResult, abruptClose);\n };\n }\n /* TODO: Flow doesn't support symbols as keys:\n https://github.com/facebook/flow/issues/3258 */\n\n\n return _defineProperty({\n next: function next() {\n return iterator.next().then(mapResult, mapReject);\n },\n return: function _return() {\n return $return ? $return.call(iterator).then(mapResult, mapReject) : Promise.resolve({\n value: undefined,\n done: true\n });\n },\n throw: function _throw(error) {\n if (typeof iterator.throw === 'function') {\n return iterator.throw(error).then(mapResult, mapReject);\n }\n\n return Promise.reject(error).catch(abruptClose);\n }\n }, SYMBOL_ASYNC_ITERATOR, function () {\n return this;\n });\n}\n\nfunction asyncMapValue(value, callback) {\n return new Promise(function (resolve) {\n return resolve(callback(value));\n });\n}\n\nfunction iteratorResult(value) {\n return {\n value: value,\n done: false\n };\n}\n","export { validate } from \"./validate.mjs\";\nexport { ValidationContext } from \"./ValidationContext.mjs\";\n// All validation rules in the GraphQL Specification.\nexport { specifiedRules } from \"./specifiedRules.mjs\"; // Spec Section: \"Executable Definitions\"\n\nexport { ExecutableDefinitionsRule } from \"./rules/ExecutableDefinitionsRule.mjs\"; // Spec Section: \"Field Selections on Objects, Interfaces, and Unions Types\"\n\nexport { FieldsOnCorrectTypeRule } from \"./rules/FieldsOnCorrectTypeRule.mjs\"; // Spec Section: \"Fragments on Composite Types\"\n\nexport { FragmentsOnCompositeTypesRule } from \"./rules/FragmentsOnCompositeTypesRule.mjs\"; // Spec Section: \"Argument Names\"\n\nexport { KnownArgumentNamesRule } from \"./rules/KnownArgumentNamesRule.mjs\"; // Spec Section: \"Directives Are Defined\"\n\nexport { KnownDirectivesRule } from \"./rules/KnownDirectivesRule.mjs\"; // Spec Section: \"Fragment spread target defined\"\n\nexport { KnownFragmentNamesRule } from \"./rules/KnownFragmentNamesRule.mjs\"; // Spec Section: \"Fragment Spread Type Existence\"\n\nexport { KnownTypeNamesRule } from \"./rules/KnownTypeNamesRule.mjs\"; // Spec Section: \"Lone Anonymous Operation\"\n\nexport { LoneAnonymousOperationRule } from \"./rules/LoneAnonymousOperationRule.mjs\"; // Spec Section: \"Fragments must not form cycles\"\n\nexport { NoFragmentCyclesRule } from \"./rules/NoFragmentCyclesRule.mjs\"; // Spec Section: \"All Variable Used Defined\"\n\nexport { NoUndefinedVariablesRule } from \"./rules/NoUndefinedVariablesRule.mjs\"; // Spec Section: \"Fragments must be used\"\n\nexport { NoUnusedFragmentsRule } from \"./rules/NoUnusedFragmentsRule.mjs\"; // Spec Section: \"All Variables Used\"\n\nexport { NoUnusedVariablesRule } from \"./rules/NoUnusedVariablesRule.mjs\"; // Spec Section: \"Field Selection Merging\"\n\nexport { OverlappingFieldsCanBeMergedRule } from \"./rules/OverlappingFieldsCanBeMergedRule.mjs\"; // Spec Section: \"Fragment spread is possible\"\n\nexport { PossibleFragmentSpreadsRule } from \"./rules/PossibleFragmentSpreadsRule.mjs\"; // Spec Section: \"Argument Optionality\"\n\nexport { ProvidedRequiredArgumentsRule } from \"./rules/ProvidedRequiredArgumentsRule.mjs\"; // Spec Section: \"Leaf Field Selections\"\n\nexport { ScalarLeafsRule } from \"./rules/ScalarLeafsRule.mjs\"; // Spec Section: \"Subscriptions with Single Root Field\"\n\nexport { SingleFieldSubscriptionsRule } from \"./rules/SingleFieldSubscriptionsRule.mjs\"; // Spec Section: \"Argument Uniqueness\"\n\nexport { UniqueArgumentNamesRule } from \"./rules/UniqueArgumentNamesRule.mjs\"; // Spec Section: \"Directives Are Unique Per Location\"\n\nexport { UniqueDirectivesPerLocationRule } from \"./rules/UniqueDirectivesPerLocationRule.mjs\"; // Spec Section: \"Fragment Name Uniqueness\"\n\nexport { UniqueFragmentNamesRule } from \"./rules/UniqueFragmentNamesRule.mjs\"; // Spec Section: \"Input Object Field Uniqueness\"\n\nexport { UniqueInputFieldNamesRule } from \"./rules/UniqueInputFieldNamesRule.mjs\"; // Spec Section: \"Operation Name Uniqueness\"\n\nexport { UniqueOperationNamesRule } from \"./rules/UniqueOperationNamesRule.mjs\"; // Spec Section: \"Variable Uniqueness\"\n\nexport { UniqueVariableNamesRule } from \"./rules/UniqueVariableNamesRule.mjs\"; // Spec Section: \"Values Type Correctness\"\n\nexport { ValuesOfCorrectTypeRule } from \"./rules/ValuesOfCorrectTypeRule.mjs\"; // Spec Section: \"Variables are Input Types\"\n\nexport { VariablesAreInputTypesRule } from \"./rules/VariablesAreInputTypesRule.mjs\"; // Spec Section: \"All Variable Usages Are Allowed\"\n\nexport { VariablesInAllowedPositionRule } from \"./rules/VariablesInAllowedPositionRule.mjs\"; // SDL-specific validation rules\n\nexport { LoneSchemaDefinitionRule } from \"./rules/LoneSchemaDefinitionRule.mjs\";\nexport { UniqueOperationTypesRule } from \"./rules/UniqueOperationTypesRule.mjs\";\nexport { UniqueTypeNamesRule } from \"./rules/UniqueTypeNamesRule.mjs\";\nexport { UniqueEnumValueNamesRule } from \"./rules/UniqueEnumValueNamesRule.mjs\";\nexport { UniqueFieldDefinitionNamesRule } from \"./rules/UniqueFieldDefinitionNamesRule.mjs\";\nexport { UniqueDirectiveNamesRule } from \"./rules/UniqueDirectiveNamesRule.mjs\";\nexport { PossibleTypeExtensionsRule } from \"./rules/PossibleTypeExtensionsRule.mjs\"; // Optional rules not defined by the GraphQL Specification\n\nexport { NoDeprecatedCustomRule } from \"./rules/custom/NoDeprecatedCustomRule.mjs\";\nexport { NoSchemaIntrospectionCustomRule } from \"./rules/custom/NoSchemaIntrospectionCustomRule.mjs\";\n","import invariant from \"../../../jsutils/invariant.mjs\";\nimport { GraphQLError } from \"../../../error/GraphQLError.mjs\";\nimport { getNamedType, isInputObjectType } from \"../../../type/definition.mjs\";\n\n/**\n * No deprecated\n *\n * A GraphQL document is only valid if all selected fields and all used enum values have not been\n * deprecated.\n *\n * Note: This rule is optional and is not part of the Validation section of the GraphQL\n * Specification. The main purpose of this rule is detection of deprecated usages and not\n * necessarily to forbid their use when querying a service.\n */\nexport function NoDeprecatedCustomRule(context) {\n return {\n Field: function Field(node) {\n var fieldDef = context.getFieldDef();\n var deprecationReason = fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.deprecationReason;\n\n if (fieldDef && deprecationReason != null) {\n var parentType = context.getParentType();\n parentType != null || invariant(0);\n context.reportError(new GraphQLError(\"The field \".concat(parentType.name, \".\").concat(fieldDef.name, \" is deprecated. \").concat(deprecationReason), node));\n }\n },\n Argument: function Argument(node) {\n var argDef = context.getArgument();\n var deprecationReason = argDef === null || argDef === void 0 ? void 0 : argDef.deprecationReason;\n\n if (argDef && deprecationReason != null) {\n var directiveDef = context.getDirective();\n\n if (directiveDef != null) {\n context.reportError(new GraphQLError(\"Directive \\\"@\".concat(directiveDef.name, \"\\\" argument \\\"\").concat(argDef.name, \"\\\" is deprecated. \").concat(deprecationReason), node));\n } else {\n var parentType = context.getParentType();\n var fieldDef = context.getFieldDef();\n parentType != null && fieldDef != null || invariant(0);\n context.reportError(new GraphQLError(\"Field \\\"\".concat(parentType.name, \".\").concat(fieldDef.name, \"\\\" argument \\\"\").concat(argDef.name, \"\\\" is deprecated. \").concat(deprecationReason), node));\n }\n }\n },\n ObjectField: function ObjectField(node) {\n var inputObjectDef = getNamedType(context.getParentInputType());\n\n if (isInputObjectType(inputObjectDef)) {\n var inputFieldDef = inputObjectDef.getFields()[node.name.value]; // flowlint-next-line unnecessary-optional-chain:off\n\n var deprecationReason = inputFieldDef === null || inputFieldDef === void 0 ? void 0 : inputFieldDef.deprecationReason;\n\n if (deprecationReason != null) {\n context.reportError(new GraphQLError(\"The input field \".concat(inputObjectDef.name, \".\").concat(inputFieldDef.name, \" is deprecated. \").concat(deprecationReason), node));\n }\n }\n },\n EnumValue: function EnumValue(node) {\n var enumValueDef = context.getEnumValue();\n var deprecationReason = enumValueDef === null || enumValueDef === void 0 ? void 0 : enumValueDef.deprecationReason;\n\n if (enumValueDef && deprecationReason != null) {\n var enumTypeDef = getNamedType(context.getInputType());\n enumTypeDef != null || invariant(0);\n context.reportError(new GraphQLError(\"The enum value \\\"\".concat(enumTypeDef.name, \".\").concat(enumValueDef.name, \"\\\" is deprecated. \").concat(deprecationReason), node));\n }\n }\n };\n}\n","import { GraphQLError } from \"../../../error/GraphQLError.mjs\";\nimport { getNamedType } from \"../../../type/definition.mjs\";\nimport { isIntrospectionType } from \"../../../type/introspection.mjs\";\n\n/**\n * Prohibit introspection queries\n *\n * A GraphQL document is only valid if all fields selected are not fields that\n * return an introspection type.\n *\n * Note: This rule is optional and is not part of the Validation section of the\n * GraphQL Specification. This rule effectively disables introspection, which\n * does not reflect best practices and should only be done if absolutely necessary.\n */\nexport function NoSchemaIntrospectionCustomRule(context) {\n return {\n Field: function Field(node) {\n var type = getNamedType(context.getType());\n\n if (type && isIntrospectionType(type)) {\n context.reportError(new GraphQLError(\"GraphQL introspection has been disabled, but the requested query contained the field \\\"\".concat(node.name.value, \"\\\".\"), node));\n }\n }\n };\n}\n","export { GraphQLError, printError } from \"./GraphQLError.mjs\";\nexport { syntaxError } from \"./syntaxError.mjs\";\nexport { locatedError } from \"./locatedError.mjs\";\nexport { formatError } from \"./formatError.mjs\";\n","import devAssert from \"../jsutils/devAssert.mjs\";\n\n/**\n * Given a GraphQLError, format it according to the rules described by the\n * Response Format, Errors section of the GraphQL Specification.\n */\nexport function formatError(error) {\n var _error$message;\n\n error || devAssert(0, 'Received null or undefined error.');\n var message = (_error$message = error.message) !== null && _error$message !== void 0 ? _error$message : 'An unknown error occurred.';\n var locations = error.locations;\n var path = error.path;\n var extensions = error.extensions;\n return extensions && Object.keys(extensions).length > 0 ? {\n message: message,\n locations: locations,\n path: path,\n extensions: extensions\n } : {\n message: message,\n locations: locations,\n path: path\n };\n}\n/**\n * @see https://github.com/graphql/graphql-spec/blob/master/spec/Section%207%20--%20Response.md#errors\n */\n","// Produce the GraphQL query recommended for a full schema introspection.\n// Accepts optional IntrospectionOptions.\nexport { getIntrospectionQuery } from \"./getIntrospectionQuery.mjs\";\n// Gets the target Operation from a Document.\nexport { getOperationAST } from \"./getOperationAST.mjs\"; // Gets the Type for the target Operation AST.\n\nexport { getOperationRootType } from \"./getOperationRootType.mjs\"; // Convert a GraphQLSchema to an IntrospectionQuery.\n\nexport { introspectionFromSchema } from \"./introspectionFromSchema.mjs\"; // Build a GraphQLSchema from an introspection result.\n\nexport { buildClientSchema } from \"./buildClientSchema.mjs\"; // Build a GraphQLSchema from GraphQL Schema language.\n\nexport { buildASTSchema, buildSchema } from \"./buildASTSchema.mjs\";\n// Extends an existing GraphQLSchema from a parsed GraphQL Schema language AST.\nexport { extendSchema // @deprecated: Get the description from a schema AST node and supports legacy\n// syntax for specifying descriptions - will be removed in v16.\n, getDescription } from \"./extendSchema.mjs\"; // Sort a GraphQLSchema.\n\nexport { lexicographicSortSchema } from \"./lexicographicSortSchema.mjs\"; // Print a GraphQLSchema to GraphQL Schema language.\n\nexport { printSchema, printType, printIntrospectionSchema } from \"./printSchema.mjs\"; // Create a GraphQLType from a GraphQL language AST.\n\nexport { typeFromAST } from \"./typeFromAST.mjs\"; // Create a JavaScript value from a GraphQL language AST with a type.\n\nexport { valueFromAST } from \"./valueFromAST.mjs\"; // Create a JavaScript value from a GraphQL language AST without a type.\n\nexport { valueFromASTUntyped } from \"./valueFromASTUntyped.mjs\"; // Create a GraphQL language AST from a JavaScript value.\n\nexport { astFromValue } from \"./astFromValue.mjs\"; // A helper to use within recursive-descent visitors which need to be aware of\n// the GraphQL type system.\n\nexport { TypeInfo, visitWithTypeInfo } from \"./TypeInfo.mjs\"; // Coerces a JavaScript value to a GraphQL type, or produces errors.\n\nexport { coerceInputValue } from \"./coerceInputValue.mjs\"; // Concatenates multiple AST together.\n\nexport { concatAST } from \"./concatAST.mjs\"; // Separates an AST into an AST per Operation.\n\nexport { separateOperations } from \"./separateOperations.mjs\"; // Strips characters that are not significant to the validity or execution\n// of a GraphQL document.\n\nexport { stripIgnoredCharacters } from \"./stripIgnoredCharacters.mjs\"; // Comparators for types\n\nexport { isEqualType, isTypeSubTypeOf, doTypesOverlap } from \"./typeComparators.mjs\"; // Asserts that a string is a valid GraphQL name\n\nexport { assertValidName, isValidNameError } from \"./assertValidName.mjs\"; // Compares two GraphQLSchemas and detects breaking changes.\n\nexport { BreakingChangeType, DangerousChangeType, findBreakingChanges, findDangerousChanges } from \"./findBreakingChanges.mjs\";\n// @deprecated: Report all deprecated usage within a GraphQL document.\nexport { findDeprecatedUsages } from \"./findDeprecatedUsages.mjs\";\n","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nexport function getIntrospectionQuery(options) {\n var optionsWithDefault = _objectSpread({\n descriptions: true,\n specifiedByUrl: false,\n directiveIsRepeatable: false,\n schemaDescription: false,\n inputValueDeprecation: false\n }, options);\n\n var descriptions = optionsWithDefault.descriptions ? 'description' : '';\n var specifiedByUrl = optionsWithDefault.specifiedByUrl ? 'specifiedByUrl' : '';\n var directiveIsRepeatable = optionsWithDefault.directiveIsRepeatable ? 'isRepeatable' : '';\n var schemaDescription = optionsWithDefault.schemaDescription ? descriptions : '';\n\n function inputDeprecation(str) {\n return optionsWithDefault.inputValueDeprecation ? str : '';\n }\n\n return \"\\n query IntrospectionQuery {\\n __schema {\\n \".concat(schemaDescription, \"\\n queryType { name }\\n mutationType { name }\\n subscriptionType { name }\\n types {\\n ...FullType\\n }\\n directives {\\n name\\n \").concat(descriptions, \"\\n \").concat(directiveIsRepeatable, \"\\n locations\\n args\").concat(inputDeprecation('(includeDeprecated: true)'), \" {\\n ...InputValue\\n }\\n }\\n }\\n }\\n\\n fragment FullType on __Type {\\n kind\\n name\\n \").concat(descriptions, \"\\n \").concat(specifiedByUrl, \"\\n fields(includeDeprecated: true) {\\n name\\n \").concat(descriptions, \"\\n args\").concat(inputDeprecation('(includeDeprecated: true)'), \" {\\n ...InputValue\\n }\\n type {\\n ...TypeRef\\n }\\n isDeprecated\\n deprecationReason\\n }\\n inputFields\").concat(inputDeprecation('(includeDeprecated: true)'), \" {\\n ...InputValue\\n }\\n interfaces {\\n ...TypeRef\\n }\\n enumValues(includeDeprecated: true) {\\n name\\n \").concat(descriptions, \"\\n isDeprecated\\n deprecationReason\\n }\\n possibleTypes {\\n ...TypeRef\\n }\\n }\\n\\n fragment InputValue on __InputValue {\\n name\\n \").concat(descriptions, \"\\n type { ...TypeRef }\\n defaultValue\\n \").concat(inputDeprecation('isDeprecated'), \"\\n \").concat(inputDeprecation('deprecationReason'), \"\\n }\\n\\n fragment TypeRef on __Type {\\n kind\\n name\\n ofType {\\n kind\\n name\\n ofType {\\n kind\\n name\\n ofType {\\n kind\\n name\\n ofType {\\n kind\\n name\\n ofType {\\n kind\\n name\\n ofType {\\n kind\\n name\\n ofType {\\n kind\\n name\\n }\\n }\\n }\\n }\\n }\\n }\\n }\\n }\\n \");\n}\n","import { Kind } from \"../language/kinds.mjs\";\n/**\n * Returns an operation AST given a document AST and optionally an operation\n * name. If a name is not provided, an operation is only returned if only one is\n * provided in the document.\n */\n\nexport function getOperationAST(documentAST, operationName) {\n var operation = null;\n\n for (var _i2 = 0, _documentAST$definiti2 = documentAST.definitions; _i2 < _documentAST$definiti2.length; _i2++) {\n var definition = _documentAST$definiti2[_i2];\n\n if (definition.kind === Kind.OPERATION_DEFINITION) {\n var _definition$name;\n\n if (operationName == null) {\n // If no operation name was provided, only return an Operation if there\n // is one defined in the document. Upon encountering the second, return\n // null.\n if (operation) {\n return null;\n }\n\n operation = definition;\n } else if (((_definition$name = definition.name) === null || _definition$name === void 0 ? void 0 : _definition$name.value) === operationName) {\n return definition;\n }\n }\n }\n\n return operation;\n}\n","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport invariant from \"../jsutils/invariant.mjs\";\nimport { parse } from \"../language/parser.mjs\";\nimport { executeSync } from \"../execution/execute.mjs\";\nimport { getIntrospectionQuery } from \"./getIntrospectionQuery.mjs\";\n/**\n * Build an IntrospectionQuery from a GraphQLSchema\n *\n * IntrospectionQuery is useful for utilities that care about type and field\n * relationships, but do not need to traverse through those relationships.\n *\n * This is the inverse of buildClientSchema. The primary use case is outside\n * of the server context, for instance when doing schema comparisons.\n */\n\nexport function introspectionFromSchema(schema, options) {\n var optionsWithDefaults = _objectSpread({\n specifiedByUrl: true,\n directiveIsRepeatable: true,\n schemaDescription: true,\n inputValueDeprecation: true\n }, options);\n\n var document = parse(getIntrospectionQuery(optionsWithDefaults));\n var result = executeSync({\n schema: schema,\n document: document\n });\n !result.errors && result.data || invariant(0);\n return result.data;\n}\n","import objectValues from \"../polyfills/objectValues.mjs\";\nimport inspect from \"../jsutils/inspect.mjs\";\nimport devAssert from \"../jsutils/devAssert.mjs\";\nimport keyValMap from \"../jsutils/keyValMap.mjs\";\nimport isObjectLike from \"../jsutils/isObjectLike.mjs\";\nimport { parseValue } from \"../language/parser.mjs\";\nimport { GraphQLSchema } from \"../type/schema.mjs\";\nimport { GraphQLDirective } from \"../type/directives.mjs\";\nimport { specifiedScalarTypes } from \"../type/scalars.mjs\";\nimport { introspectionTypes, TypeKind } from \"../type/introspection.mjs\";\nimport { isInputType, isOutputType, GraphQLList, GraphQLNonNull, GraphQLScalarType, GraphQLObjectType, GraphQLInterfaceType, GraphQLUnionType, GraphQLEnumType, GraphQLInputObjectType, assertNullableType, assertObjectType, assertInterfaceType } from \"../type/definition.mjs\";\nimport { valueFromAST } from \"./valueFromAST.mjs\";\n/**\n * Build a GraphQLSchema for use by client tools.\n *\n * Given the result of a client running the introspection query, creates and\n * returns a GraphQLSchema instance which can be then used with all graphql-js\n * tools, but cannot be used to execute a query, as introspection does not\n * represent the \"resolver\", \"parse\" or \"serialize\" functions or any other\n * server-internal mechanisms.\n *\n * This function expects a complete introspection result. Don't forget to check\n * the \"errors\" field of a server response before calling this function.\n */\n\nexport function buildClientSchema(introspection, options) {\n isObjectLike(introspection) && isObjectLike(introspection.__schema) || devAssert(0, \"Invalid or incomplete introspection result. Ensure that you are passing \\\"data\\\" property of introspection response and no \\\"errors\\\" was returned alongside: \".concat(inspect(introspection), \".\")); // Get the schema from the introspection result.\n\n var schemaIntrospection = introspection.__schema; // Iterate through all types, getting the type definition for each.\n\n var typeMap = keyValMap(schemaIntrospection.types, function (typeIntrospection) {\n return typeIntrospection.name;\n }, function (typeIntrospection) {\n return buildType(typeIntrospection);\n }); // Include standard types only if they are used.\n\n for (var _i2 = 0, _ref2 = [].concat(specifiedScalarTypes, introspectionTypes); _i2 < _ref2.length; _i2++) {\n var stdType = _ref2[_i2];\n\n if (typeMap[stdType.name]) {\n typeMap[stdType.name] = stdType;\n }\n } // Get the root Query, Mutation, and Subscription types.\n\n\n var queryType = schemaIntrospection.queryType ? getObjectType(schemaIntrospection.queryType) : null;\n var mutationType = schemaIntrospection.mutationType ? getObjectType(schemaIntrospection.mutationType) : null;\n var subscriptionType = schemaIntrospection.subscriptionType ? getObjectType(schemaIntrospection.subscriptionType) : null; // Get the directives supported by Introspection, assuming empty-set if\n // directives were not queried for.\n\n var directives = schemaIntrospection.directives ? schemaIntrospection.directives.map(buildDirective) : []; // Then produce and return a Schema with these types.\n\n return new GraphQLSchema({\n description: schemaIntrospection.description,\n query: queryType,\n mutation: mutationType,\n subscription: subscriptionType,\n types: objectValues(typeMap),\n directives: directives,\n assumeValid: options === null || options === void 0 ? void 0 : options.assumeValid\n }); // Given a type reference in introspection, return the GraphQLType instance.\n // preferring cached instances before building new instances.\n\n function getType(typeRef) {\n if (typeRef.kind === TypeKind.LIST) {\n var itemRef = typeRef.ofType;\n\n if (!itemRef) {\n throw new Error('Decorated type deeper than introspection query.');\n }\n\n return new GraphQLList(getType(itemRef));\n }\n\n if (typeRef.kind === TypeKind.NON_NULL) {\n var nullableRef = typeRef.ofType;\n\n if (!nullableRef) {\n throw new Error('Decorated type deeper than introspection query.');\n }\n\n var nullableType = getType(nullableRef);\n return new GraphQLNonNull(assertNullableType(nullableType));\n }\n\n return getNamedType(typeRef);\n }\n\n function getNamedType(typeRef) {\n var typeName = typeRef.name;\n\n if (!typeName) {\n throw new Error(\"Unknown type reference: \".concat(inspect(typeRef), \".\"));\n }\n\n var type = typeMap[typeName];\n\n if (!type) {\n throw new Error(\"Invalid or incomplete schema, unknown type: \".concat(typeName, \". Ensure that a full introspection query is used in order to build a client schema.\"));\n }\n\n return type;\n }\n\n function getObjectType(typeRef) {\n return assertObjectType(getNamedType(typeRef));\n }\n\n function getInterfaceType(typeRef) {\n return assertInterfaceType(getNamedType(typeRef));\n } // Given a type's introspection result, construct the correct\n // GraphQLType instance.\n\n\n function buildType(type) {\n if (type != null && type.name != null && type.kind != null) {\n switch (type.kind) {\n case TypeKind.SCALAR:\n return buildScalarDef(type);\n\n case TypeKind.OBJECT:\n return buildObjectDef(type);\n\n case TypeKind.INTERFACE:\n return buildInterfaceDef(type);\n\n case TypeKind.UNION:\n return buildUnionDef(type);\n\n case TypeKind.ENUM:\n return buildEnumDef(type);\n\n case TypeKind.INPUT_OBJECT:\n return buildInputObjectDef(type);\n }\n }\n\n var typeStr = inspect(type);\n throw new Error(\"Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: \".concat(typeStr, \".\"));\n }\n\n function buildScalarDef(scalarIntrospection) {\n return new GraphQLScalarType({\n name: scalarIntrospection.name,\n description: scalarIntrospection.description,\n specifiedByUrl: scalarIntrospection.specifiedByUrl\n });\n }\n\n function buildImplementationsList(implementingIntrospection) {\n // TODO: Temporary workaround until GraphQL ecosystem will fully support\n // 'interfaces' on interface types.\n if (implementingIntrospection.interfaces === null && implementingIntrospection.kind === TypeKind.INTERFACE) {\n return [];\n }\n\n if (!implementingIntrospection.interfaces) {\n var implementingIntrospectionStr = inspect(implementingIntrospection);\n throw new Error(\"Introspection result missing interfaces: \".concat(implementingIntrospectionStr, \".\"));\n }\n\n return implementingIntrospection.interfaces.map(getInterfaceType);\n }\n\n function buildObjectDef(objectIntrospection) {\n return new GraphQLObjectType({\n name: objectIntrospection.name,\n description: objectIntrospection.description,\n interfaces: function interfaces() {\n return buildImplementationsList(objectIntrospection);\n },\n fields: function fields() {\n return buildFieldDefMap(objectIntrospection);\n }\n });\n }\n\n function buildInterfaceDef(interfaceIntrospection) {\n return new GraphQLInterfaceType({\n name: interfaceIntrospection.name,\n description: interfaceIntrospection.description,\n interfaces: function interfaces() {\n return buildImplementationsList(interfaceIntrospection);\n },\n fields: function fields() {\n return buildFieldDefMap(interfaceIntrospection);\n }\n });\n }\n\n function buildUnionDef(unionIntrospection) {\n if (!unionIntrospection.possibleTypes) {\n var unionIntrospectionStr = inspect(unionIntrospection);\n throw new Error(\"Introspection result missing possibleTypes: \".concat(unionIntrospectionStr, \".\"));\n }\n\n return new GraphQLUnionType({\n name: unionIntrospection.name,\n description: unionIntrospection.description,\n types: function types() {\n return unionIntrospection.possibleTypes.map(getObjectType);\n }\n });\n }\n\n function buildEnumDef(enumIntrospection) {\n if (!enumIntrospection.enumValues) {\n var enumIntrospectionStr = inspect(enumIntrospection);\n throw new Error(\"Introspection result missing enumValues: \".concat(enumIntrospectionStr, \".\"));\n }\n\n return new GraphQLEnumType({\n name: enumIntrospection.name,\n description: enumIntrospection.description,\n values: keyValMap(enumIntrospection.enumValues, function (valueIntrospection) {\n return valueIntrospection.name;\n }, function (valueIntrospection) {\n return {\n description: valueIntrospection.description,\n deprecationReason: valueIntrospection.deprecationReason\n };\n })\n });\n }\n\n function buildInputObjectDef(inputObjectIntrospection) {\n if (!inputObjectIntrospection.inputFields) {\n var inputObjectIntrospectionStr = inspect(inputObjectIntrospection);\n throw new Error(\"Introspection result missing inputFields: \".concat(inputObjectIntrospectionStr, \".\"));\n }\n\n return new GraphQLInputObjectType({\n name: inputObjectIntrospection.name,\n description: inputObjectIntrospection.description,\n fields: function fields() {\n return buildInputValueDefMap(inputObjectIntrospection.inputFields);\n }\n });\n }\n\n function buildFieldDefMap(typeIntrospection) {\n if (!typeIntrospection.fields) {\n throw new Error(\"Introspection result missing fields: \".concat(inspect(typeIntrospection), \".\"));\n }\n\n return keyValMap(typeIntrospection.fields, function (fieldIntrospection) {\n return fieldIntrospection.name;\n }, buildField);\n }\n\n function buildField(fieldIntrospection) {\n var type = getType(fieldIntrospection.type);\n\n if (!isOutputType(type)) {\n var typeStr = inspect(type);\n throw new Error(\"Introspection must provide output type for fields, but received: \".concat(typeStr, \".\"));\n }\n\n if (!fieldIntrospection.args) {\n var fieldIntrospectionStr = inspect(fieldIntrospection);\n throw new Error(\"Introspection result missing field args: \".concat(fieldIntrospectionStr, \".\"));\n }\n\n return {\n description: fieldIntrospection.description,\n deprecationReason: fieldIntrospection.deprecationReason,\n type: type,\n args: buildInputValueDefMap(fieldIntrospection.args)\n };\n }\n\n function buildInputValueDefMap(inputValueIntrospections) {\n return keyValMap(inputValueIntrospections, function (inputValue) {\n return inputValue.name;\n }, buildInputValue);\n }\n\n function buildInputValue(inputValueIntrospection) {\n var type = getType(inputValueIntrospection.type);\n\n if (!isInputType(type)) {\n var typeStr = inspect(type);\n throw new Error(\"Introspection must provide input type for arguments, but received: \".concat(typeStr, \".\"));\n }\n\n var defaultValue = inputValueIntrospection.defaultValue != null ? valueFromAST(parseValue(inputValueIntrospection.defaultValue), type) : undefined;\n return {\n description: inputValueIntrospection.description,\n type: type,\n defaultValue: defaultValue,\n deprecationReason: inputValueIntrospection.deprecationReason\n };\n }\n\n function buildDirective(directiveIntrospection) {\n if (!directiveIntrospection.args) {\n var directiveIntrospectionStr = inspect(directiveIntrospection);\n throw new Error(\"Introspection result missing directive args: \".concat(directiveIntrospectionStr, \".\"));\n }\n\n if (!directiveIntrospection.locations) {\n var _directiveIntrospectionStr = inspect(directiveIntrospection);\n\n throw new Error(\"Introspection result missing directive locations: \".concat(_directiveIntrospectionStr, \".\"));\n }\n\n return new GraphQLDirective({\n name: directiveIntrospection.name,\n description: directiveIntrospection.description,\n isRepeatable: directiveIntrospection.isRepeatable,\n locations: directiveIntrospection.locations.slice(),\n args: buildInputValueDefMap(directiveIntrospection.args)\n });\n }\n}\n","import devAssert from \"../jsutils/devAssert.mjs\";\nimport { Kind } from \"../language/kinds.mjs\";\nimport { parse } from \"../language/parser.mjs\";\nimport { assertValidSDL } from \"../validation/validate.mjs\";\nimport { GraphQLSchema } from \"../type/schema.mjs\";\nimport { specifiedDirectives } from \"../type/directives.mjs\";\nimport { extendSchemaImpl } from \"./extendSchema.mjs\";\n\n/**\n * This takes the ast of a schema document produced by the parse function in\n * src/language/parser.js.\n *\n * If no schema definition is provided, then it will look for types named Query\n * and Mutation.\n *\n * Given that AST it constructs a GraphQLSchema. The resulting schema\n * has no resolve methods, so execution will use default resolvers.\n *\n * Accepts options as a second argument:\n *\n * - commentDescriptions:\n * Provide true to use preceding comments as the description.\n *\n */\nexport function buildASTSchema(documentAST, options) {\n documentAST != null && documentAST.kind === Kind.DOCUMENT || devAssert(0, 'Must provide valid Document AST.');\n\n if ((options === null || options === void 0 ? void 0 : options.assumeValid) !== true && (options === null || options === void 0 ? void 0 : options.assumeValidSDL) !== true) {\n assertValidSDL(documentAST);\n }\n\n var emptySchemaConfig = {\n description: undefined,\n types: [],\n directives: [],\n extensions: undefined,\n extensionASTNodes: [],\n assumeValid: false\n };\n var config = extendSchemaImpl(emptySchemaConfig, documentAST, options);\n\n if (config.astNode == null) {\n for (var _i2 = 0, _config$types2 = config.types; _i2 < _config$types2.length; _i2++) {\n var type = _config$types2[_i2];\n\n switch (type.name) {\n // Note: While this could make early assertions to get the correctly\n // typed values below, that would throw immediately while type system\n // validation with validateSchema() will produce more actionable results.\n case 'Query':\n config.query = type;\n break;\n\n case 'Mutation':\n config.mutation = type;\n break;\n\n case 'Subscription':\n config.subscription = type;\n break;\n }\n }\n }\n\n var directives = config.directives; // If specified directives were not explicitly declared, add them.\n\n var _loop = function _loop(_i4) {\n var stdDirective = specifiedDirectives[_i4];\n\n if (directives.every(function (directive) {\n return directive.name !== stdDirective.name;\n })) {\n directives.push(stdDirective);\n }\n };\n\n for (var _i4 = 0; _i4 < specifiedDirectives.length; _i4++) {\n _loop(_i4);\n }\n\n return new GraphQLSchema(config);\n}\n/**\n * A helper function to build a GraphQLSchema directly from a source\n * document.\n */\n\nexport function buildSchema(source, options) {\n var document = parse(source, {\n noLocation: options === null || options === void 0 ? void 0 : options.noLocation,\n allowLegacySDLEmptyFields: options === null || options === void 0 ? void 0 : options.allowLegacySDLEmptyFields,\n allowLegacySDLImplementsInterfaces: options === null || options === void 0 ? void 0 : options.allowLegacySDLImplementsInterfaces,\n experimentalFragmentVariables: options === null || options === void 0 ? void 0 : options.experimentalFragmentVariables\n });\n return buildASTSchema(document, {\n commentDescriptions: options === null || options === void 0 ? void 0 : options.commentDescriptions,\n assumeValidSDL: options === null || options === void 0 ? void 0 : options.assumeValidSDL,\n assumeValid: options === null || options === void 0 ? void 0 : options.assumeValid\n });\n}\n","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport objectValues from \"../polyfills/objectValues.mjs\";\nimport keyMap from \"../jsutils/keyMap.mjs\";\nimport inspect from \"../jsutils/inspect.mjs\";\nimport mapValue from \"../jsutils/mapValue.mjs\";\nimport invariant from \"../jsutils/invariant.mjs\";\nimport devAssert from \"../jsutils/devAssert.mjs\";\nimport { Kind } from \"../language/kinds.mjs\";\nimport { TokenKind } from \"../language/tokenKind.mjs\";\nimport { dedentBlockStringValue } from \"../language/blockString.mjs\";\nimport { isTypeDefinitionNode, isTypeExtensionNode } from \"../language/predicates.mjs\";\nimport { assertValidSDLExtension } from \"../validation/validate.mjs\";\nimport { getDirectiveValues } from \"../execution/values.mjs\";\nimport { assertSchema, GraphQLSchema } from \"../type/schema.mjs\";\nimport { specifiedScalarTypes, isSpecifiedScalarType } from \"../type/scalars.mjs\";\nimport { introspectionTypes, isIntrospectionType } from \"../type/introspection.mjs\";\nimport { GraphQLDirective, GraphQLDeprecatedDirective, GraphQLSpecifiedByDirective } from \"../type/directives.mjs\";\nimport { isScalarType, isObjectType, isInterfaceType, isUnionType, isListType, isNonNullType, isEnumType, isInputObjectType, GraphQLList, GraphQLNonNull, GraphQLScalarType, GraphQLObjectType, GraphQLInterfaceType, GraphQLUnionType, GraphQLEnumType, GraphQLInputObjectType } from \"../type/definition.mjs\";\nimport { valueFromAST } from \"./valueFromAST.mjs\";\n\n/**\n * Produces a new schema given an existing schema and a document which may\n * contain GraphQL type extensions and definitions. The original schema will\n * remain unaltered.\n *\n * Because a schema represents a graph of references, a schema cannot be\n * extended without effectively making an entire copy. We do not know until it's\n * too late if subgraphs remain unchanged.\n *\n * This algorithm copies the provided schema, applying extensions while\n * producing the copy. The original schema remains unaltered.\n *\n * Accepts options as a third argument:\n *\n * - commentDescriptions:\n * Provide true to use preceding comments as the description.\n *\n */\nexport function extendSchema(schema, documentAST, options) {\n assertSchema(schema);\n documentAST != null && documentAST.kind === Kind.DOCUMENT || devAssert(0, 'Must provide valid Document AST.');\n\n if ((options === null || options === void 0 ? void 0 : options.assumeValid) !== true && (options === null || options === void 0 ? void 0 : options.assumeValidSDL) !== true) {\n assertValidSDLExtension(documentAST, schema);\n }\n\n var schemaConfig = schema.toConfig();\n var extendedConfig = extendSchemaImpl(schemaConfig, documentAST, options);\n return schemaConfig === extendedConfig ? schema : new GraphQLSchema(extendedConfig);\n}\n/**\n * @internal\n */\n\nexport function extendSchemaImpl(schemaConfig, documentAST, options) {\n var _schemaDef, _schemaDef$descriptio, _schemaDef2, _options$assumeValid;\n\n // Collect the type definitions and extensions found in the document.\n var typeDefs = [];\n var typeExtensionsMap = Object.create(null); // New directives and types are separate because a directives and types can\n // have the same name. For example, a type named \"skip\".\n\n var directiveDefs = [];\n var schemaDef; // Schema extensions are collected which may add additional operation types.\n\n var schemaExtensions = [];\n\n for (var _i2 = 0, _documentAST$definiti2 = documentAST.definitions; _i2 < _documentAST$definiti2.length; _i2++) {\n var def = _documentAST$definiti2[_i2];\n\n if (def.kind === Kind.SCHEMA_DEFINITION) {\n schemaDef = def;\n } else if (def.kind === Kind.SCHEMA_EXTENSION) {\n schemaExtensions.push(def);\n } else if (isTypeDefinitionNode(def)) {\n typeDefs.push(def);\n } else if (isTypeExtensionNode(def)) {\n var extendedTypeName = def.name.value;\n var existingTypeExtensions = typeExtensionsMap[extendedTypeName];\n typeExtensionsMap[extendedTypeName] = existingTypeExtensions ? existingTypeExtensions.concat([def]) : [def];\n } else if (def.kind === Kind.DIRECTIVE_DEFINITION) {\n directiveDefs.push(def);\n }\n } // If this document contains no new types, extensions, or directives then\n // return the same unmodified GraphQLSchema instance.\n\n\n if (Object.keys(typeExtensionsMap).length === 0 && typeDefs.length === 0 && directiveDefs.length === 0 && schemaExtensions.length === 0 && schemaDef == null) {\n return schemaConfig;\n }\n\n var typeMap = Object.create(null);\n\n for (var _i4 = 0, _schemaConfig$types2 = schemaConfig.types; _i4 < _schemaConfig$types2.length; _i4++) {\n var existingType = _schemaConfig$types2[_i4];\n typeMap[existingType.name] = extendNamedType(existingType);\n }\n\n for (var _i6 = 0; _i6 < typeDefs.length; _i6++) {\n var _stdTypeMap$name;\n\n var typeNode = typeDefs[_i6];\n var name = typeNode.name.value;\n typeMap[name] = (_stdTypeMap$name = stdTypeMap[name]) !== null && _stdTypeMap$name !== void 0 ? _stdTypeMap$name : buildType(typeNode);\n }\n\n var operationTypes = _objectSpread(_objectSpread({\n // Get the extended root operation types.\n query: schemaConfig.query && replaceNamedType(schemaConfig.query),\n mutation: schemaConfig.mutation && replaceNamedType(schemaConfig.mutation),\n subscription: schemaConfig.subscription && replaceNamedType(schemaConfig.subscription)\n }, schemaDef && getOperationTypes([schemaDef])), getOperationTypes(schemaExtensions)); // Then produce and return a Schema config with these types.\n\n\n return _objectSpread(_objectSpread({\n description: (_schemaDef = schemaDef) === null || _schemaDef === void 0 ? void 0 : (_schemaDef$descriptio = _schemaDef.description) === null || _schemaDef$descriptio === void 0 ? void 0 : _schemaDef$descriptio.value\n }, operationTypes), {}, {\n types: objectValues(typeMap),\n directives: [].concat(schemaConfig.directives.map(replaceDirective), directiveDefs.map(buildDirective)),\n extensions: undefined,\n astNode: (_schemaDef2 = schemaDef) !== null && _schemaDef2 !== void 0 ? _schemaDef2 : schemaConfig.astNode,\n extensionASTNodes: schemaConfig.extensionASTNodes.concat(schemaExtensions),\n assumeValid: (_options$assumeValid = options === null || options === void 0 ? void 0 : options.assumeValid) !== null && _options$assumeValid !== void 0 ? _options$assumeValid : false\n }); // Below are functions used for producing this schema that have closed over\n // this scope and have access to the schema, cache, and newly defined types.\n\n function replaceType(type) {\n if (isListType(type)) {\n // $FlowFixMe[incompatible-return]\n return new GraphQLList(replaceType(type.ofType));\n }\n\n if (isNonNullType(type)) {\n // $FlowFixMe[incompatible-return]\n return new GraphQLNonNull(replaceType(type.ofType));\n }\n\n return replaceNamedType(type);\n }\n\n function replaceNamedType(type) {\n // Note: While this could make early assertions to get the correctly\n // typed values, that would throw immediately while type system\n // validation with validateSchema() will produce more actionable results.\n return typeMap[type.name];\n }\n\n function replaceDirective(directive) {\n var config = directive.toConfig();\n return new GraphQLDirective(_objectSpread(_objectSpread({}, config), {}, {\n args: mapValue(config.args, extendArg)\n }));\n }\n\n function extendNamedType(type) {\n if (isIntrospectionType(type) || isSpecifiedScalarType(type)) {\n // Builtin types are not extended.\n return type;\n }\n\n if (isScalarType(type)) {\n return extendScalarType(type);\n }\n\n if (isObjectType(type)) {\n return extendObjectType(type);\n }\n\n if (isInterfaceType(type)) {\n return extendInterfaceType(type);\n }\n\n if (isUnionType(type)) {\n return extendUnionType(type);\n }\n\n if (isEnumType(type)) {\n return extendEnumType(type);\n } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')\n\n\n if (isInputObjectType(type)) {\n return extendInputObjectType(type);\n } // istanbul ignore next (Not reachable. All possible types have been considered)\n\n\n false || invariant(0, 'Unexpected type: ' + inspect(type));\n }\n\n function extendInputObjectType(type) {\n var _typeExtensionsMap$co;\n\n var config = type.toConfig();\n var extensions = (_typeExtensionsMap$co = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co !== void 0 ? _typeExtensionsMap$co : [];\n return new GraphQLInputObjectType(_objectSpread(_objectSpread({}, config), {}, {\n fields: function fields() {\n return _objectSpread(_objectSpread({}, mapValue(config.fields, function (field) {\n return _objectSpread(_objectSpread({}, field), {}, {\n type: replaceType(field.type)\n });\n })), buildInputFieldMap(extensions));\n },\n extensionASTNodes: config.extensionASTNodes.concat(extensions)\n }));\n }\n\n function extendEnumType(type) {\n var _typeExtensionsMap$ty;\n\n var config = type.toConfig();\n var extensions = (_typeExtensionsMap$ty = typeExtensionsMap[type.name]) !== null && _typeExtensionsMap$ty !== void 0 ? _typeExtensionsMap$ty : [];\n return new GraphQLEnumType(_objectSpread(_objectSpread({}, config), {}, {\n values: _objectSpread(_objectSpread({}, config.values), buildEnumValueMap(extensions)),\n extensionASTNodes: config.extensionASTNodes.concat(extensions)\n }));\n }\n\n function extendScalarType(type) {\n var _typeExtensionsMap$co2;\n\n var config = type.toConfig();\n var extensions = (_typeExtensionsMap$co2 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co2 !== void 0 ? _typeExtensionsMap$co2 : [];\n var specifiedByUrl = config.specifiedByUrl;\n\n for (var _i8 = 0; _i8 < extensions.length; _i8++) {\n var _getSpecifiedByUrl;\n\n var extensionNode = extensions[_i8];\n specifiedByUrl = (_getSpecifiedByUrl = getSpecifiedByUrl(extensionNode)) !== null && _getSpecifiedByUrl !== void 0 ? _getSpecifiedByUrl : specifiedByUrl;\n }\n\n return new GraphQLScalarType(_objectSpread(_objectSpread({}, config), {}, {\n specifiedByUrl: specifiedByUrl,\n extensionASTNodes: config.extensionASTNodes.concat(extensions)\n }));\n }\n\n function extendObjectType(type) {\n var _typeExtensionsMap$co3;\n\n var config = type.toConfig();\n var extensions = (_typeExtensionsMap$co3 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co3 !== void 0 ? _typeExtensionsMap$co3 : [];\n return new GraphQLObjectType(_objectSpread(_objectSpread({}, config), {}, {\n interfaces: function interfaces() {\n return [].concat(type.getInterfaces().map(replaceNamedType), buildInterfaces(extensions));\n },\n fields: function fields() {\n return _objectSpread(_objectSpread({}, mapValue(config.fields, extendField)), buildFieldMap(extensions));\n },\n extensionASTNodes: config.extensionASTNodes.concat(extensions)\n }));\n }\n\n function extendInterfaceType(type) {\n var _typeExtensionsMap$co4;\n\n var config = type.toConfig();\n var extensions = (_typeExtensionsMap$co4 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co4 !== void 0 ? _typeExtensionsMap$co4 : [];\n return new GraphQLInterfaceType(_objectSpread(_objectSpread({}, config), {}, {\n interfaces: function interfaces() {\n return [].concat(type.getInterfaces().map(replaceNamedType), buildInterfaces(extensions));\n },\n fields: function fields() {\n return _objectSpread(_objectSpread({}, mapValue(config.fields, extendField)), buildFieldMap(extensions));\n },\n extensionASTNodes: config.extensionASTNodes.concat(extensions)\n }));\n }\n\n function extendUnionType(type) {\n var _typeExtensionsMap$co5;\n\n var config = type.toConfig();\n var extensions = (_typeExtensionsMap$co5 = typeExtensionsMap[config.name]) !== null && _typeExtensionsMap$co5 !== void 0 ? _typeExtensionsMap$co5 : [];\n return new GraphQLUnionType(_objectSpread(_objectSpread({}, config), {}, {\n types: function types() {\n return [].concat(type.getTypes().map(replaceNamedType), buildUnionTypes(extensions));\n },\n extensionASTNodes: config.extensionASTNodes.concat(extensions)\n }));\n }\n\n function extendField(field) {\n return _objectSpread(_objectSpread({}, field), {}, {\n type: replaceType(field.type),\n // $FlowFixMe[incompatible-call]\n args: mapValue(field.args, extendArg)\n });\n }\n\n function extendArg(arg) {\n return _objectSpread(_objectSpread({}, arg), {}, {\n type: replaceType(arg.type)\n });\n }\n\n function getOperationTypes(nodes) {\n var opTypes = {};\n\n for (var _i10 = 0; _i10 < nodes.length; _i10++) {\n var _node$operationTypes;\n\n var node = nodes[_i10];\n // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n var operationTypesNodes = (_node$operationTypes = node.operationTypes) !== null && _node$operationTypes !== void 0 ? _node$operationTypes : [];\n\n for (var _i12 = 0; _i12 < operationTypesNodes.length; _i12++) {\n var operationType = operationTypesNodes[_i12];\n opTypes[operationType.operation] = getNamedType(operationType.type);\n }\n } // Note: While this could make early assertions to get the correctly\n // typed values below, that would throw immediately while type system\n // validation with validateSchema() will produce more actionable results.\n\n\n return opTypes;\n }\n\n function getNamedType(node) {\n var _stdTypeMap$name2;\n\n var name = node.name.value;\n var type = (_stdTypeMap$name2 = stdTypeMap[name]) !== null && _stdTypeMap$name2 !== void 0 ? _stdTypeMap$name2 : typeMap[name];\n\n if (type === undefined) {\n throw new Error(\"Unknown type: \\\"\".concat(name, \"\\\".\"));\n }\n\n return type;\n }\n\n function getWrappedType(node) {\n if (node.kind === Kind.LIST_TYPE) {\n return new GraphQLList(getWrappedType(node.type));\n }\n\n if (node.kind === Kind.NON_NULL_TYPE) {\n return new GraphQLNonNull(getWrappedType(node.type));\n }\n\n return getNamedType(node);\n }\n\n function buildDirective(node) {\n var locations = node.locations.map(function (_ref) {\n var value = _ref.value;\n return value;\n });\n return new GraphQLDirective({\n name: node.name.value,\n description: getDescription(node, options),\n locations: locations,\n isRepeatable: node.repeatable,\n args: buildArgumentMap(node.arguments),\n astNode: node\n });\n }\n\n function buildFieldMap(nodes) {\n var fieldConfigMap = Object.create(null);\n\n for (var _i14 = 0; _i14 < nodes.length; _i14++) {\n var _node$fields;\n\n var node = nodes[_i14];\n // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n var nodeFields = (_node$fields = node.fields) !== null && _node$fields !== void 0 ? _node$fields : [];\n\n for (var _i16 = 0; _i16 < nodeFields.length; _i16++) {\n var field = nodeFields[_i16];\n fieldConfigMap[field.name.value] = {\n // Note: While this could make assertions to get the correctly typed\n // value, that would throw immediately while type system validation\n // with validateSchema() will produce more actionable results.\n type: getWrappedType(field.type),\n description: getDescription(field, options),\n args: buildArgumentMap(field.arguments),\n deprecationReason: getDeprecationReason(field),\n astNode: field\n };\n }\n }\n\n return fieldConfigMap;\n }\n\n function buildArgumentMap(args) {\n // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n var argsNodes = args !== null && args !== void 0 ? args : [];\n var argConfigMap = Object.create(null);\n\n for (var _i18 = 0; _i18 < argsNodes.length; _i18++) {\n var arg = argsNodes[_i18];\n // Note: While this could make assertions to get the correctly typed\n // value, that would throw immediately while type system validation\n // with validateSchema() will produce more actionable results.\n var type = getWrappedType(arg.type);\n argConfigMap[arg.name.value] = {\n type: type,\n description: getDescription(arg, options),\n defaultValue: valueFromAST(arg.defaultValue, type),\n deprecationReason: getDeprecationReason(arg),\n astNode: arg\n };\n }\n\n return argConfigMap;\n }\n\n function buildInputFieldMap(nodes) {\n var inputFieldMap = Object.create(null);\n\n for (var _i20 = 0; _i20 < nodes.length; _i20++) {\n var _node$fields2;\n\n var node = nodes[_i20];\n // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n var fieldsNodes = (_node$fields2 = node.fields) !== null && _node$fields2 !== void 0 ? _node$fields2 : [];\n\n for (var _i22 = 0; _i22 < fieldsNodes.length; _i22++) {\n var field = fieldsNodes[_i22];\n // Note: While this could make assertions to get the correctly typed\n // value, that would throw immediately while type system validation\n // with validateSchema() will produce more actionable results.\n var type = getWrappedType(field.type);\n inputFieldMap[field.name.value] = {\n type: type,\n description: getDescription(field, options),\n defaultValue: valueFromAST(field.defaultValue, type),\n deprecationReason: getDeprecationReason(field),\n astNode: field\n };\n }\n }\n\n return inputFieldMap;\n }\n\n function buildEnumValueMap(nodes) {\n var enumValueMap = Object.create(null);\n\n for (var _i24 = 0; _i24 < nodes.length; _i24++) {\n var _node$values;\n\n var node = nodes[_i24];\n // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n var valuesNodes = (_node$values = node.values) !== null && _node$values !== void 0 ? _node$values : [];\n\n for (var _i26 = 0; _i26 < valuesNodes.length; _i26++) {\n var value = valuesNodes[_i26];\n enumValueMap[value.name.value] = {\n description: getDescription(value, options),\n deprecationReason: getDeprecationReason(value),\n astNode: value\n };\n }\n }\n\n return enumValueMap;\n }\n\n function buildInterfaces(nodes) {\n var interfaces = [];\n\n for (var _i28 = 0; _i28 < nodes.length; _i28++) {\n var _node$interfaces;\n\n var node = nodes[_i28];\n // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n var interfacesNodes = (_node$interfaces = node.interfaces) !== null && _node$interfaces !== void 0 ? _node$interfaces : [];\n\n for (var _i30 = 0; _i30 < interfacesNodes.length; _i30++) {\n var type = interfacesNodes[_i30];\n // Note: While this could make assertions to get the correctly typed\n // values below, that would throw immediately while type system\n // validation with validateSchema() will produce more actionable\n // results.\n interfaces.push(getNamedType(type));\n }\n }\n\n return interfaces;\n }\n\n function buildUnionTypes(nodes) {\n var types = [];\n\n for (var _i32 = 0; _i32 < nodes.length; _i32++) {\n var _node$types;\n\n var node = nodes[_i32];\n // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2203')\n var typeNodes = (_node$types = node.types) !== null && _node$types !== void 0 ? _node$types : [];\n\n for (var _i34 = 0; _i34 < typeNodes.length; _i34++) {\n var type = typeNodes[_i34];\n // Note: While this could make assertions to get the correctly typed\n // values below, that would throw immediately while type system\n // validation with validateSchema() will produce more actionable\n // results.\n types.push(getNamedType(type));\n }\n }\n\n return types;\n }\n\n function buildType(astNode) {\n var _typeExtensionsMap$na;\n\n var name = astNode.name.value;\n var description = getDescription(astNode, options);\n var extensionNodes = (_typeExtensionsMap$na = typeExtensionsMap[name]) !== null && _typeExtensionsMap$na !== void 0 ? _typeExtensionsMap$na : [];\n\n switch (astNode.kind) {\n case Kind.OBJECT_TYPE_DEFINITION:\n {\n var extensionASTNodes = extensionNodes;\n var allNodes = [astNode].concat(extensionASTNodes);\n return new GraphQLObjectType({\n name: name,\n description: description,\n interfaces: function interfaces() {\n return buildInterfaces(allNodes);\n },\n fields: function fields() {\n return buildFieldMap(allNodes);\n },\n astNode: astNode,\n extensionASTNodes: extensionASTNodes\n });\n }\n\n case Kind.INTERFACE_TYPE_DEFINITION:\n {\n var _extensionASTNodes = extensionNodes;\n\n var _allNodes = [astNode].concat(_extensionASTNodes);\n\n return new GraphQLInterfaceType({\n name: name,\n description: description,\n interfaces: function interfaces() {\n return buildInterfaces(_allNodes);\n },\n fields: function fields() {\n return buildFieldMap(_allNodes);\n },\n astNode: astNode,\n extensionASTNodes: _extensionASTNodes\n });\n }\n\n case Kind.ENUM_TYPE_DEFINITION:\n {\n var _extensionASTNodes2 = extensionNodes;\n\n var _allNodes2 = [astNode].concat(_extensionASTNodes2);\n\n return new GraphQLEnumType({\n name: name,\n description: description,\n values: buildEnumValueMap(_allNodes2),\n astNode: astNode,\n extensionASTNodes: _extensionASTNodes2\n });\n }\n\n case Kind.UNION_TYPE_DEFINITION:\n {\n var _extensionASTNodes3 = extensionNodes;\n\n var _allNodes3 = [astNode].concat(_extensionASTNodes3);\n\n return new GraphQLUnionType({\n name: name,\n description: description,\n types: function types() {\n return buildUnionTypes(_allNodes3);\n },\n astNode: astNode,\n extensionASTNodes: _extensionASTNodes3\n });\n }\n\n case Kind.SCALAR_TYPE_DEFINITION:\n {\n var _extensionASTNodes4 = extensionNodes;\n return new GraphQLScalarType({\n name: name,\n description: description,\n specifiedByUrl: getSpecifiedByUrl(astNode),\n astNode: astNode,\n extensionASTNodes: _extensionASTNodes4\n });\n }\n\n case Kind.INPUT_OBJECT_TYPE_DEFINITION:\n {\n var _extensionASTNodes5 = extensionNodes;\n\n var _allNodes4 = [astNode].concat(_extensionASTNodes5);\n\n return new GraphQLInputObjectType({\n name: name,\n description: description,\n fields: function fields() {\n return buildInputFieldMap(_allNodes4);\n },\n astNode: astNode,\n extensionASTNodes: _extensionASTNodes5\n });\n }\n } // istanbul ignore next (Not reachable. All possible type definition nodes have been considered)\n\n\n false || invariant(0, 'Unexpected type definition node: ' + inspect(astNode));\n }\n}\nvar stdTypeMap = keyMap(specifiedScalarTypes.concat(introspectionTypes), function (type) {\n return type.name;\n});\n/**\n * Given a field or enum value node, returns the string value for the\n * deprecation reason.\n */\n\nfunction getDeprecationReason(node) {\n var deprecated = getDirectiveValues(GraphQLDeprecatedDirective, node);\n return deprecated === null || deprecated === void 0 ? void 0 : deprecated.reason;\n}\n/**\n * Given a scalar node, returns the string value for the specifiedByUrl.\n */\n\n\nfunction getSpecifiedByUrl(node) {\n var specifiedBy = getDirectiveValues(GraphQLSpecifiedByDirective, node);\n return specifiedBy === null || specifiedBy === void 0 ? void 0 : specifiedBy.url;\n}\n/**\n * Given an ast node, returns its string description.\n * @deprecated: provided to ease adoption and will be removed in v16.\n *\n * Accepts options as a second argument:\n *\n * - commentDescriptions:\n * Provide true to use preceding comments as the description.\n *\n */\n\n\nexport function getDescription(node, options) {\n if (node.description) {\n return node.description.value;\n }\n\n if ((options === null || options === void 0 ? void 0 : options.commentDescriptions) === true) {\n var rawValue = getLeadingCommentBlock(node);\n\n if (rawValue !== undefined) {\n return dedentBlockStringValue('\\n' + rawValue);\n }\n }\n}\n\nfunction getLeadingCommentBlock(node) {\n var loc = node.loc;\n\n if (!loc) {\n return;\n }\n\n var comments = [];\n var token = loc.startToken.prev;\n\n while (token != null && token.kind === TokenKind.COMMENT && token.next && token.prev && token.line + 1 === token.next.line && token.line !== token.prev.line) {\n var value = String(token.value);\n comments.push(value);\n token = token.prev;\n }\n\n return comments.length > 0 ? comments.reverse().join('\\n') : undefined;\n}\n","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport objectValues from \"../polyfills/objectValues.mjs\";\nimport inspect from \"../jsutils/inspect.mjs\";\nimport invariant from \"../jsutils/invariant.mjs\";\nimport keyValMap from \"../jsutils/keyValMap.mjs\";\nimport naturalCompare from \"../jsutils/naturalCompare.mjs\";\nimport { GraphQLSchema } from \"../type/schema.mjs\";\nimport { GraphQLDirective } from \"../type/directives.mjs\";\nimport { isIntrospectionType } from \"../type/introspection.mjs\";\nimport { GraphQLList, GraphQLNonNull, GraphQLObjectType, GraphQLInterfaceType, GraphQLUnionType, GraphQLEnumType, GraphQLInputObjectType, isListType, isNonNullType, isScalarType, isObjectType, isInterfaceType, isUnionType, isEnumType, isInputObjectType } from \"../type/definition.mjs\";\n/**\n * Sort GraphQLSchema.\n *\n * This function returns a sorted copy of the given GraphQLSchema.\n */\n\nexport function lexicographicSortSchema(schema) {\n var schemaConfig = schema.toConfig();\n var typeMap = keyValMap(sortByName(schemaConfig.types), function (type) {\n return type.name;\n }, sortNamedType);\n return new GraphQLSchema(_objectSpread(_objectSpread({}, schemaConfig), {}, {\n types: objectValues(typeMap),\n directives: sortByName(schemaConfig.directives).map(sortDirective),\n query: replaceMaybeType(schemaConfig.query),\n mutation: replaceMaybeType(schemaConfig.mutation),\n subscription: replaceMaybeType(schemaConfig.subscription)\n }));\n\n function replaceType(type) {\n if (isListType(type)) {\n // $FlowFixMe[incompatible-return]\n return new GraphQLList(replaceType(type.ofType));\n } else if (isNonNullType(type)) {\n // $FlowFixMe[incompatible-return]\n return new GraphQLNonNull(replaceType(type.ofType));\n }\n\n return replaceNamedType(type);\n }\n\n function replaceNamedType(type) {\n return typeMap[type.name];\n }\n\n function replaceMaybeType(maybeType) {\n return maybeType && replaceNamedType(maybeType);\n }\n\n function sortDirective(directive) {\n var config = directive.toConfig();\n return new GraphQLDirective(_objectSpread(_objectSpread({}, config), {}, {\n locations: sortBy(config.locations, function (x) {\n return x;\n }),\n args: sortArgs(config.args)\n }));\n }\n\n function sortArgs(args) {\n return sortObjMap(args, function (arg) {\n return _objectSpread(_objectSpread({}, arg), {}, {\n type: replaceType(arg.type)\n });\n });\n }\n\n function sortFields(fieldsMap) {\n return sortObjMap(fieldsMap, function (field) {\n return _objectSpread(_objectSpread({}, field), {}, {\n type: replaceType(field.type),\n args: sortArgs(field.args)\n });\n });\n }\n\n function sortInputFields(fieldsMap) {\n return sortObjMap(fieldsMap, function (field) {\n return _objectSpread(_objectSpread({}, field), {}, {\n type: replaceType(field.type)\n });\n });\n }\n\n function sortTypes(arr) {\n return sortByName(arr).map(replaceNamedType);\n }\n\n function sortNamedType(type) {\n if (isScalarType(type) || isIntrospectionType(type)) {\n return type;\n }\n\n if (isObjectType(type)) {\n var config = type.toConfig();\n return new GraphQLObjectType(_objectSpread(_objectSpread({}, config), {}, {\n interfaces: function interfaces() {\n return sortTypes(config.interfaces);\n },\n fields: function fields() {\n return sortFields(config.fields);\n }\n }));\n }\n\n if (isInterfaceType(type)) {\n var _config = type.toConfig();\n\n return new GraphQLInterfaceType(_objectSpread(_objectSpread({}, _config), {}, {\n interfaces: function interfaces() {\n return sortTypes(_config.interfaces);\n },\n fields: function fields() {\n return sortFields(_config.fields);\n }\n }));\n }\n\n if (isUnionType(type)) {\n var _config2 = type.toConfig();\n\n return new GraphQLUnionType(_objectSpread(_objectSpread({}, _config2), {}, {\n types: function types() {\n return sortTypes(_config2.types);\n }\n }));\n }\n\n if (isEnumType(type)) {\n var _config3 = type.toConfig();\n\n return new GraphQLEnumType(_objectSpread(_objectSpread({}, _config3), {}, {\n values: sortObjMap(_config3.values)\n }));\n } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')\n\n\n if (isInputObjectType(type)) {\n var _config4 = type.toConfig();\n\n return new GraphQLInputObjectType(_objectSpread(_objectSpread({}, _config4), {}, {\n fields: function fields() {\n return sortInputFields(_config4.fields);\n }\n }));\n } // istanbul ignore next (Not reachable. All possible types have been considered)\n\n\n false || invariant(0, 'Unexpected type: ' + inspect(type));\n }\n}\n\nfunction sortObjMap(map, sortValueFn) {\n var sortedMap = Object.create(null);\n var sortedKeys = sortBy(Object.keys(map), function (x) {\n return x;\n });\n\n for (var _i2 = 0; _i2 < sortedKeys.length; _i2++) {\n var key = sortedKeys[_i2];\n var value = map[key];\n sortedMap[key] = sortValueFn ? sortValueFn(value) : value;\n }\n\n return sortedMap;\n}\n\nfunction sortByName(array) {\n return sortBy(array, function (obj) {\n return obj.name;\n });\n}\n\nfunction sortBy(array, mapToKey) {\n return array.slice().sort(function (obj1, obj2) {\n var key1 = mapToKey(obj1);\n var key2 = mapToKey(obj2);\n return naturalCompare(key1, key2);\n });\n}\n","import objectValues from \"../polyfills/objectValues.mjs\";\nimport inspect from \"../jsutils/inspect.mjs\";\nimport invariant from \"../jsutils/invariant.mjs\";\nimport { print } from \"../language/printer.mjs\";\nimport { printBlockString } from \"../language/blockString.mjs\";\nimport { isIntrospectionType } from \"../type/introspection.mjs\";\nimport { GraphQLString, isSpecifiedScalarType } from \"../type/scalars.mjs\";\nimport { DEFAULT_DEPRECATION_REASON, isSpecifiedDirective } from \"../type/directives.mjs\";\nimport { isScalarType, isObjectType, isInterfaceType, isUnionType, isEnumType, isInputObjectType } from \"../type/definition.mjs\";\nimport { astFromValue } from \"./astFromValue.mjs\";\n\n/**\n * Accepts options as a second argument:\n *\n * - commentDescriptions:\n * Provide true to use preceding comments as the description.\n *\n */\nexport function printSchema(schema, options) {\n return printFilteredSchema(schema, function (n) {\n return !isSpecifiedDirective(n);\n }, isDefinedType, options);\n}\nexport function printIntrospectionSchema(schema, options) {\n return printFilteredSchema(schema, isSpecifiedDirective, isIntrospectionType, options);\n}\n\nfunction isDefinedType(type) {\n return !isSpecifiedScalarType(type) && !isIntrospectionType(type);\n}\n\nfunction printFilteredSchema(schema, directiveFilter, typeFilter, options) {\n var directives = schema.getDirectives().filter(directiveFilter);\n var types = objectValues(schema.getTypeMap()).filter(typeFilter);\n return [printSchemaDefinition(schema)].concat(directives.map(function (directive) {\n return printDirective(directive, options);\n }), types.map(function (type) {\n return printType(type, options);\n })).filter(Boolean).join('\\n\\n') + '\\n';\n}\n\nfunction printSchemaDefinition(schema) {\n if (schema.description == null && isSchemaOfCommonNames(schema)) {\n return;\n }\n\n var operationTypes = [];\n var queryType = schema.getQueryType();\n\n if (queryType) {\n operationTypes.push(\" query: \".concat(queryType.name));\n }\n\n var mutationType = schema.getMutationType();\n\n if (mutationType) {\n operationTypes.push(\" mutation: \".concat(mutationType.name));\n }\n\n var subscriptionType = schema.getSubscriptionType();\n\n if (subscriptionType) {\n operationTypes.push(\" subscription: \".concat(subscriptionType.name));\n }\n\n return printDescription({}, schema) + \"schema {\\n\".concat(operationTypes.join('\\n'), \"\\n}\");\n}\n/**\n * GraphQL schema define root types for each type of operation. These types are\n * the same as any other type and can be named in any manner, however there is\n * a common naming convention:\n *\n * schema {\n * query: Query\n * mutation: Mutation\n * }\n *\n * When using this naming convention, the schema description can be omitted.\n */\n\n\nfunction isSchemaOfCommonNames(schema) {\n var queryType = schema.getQueryType();\n\n if (queryType && queryType.name !== 'Query') {\n return false;\n }\n\n var mutationType = schema.getMutationType();\n\n if (mutationType && mutationType.name !== 'Mutation') {\n return false;\n }\n\n var subscriptionType = schema.getSubscriptionType();\n\n if (subscriptionType && subscriptionType.name !== 'Subscription') {\n return false;\n }\n\n return true;\n}\n\nexport function printType(type, options) {\n if (isScalarType(type)) {\n return printScalar(type, options);\n }\n\n if (isObjectType(type)) {\n return printObject(type, options);\n }\n\n if (isInterfaceType(type)) {\n return printInterface(type, options);\n }\n\n if (isUnionType(type)) {\n return printUnion(type, options);\n }\n\n if (isEnumType(type)) {\n return printEnum(type, options);\n } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')\n\n\n if (isInputObjectType(type)) {\n return printInputObject(type, options);\n } // istanbul ignore next (Not reachable. All possible types have been considered)\n\n\n false || invariant(0, 'Unexpected type: ' + inspect(type));\n}\n\nfunction printScalar(type, options) {\n return printDescription(options, type) + \"scalar \".concat(type.name) + printSpecifiedByUrl(type);\n}\n\nfunction printImplementedInterfaces(type) {\n var interfaces = type.getInterfaces();\n return interfaces.length ? ' implements ' + interfaces.map(function (i) {\n return i.name;\n }).join(' & ') : '';\n}\n\nfunction printObject(type, options) {\n return printDescription(options, type) + \"type \".concat(type.name) + printImplementedInterfaces(type) + printFields(options, type);\n}\n\nfunction printInterface(type, options) {\n return printDescription(options, type) + \"interface \".concat(type.name) + printImplementedInterfaces(type) + printFields(options, type);\n}\n\nfunction printUnion(type, options) {\n var types = type.getTypes();\n var possibleTypes = types.length ? ' = ' + types.join(' | ') : '';\n return printDescription(options, type) + 'union ' + type.name + possibleTypes;\n}\n\nfunction printEnum(type, options) {\n var values = type.getValues().map(function (value, i) {\n return printDescription(options, value, ' ', !i) + ' ' + value.name + printDeprecated(value.deprecationReason);\n });\n return printDescription(options, type) + \"enum \".concat(type.name) + printBlock(values);\n}\n\nfunction printInputObject(type, options) {\n var fields = objectValues(type.getFields()).map(function (f, i) {\n return printDescription(options, f, ' ', !i) + ' ' + printInputValue(f);\n });\n return printDescription(options, type) + \"input \".concat(type.name) + printBlock(fields);\n}\n\nfunction printFields(options, type) {\n var fields = objectValues(type.getFields()).map(function (f, i) {\n return printDescription(options, f, ' ', !i) + ' ' + f.name + printArgs(options, f.args, ' ') + ': ' + String(f.type) + printDeprecated(f.deprecationReason);\n });\n return printBlock(fields);\n}\n\nfunction printBlock(items) {\n return items.length !== 0 ? ' {\\n' + items.join('\\n') + '\\n}' : '';\n}\n\nfunction printArgs(options, args) {\n var indentation = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n\n if (args.length === 0) {\n return '';\n } // If every arg does not have a description, print them on one line.\n\n\n if (args.every(function (arg) {\n return !arg.description;\n })) {\n return '(' + args.map(printInputValue).join(', ') + ')';\n }\n\n return '(\\n' + args.map(function (arg, i) {\n return printDescription(options, arg, ' ' + indentation, !i) + ' ' + indentation + printInputValue(arg);\n }).join('\\n') + '\\n' + indentation + ')';\n}\n\nfunction printInputValue(arg) {\n var defaultAST = astFromValue(arg.defaultValue, arg.type);\n var argDecl = arg.name + ': ' + String(arg.type);\n\n if (defaultAST) {\n argDecl += \" = \".concat(print(defaultAST));\n }\n\n return argDecl + printDeprecated(arg.deprecationReason);\n}\n\nfunction printDirective(directive, options) {\n return printDescription(options, directive) + 'directive @' + directive.name + printArgs(options, directive.args) + (directive.isRepeatable ? ' repeatable' : '') + ' on ' + directive.locations.join(' | ');\n}\n\nfunction printDeprecated(reason) {\n if (reason == null) {\n return '';\n }\n\n var reasonAST = astFromValue(reason, GraphQLString);\n\n if (reasonAST && reason !== DEFAULT_DEPRECATION_REASON) {\n return ' @deprecated(reason: ' + print(reasonAST) + ')';\n }\n\n return ' @deprecated';\n}\n\nfunction printSpecifiedByUrl(scalar) {\n if (scalar.specifiedByUrl == null) {\n return '';\n }\n\n var url = scalar.specifiedByUrl;\n var urlAST = astFromValue(url, GraphQLString);\n urlAST || invariant(0, 'Unexpected null value returned from `astFromValue` for specifiedByUrl');\n return ' @specifiedBy(url: ' + print(urlAST) + ')';\n}\n\nfunction printDescription(options, def) {\n var indentation = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n var firstInBlock = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n var description = def.description;\n\n if (description == null) {\n return '';\n }\n\n if ((options === null || options === void 0 ? void 0 : options.commentDescriptions) === true) {\n return printDescriptionWithComments(description, indentation, firstInBlock);\n }\n\n var preferMultipleLines = description.length > 70;\n var blockString = printBlockString(description, '', preferMultipleLines);\n var prefix = indentation && !firstInBlock ? '\\n' + indentation : indentation;\n return prefix + blockString.replace(/\\n/g, '\\n' + indentation) + '\\n';\n}\n\nfunction printDescriptionWithComments(description, indentation, firstInBlock) {\n var prefix = indentation && !firstInBlock ? '\\n' : '';\n var comment = description.split('\\n').map(function (line) {\n return indentation + (line !== '' ? '# ' + line : '#');\n }).join('\\n');\n return prefix + comment + '\\n';\n}\n","/**\n * Provided a collection of ASTs, presumably each from different files,\n * concatenate the ASTs together into batched AST, useful for validating many\n * GraphQL source files which together represent one conceptual application.\n */\nexport function concatAST(documents) {\n var definitions = [];\n\n for (var _i2 = 0; _i2 < documents.length; _i2++) {\n var doc = documents[_i2];\n definitions = definitions.concat(doc.definitions);\n }\n\n return {\n kind: 'Document',\n definitions: definitions\n };\n}\n","import { Kind } from \"../language/kinds.mjs\";\nimport { visit } from \"../language/visitor.mjs\";\n/**\n * separateOperations accepts a single AST document which may contain many\n * operations and fragments and returns a collection of AST documents each of\n * which contains a single operation as well the fragment definitions it\n * refers to.\n */\n\nexport function separateOperations(documentAST) {\n var operations = [];\n var depGraph = Object.create(null); // Populate metadata and build a dependency graph.\n\n for (var _i2 = 0, _documentAST$definiti2 = documentAST.definitions; _i2 < _documentAST$definiti2.length; _i2++) {\n var definitionNode = _documentAST$definiti2[_i2];\n\n switch (definitionNode.kind) {\n case Kind.OPERATION_DEFINITION:\n operations.push(definitionNode);\n break;\n\n case Kind.FRAGMENT_DEFINITION:\n depGraph[definitionNode.name.value] = collectDependencies(definitionNode.selectionSet);\n break;\n }\n } // For each operation, produce a new synthesized AST which includes only what\n // is necessary for completing that operation.\n\n\n var separatedDocumentASTs = Object.create(null);\n\n var _loop = function _loop(_i4) {\n var operation = operations[_i4];\n var dependencies = new Set();\n\n for (var _i6 = 0, _collectDependencies2 = collectDependencies(operation.selectionSet); _i6 < _collectDependencies2.length; _i6++) {\n var fragmentName = _collectDependencies2[_i6];\n collectTransitiveDependencies(dependencies, depGraph, fragmentName);\n } // Provides the empty string for anonymous operations.\n\n\n var operationName = operation.name ? operation.name.value : ''; // The list of definition nodes to be included for this operation, sorted\n // to retain the same order as the original document.\n\n separatedDocumentASTs[operationName] = {\n kind: Kind.DOCUMENT,\n definitions: documentAST.definitions.filter(function (node) {\n return node === operation || node.kind === Kind.FRAGMENT_DEFINITION && dependencies.has(node.name.value);\n })\n };\n };\n\n for (var _i4 = 0; _i4 < operations.length; _i4++) {\n _loop(_i4);\n }\n\n return separatedDocumentASTs;\n}\n\n// From a dependency graph, collects a list of transitive dependencies by\n// recursing through a dependency graph.\nfunction collectTransitiveDependencies(collected, depGraph, fromName) {\n if (!collected.has(fromName)) {\n collected.add(fromName);\n var immediateDeps = depGraph[fromName];\n\n if (immediateDeps !== undefined) {\n for (var _i8 = 0; _i8 < immediateDeps.length; _i8++) {\n var toName = immediateDeps[_i8];\n collectTransitiveDependencies(collected, depGraph, toName);\n }\n }\n }\n}\n\nfunction collectDependencies(selectionSet) {\n var dependencies = [];\n visit(selectionSet, {\n FragmentSpread: function FragmentSpread(node) {\n dependencies.push(node.name.value);\n }\n });\n return dependencies;\n}\n","import { Source, isSource } from \"../language/source.mjs\";\nimport { TokenKind } from \"../language/tokenKind.mjs\";\nimport { Lexer, isPunctuatorTokenKind } from \"../language/lexer.mjs\";\nimport { dedentBlockStringValue, getBlockStringIndentation } from \"../language/blockString.mjs\";\n/**\n * Strips characters that are not significant to the validity or execution\n * of a GraphQL document:\n * - UnicodeBOM\n * - WhiteSpace\n * - LineTerminator\n * - Comment\n * - Comma\n * - BlockString indentation\n *\n * Note: It is required to have a delimiter character between neighboring\n * non-punctuator tokens and this function always uses single space as delimiter.\n *\n * It is guaranteed that both input and output documents if parsed would result\n * in the exact same AST except for nodes location.\n *\n * Warning: It is guaranteed that this function will always produce stable results.\n * However, it's not guaranteed that it will stay the same between different\n * releases due to bugfixes or changes in the GraphQL specification.\n *\n * Query example:\n *\n * query SomeQuery($foo: String!, $bar: String) {\n * someField(foo: $foo, bar: $bar) {\n * a\n * b {\n * c\n * d\n * }\n * }\n * }\n *\n * Becomes:\n *\n * query SomeQuery($foo:String!$bar:String){someField(foo:$foo bar:$bar){a b{c d}}}\n *\n * SDL example:\n *\n * \"\"\"\n * Type description\n * \"\"\"\n * type Foo {\n * \"\"\"\n * Field description\n * \"\"\"\n * bar: String\n * }\n *\n * Becomes:\n *\n * \"\"\"Type description\"\"\" type Foo{\"\"\"Field description\"\"\" bar:String}\n */\n\nexport function stripIgnoredCharacters(source) {\n var sourceObj = isSource(source) ? source : new Source(source);\n var body = sourceObj.body;\n var lexer = new Lexer(sourceObj);\n var strippedBody = '';\n var wasLastAddedTokenNonPunctuator = false;\n\n while (lexer.advance().kind !== TokenKind.EOF) {\n var currentToken = lexer.token;\n var tokenKind = currentToken.kind;\n /**\n * Every two non-punctuator tokens should have space between them.\n * Also prevent case of non-punctuator token following by spread resulting\n * in invalid token (e.g. `1...` is invalid Float token).\n */\n\n var isNonPunctuator = !isPunctuatorTokenKind(currentToken.kind);\n\n if (wasLastAddedTokenNonPunctuator) {\n if (isNonPunctuator || currentToken.kind === TokenKind.SPREAD) {\n strippedBody += ' ';\n }\n }\n\n var tokenBody = body.slice(currentToken.start, currentToken.end);\n\n if (tokenKind === TokenKind.BLOCK_STRING) {\n strippedBody += dedentBlockString(tokenBody);\n } else {\n strippedBody += tokenBody;\n }\n\n wasLastAddedTokenNonPunctuator = isNonPunctuator;\n }\n\n return strippedBody;\n}\n\nfunction dedentBlockString(blockStr) {\n // skip leading and trailing triple quotations\n var rawStr = blockStr.slice(3, -3);\n var body = dedentBlockStringValue(rawStr);\n\n if (getBlockStringIndentation(body) > 0) {\n body = '\\n' + body;\n }\n\n var lastChar = body[body.length - 1];\n var hasTrailingQuote = lastChar === '\"' && body.slice(-4) !== '\\\\\"\"\"';\n\n if (hasTrailingQuote || lastChar === '\\\\') {\n body += '\\n';\n }\n\n return '\"\"\"' + body + '\"\"\"';\n}\n","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport objectValues from \"../polyfills/objectValues.mjs\";\nimport keyMap from \"../jsutils/keyMap.mjs\";\nimport inspect from \"../jsutils/inspect.mjs\";\nimport invariant from \"../jsutils/invariant.mjs\";\nimport naturalCompare from \"../jsutils/naturalCompare.mjs\";\nimport { print } from \"../language/printer.mjs\";\nimport { visit } from \"../language/visitor.mjs\";\nimport { isSpecifiedScalarType } from \"../type/scalars.mjs\";\nimport { isScalarType, isObjectType, isInterfaceType, isUnionType, isEnumType, isInputObjectType, isNonNullType, isListType, isNamedType, isRequiredArgument, isRequiredInputField } from \"../type/definition.mjs\";\nimport { astFromValue } from \"./astFromValue.mjs\";\nexport var BreakingChangeType = Object.freeze({\n TYPE_REMOVED: 'TYPE_REMOVED',\n TYPE_CHANGED_KIND: 'TYPE_CHANGED_KIND',\n TYPE_REMOVED_FROM_UNION: 'TYPE_REMOVED_FROM_UNION',\n VALUE_REMOVED_FROM_ENUM: 'VALUE_REMOVED_FROM_ENUM',\n REQUIRED_INPUT_FIELD_ADDED: 'REQUIRED_INPUT_FIELD_ADDED',\n IMPLEMENTED_INTERFACE_REMOVED: 'IMPLEMENTED_INTERFACE_REMOVED',\n FIELD_REMOVED: 'FIELD_REMOVED',\n FIELD_CHANGED_KIND: 'FIELD_CHANGED_KIND',\n REQUIRED_ARG_ADDED: 'REQUIRED_ARG_ADDED',\n ARG_REMOVED: 'ARG_REMOVED',\n ARG_CHANGED_KIND: 'ARG_CHANGED_KIND',\n DIRECTIVE_REMOVED: 'DIRECTIVE_REMOVED',\n DIRECTIVE_ARG_REMOVED: 'DIRECTIVE_ARG_REMOVED',\n REQUIRED_DIRECTIVE_ARG_ADDED: 'REQUIRED_DIRECTIVE_ARG_ADDED',\n DIRECTIVE_REPEATABLE_REMOVED: 'DIRECTIVE_REPEATABLE_REMOVED',\n DIRECTIVE_LOCATION_REMOVED: 'DIRECTIVE_LOCATION_REMOVED'\n});\nexport var DangerousChangeType = Object.freeze({\n VALUE_ADDED_TO_ENUM: 'VALUE_ADDED_TO_ENUM',\n TYPE_ADDED_TO_UNION: 'TYPE_ADDED_TO_UNION',\n OPTIONAL_INPUT_FIELD_ADDED: 'OPTIONAL_INPUT_FIELD_ADDED',\n OPTIONAL_ARG_ADDED: 'OPTIONAL_ARG_ADDED',\n IMPLEMENTED_INTERFACE_ADDED: 'IMPLEMENTED_INTERFACE_ADDED',\n ARG_DEFAULT_VALUE_CHANGE: 'ARG_DEFAULT_VALUE_CHANGE'\n});\n\n/**\n * Given two schemas, returns an Array containing descriptions of all the types\n * of breaking changes covered by the other functions down below.\n */\nexport function findBreakingChanges(oldSchema, newSchema) {\n var breakingChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) {\n return change.type in BreakingChangeType;\n });\n return breakingChanges;\n}\n/**\n * Given two schemas, returns an Array containing descriptions of all the types\n * of potentially dangerous changes covered by the other functions down below.\n */\n\nexport function findDangerousChanges(oldSchema, newSchema) {\n var dangerousChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) {\n return change.type in DangerousChangeType;\n });\n return dangerousChanges;\n}\n\nfunction findSchemaChanges(oldSchema, newSchema) {\n return [].concat(findTypeChanges(oldSchema, newSchema), findDirectiveChanges(oldSchema, newSchema));\n}\n\nfunction findDirectiveChanges(oldSchema, newSchema) {\n var schemaChanges = [];\n var directivesDiff = diff(oldSchema.getDirectives(), newSchema.getDirectives());\n\n for (var _i2 = 0, _directivesDiff$remov2 = directivesDiff.removed; _i2 < _directivesDiff$remov2.length; _i2++) {\n var oldDirective = _directivesDiff$remov2[_i2];\n schemaChanges.push({\n type: BreakingChangeType.DIRECTIVE_REMOVED,\n description: \"\".concat(oldDirective.name, \" was removed.\")\n });\n }\n\n for (var _i4 = 0, _directivesDiff$persi2 = directivesDiff.persisted; _i4 < _directivesDiff$persi2.length; _i4++) {\n var _ref2 = _directivesDiff$persi2[_i4];\n var _oldDirective = _ref2[0];\n var newDirective = _ref2[1];\n var argsDiff = diff(_oldDirective.args, newDirective.args);\n\n for (var _i6 = 0, _argsDiff$added2 = argsDiff.added; _i6 < _argsDiff$added2.length; _i6++) {\n var newArg = _argsDiff$added2[_i6];\n\n if (isRequiredArgument(newArg)) {\n schemaChanges.push({\n type: BreakingChangeType.REQUIRED_DIRECTIVE_ARG_ADDED,\n description: \"A required arg \".concat(newArg.name, \" on directive \").concat(_oldDirective.name, \" was added.\")\n });\n }\n }\n\n for (var _i8 = 0, _argsDiff$removed2 = argsDiff.removed; _i8 < _argsDiff$removed2.length; _i8++) {\n var oldArg = _argsDiff$removed2[_i8];\n schemaChanges.push({\n type: BreakingChangeType.DIRECTIVE_ARG_REMOVED,\n description: \"\".concat(oldArg.name, \" was removed from \").concat(_oldDirective.name, \".\")\n });\n }\n\n if (_oldDirective.isRepeatable && !newDirective.isRepeatable) {\n schemaChanges.push({\n type: BreakingChangeType.DIRECTIVE_REPEATABLE_REMOVED,\n description: \"Repeatable flag was removed from \".concat(_oldDirective.name, \".\")\n });\n }\n\n for (var _i10 = 0, _oldDirective$locatio2 = _oldDirective.locations; _i10 < _oldDirective$locatio2.length; _i10++) {\n var location = _oldDirective$locatio2[_i10];\n\n if (newDirective.locations.indexOf(location) === -1) {\n schemaChanges.push({\n type: BreakingChangeType.DIRECTIVE_LOCATION_REMOVED,\n description: \"\".concat(location, \" was removed from \").concat(_oldDirective.name, \".\")\n });\n }\n }\n }\n\n return schemaChanges;\n}\n\nfunction findTypeChanges(oldSchema, newSchema) {\n var schemaChanges = [];\n var typesDiff = diff(objectValues(oldSchema.getTypeMap()), objectValues(newSchema.getTypeMap()));\n\n for (var _i12 = 0, _typesDiff$removed2 = typesDiff.removed; _i12 < _typesDiff$removed2.length; _i12++) {\n var oldType = _typesDiff$removed2[_i12];\n schemaChanges.push({\n type: BreakingChangeType.TYPE_REMOVED,\n description: isSpecifiedScalarType(oldType) ? \"Standard scalar \".concat(oldType.name, \" was removed because it is not referenced anymore.\") : \"\".concat(oldType.name, \" was removed.\")\n });\n }\n\n for (var _i14 = 0, _typesDiff$persisted2 = typesDiff.persisted; _i14 < _typesDiff$persisted2.length; _i14++) {\n var _ref4 = _typesDiff$persisted2[_i14];\n var _oldType = _ref4[0];\n var newType = _ref4[1];\n\n if (isEnumType(_oldType) && isEnumType(newType)) {\n schemaChanges.push.apply(schemaChanges, findEnumTypeChanges(_oldType, newType));\n } else if (isUnionType(_oldType) && isUnionType(newType)) {\n schemaChanges.push.apply(schemaChanges, findUnionTypeChanges(_oldType, newType));\n } else if (isInputObjectType(_oldType) && isInputObjectType(newType)) {\n schemaChanges.push.apply(schemaChanges, findInputObjectTypeChanges(_oldType, newType));\n } else if (isObjectType(_oldType) && isObjectType(newType)) {\n schemaChanges.push.apply(schemaChanges, findFieldChanges(_oldType, newType).concat(findImplementedInterfacesChanges(_oldType, newType)));\n } else if (isInterfaceType(_oldType) && isInterfaceType(newType)) {\n schemaChanges.push.apply(schemaChanges, findFieldChanges(_oldType, newType).concat(findImplementedInterfacesChanges(_oldType, newType)));\n } else if (_oldType.constructor !== newType.constructor) {\n schemaChanges.push({\n type: BreakingChangeType.TYPE_CHANGED_KIND,\n description: \"\".concat(_oldType.name, \" changed from \") + \"\".concat(typeKindName(_oldType), \" to \").concat(typeKindName(newType), \".\")\n });\n }\n }\n\n return schemaChanges;\n}\n\nfunction findInputObjectTypeChanges(oldType, newType) {\n var schemaChanges = [];\n var fieldsDiff = diff(objectValues(oldType.getFields()), objectValues(newType.getFields()));\n\n for (var _i16 = 0, _fieldsDiff$added2 = fieldsDiff.added; _i16 < _fieldsDiff$added2.length; _i16++) {\n var newField = _fieldsDiff$added2[_i16];\n\n if (isRequiredInputField(newField)) {\n schemaChanges.push({\n type: BreakingChangeType.REQUIRED_INPUT_FIELD_ADDED,\n description: \"A required field \".concat(newField.name, \" on input type \").concat(oldType.name, \" was added.\")\n });\n } else {\n schemaChanges.push({\n type: DangerousChangeType.OPTIONAL_INPUT_FIELD_ADDED,\n description: \"An optional field \".concat(newField.name, \" on input type \").concat(oldType.name, \" was added.\")\n });\n }\n }\n\n for (var _i18 = 0, _fieldsDiff$removed2 = fieldsDiff.removed; _i18 < _fieldsDiff$removed2.length; _i18++) {\n var oldField = _fieldsDiff$removed2[_i18];\n schemaChanges.push({\n type: BreakingChangeType.FIELD_REMOVED,\n description: \"\".concat(oldType.name, \".\").concat(oldField.name, \" was removed.\")\n });\n }\n\n for (var _i20 = 0, _fieldsDiff$persisted2 = fieldsDiff.persisted; _i20 < _fieldsDiff$persisted2.length; _i20++) {\n var _ref6 = _fieldsDiff$persisted2[_i20];\n var _oldField = _ref6[0];\n var _newField = _ref6[1];\n var isSafe = isChangeSafeForInputObjectFieldOrFieldArg(_oldField.type, _newField.type);\n\n if (!isSafe) {\n schemaChanges.push({\n type: BreakingChangeType.FIELD_CHANGED_KIND,\n description: \"\".concat(oldType.name, \".\").concat(_oldField.name, \" changed type from \") + \"\".concat(String(_oldField.type), \" to \").concat(String(_newField.type), \".\")\n });\n }\n }\n\n return schemaChanges;\n}\n\nfunction findUnionTypeChanges(oldType, newType) {\n var schemaChanges = [];\n var possibleTypesDiff = diff(oldType.getTypes(), newType.getTypes());\n\n for (var _i22 = 0, _possibleTypesDiff$ad2 = possibleTypesDiff.added; _i22 < _possibleTypesDiff$ad2.length; _i22++) {\n var newPossibleType = _possibleTypesDiff$ad2[_i22];\n schemaChanges.push({\n type: DangerousChangeType.TYPE_ADDED_TO_UNION,\n description: \"\".concat(newPossibleType.name, \" was added to union type \").concat(oldType.name, \".\")\n });\n }\n\n for (var _i24 = 0, _possibleTypesDiff$re2 = possibleTypesDiff.removed; _i24 < _possibleTypesDiff$re2.length; _i24++) {\n var oldPossibleType = _possibleTypesDiff$re2[_i24];\n schemaChanges.push({\n type: BreakingChangeType.TYPE_REMOVED_FROM_UNION,\n description: \"\".concat(oldPossibleType.name, \" was removed from union type \").concat(oldType.name, \".\")\n });\n }\n\n return schemaChanges;\n}\n\nfunction findEnumTypeChanges(oldType, newType) {\n var schemaChanges = [];\n var valuesDiff = diff(oldType.getValues(), newType.getValues());\n\n for (var _i26 = 0, _valuesDiff$added2 = valuesDiff.added; _i26 < _valuesDiff$added2.length; _i26++) {\n var newValue = _valuesDiff$added2[_i26];\n schemaChanges.push({\n type: DangerousChangeType.VALUE_ADDED_TO_ENUM,\n description: \"\".concat(newValue.name, \" was added to enum type \").concat(oldType.name, \".\")\n });\n }\n\n for (var _i28 = 0, _valuesDiff$removed2 = valuesDiff.removed; _i28 < _valuesDiff$removed2.length; _i28++) {\n var oldValue = _valuesDiff$removed2[_i28];\n schemaChanges.push({\n type: BreakingChangeType.VALUE_REMOVED_FROM_ENUM,\n description: \"\".concat(oldValue.name, \" was removed from enum type \").concat(oldType.name, \".\")\n });\n }\n\n return schemaChanges;\n}\n\nfunction findImplementedInterfacesChanges(oldType, newType) {\n var schemaChanges = [];\n var interfacesDiff = diff(oldType.getInterfaces(), newType.getInterfaces());\n\n for (var _i30 = 0, _interfacesDiff$added2 = interfacesDiff.added; _i30 < _interfacesDiff$added2.length; _i30++) {\n var newInterface = _interfacesDiff$added2[_i30];\n schemaChanges.push({\n type: DangerousChangeType.IMPLEMENTED_INTERFACE_ADDED,\n description: \"\".concat(newInterface.name, \" added to interfaces implemented by \").concat(oldType.name, \".\")\n });\n }\n\n for (var _i32 = 0, _interfacesDiff$remov2 = interfacesDiff.removed; _i32 < _interfacesDiff$remov2.length; _i32++) {\n var oldInterface = _interfacesDiff$remov2[_i32];\n schemaChanges.push({\n type: BreakingChangeType.IMPLEMENTED_INTERFACE_REMOVED,\n description: \"\".concat(oldType.name, \" no longer implements interface \").concat(oldInterface.name, \".\")\n });\n }\n\n return schemaChanges;\n}\n\nfunction findFieldChanges(oldType, newType) {\n var schemaChanges = [];\n var fieldsDiff = diff(objectValues(oldType.getFields()), objectValues(newType.getFields()));\n\n for (var _i34 = 0, _fieldsDiff$removed4 = fieldsDiff.removed; _i34 < _fieldsDiff$removed4.length; _i34++) {\n var oldField = _fieldsDiff$removed4[_i34];\n schemaChanges.push({\n type: BreakingChangeType.FIELD_REMOVED,\n description: \"\".concat(oldType.name, \".\").concat(oldField.name, \" was removed.\")\n });\n }\n\n for (var _i36 = 0, _fieldsDiff$persisted4 = fieldsDiff.persisted; _i36 < _fieldsDiff$persisted4.length; _i36++) {\n var _ref8 = _fieldsDiff$persisted4[_i36];\n var _oldField2 = _ref8[0];\n var newField = _ref8[1];\n schemaChanges.push.apply(schemaChanges, findArgChanges(oldType, _oldField2, newField));\n var isSafe = isChangeSafeForObjectOrInterfaceField(_oldField2.type, newField.type);\n\n if (!isSafe) {\n schemaChanges.push({\n type: BreakingChangeType.FIELD_CHANGED_KIND,\n description: \"\".concat(oldType.name, \".\").concat(_oldField2.name, \" changed type from \") + \"\".concat(String(_oldField2.type), \" to \").concat(String(newField.type), \".\")\n });\n }\n }\n\n return schemaChanges;\n}\n\nfunction findArgChanges(oldType, oldField, newField) {\n var schemaChanges = [];\n var argsDiff = diff(oldField.args, newField.args);\n\n for (var _i38 = 0, _argsDiff$removed4 = argsDiff.removed; _i38 < _argsDiff$removed4.length; _i38++) {\n var oldArg = _argsDiff$removed4[_i38];\n schemaChanges.push({\n type: BreakingChangeType.ARG_REMOVED,\n description: \"\".concat(oldType.name, \".\").concat(oldField.name, \" arg \").concat(oldArg.name, \" was removed.\")\n });\n }\n\n for (var _i40 = 0, _argsDiff$persisted2 = argsDiff.persisted; _i40 < _argsDiff$persisted2.length; _i40++) {\n var _ref10 = _argsDiff$persisted2[_i40];\n var _oldArg = _ref10[0];\n var newArg = _ref10[1];\n var isSafe = isChangeSafeForInputObjectFieldOrFieldArg(_oldArg.type, newArg.type);\n\n if (!isSafe) {\n schemaChanges.push({\n type: BreakingChangeType.ARG_CHANGED_KIND,\n description: \"\".concat(oldType.name, \".\").concat(oldField.name, \" arg \").concat(_oldArg.name, \" has changed type from \") + \"\".concat(String(_oldArg.type), \" to \").concat(String(newArg.type), \".\")\n });\n } else if (_oldArg.defaultValue !== undefined) {\n if (newArg.defaultValue === undefined) {\n schemaChanges.push({\n type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,\n description: \"\".concat(oldType.name, \".\").concat(oldField.name, \" arg \").concat(_oldArg.name, \" defaultValue was removed.\")\n });\n } else {\n // Since we looking only for client's observable changes we should\n // compare default values in the same representation as they are\n // represented inside introspection.\n var oldValueStr = stringifyValue(_oldArg.defaultValue, _oldArg.type);\n var newValueStr = stringifyValue(newArg.defaultValue, newArg.type);\n\n if (oldValueStr !== newValueStr) {\n schemaChanges.push({\n type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,\n description: \"\".concat(oldType.name, \".\").concat(oldField.name, \" arg \").concat(_oldArg.name, \" has changed defaultValue from \").concat(oldValueStr, \" to \").concat(newValueStr, \".\")\n });\n }\n }\n }\n }\n\n for (var _i42 = 0, _argsDiff$added4 = argsDiff.added; _i42 < _argsDiff$added4.length; _i42++) {\n var _newArg = _argsDiff$added4[_i42];\n\n if (isRequiredArgument(_newArg)) {\n schemaChanges.push({\n type: BreakingChangeType.REQUIRED_ARG_ADDED,\n description: \"A required arg \".concat(_newArg.name, \" on \").concat(oldType.name, \".\").concat(oldField.name, \" was added.\")\n });\n } else {\n schemaChanges.push({\n type: DangerousChangeType.OPTIONAL_ARG_ADDED,\n description: \"An optional arg \".concat(_newArg.name, \" on \").concat(oldType.name, \".\").concat(oldField.name, \" was added.\")\n });\n }\n }\n\n return schemaChanges;\n}\n\nfunction isChangeSafeForObjectOrInterfaceField(oldType, newType) {\n if (isListType(oldType)) {\n return (// if they're both lists, make sure the underlying types are compatible\n isListType(newType) && isChangeSafeForObjectOrInterfaceField(oldType.ofType, newType.ofType) || // moving from nullable to non-null of the same underlying type is safe\n isNonNullType(newType) && isChangeSafeForObjectOrInterfaceField(oldType, newType.ofType)\n );\n }\n\n if (isNonNullType(oldType)) {\n // if they're both non-null, make sure the underlying types are compatible\n return isNonNullType(newType) && isChangeSafeForObjectOrInterfaceField(oldType.ofType, newType.ofType);\n }\n\n return (// if they're both named types, see if their names are equivalent\n isNamedType(newType) && oldType.name === newType.name || // moving from nullable to non-null of the same underlying type is safe\n isNonNullType(newType) && isChangeSafeForObjectOrInterfaceField(oldType, newType.ofType)\n );\n}\n\nfunction isChangeSafeForInputObjectFieldOrFieldArg(oldType, newType) {\n if (isListType(oldType)) {\n // if they're both lists, make sure the underlying types are compatible\n return isListType(newType) && isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType.ofType);\n }\n\n if (isNonNullType(oldType)) {\n return (// if they're both non-null, make sure the underlying types are\n // compatible\n isNonNullType(newType) && isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType.ofType) || // moving from non-null to nullable of the same underlying type is safe\n !isNonNullType(newType) && isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType)\n );\n } // if they're both named types, see if their names are equivalent\n\n\n return isNamedType(newType) && oldType.name === newType.name;\n}\n\nfunction typeKindName(type) {\n if (isScalarType(type)) {\n return 'a Scalar type';\n }\n\n if (isObjectType(type)) {\n return 'an Object type';\n }\n\n if (isInterfaceType(type)) {\n return 'an Interface type';\n }\n\n if (isUnionType(type)) {\n return 'a Union type';\n }\n\n if (isEnumType(type)) {\n return 'an Enum type';\n } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')\n\n\n if (isInputObjectType(type)) {\n return 'an Input type';\n } // istanbul ignore next (Not reachable. All possible named types have been considered)\n\n\n false || invariant(0, 'Unexpected type: ' + inspect(type));\n}\n\nfunction stringifyValue(value, type) {\n var ast = astFromValue(value, type);\n ast != null || invariant(0);\n var sortedAST = visit(ast, {\n ObjectValue: function ObjectValue(objectNode) {\n // Make a copy since sort mutates array\n var fields = [].concat(objectNode.fields);\n fields.sort(function (fieldA, fieldB) {\n return naturalCompare(fieldA.name.value, fieldB.name.value);\n });\n return _objectSpread(_objectSpread({}, objectNode), {}, {\n fields: fields\n });\n }\n });\n return print(sortedAST);\n}\n\nfunction diff(oldArray, newArray) {\n var added = [];\n var removed = [];\n var persisted = [];\n var oldMap = keyMap(oldArray, function (_ref11) {\n var name = _ref11.name;\n return name;\n });\n var newMap = keyMap(newArray, function (_ref12) {\n var name = _ref12.name;\n return name;\n });\n\n for (var _i44 = 0; _i44 < oldArray.length; _i44++) {\n var oldItem = oldArray[_i44];\n var newItem = newMap[oldItem.name];\n\n if (newItem === undefined) {\n removed.push(oldItem);\n } else {\n persisted.push([oldItem, newItem]);\n }\n }\n\n for (var _i46 = 0; _i46 < newArray.length; _i46++) {\n var _newItem = newArray[_i46];\n\n if (oldMap[_newItem.name] === undefined) {\n added.push(_newItem);\n }\n }\n\n return {\n added: added,\n persisted: persisted,\n removed: removed\n };\n}\n","import { validate } from \"../validation/validate.mjs\";\nimport { NoDeprecatedCustomRule } from \"../validation/rules/custom/NoDeprecatedCustomRule.mjs\";\n/**\n * A validation rule which reports deprecated usages.\n *\n * Returns a list of GraphQLError instances describing each deprecated use.\n *\n * @deprecated Please use `validate` with `NoDeprecatedCustomRule` instead:\n *\n * ```\n * import { validate, NoDeprecatedCustomRule } from 'graphql'\n *\n * const errors = validate(schema, document, [NoDeprecatedCustomRule])\n * ```\n */\n\nexport function findDeprecatedUsages(schema, ast) {\n return validate(schema, ast, [NoDeprecatedCustomRule]);\n}\n","export { isCancelError } from './errors/CanceledError.mjs';\nexport { del, get, head, patch, post, put } from './apis/index.mjs';\n//# sourceMappingURL=index.mjs.map\n","import { RestApiError } from './RestApiError.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Internal-only class for CanceledError.\n *\n * @internal\n */\nclass CanceledError extends RestApiError {\n constructor(params = {}) {\n super({\n name: 'CanceledError',\n message: 'Request is canceled by user',\n ...params,\n });\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = CanceledError;\n Object.setPrototypeOf(this, CanceledError.prototype);\n }\n}\n/**\n * Check if an error is caused by user calling `cancel()` in REST API.\n *\n * @note This function works **ONLY** for errors thrown by REST API. For GraphQL APIs, use `client.isCancelError(error)`\n * instead. `client` is generated from `generateClient()` API from `aws-amplify/api`.\n *\n * @param {unknown} error The unknown exception to be checked.\n * @returns - A boolean indicating if the error was from an upload cancellation\n */\nconst isCancelError = (error) => !!error && error instanceof CanceledError;\n\nexport { CanceledError, isCancelError };\n//# sourceMappingURL=CanceledError.mjs.map\n","import { ApiError } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nclass RestApiError extends ApiError {\n constructor(params) {\n super(params);\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = RestApiError;\n Object.setPrototypeOf(this, RestApiError.prototype);\n }\n}\n\nexport { RestApiError };\n//# sourceMappingURL=RestApiError.mjs.map\n","import { Amplify } from '@aws-amplify/core';\nimport { get as get$1, post as post$1, put as put$1, del as del$1, head as head$1, patch as patch$1 } from './common/publicApis.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * GET HTTP request\n * @param {GetInput} input - Input for GET operation\n * @returns {GetOperation} Operation for GET request\n * @throws - {@link RestApiError}\n * @example\n * Send a GET request\n * ```js\n * import { get, isCancelError } from '@aws-amplify/api';\n *\n * const { body } = await get({\n * apiName,\n * path,\n * options: {\n * headers, // Optional, A map of custom header key/values\n * body, // Optional, JSON object or FormData\n * queryParams, // Optional, A map of query strings\n * }\n * }).response;\n * const data = await body.json();\n * ```\n * @example\n * Cancel a GET request\n *\n * ```js\n * import { get, isCancelError } from '@aws-amplify/api';\n *\n * const { response, cancel } = get({apiName, path, options});\n * cancel(message);\n * try {\n * await response;\n * } catch (e) {\n * if (isCancelError(e)) {\n * // handle request cancellation\n * }\n * //...\n * }\n * ```\n */\nconst get = (input) => get$1(Amplify, input);\n/**\n * POST HTTP request\n * @param {PostInput} input - Input for POST operation\n * @returns {PostOperation} Operation for POST request\n * @throws - {@link RestApiError}\n * @example\n * Send a POST request\n * ```js\n * import { post, isCancelError } from '@aws-amplify/api';\n *\n * const { body } = await post({\n * apiName,\n * path,\n * options: {\n * headers, // Optional, A map of custom header key/values\n * body, // Optional, JSON object or FormData\n * queryParams, // Optional, A map of query strings\n * }\n * }).response;\n * const data = await body.json();\n * ```\n * @example\n * Cancel a POST request\n *\n * ```js\n * import { post, isCancelError } from '@aws-amplify/api';\n *\n * const { response, cancel } = post({apiName, path, options});\n * cancel(message);\n * try {\n * await response;\n * } catch (e) {\n * if (isCancelError(e)) {\n * // handle request cancellation\n * }\n * //...\n * }\n * ```\n */\nconst post = (input) => post$1(Amplify, input);\n/**\n * PUT HTTP request\n * @param {PutInput} input - Input for PUT operation\n * @returns {PutOperation} Operation for PUT request\n * @throws - {@link RestApiError}\n * @example\n * Send a PUT request\n * ```js\n * import { put, isCancelError } from '@aws-amplify/api';\n *\n * const { body } = await put({\n * apiName,\n * path,\n * options: {\n * headers, // Optional, A map of custom header key/values\n * body, // Optional, JSON object or FormData\n * queryParams, // Optional, A map of query strings\n * }\n * }).response;\n * const data = await body.json();\n * ```\n * @example\n * Cancel a PUT request\n * ```js\n * import { put, isCancelError } from '@aws-amplify/api';\n *\n * const { response, cancel } = put({apiName, path, options});\n * cancel(message);\n * try {\n * await response;\n * } catch (e) {\n * if (isCancelError(e)) {\n * // handle request cancellation\n * }\n * //...\n * }\n * ```\n */\nconst put = (input) => put$1(Amplify, input);\n/**\n * DELETE HTTP request\n * @param {DeleteInput} input - Input for DELETE operation\n * @returns {DeleteOperation} Operation for DELETE request\n * @throws - {@link RestApiError}\n * @example\n * Send a DELETE request\n * ```js\n * import { del } from '@aws-amplify/api';\n *\n * const { statusCode } = await del({\n * apiName,\n * path,\n * options: {\n * headers, // Optional, A map of custom header key/values\n * queryParams, // Optional, A map of query strings\n * }\n * }).response;\n * ```\n */\nconst del = (input) => del$1(Amplify, input);\n/**\n * HEAD HTTP request\n * @param {HeadInput} input - Input for HEAD operation\n * @returns {HeadOperation} Operation for HEAD request\n * @throws - {@link RestApiError}\n * @example\n * Send a HEAD request\n * ```js\n * import { head, isCancelError } from '@aws-amplify/api';\n *\n * const { headers, statusCode } = await head({\n * apiName,\n * path,\n * options: {\n * headers, // Optional, A map of custom header key/values\n * queryParams, // Optional, A map of query strings\n * }\n * }),response;\n * ```\n *\n */\nconst head = (input) => head$1(Amplify, input);\n/**\n * PATCH HTTP request\n * @param {PatchInput} input - Input for PATCH operation\n * @returns {PatchOperation} Operation for PATCH request\n * @throws - {@link RestApiError}\n * @example\n * Send a PATCH request\n * ```js\n * import { patch } from '@aws-amplify/api';\n *\n * const { body } = await patch({\n * apiName,\n * path,\n * options: {\n * headers, // Optional, A map of custom header key/values\n * body, // Optional, JSON object or FormData\n * queryParams, // Optional, A map of query strings\n * }\n * }).response;\n * const data = await body.json();\n * ```\n *\n * @example\n * Cancel a PATCH request\n * ```js\n * import { patch, isCancelError } from '@aws-amplify/api';\n *\n * const { response, cancel } = patch({apiName, path, options});\n * cancel(message);\n * try {\n * await response;\n * } catch (e) {\n * if (isCancelError(e)) {\n * // handle request cancellation\n * }\n * //...\n * }\n * ```\n */\nconst patch = (input) => patch$1(Amplify, input);\n\nexport { del, get, head, patch, post, put };\n//# sourceMappingURL=index.mjs.map\n","import { createCancellableOperation } from '../../utils/createCancellableOperation.mjs';\nimport { parseSigningInfo } from '../../utils/parseSigningInfo.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport '../../errors/validation.mjs';\nimport { resolveApiUrl } from '../../utils/resolveApiUrl.mjs';\nimport { logger } from '../../utils/logger.mjs';\nimport { isIamAuthApplicableForRest } from '../../utils/isIamAuthApplicable.mjs';\nimport { transferHandler } from './handler.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst publicHandler = (amplify, options, method) => createCancellableOperation(async (abortSignal) => {\n const { apiName, options: apiOptions = {}, path: apiPath } = options;\n const url = resolveApiUrl(amplify, apiName, apiPath, apiOptions?.queryParams);\n const libraryConfigHeaders = await amplify.libraryOptions?.API?.REST?.headers?.({\n apiName,\n });\n const { headers: invocationHeaders = {} } = apiOptions;\n const headers = {\n // custom headers from invocation options should precede library options\n ...libraryConfigHeaders,\n ...invocationHeaders,\n };\n const signingServiceInfo = parseSigningInfo(url, {\n amplify,\n apiName,\n });\n logger.debug(method, url, headers, `IAM signing options: ${JSON.stringify(signingServiceInfo)}`);\n return transferHandler(amplify, {\n ...apiOptions,\n url,\n method,\n headers,\n abortSignal,\n }, isIamAuthApplicableForRest, signingServiceInfo);\n});\nconst get = (amplify, input) => publicHandler(amplify, input, 'GET');\nconst post = (amplify, input) => publicHandler(amplify, input, 'POST');\nconst put = (amplify, input) => publicHandler(amplify, input, 'PUT');\nconst del = (amplify, input) => publicHandler(amplify, input, 'DELETE');\nconst head = (amplify, input) => publicHandler(amplify, input, 'HEAD');\nconst patch = (amplify, input) => publicHandler(amplify, input, 'PATCH');\n\nexport { del, get, head, patch, post, put };\n//# sourceMappingURL=publicApis.mjs.map\n","import { CanceledError } from '../errors/CanceledError.mjs';\nimport '@aws-amplify/core/internals/utils';\nimport '../errors/validation.mjs';\nimport { parseRestApiServiceError } from './serviceError.mjs';\nimport { logger } from './logger.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nfunction createCancellableOperation(handler, abortController) {\n const isInternalPost = (targetHandler) => !!abortController;\n // For creating a cancellable operation for public REST APIs, we need to create an AbortController\n // internally. Whereas for internal POST APIs, we need to accept in the AbortController from the\n // callers.\n const publicApisAbortController = new AbortController();\n const publicApisAbortSignal = publicApisAbortController.signal;\n const internalPostAbortSignal = abortController?.signal;\n let abortReason;\n const job = async () => {\n try {\n const response = await (isInternalPost(handler)\n ? handler()\n : handler(publicApisAbortSignal));\n if (response.statusCode >= 300) {\n throw await parseRestApiServiceError(response);\n }\n return response;\n }\n catch (error) {\n const abortSignal = internalPostAbortSignal ?? publicApisAbortSignal;\n const message = abortReason ?? abortSignal.reason;\n if (error.name === 'AbortError' || abortSignal?.aborted === true) {\n const canceledError = new CanceledError({\n ...(message && { message }),\n underlyingError: error,\n recoverySuggestion: 'The API request was explicitly canceled. If this is not intended, validate if you called the `cancel()` function on the API request erroneously.',\n });\n logger.debug(error);\n throw canceledError;\n }\n logger.debug(error);\n throw error;\n }\n };\n if (isInternalPost()) {\n return job();\n }\n else {\n const cancel = (abortMessage) => {\n if (publicApisAbortSignal.aborted === true) {\n return;\n }\n publicApisAbortController.abort(abortMessage);\n // If abort reason is not supported, set a scoped reasons instead. The reason property inside an\n // AbortSignal is a readonly property and trying to set it would throw an error.\n if (abortMessage && publicApisAbortSignal.reason !== abortMessage) {\n abortReason = abortMessage;\n }\n };\n return { response: job(), cancel };\n }\n}\n\nexport { createCancellableOperation };\n//# sourceMappingURL=createCancellableOperation.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar RestApiValidationErrorCode;\n(function (RestApiValidationErrorCode) {\n RestApiValidationErrorCode[\"InvalidApiName\"] = \"InvalidApiName\";\n})(RestApiValidationErrorCode || (RestApiValidationErrorCode = {}));\nconst validationErrorMap = {\n [RestApiValidationErrorCode.InvalidApiName]: {\n message: 'API name is invalid.',\n recoverySuggestion: 'Check if the API name matches the one in your configuration or `aws-exports.js`',\n },\n};\n\nexport { RestApiValidationErrorCode, validationErrorMap };\n//# sourceMappingURL=validation.mjs.map\n","import { parseJsonError } from '@aws-amplify/core/internals/aws-client-utils';\nimport { RestApiError } from '../errors/RestApiError.mjs';\nimport '../errors/validation.mjs';\n\n/**\n * Parses both AWS and non-AWS error responses coming from the users' backend code.\n * * AWS errors generated by the AWS services(e.g. API Gateway, Bedrock). They can be Signature errors,\n * ClockSkew errors, etc. These responses will be parsed to errors with proper name and message from the AWS\n * services.\n * * non-AWS errors thrown by the user code. They can contain any headers or body. Users need to access the\n * error.response to get the headers and body and parse them accordingly. The JS error name and message will\n * be `UnknownError` and `Unknown error` respectively.\n */\nconst parseRestApiServiceError = async (response) => {\n if (!response) {\n // Response is not considered an error.\n return;\n }\n const parsedAwsError = await parseJsonError(stubErrorResponse(response));\n if (!parsedAwsError) ;\n else {\n const bodyText = await response.body?.text();\n return buildRestApiError(parsedAwsError, {\n statusCode: response.statusCode,\n headers: response.headers,\n body: bodyText,\n });\n }\n};\n/**\n * The response object needs to be stub here because the parseAwsJsonError assumes the response body to be valid JSON.\n * Although this is true for AWS services, it is not true for responses from user's code. Once the response body is\n * unwrapped as JSON(and fail), it cannot be read as text again. Therefore, we need to stub the response body here to\n * make sure we can read the error response body as a JSON, and may fall back to read as text if it is not a valid JSON.\n */\nconst stubErrorResponse = (response) => {\n let bodyTextPromise;\n const bodyProxy = new Proxy(response.body, {\n get(target, prop, receiver) {\n if (prop === 'json') {\n // For potential AWS errors, error parser will try to parse the body as JSON first.\n return async () => {\n if (!bodyTextPromise) {\n bodyTextPromise = target.text();\n }\n try {\n return JSON.parse(await bodyTextPromise);\n }\n catch (error) {\n // If response body is not a valid JSON, we stub it to be an empty object and eventually parsed\n // as an unknown error\n return {};\n }\n };\n }\n else if (prop === 'text') {\n // For non-AWS errors, users can access the body as a string as a fallback.\n return async () => {\n if (!bodyTextPromise) {\n bodyTextPromise = target.text();\n }\n return bodyTextPromise;\n };\n }\n else {\n return Reflect.get(target, prop, receiver);\n }\n },\n });\n const responseProxy = new Proxy(response, {\n get(target, prop, receiver) {\n if (prop === 'body') {\n return bodyProxy;\n }\n else {\n return Reflect.get(target, prop, receiver);\n }\n },\n });\n return responseProxy;\n};\n/**\n * Utility to create a new RestApiError from a service error.\n */\nconst buildRestApiError = (error, response) => {\n const restApiError = new RestApiError({\n name: error?.name,\n message: error.message,\n underlyingError: error,\n response,\n });\n // $metadata is only required for backwards compatibility.\n return Object.assign(restApiError, { $metadata: error.$metadata });\n};\n\nexport { parseRestApiServiceError };\n//# sourceMappingURL=serviceError.mjs.map\n","import { ConsoleLogger } from '@aws-amplify/core';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('RestApis');\n\nexport { logger };\n//# sourceMappingURL=logger.mjs.map\n","import { DEFAULT_REST_IAM_SIGNING_SERVICE, DEFAULT_IAM_SIGNING_REGION, APIG_HOSTNAME_PATTERN } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Infer the signing service and region from the given URL, and for REST API only, from the Amplify configuration.\n * It supports raw API Gateway endpoint and AppSync endpoint.\n *\n * @internal\n */\nconst parseSigningInfo = (url, restApiOptions) => {\n const { service: signingService = DEFAULT_REST_IAM_SIGNING_SERVICE, region: signingRegion = DEFAULT_IAM_SIGNING_REGION, } = restApiOptions?.amplify.getConfig()?.API?.REST?.[restApiOptions?.apiName] ??\n {};\n const { hostname } = url;\n const [, service, region] = APIG_HOSTNAME_PATTERN.exec(hostname) ?? [];\n if (service === DEFAULT_REST_IAM_SIGNING_SERVICE) {\n // The configured endpoint is an API Gateway endpoint\n // @see: https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-call-api.html\n return {\n service,\n region: region ?? signingRegion,\n };\n }\n else if (service === 'appsync-api') {\n // AppSync endpoint is internally supported because GraphQL operation will send request using POST handler.\n // example: https://xxxx.appsync-api.us-east-1.amazonaws.com/graphql\n return {\n service: 'appsync',\n region: region ?? signingRegion,\n };\n }\n else {\n return {\n service: signingService,\n region: signingRegion,\n };\n }\n};\n\nexport { parseSigningInfo };\n//# sourceMappingURL=parseSigningInfo.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst DEFAULT_REST_IAM_SIGNING_SERVICE = 'execute-api';\nconst DEFAULT_APPSYNC_API_SERVICE = 'appsync-api';\nconst DEFAULT_IAM_SIGNING_REGION = 'us-east-1';\n/**\n * The REST endpoints generated by API Gateway\n * @see {@link https://docs.aws.amazon.com/general/latest/gr/apigateway.html#apigateway_region_data_plane}\n */\nconst APIG_HOSTNAME_PATTERN = /^.+\\.([a-z0-9-]+)\\.([a-z0-9-]+)\\.amazonaws\\.com/;\n\nexport { APIG_HOSTNAME_PATTERN, DEFAULT_APPSYNC_API_SERVICE, DEFAULT_IAM_SIGNING_REGION, DEFAULT_REST_IAM_SIGNING_SERVICE };\n//# sourceMappingURL=constants.mjs.map\n","import { AmplifyUrl, AmplifyUrlSearchParams } from '@aws-amplify/core/internals/utils';\nimport { RestApiError } from '../errors/RestApiError.mjs';\nimport { assertValidationError } from '../errors/assertValidatonError.mjs';\nimport { RestApiValidationErrorCode, validationErrorMap } from '../errors/validation.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Resolve the REST API request URL by:\n * 1. Loading the REST API endpoint from the Amplify configuration with corresponding API name.\n * 2. Appending the path to the endpoint.\n * 3. Merge the query parameters from path and the queryParameter argument which is taken from the public REST API\n * options.\n * 4. Validating the resulting URL string.\n *\n * @internal\n */\nconst resolveApiUrl = (amplify, apiName, path, queryParams) => {\n const urlStr = amplify.getConfig()?.API?.REST?.[apiName]?.endpoint;\n assertValidationError(!!urlStr, RestApiValidationErrorCode.InvalidApiName);\n try {\n const url = new AmplifyUrl(urlStr + path);\n if (queryParams) {\n const mergedQueryParams = new AmplifyUrlSearchParams(url.searchParams);\n Object.entries(queryParams).forEach(([key, value]) => {\n mergedQueryParams.set(key, value);\n });\n url.search = new AmplifyUrlSearchParams(mergedQueryParams).toString();\n }\n return url;\n }\n catch (error) {\n throw new RestApiError({\n name: RestApiValidationErrorCode.InvalidApiName,\n ...validationErrorMap[RestApiValidationErrorCode.InvalidApiName],\n recoverySuggestion: `Please make sure the REST endpoint URL is a valid URL string. Got ${urlStr}`,\n });\n }\n};\n\nexport { resolveApiUrl };\n//# sourceMappingURL=resolveApiUrl.mjs.map\n","import { RestApiError } from './RestApiError.mjs';\nimport { validationErrorMap } from './validation.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nfunction assertValidationError(assertion, name) {\n const { message, recoverySuggestion } = validationErrorMap[name];\n if (!assertion) {\n throw new RestApiError({ name, message, recoverySuggestion });\n }\n}\n\nexport { assertValidationError };\n//# sourceMappingURL=assertValidatonError.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Determines if IAM authentication should be applied for a GraphQL request.\n *\n * This function checks the `headers` of the HTTP request to determine if IAM authentication\n * is applicable. IAM authentication is considered applicable if there is no `authorization`\n * header, no `x-api-key` header, and `signingServiceInfo` is provided.\n *\n * @param request - The HTTP request object containing headers.\n * @param signingServiceInfo - Optional signing service information,\n * including service and region.\n * @returns A boolean `true` if IAM authentication should be applied.\n *\n * @internal\n */\nconst isIamAuthApplicableForGraphQL = ({ headers }, signingServiceInfo) => !headers.authorization && !headers['x-api-key'] && !!signingServiceInfo;\n/**\n * Determines if IAM authentication should be applied for a REST request.\n *\n * This function checks the `headers` of the HTTP request to determine if IAM authentication\n * is applicable. IAM authentication is considered applicable if there is no `authorization`\n * header and `signingServiceInfo` is provided.\n *\n * @param request - The HTTP request object containing headers.\n * @param signingServiceInfo - Optional signing service information,\n * including service and region.\n * @returns A boolean `true` if IAM authentication should be applied.\n *\n * @internal\n */\nconst isIamAuthApplicableForRest = ({ headers }, signingServiceInfo) => !headers.authorization && !!signingServiceInfo;\n\nexport { isIamAuthApplicableForGraphQL, isIamAuthApplicableForRest };\n//# sourceMappingURL=isIamAuthApplicable.mjs.map\n","import { getRetryDecider, jitteredBackoff, authenticatedHandler, unauthenticatedHandler } from '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport '../../errors/validation.mjs';\nimport { parseRestApiServiceError } from '../../utils/serviceError.mjs';\nimport { logger } from '../../utils/logger.mjs';\nimport { parseSigningInfo } from '../../utils/parseSigningInfo.mjs';\nimport { resolveHeaders } from '../../utils/resolveHeaders.mjs';\n\n/**\n * Make REST API call with best-effort IAM auth.\n * @param amplify Amplify instance to to resolve credentials and tokens. Should use different instance in client-side\n * and SSR\n * @param options Options accepted from public API options when calling the handlers.\n * @param signingServiceInfo Internal-only options enable IAM auth as well as to to overwrite the IAM signing service\n * and region. If specified, and NONE of API Key header or Auth header is present, IAM auth will be used.\n * @param iamAuthApplicable Callback function that is used to determine if IAM Auth should be used or not.\n *\n * @internal\n */\nconst transferHandler = async (amplify, options, iamAuthApplicable, signingServiceInfo) => {\n const { url, method, headers, body, withCredentials, abortSignal } = options;\n const resolvedBody = body\n ? body instanceof FormData\n ? body\n : JSON.stringify(body ?? '')\n : undefined;\n const resolvedHeaders = resolveHeaders(headers, body);\n const request = {\n url,\n headers: resolvedHeaders,\n method,\n body: resolvedBody,\n };\n const baseOptions = {\n retryDecider: getRetryDecider(parseRestApiServiceError),\n computeDelay: jitteredBackoff,\n withCrossDomainCredentials: withCredentials,\n abortSignal,\n };\n const isIamAuthApplicable = iamAuthApplicable(request, signingServiceInfo);\n let response;\n const credentials = await resolveCredentials(amplify);\n if (isIamAuthApplicable && credentials) {\n const signingInfoFromUrl = parseSigningInfo(url);\n const signingService = signingServiceInfo?.service ?? signingInfoFromUrl.service;\n const signingRegion = signingServiceInfo?.region ?? signingInfoFromUrl.region;\n response = await authenticatedHandler(request, {\n ...baseOptions,\n credentials,\n region: signingRegion,\n service: signingService,\n });\n }\n else {\n response = await unauthenticatedHandler(request, {\n ...baseOptions,\n });\n }\n // Clean-up un-modeled properties from response.\n return {\n statusCode: response.statusCode,\n headers: response.headers,\n body: response.body,\n };\n};\nconst resolveCredentials = async (amplify) => {\n try {\n const { credentials } = await amplify.Auth.fetchAuthSession();\n if (credentials) {\n return credentials;\n }\n }\n catch (e) {\n logger.debug('No credentials available, the request will be unsigned.');\n }\n return null;\n};\n\nexport { transferHandler };\n//# sourceMappingURL=handler.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst resolveHeaders = (headers, body) => {\n const normalizedHeaders = {};\n for (const key in headers) {\n normalizedHeaders[key.toLowerCase()] = headers[key];\n }\n if (body) {\n normalizedHeaders['content-type'] = 'application/json; charset=UTF-8';\n if (body instanceof FormData) {\n /**\n * If body is a FormData we should not allow setting content-type.\n * It's because runtime HTTP handlers(xhr, fetch, undici, node-fetch,\n * etc.) will modify the content-type value when setting multipart\n * boundary.\n */\n delete normalizedHeaders['content-type'];\n }\n }\n return normalizedHeaders;\n};\n\nexport { resolveHeaders };\n//# sourceMappingURL=resolveHeaders.mjs.map\n","export { cancel, post, updateRequestToBeCancellable } from '../apis/common/internalPost.mjs';\n//# sourceMappingURL=index.mjs.map\n","import { createCancellableOperation } from '../../utils/createCancellableOperation.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport '../../errors/validation.mjs';\nimport '../../utils/logger.mjs';\nimport { isIamAuthApplicableForGraphQL } from '../../utils/isIamAuthApplicable.mjs';\nimport { transferHandler } from './handler.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * This weak map provides functionality to cancel a request given the promise containing the `post` request.\n *\n * 1. For every GraphQL POST request, an abort controller is created and supplied to the request.\n * 2. The promise fulfilled by GraphGL POST request is then mapped to that abort controller.\n * 3. The promise is returned to the external caller.\n * 4. The caller can either wait for the promise to fulfill or call `cancel(promise)` to cancel the request.\n * 5. If `cancel(promise)` is called, then the corresponding abort controller is retrieved from the map below.\n * 6. GraphQL POST request will be rejected with the error message provided during cancel.\n * 7. Caller can check if the error is because of cancelling by calling `isCancelError(error)`.\n */\nconst cancelTokenMap = new WeakMap();\n/**\n * @internal\n *\n * REST POST handler to send GraphQL request to given endpoint. By default, it will use IAM to authorize\n * the request. In some auth modes, the IAM auth has to be disabled. Here's how to set up the request auth correctly:\n * * If auth mode is 'iam', you MUST NOT set 'authorization' header and 'x-api-key' header, since it would disable IAM\n * auth. You MUST also set 'input.options.signingServiceInfo' option.\n * * The including 'input.options.signingServiceInfo.service' and 'input.options.signingServiceInfo.region' are\n * optional. If omitted, the signing service and region will be inferred from url.\n * * If auth mode is 'none', you MUST NOT set 'options.signingServiceInfo' option.\n * * If auth mode is 'apiKey', you MUST set 'x-api-key' custom header.\n * * If auth mode is 'oidc' or 'lambda' or 'userPool', you MUST set 'authorization' header.\n *\n * To make the internal post cancellable, you must also call `updateRequestToBeCancellable()` with the promise from\n * internal post call and the abort controller supplied to the internal post call.\n *\n * @param amplify the AmplifyClassV6 instance - it may be the singleton used on Web, or an instance created within\n * a context created by `runWithAmplifyServerContext`\n * @param postInput an object of {@link InternalPostInput}\n * @param postInput.url The URL that the POST request sends to\n * @param postInput.options Options of the POST request\n * @param postInput.abortController The abort controller used to cancel the POST request\n * @returns a {@link RestApiResponse}\n *\n * @throws an {@link AmplifyError} with `Network Error` as the `message` when the external resource is unreachable due to one\n * of the following reasons:\n * 1. no network connection\n * 2. CORS error\n * @throws a {@link CanceledError} when the ongoing POST request get cancelled\n */\nconst post = (amplify, { url, options, abortController }) => {\n const controller = abortController ?? new AbortController();\n const responsePromise = createCancellableOperation(async () => {\n const response = transferHandler(amplify, {\n url,\n method: 'POST',\n ...options,\n abortSignal: controller.signal,\n }, isIamAuthApplicableForGraphQL, options?.signingServiceInfo);\n return response;\n }, controller);\n const responseWithCleanUp = responsePromise.finally(() => {\n cancelTokenMap.delete(responseWithCleanUp);\n });\n return responseWithCleanUp;\n};\n/**\n * Cancels a request given the promise returned by `post`.\n * If the request is already completed, this function does nothing.\n * It MUST be used after `updateRequestToBeCancellable` is called.\n */\nconst cancel = (promise, message) => {\n const controller = cancelTokenMap.get(promise);\n if (controller) {\n controller.abort(message);\n if (message && controller.signal.reason !== message) {\n // In runtimes where `AbortSignal.reason` is not supported, we track the reason ourselves.\n // @ts-expect-error reason is read-only property.\n controller.signal.reason = message;\n }\n return true;\n }\n return false;\n};\n/**\n * MUST be used to make a promise including internal `post` API call cancellable.\n */\nconst updateRequestToBeCancellable = (promise, controller) => {\n cancelTokenMap.set(promise, controller);\n};\n\nexport { cancel, post, updateRequestToBeCancellable };\n//# sourceMappingURL=internalPost.mjs.map\n","import { USER_AGENT_HEADER, getAmplifyUserAgent } from '@aws-amplify/core/internals/utils';\nimport { MESSAGE_TYPES, DEFAULT_KEEP_ALIVE_TIMEOUT } from '../constants.mjs';\nimport { AWSWebSocketProvider } from '../AWSWebSocketProvider/index.mjs';\nimport { awsRealTimeHeaderBasedAuth } from '../AWSWebSocketProvider/authHeaders.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst PROVIDER_NAME = 'AWSAppSyncRealTimeProvider';\nconst WS_PROTOCOL_NAME = 'graphql-ws';\nconst CONNECT_URI = '/connect';\nclass AWSAppSyncRealTimeProvider extends AWSWebSocketProvider {\n constructor() {\n super({\n providerName: PROVIDER_NAME,\n wsProtocolName: WS_PROTOCOL_NAME,\n connectUri: CONNECT_URI,\n });\n }\n getProviderName() {\n return PROVIDER_NAME;\n }\n subscribe(options, customUserAgentDetails) {\n return super.subscribe(options, customUserAgentDetails);\n }\n async _prepareSubscriptionPayload({ options, subscriptionId, customUserAgentDetails, additionalCustomHeaders, libraryConfigHeaders, }) {\n const { appSyncGraphqlEndpoint, authenticationType, query, variables, apiKey, region, } = options;\n const data = {\n query,\n variables,\n };\n const serializedData = JSON.stringify(data);\n const headers = {\n ...(await awsRealTimeHeaderBasedAuth({\n apiKey,\n appSyncGraphqlEndpoint,\n authenticationType,\n payload: serializedData,\n canonicalUri: '',\n region,\n additionalCustomHeaders,\n })),\n ...libraryConfigHeaders,\n ...additionalCustomHeaders,\n [USER_AGENT_HEADER]: getAmplifyUserAgent(customUserAgentDetails),\n };\n const subscriptionMessage = {\n id: subscriptionId,\n payload: {\n data: serializedData,\n extensions: {\n authorization: {\n ...headers,\n },\n },\n },\n type: MESSAGE_TYPES.GQL_START,\n };\n const serializedSubscriptionMessage = JSON.stringify(subscriptionMessage);\n return serializedSubscriptionMessage;\n }\n _handleSubscriptionData(message) {\n this.logger.debug(`subscription message from AWS AppSync RealTime: ${message.data}`);\n const { id = '', payload, type } = JSON.parse(String(message.data));\n const { observer = null, query = '', variables = {}, } = this.subscriptionObserverMap.get(id) || {};\n this.logger.debug({ id, observer, query, variables });\n if (type === MESSAGE_TYPES.DATA && payload && payload.data) {\n if (observer) {\n observer.next(payload);\n }\n else {\n this.logger.debug(`observer not found for id: ${id}`);\n }\n return [true, { id, type, payload }];\n }\n return [false, { id, type, payload }];\n }\n _unsubscribeMessage(subscriptionId) {\n return {\n id: subscriptionId,\n type: MESSAGE_TYPES.GQL_STOP,\n };\n }\n _extractConnectionTimeout(data) {\n const { payload: { connectionTimeoutMs = DEFAULT_KEEP_ALIVE_TIMEOUT } = {}, } = data;\n return connectionTimeoutMs;\n }\n _extractErrorCodeAndType(data) {\n const { payload: { errors: [{ errorType = '', errorCode = 0 } = {}] = [] } = {}, } = data;\n return { errorCode, errorType };\n }\n}\n\nexport { AWSAppSyncRealTimeProvider };\n//# sourceMappingURL=index.mjs.map\n","export { AMPLIFY_SYMBOL } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst MAX_DELAY_MS = 5000;\nconst NON_RETRYABLE_CODES = [400, 401, 403];\nconst NON_RETRYABLE_ERROR_TYPES = [\n 'BadRequestException',\n 'UnauthorizedException',\n];\nconst CONNECTION_STATE_CHANGE = 'ConnectionStateChange';\nvar MESSAGE_TYPES;\n(function (MESSAGE_TYPES) {\n /**\n * Client -> Server message.\n * This message type is the first message after handshake and this will initialize AWS AppSync RealTime communication\n */\n MESSAGE_TYPES[\"GQL_CONNECTION_INIT\"] = \"connection_init\";\n /**\n * Server -> Client message\n * This message type is in case there is an issue with AWS AppSync RealTime when establishing connection\n */\n MESSAGE_TYPES[\"GQL_CONNECTION_ERROR\"] = \"connection_error\";\n /**\n * Server -> Client message.\n * This message type is for the ack response from AWS AppSync RealTime for GQL_CONNECTION_INIT message\n */\n MESSAGE_TYPES[\"GQL_CONNECTION_ACK\"] = \"connection_ack\";\n /**\n * Client -> Server message.\n * This message type is for register subscriptions with AWS AppSync RealTime\n */\n MESSAGE_TYPES[\"GQL_START\"] = \"start\";\n /**\n * Server -> Client message.\n * This message type is for the ack response from AWS AppSync RealTime for GQL_START message\n */\n MESSAGE_TYPES[\"GQL_START_ACK\"] = \"start_ack\";\n /**\n * Server -> Client message.\n * This message type is for subscription message from AWS AppSync RealTime or Events\n */\n MESSAGE_TYPES[\"DATA\"] = \"data\";\n /**\n * Server -> Client message.\n * This message type helps the client to know is still receiving messages from AWS AppSync RealTime\n */\n MESSAGE_TYPES[\"GQL_CONNECTION_KEEP_ALIVE\"] = \"ka\";\n /**\n * Client -> Server message.\n * This message type is for unregister subscriptions with AWS AppSync RealTime\n */\n MESSAGE_TYPES[\"GQL_STOP\"] = \"stop\";\n /**\n * Server -> Client message.\n * This message type is for the ack response from AWS AppSync RealTime for GQL_STOP message\n */\n MESSAGE_TYPES[\"GQL_COMPLETE\"] = \"complete\";\n /**\n * Server -> Client message.\n * This message type is for sending error messages from AWS AppSync RealTime to the client\n */\n MESSAGE_TYPES[\"GQL_ERROR\"] = \"error\";\n /**\n * Client -> Server message.\n * This message type is for registering subscriptions with Events\n */\n MESSAGE_TYPES[\"EVENT_SUBSCRIBE\"] = \"subscribe\";\n /**\n * Client -> Server message.\n * This message type is for publishing a message with Events\n */\n MESSAGE_TYPES[\"EVENT_PUBLISH\"] = \"publish\";\n /**\n * Server -> Client message.\n * Server acknowledges successful subscription\n */\n MESSAGE_TYPES[\"EVENT_SUBSCRIBE_ACK\"] = \"subscribe_success\";\n /**\n * Server -> Client message.\n * Server acknowledges successful publish\n */\n MESSAGE_TYPES[\"EVENT_PUBLISH_ACK\"] = \"publish_success\";\n /**\n * Client -> Server message.\n * This message type is for unregister subscriptions with AWS AppSync RealTime\n */\n MESSAGE_TYPES[\"EVENT_STOP\"] = \"unsubscribe\";\n /**\n * Server -> Client message.\n * This is the ack response from AWS AppSync Events to EVENT_STOP message\n */\n MESSAGE_TYPES[\"EVENT_COMPLETE\"] = \"unsubscribe_success\";\n})(MESSAGE_TYPES || (MESSAGE_TYPES = {}));\nvar SUBSCRIPTION_STATUS;\n(function (SUBSCRIPTION_STATUS) {\n SUBSCRIPTION_STATUS[SUBSCRIPTION_STATUS[\"PENDING\"] = 0] = \"PENDING\";\n SUBSCRIPTION_STATUS[SUBSCRIPTION_STATUS[\"CONNECTED\"] = 1] = \"CONNECTED\";\n SUBSCRIPTION_STATUS[SUBSCRIPTION_STATUS[\"FAILED\"] = 2] = \"FAILED\";\n})(SUBSCRIPTION_STATUS || (SUBSCRIPTION_STATUS = {}));\nvar SOCKET_STATUS;\n(function (SOCKET_STATUS) {\n SOCKET_STATUS[SOCKET_STATUS[\"CLOSED\"] = 0] = \"CLOSED\";\n SOCKET_STATUS[SOCKET_STATUS[\"READY\"] = 1] = \"READY\";\n SOCKET_STATUS[SOCKET_STATUS[\"CONNECTING\"] = 2] = \"CONNECTING\";\n})(SOCKET_STATUS || (SOCKET_STATUS = {}));\nconst AWS_APPSYNC_REALTIME_HEADERS = {\n accept: 'application/json, text/javascript',\n 'content-encoding': 'amz-1.0',\n 'content-type': 'application/json; charset=UTF-8',\n};\n/**\n * Time in milleseconds to wait for GQL_CONNECTION_INIT message\n */\nconst CONNECTION_INIT_TIMEOUT = 15000;\n/**\n * Time in milleseconds to wait for GQL_START_ACK message\n */\nconst START_ACK_TIMEOUT = 15000;\n/**\n * Default Time in milleseconds to wait for GQL_CONNECTION_KEEP_ALIVE message\n */\nconst DEFAULT_KEEP_ALIVE_TIMEOUT = 5 * 60 * 1000;\n/**\n * Default Time in milleseconds to alert for missed GQL_CONNECTION_KEEP_ALIVE message\n */\nconst DEFAULT_KEEP_ALIVE_ALERT_TIMEOUT = 65 * 1000;\n/**\n * Default delay time in milleseconds between when reconnect is triggered vs when it is attempted\n */\nconst RECONNECT_DELAY = 5 * 1000;\n/**\n * Default interval time in milleseconds between when reconnect is re-attempted\n */\nconst RECONNECT_INTERVAL = 60 * 1000;\n\nexport { AWS_APPSYNC_REALTIME_HEADERS, CONNECTION_INIT_TIMEOUT, CONNECTION_STATE_CHANGE, DEFAULT_KEEP_ALIVE_ALERT_TIMEOUT, DEFAULT_KEEP_ALIVE_TIMEOUT, MAX_DELAY_MS, MESSAGE_TYPES, NON_RETRYABLE_CODES, NON_RETRYABLE_ERROR_TYPES, RECONNECT_DELAY, RECONNECT_INTERVAL, SOCKET_STATUS, START_ACK_TIMEOUT, SUBSCRIPTION_STATUS };\n//# sourceMappingURL=constants.mjs.map\n","import { Observable } from 'rxjs';\nimport { GraphQLError } from 'graphql';\nimport { ConsoleLogger, Hub } from '@aws-amplify/core';\nimport { NonRetryableError, amplifyUuid, isNonRetryableError, base64Encoder, jitteredExponentialRetry, AMPLIFY_SYMBOL } from '@aws-amplify/core/internals/utils';\nimport { ConnectionState, CONTROL_MSG } from '../../types/PubSub.mjs';\nimport { SOCKET_STATUS, DEFAULT_KEEP_ALIVE_TIMEOUT, NON_RETRYABLE_CODES, NON_RETRYABLE_ERROR_TYPES, SUBSCRIPTION_STATUS, START_ACK_TIMEOUT, MESSAGE_TYPES, DEFAULT_KEEP_ALIVE_ALERT_TIMEOUT, MAX_DELAY_MS, CONNECTION_INIT_TIMEOUT, CONNECTION_STATE_CHANGE } from '../constants.mjs';\nimport { ConnectionStateMonitor, CONNECTION_CHANGE } from '../../utils/ConnectionStateMonitor.mjs';\nimport { ReconnectionMonitor, ReconnectEvent } from '../../utils/ReconnectionMonitor.mjs';\nimport { additionalHeadersFromOptions, queryParamsFromCustomHeaders, realtimeUrlWithQueryString } from './appsyncUrl.mjs';\nimport { awsRealTimeHeaderBasedAuth } from './authHeaders.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst dispatchApiEvent = (payload) => {\n Hub.dispatch('api', payload, 'PubSub', AMPLIFY_SYMBOL);\n};\nclass AWSWebSocketProvider {\n constructor(args) {\n this.subscriptionObserverMap = new Map();\n this.socketStatus = SOCKET_STATUS.CLOSED;\n this.keepAliveTimeout = DEFAULT_KEEP_ALIVE_TIMEOUT;\n this.promiseArray = [];\n this.connectionStateMonitor = new ConnectionStateMonitor();\n this.reconnectionMonitor = new ReconnectionMonitor();\n /**\n * Open WebSocket connection & perform handshake\n * Ref: https://docs.aws.amazon.com/appsync/latest/devguide/real-time-websocket-client.html#appsynclong-real-time-websocket-client-implementation-guide-for-graphql-subscriptions\n *\n * @param subprotocol -\n */\n this._establishConnection = async (awsRealTimeUrl, subprotocol) => {\n this.logger.debug(`Establishing WebSocket connection to ${awsRealTimeUrl}`);\n try {\n await this._openConnection(awsRealTimeUrl, subprotocol);\n await this._initiateHandshake();\n }\n catch (err) {\n const { errorType, errorCode } = err;\n if (NON_RETRYABLE_CODES.includes(errorCode) ||\n // Event API does not currently return `errorCode`. This may change in the future.\n // For now fall back to also checking known non-retryable error types\n NON_RETRYABLE_ERROR_TYPES.includes(errorType)) {\n throw new NonRetryableError(errorType);\n }\n else if (errorType) {\n throw new Error(errorType);\n }\n else {\n throw err;\n }\n }\n };\n this.logger = new ConsoleLogger(args.providerName);\n this.wsProtocolName = args.wsProtocolName;\n this.wsConnectUri = args.connectUri;\n this.connectionStateMonitorSubscription =\n this._startConnectionStateMonitoring();\n }\n /**\n * Mark the socket closed and release all active listeners\n */\n close() {\n // Mark the socket closed both in status and the connection monitor\n this.socketStatus = SOCKET_STATUS.CLOSED;\n this.connectionStateMonitor.record(CONNECTION_CHANGE.CONNECTION_FAILED);\n // Turn off the subscription monitor Hub publishing\n this.connectionStateMonitorSubscription.unsubscribe();\n // Complete all reconnect observers\n this.reconnectionMonitor.close();\n return new Promise((resolve, reject) => {\n if (this.awsRealTimeSocket) {\n this.awsRealTimeSocket.onclose = (_) => {\n this.subscriptionObserverMap = new Map();\n this.awsRealTimeSocket = undefined;\n resolve();\n };\n this.awsRealTimeSocket.onerror = (err) => {\n reject(err);\n };\n this.awsRealTimeSocket.close();\n }\n else {\n resolve();\n }\n });\n }\n subscribe(options, customUserAgentDetails) {\n return new Observable(observer => {\n if (!options?.appSyncGraphqlEndpoint) {\n observer.error({\n errors: [\n {\n ...new GraphQLError(`Subscribe only available for AWS AppSync endpoint`),\n },\n ],\n });\n observer.complete();\n return;\n }\n let subscriptionStartInProgress = false;\n const subscriptionId = amplifyUuid();\n const startSubscription = () => {\n if (!subscriptionStartInProgress) {\n subscriptionStartInProgress = true;\n this._startSubscriptionWithAWSAppSyncRealTime({\n options,\n observer,\n subscriptionId,\n customUserAgentDetails,\n })\n .catch(err => {\n this.logger.debug(`${CONTROL_MSG.REALTIME_SUBSCRIPTION_INIT_ERROR}: ${err}`);\n this.connectionStateMonitor.record(CONNECTION_CHANGE.CLOSED);\n })\n .finally(() => {\n subscriptionStartInProgress = false;\n });\n }\n };\n // Add an observable to the reconnection list to manage reconnection for this subscription\n const reconnectSubscription = new Observable(reconnectSubscriptionObserver => {\n this.reconnectionMonitor.addObserver(reconnectSubscriptionObserver);\n }).subscribe(() => {\n startSubscription();\n });\n startSubscription();\n return async () => {\n await this._cleanupSubscription(subscriptionId, reconnectSubscription);\n };\n });\n }\n async connect(options) {\n if (this.socketStatus === SOCKET_STATUS.READY) {\n return;\n }\n await this._connectWebSocket(options);\n }\n async publish(options, customUserAgentDetails) {\n if (this.socketStatus !== SOCKET_STATUS.READY) {\n throw new Error('Subscription has not been initialized');\n }\n return this._publishMessage(options, customUserAgentDetails);\n }\n async _connectWebSocket(options) {\n const { apiKey, appSyncGraphqlEndpoint, authenticationType, region } = options;\n const { additionalCustomHeaders } = await additionalHeadersFromOptions(options);\n this.connectionStateMonitor.record(CONNECTION_CHANGE.OPENING_CONNECTION);\n await this._initializeWebSocketConnection({\n apiKey,\n appSyncGraphqlEndpoint,\n authenticationType,\n region,\n additionalCustomHeaders,\n });\n }\n async _publishMessage(options, customUserAgentDetails) {\n const subscriptionId = amplifyUuid();\n const { additionalCustomHeaders, libraryConfigHeaders } = await additionalHeadersFromOptions(options);\n const serializedSubscriptionMessage = await this._prepareSubscriptionPayload({\n options,\n subscriptionId,\n customUserAgentDetails,\n additionalCustomHeaders,\n libraryConfigHeaders,\n publish: true,\n });\n return new Promise((resolve, reject) => {\n if (this.awsRealTimeSocket) {\n const publishListener = (event) => {\n const data = JSON.parse(event.data);\n if (data.id === subscriptionId && data.type === 'publish_success') {\n this.awsRealTimeSocket &&\n this.awsRealTimeSocket.removeEventListener('message', publishListener);\n resolve();\n }\n if (data.erroredEvents && data.erroredEvents.length > 0) ;\n };\n this.awsRealTimeSocket.addEventListener('message', publishListener);\n this.awsRealTimeSocket.addEventListener('close', () => {\n reject(new Error('WebSocket is closed'));\n });\n //\n // this.awsRealTimeSocket.addEventListener('error', publishListener);\n this.awsRealTimeSocket.send(serializedSubscriptionMessage);\n }\n });\n }\n async _cleanupSubscription(subscriptionId, reconnectSubscription) {\n // Cleanup reconnection subscription\n reconnectSubscription?.unsubscribe();\n // Cleanup after unsubscribing or observer.complete was called after _startSubscriptionWithAWSAppSyncRealTime\n try {\n // Waiting that subscription has been connected before trying to unsubscribe\n await this._waitForSubscriptionToBeConnected(subscriptionId);\n const { subscriptionState } = this.subscriptionObserverMap.get(subscriptionId) || {};\n if (!subscriptionState) {\n // subscription already unsubscribed\n return;\n }\n if (subscriptionState === SUBSCRIPTION_STATUS.CONNECTED) {\n this._sendUnsubscriptionMessage(subscriptionId);\n }\n else {\n throw new Error('Subscription never connected');\n }\n }\n catch (err) {\n this.logger.debug(`Error while unsubscribing ${err}`);\n }\n finally {\n this._removeSubscriptionObserver(subscriptionId);\n }\n }\n // Monitor the connection state and pass changes along to Hub\n _startConnectionStateMonitoring() {\n return this.connectionStateMonitor.connectionStateObservable.subscribe(connectionState => {\n dispatchApiEvent({\n event: CONNECTION_STATE_CHANGE,\n data: {\n provider: this,\n connectionState,\n },\n message: `Connection state is ${connectionState}`,\n });\n this.connectionState = connectionState;\n // Trigger START_RECONNECT when the connection is disrupted\n if (connectionState === ConnectionState.ConnectionDisrupted) {\n this.reconnectionMonitor.record(ReconnectEvent.START_RECONNECT);\n }\n // Trigger HALT_RECONNECT to halt reconnection attempts when the state is anything other than\n // ConnectionDisrupted or Connecting\n if ([\n ConnectionState.Connected,\n ConnectionState.ConnectedPendingDisconnect,\n ConnectionState.ConnectedPendingKeepAlive,\n ConnectionState.ConnectedPendingNetwork,\n ConnectionState.ConnectionDisruptedPendingNetwork,\n ConnectionState.Disconnected,\n ].includes(connectionState)) {\n this.reconnectionMonitor.record(ReconnectEvent.HALT_RECONNECT);\n }\n });\n }\n async _startSubscriptionWithAWSAppSyncRealTime({ options, observer, subscriptionId, customUserAgentDetails, }) {\n const { query, variables } = options;\n const { additionalCustomHeaders, libraryConfigHeaders } = await additionalHeadersFromOptions(options);\n this.subscriptionObserverMap.set(subscriptionId, {\n observer,\n query: query ?? '',\n variables: variables ?? {},\n subscriptionState: SUBSCRIPTION_STATUS.PENDING,\n startAckTimeoutId: undefined,\n });\n const serializedSubscriptionMessage = await this._prepareSubscriptionPayload({\n options,\n subscriptionId,\n customUserAgentDetails,\n additionalCustomHeaders,\n libraryConfigHeaders,\n });\n try {\n await this._connectWebSocket(options);\n }\n catch (err) {\n this._logStartSubscriptionError(subscriptionId, observer, err);\n return;\n }\n // Potential race condition can occur when unsubscribe is called during _initializeWebSocketConnection.\n // E.g.unsubscribe gets invoked prior to finishing WebSocket handshake or START_ACK.\n // Both subscriptionFailedCallback and subscriptionReadyCallback are used to synchronized this.\n const { subscriptionFailedCallback, subscriptionReadyCallback } = this.subscriptionObserverMap.get(subscriptionId) ?? {};\n // This must be done before sending the message in order to be listening immediately\n this.subscriptionObserverMap.set(subscriptionId, {\n observer,\n subscriptionState: SUBSCRIPTION_STATUS.PENDING,\n query: query ?? '',\n variables: variables ?? {},\n subscriptionReadyCallback,\n subscriptionFailedCallback,\n startAckTimeoutId: setTimeout(() => {\n this._timeoutStartSubscriptionAck(subscriptionId);\n }, START_ACK_TIMEOUT),\n });\n if (this.awsRealTimeSocket) {\n this.awsRealTimeSocket.send(serializedSubscriptionMessage);\n }\n }\n // Log logic for start subscription failures\n _logStartSubscriptionError(subscriptionId, observer, err) {\n this.logger.debug({ err });\n const message = String(err.message ?? '');\n // Resolving to give the state observer time to propogate the update\n this.connectionStateMonitor.record(CONNECTION_CHANGE.CLOSED);\n // Capture the error only when the network didn't cause disruption\n if (this.connectionState !== ConnectionState.ConnectionDisruptedPendingNetwork) {\n // When the error is non-retriable, error out the observable\n if (isNonRetryableError(err)) {\n observer.error({\n errors: [\n {\n ...new GraphQLError(`${CONTROL_MSG.CONNECTION_FAILED}: ${message}`),\n },\n ],\n });\n }\n else {\n this.logger.debug(`${CONTROL_MSG.CONNECTION_FAILED}: ${message}`);\n }\n const { subscriptionFailedCallback } = this.subscriptionObserverMap.get(subscriptionId) || {};\n // Notify concurrent unsubscription\n if (typeof subscriptionFailedCallback === 'function') {\n subscriptionFailedCallback();\n }\n }\n }\n // Waiting that subscription has been connected before trying to unsubscribe\n async _waitForSubscriptionToBeConnected(subscriptionId) {\n const subscriptionObserver = this.subscriptionObserverMap.get(subscriptionId);\n if (subscriptionObserver) {\n const { subscriptionState } = subscriptionObserver;\n // This in case unsubscribe is invoked before sending start subscription message\n if (subscriptionState === SUBSCRIPTION_STATUS.PENDING) {\n return new Promise((resolve, reject) => {\n const { observer, subscriptionState: observedSubscriptionState, variables, query, } = subscriptionObserver;\n this.subscriptionObserverMap.set(subscriptionId, {\n observer,\n subscriptionState: observedSubscriptionState,\n variables,\n query,\n subscriptionReadyCallback: resolve,\n subscriptionFailedCallback: reject,\n });\n });\n }\n }\n }\n _sendUnsubscriptionMessage(subscriptionId) {\n try {\n if (this.awsRealTimeSocket &&\n this.awsRealTimeSocket.readyState === WebSocket.OPEN &&\n this.socketStatus === SOCKET_STATUS.READY) {\n // Preparing unsubscribe message to stop receiving messages for that subscription\n const unsubscribeMessage = this._unsubscribeMessage(subscriptionId);\n const stringToAWSRealTime = JSON.stringify(unsubscribeMessage);\n this.awsRealTimeSocket.send(stringToAWSRealTime);\n }\n }\n catch (err) {\n // If GQL_STOP is not sent because of disconnection issue, then there is nothing the client can do\n this.logger.debug({ err });\n }\n }\n _removeSubscriptionObserver(subscriptionId) {\n this.subscriptionObserverMap.delete(subscriptionId);\n // Verifying 1000ms after removing subscription in case there are new subscription unmount/mount\n setTimeout(this._closeSocketIfRequired.bind(this), 1000);\n }\n _closeSocketIfRequired() {\n if (this.subscriptionObserverMap.size > 0) {\n // Active subscriptions on the WebSocket\n return;\n }\n if (!this.awsRealTimeSocket) {\n this.socketStatus = SOCKET_STATUS.CLOSED;\n return;\n }\n this.connectionStateMonitor.record(CONNECTION_CHANGE.CLOSING_CONNECTION);\n if (this.awsRealTimeSocket.bufferedAmount > 0) {\n // Still data on the WebSocket\n setTimeout(this._closeSocketIfRequired.bind(this), 1000);\n }\n else {\n this.logger.debug('closing WebSocket...');\n if (this.keepAliveTimeoutId) {\n clearTimeout(this.keepAliveTimeoutId);\n }\n if (this.keepAliveAlertTimeoutId) {\n clearTimeout(this.keepAliveAlertTimeoutId);\n }\n const tempSocket = this.awsRealTimeSocket;\n // Cleaning callbacks to avoid race condition, socket still exists\n tempSocket.onclose = null;\n tempSocket.onerror = null;\n tempSocket.close(1000);\n this.awsRealTimeSocket = undefined;\n this.socketStatus = SOCKET_STATUS.CLOSED;\n this.connectionStateMonitor.record(CONNECTION_CHANGE.CLOSED);\n }\n }\n _handleIncomingSubscriptionMessage(message) {\n if (typeof message.data !== 'string') {\n return;\n }\n const [isData, data] = this._handleSubscriptionData(message);\n if (isData)\n return;\n const { type, id, payload } = data;\n const { observer = null, query = '', variables = {}, startAckTimeoutId, subscriptionReadyCallback, subscriptionFailedCallback, } = this.subscriptionObserverMap.get(id) || {};\n if (type === MESSAGE_TYPES.GQL_START_ACK ||\n type === MESSAGE_TYPES.EVENT_SUBSCRIBE_ACK) {\n this.logger.debug(`subscription ready for ${JSON.stringify({ query, variables })}`);\n if (typeof subscriptionReadyCallback === 'function') {\n subscriptionReadyCallback();\n }\n if (startAckTimeoutId)\n clearTimeout(startAckTimeoutId);\n dispatchApiEvent({\n event: CONTROL_MSG.SUBSCRIPTION_ACK,\n data: { query, variables },\n message: 'Connection established for subscription',\n });\n const subscriptionState = SUBSCRIPTION_STATUS.CONNECTED;\n if (observer) {\n this.subscriptionObserverMap.set(id, {\n observer,\n query,\n variables,\n startAckTimeoutId: undefined,\n subscriptionState,\n subscriptionReadyCallback,\n subscriptionFailedCallback,\n });\n }\n this.connectionStateMonitor.record(CONNECTION_CHANGE.CONNECTION_ESTABLISHED);\n return;\n }\n if (type === MESSAGE_TYPES.GQL_CONNECTION_KEEP_ALIVE) {\n if (this.keepAliveTimeoutId)\n clearTimeout(this.keepAliveTimeoutId);\n if (this.keepAliveAlertTimeoutId)\n clearTimeout(this.keepAliveAlertTimeoutId);\n this.keepAliveTimeoutId = setTimeout(() => {\n this._errorDisconnect(CONTROL_MSG.TIMEOUT_DISCONNECT);\n }, this.keepAliveTimeout);\n this.keepAliveAlertTimeoutId = setTimeout(() => {\n this.connectionStateMonitor.record(CONNECTION_CHANGE.KEEP_ALIVE_MISSED);\n }, DEFAULT_KEEP_ALIVE_ALERT_TIMEOUT);\n this.connectionStateMonitor.record(CONNECTION_CHANGE.KEEP_ALIVE);\n return;\n }\n if (type === MESSAGE_TYPES.GQL_ERROR) {\n const subscriptionState = SUBSCRIPTION_STATUS.FAILED;\n if (observer) {\n this.subscriptionObserverMap.set(id, {\n observer,\n query,\n variables,\n startAckTimeoutId,\n subscriptionReadyCallback,\n subscriptionFailedCallback,\n subscriptionState,\n });\n this.logger.debug(`${CONTROL_MSG.CONNECTION_FAILED}: ${JSON.stringify(payload ?? data)}`);\n observer.error({\n errors: [\n {\n ...new GraphQLError(`${CONTROL_MSG.CONNECTION_FAILED}: ${JSON.stringify(payload ?? data)}`),\n },\n ],\n });\n if (startAckTimeoutId)\n clearTimeout(startAckTimeoutId);\n if (typeof subscriptionFailedCallback === 'function') {\n subscriptionFailedCallback();\n }\n }\n }\n }\n _errorDisconnect(msg) {\n this.logger.debug(`Disconnect error: ${msg}`);\n if (this.awsRealTimeSocket) {\n this.connectionStateMonitor.record(CONNECTION_CHANGE.CLOSED);\n this.awsRealTimeSocket.close();\n }\n this.socketStatus = SOCKET_STATUS.CLOSED;\n }\n _timeoutStartSubscriptionAck(subscriptionId) {\n const subscriptionObserver = this.subscriptionObserverMap.get(subscriptionId);\n if (subscriptionObserver) {\n const { observer, query, variables } = subscriptionObserver;\n if (!observer) {\n return;\n }\n this.subscriptionObserverMap.set(subscriptionId, {\n observer,\n query,\n variables,\n subscriptionState: SUBSCRIPTION_STATUS.FAILED,\n });\n this.connectionStateMonitor.record(CONNECTION_CHANGE.CLOSED);\n this.logger.debug('timeoutStartSubscription', JSON.stringify({ query, variables }));\n }\n }\n _initializeWebSocketConnection({ appSyncGraphqlEndpoint, authenticationType, apiKey, region, additionalCustomHeaders, }) {\n if (this.socketStatus === SOCKET_STATUS.READY) {\n return;\n }\n // TODO(Eslint): refactor to now use async function as the promise executor\n // eslint-disable-next-line no-async-promise-executor\n return new Promise(async (resolve, reject) => {\n this.promiseArray.push({ res: resolve, rej: reject });\n if (this.socketStatus === SOCKET_STATUS.CLOSED) {\n try {\n this.socketStatus = SOCKET_STATUS.CONNECTING;\n // Empty payload on connect\n const payloadString = '{}';\n const authHeader = await awsRealTimeHeaderBasedAuth({\n authenticationType,\n payload: payloadString,\n canonicalUri: this.wsConnectUri,\n apiKey,\n appSyncGraphqlEndpoint,\n region,\n additionalCustomHeaders,\n });\n const headerString = authHeader ? JSON.stringify(authHeader) : '';\n // base64url-encoded string\n const encodedHeader = base64Encoder.convert(headerString, {\n urlSafe: true,\n skipPadding: true,\n });\n const authTokenSubprotocol = `header-${encodedHeader}`;\n const queryParams = queryParamsFromCustomHeaders(additionalCustomHeaders);\n const awsRealTimeUrl = realtimeUrlWithQueryString(appSyncGraphqlEndpoint, queryParams);\n await this._establishRetryableConnection(awsRealTimeUrl, authTokenSubprotocol);\n this.promiseArray.forEach(({ res }) => {\n this.logger.debug('Notifying connection successful');\n res();\n });\n this.socketStatus = SOCKET_STATUS.READY;\n this.promiseArray = [];\n }\n catch (err) {\n this.logger.debug('Connection exited with', err);\n this.promiseArray.forEach(({ rej }) => {\n rej(err);\n });\n this.promiseArray = [];\n if (this.awsRealTimeSocket &&\n this.awsRealTimeSocket.readyState === WebSocket.OPEN) {\n this.awsRealTimeSocket.close(3001);\n }\n this.awsRealTimeSocket = undefined;\n this.socketStatus = SOCKET_STATUS.CLOSED;\n }\n }\n });\n }\n async _establishRetryableConnection(awsRealTimeUrl, subprotocol) {\n this.logger.debug(`Establishing retryable connection`);\n await jitteredExponentialRetry(this._establishConnection.bind(this), [awsRealTimeUrl, subprotocol], MAX_DELAY_MS);\n }\n async _openConnection(awsRealTimeUrl, subprotocol) {\n return new Promise((resolve, reject) => {\n const newSocket = this._getNewWebSocket(awsRealTimeUrl, [\n this.wsProtocolName,\n subprotocol,\n ]);\n newSocket.onerror = () => {\n this.logger.debug(`WebSocket connection error`);\n };\n newSocket.onclose = () => {\n reject(new Error('Connection handshake error'));\n };\n newSocket.onopen = () => {\n this.awsRealTimeSocket = newSocket;\n resolve();\n };\n });\n }\n _getNewWebSocket(url, protocol) {\n return new WebSocket(url, protocol);\n }\n async _initiateHandshake() {\n return new Promise((resolve, reject) => {\n if (!this.awsRealTimeSocket) {\n reject(new Error('awsRealTimeSocket undefined'));\n return;\n }\n let ackOk = false;\n this.awsRealTimeSocket.onerror = error => {\n this.logger.debug(`WebSocket error ${JSON.stringify(error)}`);\n };\n this.awsRealTimeSocket.onclose = event => {\n this.logger.debug(`WebSocket closed ${event.reason}`);\n reject(new Error(JSON.stringify(event)));\n };\n this.awsRealTimeSocket.onmessage = (message) => {\n if (typeof message.data !== 'string') {\n return;\n }\n this.logger.debug(`subscription message from AWS AppSyncRealTime: ${message.data} `);\n const data = JSON.parse(message.data);\n const { type } = data;\n const connectionTimeoutMs = this._extractConnectionTimeout(data);\n if (type === MESSAGE_TYPES.GQL_CONNECTION_ACK) {\n ackOk = true;\n this._registerWebsocketHandlers(connectionTimeoutMs);\n resolve('Connected to AWS AppSyncRealTime');\n return;\n }\n if (type === MESSAGE_TYPES.GQL_CONNECTION_ERROR) {\n const { errorType, errorCode } = this._extractErrorCodeAndType(data);\n // TODO(Eslint): refactor to reject an Error object instead of a plain object\n // eslint-disable-next-line prefer-promise-reject-errors\n reject({ errorType, errorCode });\n }\n };\n const gqlInit = {\n type: MESSAGE_TYPES.GQL_CONNECTION_INIT,\n };\n this.awsRealTimeSocket.send(JSON.stringify(gqlInit));\n const checkAckOk = (targetAckOk) => {\n if (!targetAckOk) {\n this.connectionStateMonitor.record(CONNECTION_CHANGE.CONNECTION_FAILED);\n reject(new Error(`Connection timeout: ack from AWSAppSyncRealTime was not received after ${CONNECTION_INIT_TIMEOUT} ms`));\n }\n };\n setTimeout(() => {\n checkAckOk(ackOk);\n }, CONNECTION_INIT_TIMEOUT);\n });\n }\n _registerWebsocketHandlers(connectionTimeoutMs) {\n if (!this.awsRealTimeSocket) {\n return;\n }\n this.keepAliveTimeout = connectionTimeoutMs;\n this.awsRealTimeSocket.onmessage =\n this._handleIncomingSubscriptionMessage.bind(this);\n this.awsRealTimeSocket.onerror = err => {\n this.logger.debug(err);\n this._errorDisconnect(CONTROL_MSG.CONNECTION_CLOSED);\n };\n this.awsRealTimeSocket.onclose = event => {\n this.logger.debug(`WebSocket closed ${event.reason}`);\n this._errorDisconnect(CONTROL_MSG.CONNECTION_CLOSED);\n };\n }\n}\n\nexport { AWSWebSocketProvider };\n//# sourceMappingURL=index.mjs.map\n","var CONTROL_MSG;\n(function (CONTROL_MSG) {\n CONTROL_MSG[\"CONNECTION_CLOSED\"] = \"Connection closed\";\n CONTROL_MSG[\"CONNECTION_FAILED\"] = \"Connection failed\";\n CONTROL_MSG[\"REALTIME_SUBSCRIPTION_INIT_ERROR\"] = \"AppSync Realtime subscription init error\";\n CONTROL_MSG[\"SUBSCRIPTION_ACK\"] = \"Subscription ack\";\n CONTROL_MSG[\"TIMEOUT_DISCONNECT\"] = \"Timeout disconnect\";\n})(CONTROL_MSG || (CONTROL_MSG = {}));\n/** @enum {string} */\nvar ConnectionState;\n(function (ConnectionState) {\n /*\n * The connection is alive and healthy\n */\n ConnectionState[\"Connected\"] = \"Connected\";\n /*\n * The connection is alive, but the connection is offline\n */\n ConnectionState[\"ConnectedPendingNetwork\"] = \"ConnectedPendingNetwork\";\n /*\n * The connection has been disconnected while in use\n */\n ConnectionState[\"ConnectionDisrupted\"] = \"ConnectionDisrupted\";\n /*\n * The connection has been disconnected and the network is offline\n */\n ConnectionState[\"ConnectionDisruptedPendingNetwork\"] = \"ConnectionDisruptedPendingNetwork\";\n /*\n * The connection is in the process of connecting\n */\n ConnectionState[\"Connecting\"] = \"Connecting\";\n /*\n * The connection is not in use and is being disconnected\n */\n ConnectionState[\"ConnectedPendingDisconnect\"] = \"ConnectedPendingDisconnect\";\n /*\n * The connection is not in use and has been disconnected\n */\n ConnectionState[\"Disconnected\"] = \"Disconnected\";\n /*\n * The connection is alive, but a keep alive message has been missed\n */\n ConnectionState[\"ConnectedPendingKeepAlive\"] = \"ConnectedPendingKeepAlive\";\n})(ConnectionState || (ConnectionState = {}));\n\nexport { CONTROL_MSG, ConnectionState };\n//# sourceMappingURL=PubSub.mjs.map\n","import { Observable, map, filter } from 'rxjs';\nimport { ConnectionState } from '../types/PubSub.mjs';\nimport { ReachabilityMonitor } from './ReachabilityMonitor/index.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst CONNECTION_CHANGE = {\n KEEP_ALIVE_MISSED: { keepAliveState: 'unhealthy' },\n KEEP_ALIVE: { keepAliveState: 'healthy' },\n CONNECTION_ESTABLISHED: { connectionState: 'connected' },\n CONNECTION_FAILED: {\n intendedConnectionState: 'disconnected',\n connectionState: 'disconnected',\n },\n CLOSING_CONNECTION: { intendedConnectionState: 'disconnected' },\n OPENING_CONNECTION: {\n intendedConnectionState: 'connected',\n connectionState: 'connecting',\n },\n CLOSED: { connectionState: 'disconnected' },\n ONLINE: { networkState: 'connected' },\n OFFLINE: { networkState: 'disconnected' },\n};\nclass ConnectionStateMonitor {\n constructor() {\n this._networkMonitoringSubscription = undefined;\n this._linkedConnectionState = {\n networkState: 'connected',\n connectionState: 'disconnected',\n intendedConnectionState: 'disconnected',\n keepAliveState: 'healthy',\n };\n // Attempt to update the state with the current actual network state\n this._initialNetworkStateSubscription = ReachabilityMonitor().subscribe(({ online }) => {\n this.record(online ? CONNECTION_CHANGE.ONLINE : CONNECTION_CHANGE.OFFLINE);\n this._initialNetworkStateSubscription?.unsubscribe();\n });\n this._linkedConnectionStateObservable =\n new Observable(connectionStateObserver => {\n connectionStateObserver.next(this._linkedConnectionState);\n this._linkedConnectionStateObserver = connectionStateObserver;\n });\n }\n /**\n * Turn network state monitoring on if it isn't on already\n */\n enableNetworkMonitoring() {\n // If no initial network state was discovered, stop trying\n this._initialNetworkStateSubscription?.unsubscribe();\n // Maintain the network state based on the reachability monitor\n if (this._networkMonitoringSubscription === undefined) {\n this._networkMonitoringSubscription = ReachabilityMonitor().subscribe(({ online }) => {\n this.record(online ? CONNECTION_CHANGE.ONLINE : CONNECTION_CHANGE.OFFLINE);\n });\n }\n }\n /**\n * Turn network state monitoring off if it isn't off already\n */\n disableNetworkMonitoring() {\n this._networkMonitoringSubscription?.unsubscribe();\n this._networkMonitoringSubscription = undefined;\n }\n /**\n * Get the observable that allows us to monitor the connection state\n *\n * @returns {Observable} - The observable that emits ConnectionState updates\n */\n get connectionStateObservable() {\n let previous;\n // The linked state aggregates state changes to any of the network, connection,\n // intendedConnection and keepAliveHealth. Some states will change these independent\n // states without changing the overall connection state.\n // After translating from linked states to ConnectionState, then remove any duplicates\n return this._linkedConnectionStateObservable\n .pipe(map(value => {\n return this.connectionStatesTranslator(value);\n }))\n .pipe(filter(current => {\n const toInclude = current !== previous;\n previous = current;\n return toInclude;\n }));\n }\n /*\n * Updates local connection state and emits the full state to the observer.\n */\n record(statusUpdates) {\n // Maintain the network monitor\n if (statusUpdates.intendedConnectionState === 'connected') {\n this.enableNetworkMonitoring();\n }\n else if (statusUpdates.intendedConnectionState === 'disconnected') {\n this.disableNetworkMonitoring();\n }\n // Maintain the socket state\n const newSocketStatus = {\n ...this._linkedConnectionState,\n ...statusUpdates,\n };\n this._linkedConnectionState = { ...newSocketStatus };\n this._linkedConnectionStateObserver?.next(this._linkedConnectionState);\n }\n /*\n * Translate the ConnectionState structure into a specific ConnectionState string literal union\n */\n connectionStatesTranslator({ connectionState, networkState, intendedConnectionState, keepAliveState, }) {\n if (connectionState === 'connected' && networkState === 'disconnected')\n return ConnectionState.ConnectedPendingNetwork;\n if (connectionState === 'connected' &&\n intendedConnectionState === 'disconnected')\n return ConnectionState.ConnectedPendingDisconnect;\n if (connectionState === 'disconnected' &&\n intendedConnectionState === 'connected' &&\n networkState === 'disconnected')\n return ConnectionState.ConnectionDisruptedPendingNetwork;\n if (connectionState === 'disconnected' &&\n intendedConnectionState === 'connected')\n return ConnectionState.ConnectionDisrupted;\n if (connectionState === 'connected' && keepAliveState === 'unhealthy')\n return ConnectionState.ConnectedPendingKeepAlive;\n // All remaining states directly correspond to the connection state\n if (connectionState === 'connecting')\n return ConnectionState.Connecting;\n if (connectionState === 'disconnected')\n return ConnectionState.Disconnected;\n return ConnectionState.Connected;\n }\n}\n\nexport { CONNECTION_CHANGE, ConnectionStateMonitor };\n//# sourceMappingURL=ConnectionStateMonitor.mjs.map\n","import { Reachability } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst ReachabilityMonitor = () => new Reachability().networkMonitor();\n\nexport { ReachabilityMonitor };\n//# sourceMappingURL=index.mjs.map\n","import { RECONNECT_INTERVAL, RECONNECT_DELAY } from '../Providers/constants.mjs';\n\nvar ReconnectEvent;\n(function (ReconnectEvent) {\n ReconnectEvent[\"START_RECONNECT\"] = \"START_RECONNECT\";\n ReconnectEvent[\"HALT_RECONNECT\"] = \"HALT_RECONNECT\";\n})(ReconnectEvent || (ReconnectEvent = {}));\n/**\n * Captures the reconnect event logic used to determine when to reconnect to PubSub providers.\n * Reconnect attempts are delayed by 5 seconds to let the interface settle.\n * Attempting to reconnect only once creates unrecoverable states when the network state isn't\n * supported by the browser, so this keeps retrying every minute until halted.\n */\nclass ReconnectionMonitor {\n constructor() {\n this.reconnectObservers = [];\n }\n /**\n * Add reconnect observer to the list of observers to alert on reconnect\n */\n addObserver(reconnectObserver) {\n this.reconnectObservers.push(reconnectObserver);\n }\n /**\n * Given a reconnect event, start the appropriate behavior\n */\n record(event) {\n if (event === ReconnectEvent.START_RECONNECT) {\n // If the reconnection hasn't been started\n if (this.reconnectSetTimeoutId === undefined &&\n this.reconnectIntervalId === undefined) {\n this.reconnectSetTimeoutId = setTimeout(() => {\n // Reconnect now\n this._triggerReconnect();\n // Retry reconnect every periodically until it works\n this.reconnectIntervalId = setInterval(() => {\n this._triggerReconnect();\n }, RECONNECT_INTERVAL);\n }, RECONNECT_DELAY);\n }\n }\n if (event === ReconnectEvent.HALT_RECONNECT) {\n if (this.reconnectIntervalId) {\n clearInterval(this.reconnectIntervalId);\n this.reconnectIntervalId = undefined;\n }\n if (this.reconnectSetTimeoutId) {\n clearTimeout(this.reconnectSetTimeoutId);\n this.reconnectSetTimeoutId = undefined;\n }\n }\n }\n /**\n * Complete all reconnect observers\n */\n close() {\n this.reconnectObservers.forEach(reconnectObserver => {\n reconnectObserver.complete?.();\n });\n }\n _triggerReconnect() {\n this.reconnectObservers.forEach(reconnectObserver => {\n reconnectObserver.next?.();\n });\n }\n}\n\nexport { ReconnectEvent, ReconnectionMonitor };\n//# sourceMappingURL=ReconnectionMonitor.mjs.map\n","import { AmplifyUrl, AmplifyUrlSearchParams } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst protocol = 'wss://';\nconst standardDomainPattern = /^https:\\/\\/\\w{26}\\.appsync-api\\.\\w{2}(?:(?:-\\w{2,})+)-\\d\\.amazonaws.com(?:\\.cn)?\\/graphql$/i;\nconst eventDomainPattern = /^https:\\/\\/\\w{26}\\.\\w+-api\\.\\w{2}(?:(?:-\\w{2,})+)-\\d\\.amazonaws.com(?:\\.cn)?\\/event$/i;\nconst customDomainPath = '/realtime';\nconst isCustomDomain = (url) => {\n return url.match(standardDomainPattern) === null;\n};\nconst isEventDomain = (url) => url.match(eventDomainPattern) !== null;\nconst getRealtimeEndpointUrl = (appSyncGraphqlEndpoint) => {\n let realtimeEndpoint = appSyncGraphqlEndpoint ?? '';\n if (isEventDomain(realtimeEndpoint)) {\n realtimeEndpoint = realtimeEndpoint\n .concat(customDomainPath)\n .replace('ddpg-api', 'grt-gamma')\n .replace('appsync-api', 'appsync-realtime-api');\n }\n else if (isCustomDomain(realtimeEndpoint)) {\n realtimeEndpoint = realtimeEndpoint.concat(customDomainPath);\n }\n else {\n realtimeEndpoint = realtimeEndpoint\n .replace('appsync-api', 'appsync-realtime-api')\n .replace('gogi-beta', 'grt-beta')\n .replace('ddpg-api', 'grt-gamma');\n }\n realtimeEndpoint = realtimeEndpoint\n .replace('https://', protocol)\n .replace('http://', protocol);\n return new AmplifyUrl(realtimeEndpoint);\n};\n/**\n * Strips out `Authorization` header if present\n */\nconst extractNonAuthHeaders = (headers) => {\n if (!headers) {\n return {};\n }\n if ('Authorization' in headers) {\n const { Authorization: _, ...nonAuthHeaders } = headers;\n return nonAuthHeaders;\n }\n return headers;\n};\n/**\n *\n * @param headers - http headers\n * @returns uri-encoded query parameters derived from custom headers\n */\nconst queryParamsFromCustomHeaders = (headers) => {\n const nonAuthHeaders = extractNonAuthHeaders(headers);\n const params = new AmplifyUrlSearchParams();\n Object.entries(nonAuthHeaders).forEach(([k, v]) => {\n params.append(k, v);\n });\n return params;\n};\n/**\n * Normalizes AppSync realtime endpoint URL\n *\n * @param appSyncGraphqlEndpoint - AppSync endpointUri from config\n * @param urlParams - URLSearchParams\n * @returns fully resolved string realtime endpoint URL\n */\nconst realtimeUrlWithQueryString = (appSyncGraphqlEndpoint, urlParams) => {\n const realtimeEndpointUrl = getRealtimeEndpointUrl(appSyncGraphqlEndpoint);\n // preserves any query params a customer might manually set in the configuration\n const existingParams = new AmplifyUrlSearchParams(realtimeEndpointUrl.search);\n for (const [k, v] of urlParams.entries()) {\n existingParams.append(k, v);\n }\n realtimeEndpointUrl.search = existingParams.toString();\n return realtimeEndpointUrl.toString();\n};\n// TODO: move to separate file?\nconst additionalHeadersFromOptions = async (options) => {\n const { appSyncGraphqlEndpoint, query, libraryConfigHeaders = () => ({}), additionalHeaders = {}, authToken, } = options;\n let additionalCustomHeaders = {};\n const _libraryConfigHeaders = await libraryConfigHeaders();\n if (typeof additionalHeaders === 'function') {\n const requestOptions = {\n url: appSyncGraphqlEndpoint || '',\n queryString: query || '',\n };\n additionalCustomHeaders = await additionalHeaders(requestOptions);\n }\n else {\n additionalCustomHeaders = additionalHeaders;\n }\n // if an authorization header is set, have the explicit, operation-level authToken take precedence\n if (authToken) {\n additionalCustomHeaders = {\n ...additionalCustomHeaders,\n Authorization: authToken,\n };\n }\n return {\n additionalCustomHeaders,\n libraryConfigHeaders: _libraryConfigHeaders,\n };\n};\n\nexport { additionalHeadersFromOptions, getRealtimeEndpointUrl, isCustomDomain, queryParamsFromCustomHeaders, realtimeUrlWithQueryString };\n//# sourceMappingURL=appsyncUrl.mjs.map\n","import { ConsoleLogger, fetchAuthSession } from '@aws-amplify/core';\nimport { signRequest } from '@aws-amplify/core/internals/aws-client-utils';\nimport { AmplifyUrl } from '@aws-amplify/core/internals/utils';\nimport { AWS_APPSYNC_REALTIME_HEADERS } from '../constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('AWSAppSyncRealTimeProvider Auth');\nconst awsAuthTokenHeader = async ({ host }) => {\n const session = await fetchAuthSession();\n return {\n Authorization: session?.tokens?.accessToken?.toString(),\n host,\n };\n};\nconst awsRealTimeApiKeyHeader = async ({ apiKey, host, }) => {\n const dt = new Date();\n const dtStr = dt.toISOString().replace(/[:-]|\\.\\d{3}/g, '');\n return {\n host,\n 'x-amz-date': dtStr,\n 'x-api-key': apiKey,\n };\n};\nconst awsRealTimeIAMHeader = async ({ payload, canonicalUri, appSyncGraphqlEndpoint, region, }) => {\n const endpointInfo = {\n region,\n service: 'appsync',\n };\n const creds = (await fetchAuthSession()).credentials;\n const request = {\n url: `${appSyncGraphqlEndpoint}${canonicalUri}`,\n data: payload,\n method: 'POST',\n headers: { ...AWS_APPSYNC_REALTIME_HEADERS },\n };\n const signedParams = signRequest({\n headers: request.headers,\n method: request.method,\n url: new AmplifyUrl(request.url),\n body: request.data,\n }, {\n credentials: creds,\n signingRegion: endpointInfo.region,\n signingService: endpointInfo.service,\n });\n return signedParams.headers;\n};\nconst customAuthHeader = async ({ host, additionalCustomHeaders, }) => {\n /**\n * If `additionalHeaders` was provided to the subscription as a function,\n * the headers that are returned by that function will already have been\n * provided before this function is called.\n */\n if (!additionalCustomHeaders?.Authorization) {\n throw new Error('No auth token specified');\n }\n return {\n Authorization: additionalCustomHeaders.Authorization,\n host,\n };\n};\nconst awsRealTimeHeaderBasedAuth = async ({ apiKey, authenticationType, canonicalUri, appSyncGraphqlEndpoint, region, additionalCustomHeaders, payload, }) => {\n const headerHandler = {\n apiKey: awsRealTimeApiKeyHeader,\n iam: awsRealTimeIAMHeader,\n oidc: awsAuthTokenHeader,\n userPool: awsAuthTokenHeader,\n lambda: customAuthHeader,\n none: customAuthHeader,\n };\n if (!authenticationType || !headerHandler[authenticationType]) {\n logger.debug(`Authentication type ${authenticationType} not supported`);\n return undefined;\n }\n else {\n const handler = headerHandler[authenticationType];\n const host = appSyncGraphqlEndpoint\n ? new AmplifyUrl(appSyncGraphqlEndpoint).host\n : undefined;\n const resolvedApiKey = authenticationType === 'apiKey' ? apiKey : undefined;\n logger.debug(`Authenticating with ${JSON.stringify(authenticationType)}`);\n const result = await handler({\n payload,\n canonicalUri,\n appSyncGraphqlEndpoint,\n apiKey: resolvedApiKey,\n region,\n host,\n additionalCustomHeaders,\n });\n return result;\n }\n};\n\nexport { awsRealTimeHeaderBasedAuth };\n//# sourceMappingURL=authHeaders.mjs.map\n","import { ConsoleLogger } from '@aws-amplify/core';\nimport '@aws-amplify/core/internals/utils';\nimport { assertValidationError } from './errors/assertValidationError.mjs';\nimport { APIValidationErrorCode } from './errors/validation.mjs';\nimport 'graphql';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst logger = new ConsoleLogger('GraphQLAPI resolveConfig');\n/**\n * @internal\n */\nconst resolveConfig = (amplify) => {\n const config = amplify.getConfig();\n if (!config.API?.GraphQL) {\n logger.warn('The API configuration is missing. This is likely due to Amplify.configure() not being called prior to generateClient().');\n }\n const { apiKey, customEndpoint, customEndpointRegion, defaultAuthMode, endpoint, region, } = config.API?.GraphQL ?? {};\n // TODO: re-enable when working in all test environments:\n // assertValidationError(!!endpoint, APIValidationErrorCode.NoEndpoint);\n assertValidationError(!(!customEndpoint && customEndpointRegion), APIValidationErrorCode.NoCustomEndpoint);\n return {\n apiKey,\n customEndpoint,\n customEndpointRegion,\n defaultAuthMode,\n endpoint,\n region,\n };\n};\n\nexport { resolveConfig };\n//# sourceMappingURL=resolveConfig.mjs.map\n","import { GraphQLApiError } from './GraphQLApiError.mjs';\nimport { validationErrorMap } from './validation.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nfunction assertValidationError(assertion, name) {\n const { message, recoverySuggestion } = validationErrorMap[name];\n if (!assertion) {\n throw new GraphQLApiError({ name, message, recoverySuggestion });\n }\n}\n\nexport { assertValidationError };\n//# sourceMappingURL=assertValidationError.mjs.map\n","import { AmplifyError } from '@aws-amplify/core/internals/utils';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nclass GraphQLApiError extends AmplifyError {\n constructor(params) {\n super(params);\n // Hack for making the custom error class work when transpiled to es5\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = GraphQLApiError;\n Object.setPrototypeOf(this, GraphQLApiError.prototype);\n }\n}\n\nexport { GraphQLApiError };\n//# sourceMappingURL=GraphQLApiError.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nvar APIValidationErrorCode;\n(function (APIValidationErrorCode) {\n APIValidationErrorCode[\"NoAuthSession\"] = \"NoAuthSession\";\n APIValidationErrorCode[\"NoRegion\"] = \"NoRegion\";\n APIValidationErrorCode[\"NoCustomEndpoint\"] = \"NoCustomEndpoint\";\n})(APIValidationErrorCode || (APIValidationErrorCode = {}));\nconst validationErrorMap = {\n [APIValidationErrorCode.NoAuthSession]: {\n message: 'Auth session should not be empty.',\n },\n // TODO: re-enable when working in all test environments:\n // [APIValidationErrorCode.NoEndpoint]: {\n // \tmessage: 'Missing endpoint',\n // },\n [APIValidationErrorCode.NoRegion]: {\n message: 'Missing region.',\n },\n [APIValidationErrorCode.NoCustomEndpoint]: {\n message: 'Custom endpoint region is present without custom endpoint.',\n },\n};\n\nexport { APIValidationErrorCode, validationErrorMap };\n//# sourceMappingURL=validation.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @internal\n */\nconst resolveLibraryOptions = (amplify) => {\n const headers = amplify.libraryOptions?.API?.GraphQL?.headers;\n const withCredentials = amplify.libraryOptions?.API?.GraphQL?.withCredentials;\n return { headers, withCredentials };\n};\n\nexport { resolveLibraryOptions };\n//# sourceMappingURL=resolveLibraryOptions.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Checks to see if the given response or subscription message contains an\n * Unauthorized error. If it does, it changes the error message to include instructions\n * for the app developer.\n */\nfunction repackageUnauthorizedError(content) {\n if (content.errors && Array.isArray(content.errors)) {\n content.errors.forEach(e => {\n if (isUnauthorizedError(e)) {\n e.message = 'Unauthorized';\n e.recoverySuggestion =\n `If you're calling an Amplify-generated API, make sure ` +\n `to set the \"authMode\" in generateClient({ authMode: '...' }) to the backend authorization ` +\n `rule's auth provider ('apiKey', 'userPool', 'iam', 'oidc', 'lambda')`;\n }\n });\n }\n return content;\n}\nfunction isUnauthorizedError(error) {\n // Error pattern corresponding to appsync calls\n if (error?.originalError?.name?.startsWith('UnauthorizedException')) {\n return true;\n }\n // Error pattern corresponding to appsync subscriptions\n if (error.message?.startsWith('Connection failed:') &&\n error.message?.includes('Permission denied')) {\n return true;\n }\n return false;\n}\n\nexport { repackageUnauthorizedError };\n//# sourceMappingURL=repackageAuthError.mjs.map\n","import { GraphQLAuthError } from '../../types/index.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst NO_API_KEY = {\n name: 'NoApiKey',\n // ideal: No API key configured.\n message: GraphQLAuthError.NO_API_KEY,\n recoverySuggestion: 'The API request was made with `authMode: \"apiKey\"` but no API Key was passed into `Amplify.configure()`. Review if your API key is passed into the `Amplify.configure()` function.',\n};\nconst NO_VALID_CREDENTIALS = {\n name: 'NoCredentials',\n // ideal: No auth credentials available.\n message: GraphQLAuthError.NO_CREDENTIALS,\n recoverySuggestion: `The API request was made with \\`authMode: \"iam\"\\` but no authentication credentials are available.\n\nIf you intended to make a request using an authenticated role, review if your user is signed in before making the request.\n\nIf you intend to make a request using an unauthenticated role or also known as \"guest access\", verify if \"Auth.Cognito.allowGuestAccess\" is set to \"true\" in the \\`Amplify.configure()\\` function.`,\n};\nconst NO_VALID_AUTH_TOKEN = {\n name: 'NoValidAuthTokens',\n // ideal: No valid JWT auth token provided to make the API request..\n message: GraphQLAuthError.NO_FEDERATED_JWT,\n recoverySuggestion: 'If you intended to make an authenticated API request, review if the current user is signed in.',\n};\nconst NO_SIGNED_IN_USER = {\n name: 'NoSignedUser',\n // ideal: Couldn't retrieve authentication credentials to make the API request.\n message: GraphQLAuthError.NO_CURRENT_USER,\n recoverySuggestion: 'Review the underlying exception field for more details. If you intended to make an authenticated API request, review if the current user is signed in.',\n};\nconst NO_AUTH_TOKEN_HEADER = {\n name: 'NoAuthorizationHeader',\n // ideal: Authorization header not specified.\n message: GraphQLAuthError.NO_AUTH_TOKEN,\n recoverySuggestion: 'The API request was made with `authMode: \"lambda\"` but no `authToken` is set. Review if a valid authToken is passed into the request options or in the `Amplify.configure()` function.',\n};\nconst NO_ENDPOINT = {\n name: 'NoEndpoint',\n message: 'No GraphQL endpoint configured in `Amplify.configure()`.',\n recoverySuggestion: 'Review if the GraphQL API endpoint is set in the `Amplify.configure()` function.',\n};\n\nexport { NO_API_KEY, NO_AUTH_TOKEN_HEADER, NO_ENDPOINT, NO_SIGNED_IN_USER, NO_VALID_AUTH_TOKEN, NO_VALID_CREDENTIALS };\n//# sourceMappingURL=constants.mjs.map\n","export { CONTROL_MSG, ConnectionState } from './PubSub.mjs';\n\nvar GraphQLAuthError;\n(function (GraphQLAuthError) {\n GraphQLAuthError[\"NO_API_KEY\"] = \"No api-key configured\";\n GraphQLAuthError[\"NO_CURRENT_USER\"] = \"No current user\";\n GraphQLAuthError[\"NO_CREDENTIALS\"] = \"No credentials\";\n GraphQLAuthError[\"NO_FEDERATED_JWT\"] = \"No federated jwt\";\n GraphQLAuthError[\"NO_AUTH_TOKEN\"] = \"No auth token specified\";\n})(GraphQLAuthError || (GraphQLAuthError = {}));\nconst __amplify = Symbol('amplify');\nconst __authMode = Symbol('authMode');\nconst __authToken = Symbol('authToken');\nconst __headers = Symbol('headers');\nfunction getInternals(client) {\n const c = client;\n return {\n amplify: c[__amplify],\n authMode: c[__authMode],\n authToken: c[__authToken],\n headers: c[__headers],\n };\n}\n\nexport { GraphQLAuthError, __amplify, __authMode, __authToken, __headers, getInternals };\n//# sourceMappingURL=index.mjs.map\n","import { GraphQLError } from 'graphql';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createGraphQLResultWithError = (error) => {\n return {\n data: {},\n errors: [new GraphQLError(error.message, null, null, null, null, error)],\n };\n};\n\nexport { createGraphQLResultWithError };\n//# sourceMappingURL=createGraphQLResultWithError.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction isGraphQLResponseWithErrors(response) {\n if (!response) {\n return false;\n }\n const r = response;\n return Array.isArray(r.errors) && r.errors.length > 0;\n}\n\nexport { isGraphQLResponseWithErrors };\n//# sourceMappingURL=isGraphQLResponseWithErrors.mjs.map\n","import { GraphQLApiError } from '../utils/errors/GraphQLApiError.mjs';\nimport '../utils/errors/validation.mjs';\nimport 'graphql';\nimport { NO_AUTH_TOKEN_HEADER, NO_SIGNED_IN_USER, NO_VALID_AUTH_TOKEN, NO_VALID_CREDENTIALS, NO_API_KEY } from '../utils/errors/constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nasync function headerBasedAuth(amplify, authMode, apiKey, additionalHeaders = {}) {\n let headers = {};\n switch (authMode) {\n case 'apiKey':\n if (!apiKey) {\n throw new GraphQLApiError(NO_API_KEY);\n }\n headers = {\n 'X-Api-Key': apiKey,\n };\n break;\n case 'iam': {\n const session = await amplify.Auth.fetchAuthSession();\n if (session.credentials === undefined) {\n throw new GraphQLApiError(NO_VALID_CREDENTIALS);\n }\n break;\n }\n case 'oidc':\n case 'userPool': {\n let token;\n try {\n token = (await amplify.Auth.fetchAuthSession()).tokens?.accessToken.toString();\n }\n catch (e) {\n // fetchAuthSession failed\n throw new GraphQLApiError({\n ...NO_SIGNED_IN_USER,\n underlyingError: e,\n });\n }\n // `fetchAuthSession()` succeeded but didn't return `tokens`.\n // This may happen when unauthenticated access is enabled and there is\n // no user signed in.\n if (!token) {\n throw new GraphQLApiError(NO_VALID_AUTH_TOKEN);\n }\n headers = {\n Authorization: token,\n };\n break;\n }\n case 'lambda':\n if (typeof additionalHeaders === 'object' &&\n !additionalHeaders.Authorization) {\n throw new GraphQLApiError(NO_AUTH_TOKEN_HEADER);\n }\n headers = {\n Authorization: additionalHeaders.Authorization,\n };\n break;\n }\n return headers;\n}\n\nexport { headerBasedAuth };\n//# sourceMappingURL=graphqlAuth.mjs.map\n","import { GraphQLAPI } from '../GraphQLAPI.mjs';\nimport { getInternals } from '../types/index.mjs';\n\n/**\n * Invokes graphql operations against a graphql service, providing correct input and\n * output types if Amplify-generated graphql from a recent version of the CLI/codegen\n * are used *or* correct typing is provided via the type argument.\n *\n * Amplify-generated \"branded\" graphql queries will look similar to this:\n *\n * ```ts\n * //\n * // |-- branding\n * // v\n * export const getModel = `...` as GeneratedQuery<\n * \tGetModelQueryVariables,\n * \tGetModelQuery\n * >;\n * ```\n *\n * If this branding is not in your generated graphql, update to a newer version of\n * CLI/codegen and regenerate your graphql using `amplify codegen`.\n *\n * ## Using Amplify-generated graphql\n *\n * ```ts\n * import * as queries from './graphql/queries';\n *\n * //\n * // |-- correctly typed graphql response containing a Widget\n * // v\n * const queryResult = await graphql({\n * \tquery: queries.getWidget,\n * \tvariables: {\n * \t\tid: \"abc\", // <-- type hinted/enforced\n * \t},\n * });\n *\n * //\n * // |-- a correctly typed Widget\n * // v\n * const fetchedWidget = queryResult.data?.getWidget!;\n * ```\n *\n * ## Custom input + result types\n *\n * To provide input types (`variables`) and result types:\n *\n * ```ts\n * type GetById_NameOnly = {\n * \tvariables: {\n * \t\tid: string\n * \t},\n * \tresult: Promise<{\n * \t\tdata: { getWidget: { name: string } }\n * \t}>\n * }\n *\n * //\n * // |-- type is GetById_NameOnly[\"result\"]\n * // v\n * const result = graphql({\n * \tquery: \"...\",\n * \tvariables: { id: \"abc\" } // <-- type of GetById_NameOnly[\"variables\"]\n * });\n * ```\n *\n * ## Custom result type only\n *\n * To specify result types only, use a type that is *not* in the `{variables, result}` shape:\n *\n * ```ts\n * type MyResultType = Promise<{\n * \tdata: {\n * \t\tgetWidget: { name: string }\n * \t}\n * }>\n *\n * //\n * // |-- type is MyResultType\n * // v\n * const result = graphql({query: \"...\"});\n * ```\n *\n * @param options\n * @param additionalHeaders\n */\nfunction graphql(options, additionalHeaders) {\n // inject client-level auth\n const internals = getInternals(this);\n options.authMode = options.authMode || internals.authMode;\n options.authToken = options.authToken || internals.authToken;\n const headers = additionalHeaders || internals.headers;\n /**\n * The correctness of these typings depends on correct string branding or overrides.\n * Neither of these can actually be validated at runtime. Hence, we don't perform\n * any validation or type-guarding here.\n */\n const result = GraphQLAPI.graphql(\n // TODO: move V6Client back into this package?\n internals.amplify, options, headers);\n return result;\n}\n/**\n * Cancels an inflight request. Only applicable for graphql queries and mutations\n * @param {any} request - request to cancel\n * @returns - A boolean indicating if the request was cancelled\n */\nfunction cancel(promise, message) {\n return GraphQLAPI.cancel(promise, message);\n}\n/**\n * Checks to see if an error thrown is from an api request cancellation\n * @param {any} error - Any error\n * @returns - A boolean indicating if the error was from an api request cancellation\n */\nfunction isCancelError(error) {\n return GraphQLAPI.isCancelError(error);\n}\n\nexport { cancel, graphql, isCancelError };\n//# sourceMappingURL=v6.mjs.map\n","import { Category, ApiAction } from '@aws-amplify/core/internals/utils';\nimport { INTERNAL_USER_AGENT_OVERRIDE } from '@aws-amplify/data-schema/runtime';\nimport { InternalGraphQLAPIClass } from './internals/InternalGraphQLAPI.mjs';\n\nfunction isGraphQLOptionsWithOverride(options) {\n return INTERNAL_USER_AGENT_OVERRIDE in options;\n}\nconst graphqlOperation = (query, variables = {}, authToken) => ({\n query,\n variables,\n authToken,\n});\n/**\n * Export Cloud Logic APIs\n */\nclass GraphQLAPIClass extends InternalGraphQLAPIClass {\n getModuleName() {\n return 'GraphQLAPI';\n }\n /**\n * Executes a GraphQL operation\n *\n * @param options - GraphQL Options\n * @param [additionalHeaders] - headers to merge in after any `libraryConfigHeaders` set in the config\n * @returns An Observable if the query is a subscription query, else a promise of the graphql result.\n */\n graphql(amplify, options, additionalHeaders) {\n const userAgentDetails = {\n category: Category.API,\n action: ApiAction.GraphQl,\n };\n if (isGraphQLOptionsWithOverride(options)) {\n const { [INTERNAL_USER_AGENT_OVERRIDE]: internalUserAgentOverride, ...cleanOptions } = options;\n return super.graphql(amplify, cleanOptions, additionalHeaders, {\n ...userAgentDetails,\n ...internalUserAgentOverride,\n });\n }\n return super.graphql(amplify, options, additionalHeaders, {\n ...userAgentDetails,\n });\n }\n /**\n * Checks to see if an error thrown is from an api request cancellation\n * @param error - Any error\n * @returns A boolean indicating if the error was from an api request cancellation\n */\n isCancelError(error) {\n return super.isCancelError(error);\n }\n /**\n * Cancels an inflight request. Only applicable for graphql queries and mutations\n * @param {any} request - request to cancel\n * @returns A boolean indicating if the request was cancelled\n */\n cancel(request, message) {\n return super.cancel(request, message);\n }\n}\nconst GraphQLAPI = new GraphQLAPIClass();\n\nexport { GraphQLAPI, GraphQLAPIClass, graphqlOperation };\n//# sourceMappingURL=GraphQLAPI.mjs.map\n","export { __modelMeta__ } from '@aws-amplify/data-schema-types';\nexport { addSchemaToClient } from './addSchemaToClient.mjs';\nexport { addSchemaToClientWithInstance } from './addSchemaToClientWithInstance.mjs';\nexport { INTERNAL_USER_AGENT_OVERRIDE } from './internals/ai/getCustomUserAgentDetails.mjs';\n//# sourceMappingURL=index.mjs.map\n","export { __modelMeta__ } from './client/symbol.mjs';\n//# sourceMappingURL=index.mjs.map\n","const __modelMeta__ = Symbol();\n\nexport { __modelMeta__ };\n//# sourceMappingURL=symbol.mjs.map\n","import { generateCustomQueriesProperty, generateCustomMutationsProperty, generateCustomSubscriptionsProperty } from './internals/generateCustomOperationsProperty.mjs';\nimport { generateConversationsProperty } from './internals/utils/clientProperties/generateConversationsProperty.mjs';\nimport { generateGenerationsProperty } from './internals/utils/clientProperties/generateGenerationsProperty.mjs';\nimport { generateEnumsProperty } from './internals/utils/clientProperties/generateEnumsProperty.mjs';\nimport { generateModelsProperty } from './internals/utils/clientProperties/generateModelsProperty.mjs';\nimport { upgradeClientCancellation } from './internals/cancellation.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction addSchemaToClient(client, apiGraphqlConfig, getInternals) {\n upgradeClientCancellation(client);\n client.models = generateModelsProperty(client, apiGraphqlConfig, getInternals);\n client.enums = generateEnumsProperty(apiGraphqlConfig);\n client.queries = generateCustomQueriesProperty(client, apiGraphqlConfig, getInternals);\n client.mutations = generateCustomMutationsProperty(client, apiGraphqlConfig, getInternals);\n client.subscriptions = generateCustomSubscriptionsProperty(client, apiGraphqlConfig, getInternals);\n client.conversations = generateConversationsProperty(client, apiGraphqlConfig, getInternals);\n client.generations = generateGenerationsProperty(client, apiGraphqlConfig, getInternals);\n return client;\n}\n\nexport { addSchemaToClient };\n//# sourceMappingURL=addSchemaToClient.mjs.map\n","import { customOpFactory } from './operations/custom.mjs';\n\nconst operationTypeMap = {\n queries: 'query',\n mutations: 'mutation',\n subscriptions: 'subscription',\n};\nfunction generateCustomOperationsProperty(client, config, operationsType, getInternals) {\n // some bundlers end up with `Amplify.configure` being called *after* generate client.\n // if that occurs, we need to *not error* while we wait. handling for late configuration\n // occurs in `generateClient()`. we do not need to subscribe to Hub events here.\n if (!config) {\n return {};\n }\n const modelIntrospection = config.modelIntrospection;\n // model intro schema might be absent if there's not actually a configured GraphQL API\n if (!modelIntrospection) {\n return {};\n }\n // custom operations will be absent from model intro schema if no custom ops\n // are present on the source schema.\n const operations = modelIntrospection[operationsType];\n if (!operations) {\n return {};\n }\n const ops = {};\n const useContext = getInternals(client).amplify === null;\n for (const operation of Object.values(operations)) {\n ops[operation.name] = customOpFactory(client, modelIntrospection, operationTypeMap[operationsType], operation, useContext, getInternals);\n }\n return ops;\n}\nfunction generateCustomMutationsProperty(client, config, getInternals) {\n return generateCustomOperationsProperty(client, config, 'mutations', getInternals);\n}\nfunction generateCustomQueriesProperty(client, config, getInternals) {\n return generateCustomOperationsProperty(client, config, 'queries', getInternals);\n}\nfunction generateCustomSubscriptionsProperty(client, config, getInternals) {\n return generateCustomOperationsProperty(client, config, 'subscriptions', getInternals);\n}\n\nexport { generateCustomMutationsProperty, generateCustomOperationsProperty, generateCustomQueriesProperty, generateCustomSubscriptionsProperty };\n//# sourceMappingURL=generateCustomOperationsProperty.mjs.map\n","import { map } from 'rxjs';\nimport { authModeParams, getCustomHeaders, initializeModel, selectionSetIRToString, getDefaultSelectionSetForNonModelWithIR, generateSelectionSet } from '../APIClient.mjs';\nimport { handleSingularGraphQlError } from './utils.mjs';\nimport { selfAwareAsync } from '../../utils/selfAwareAsync.mjs';\nimport { extendCancellability } from '../cancellation.mjs';\nimport { createUserAgentOverride } from '../ai/getCustomUserAgentDetails.mjs';\n\n/**\n * Type guard for checking whether a Custom Operation argument is a contextSpec object\n */\nconst argIsContextSpec = (arg) => {\n return typeof arg?.token?.value === 'symbol';\n};\n/**\n * Builds an operation function, embedded with all client and context data, that\n * can be attached to a client as a custom query or mutation.\n *\n * If we have this source schema:\n *\n * ```typescript\n * a.schema({\n * echo: a.query()\n * .arguments({input: a.string().required()})\n * .returns(a.string())\n * })\n * ```\n *\n * Our model intro schema will contain an entry like this:\n *\n * ```ts\n * {\n * queries: {\n * echo: {\n * name: \"echo\",\n * isArray: false,\n * type: 'String',\n * isRequired: false,\n * arguments: {\n * input: {\n * name: 'input',\n * isArray: false,\n * type: String,\n * isRequired: true\n * }\n * }\n * }\n * }\n * }\n * ```\n *\n * The `echo` object is used to build the `echo' method that goes here:\n *\n * ```typescript\n * const client = generateClent()\n * const { data } = await client.queries.echo({input: 'a string'});\n * // ^\n * // |\n * // +-- This one right here.\n * //\n * ```\n *\n *\n * @param client The client to run graphql queries through.\n * @param modelIntrospection The model introspection schema the op comes from.\n * @param operationType The broad category of graphql operation.\n * @param operation The operation definition from the introspection schema.\n * @param useContext Whether the function needs to accept an SSR context.\n * @returns The operation function to attach to query, mutations, etc.\n */\nfunction customOpFactory(client, modelIntrospection, operationType, operation, useContext, getInternals, customUserAgentDetails) {\n // .arguments() are defined for the custom operation in the schema builder\n // and are present in the model introspection schema\n const argsDefined = operation.arguments !== undefined;\n const op = (...args) => {\n // options is always the last argument\n const options = args[args.length - 1];\n let contextSpec;\n let arg;\n if (useContext) {\n if (argIsContextSpec(args[0])) {\n contextSpec = args[0];\n }\n else {\n throw new Error(`Invalid first argument passed to ${operation.name}. Expected contextSpec`);\n }\n }\n if (argsDefined) {\n if (useContext) {\n arg = args[1];\n }\n else {\n arg = args[0];\n }\n }\n if (operationType === 'subscription') {\n return _opSubscription(\n // subscriptions are only enabled on the clientside\n client, modelIntrospection, operation, getInternals, arg, options, customUserAgentDetails);\n }\n return _op(client, modelIntrospection, operationType, operation, getInternals, arg, options, contextSpec, customUserAgentDetails);\n };\n return op;\n}\n/**\n * Runtime test and type guard to check whether `o[field]` is a `String`.\n *\n * ```typescript\n * if (hasStringField(o, 'prop')) {\n * const s = o.prop;\n * // ^? const s: string\n * }\n * ```\n *\n * @param o Object to inspect\n * @param field Field to look for\n * @returns Boolean: `true` if the `o[field]` is a `string`\n */\nfunction hasStringField(o, field) {\n return typeof o[field] === 'string';\n}\nfunction isEnumType(type) {\n return type instanceof Object && 'enum' in type;\n}\nfunction isInputType(type) {\n return type instanceof Object && 'input' in type;\n}\n/**\n * @param argDef A single argument definition from a custom operation\n * @returns A string naming the base type including the `!` if the arg is required.\n */\nfunction argumentBaseTypeString({ type, isRequired }) {\n const requiredFlag = isRequired ? '!' : '';\n if (isEnumType(type)) {\n return `${type.enum}${requiredFlag}`;\n }\n if (isInputType(type)) {\n return `${type.input}${requiredFlag}`;\n }\n return `${type}${requiredFlag}`;\n}\n/**\n * Generates \"outer\" arguments string for a custom operation. For example,\n * in this operation:\n *\n * ```graphql\n * query MyQuery(InputString: String!) {\n * echoString(InputString: $InputString)\n * }\n * ```\n *\n * This function returns the top/outer level arguments as a string:\n *\n * ```json\n * \"InputString: String!\"\n * ```\n *\n * @param operation Operation object from model introspection schema.\n * @returns \"outer\" arguments string\n */\nfunction outerArguments(operation) {\n if (operation.arguments === undefined) {\n return '';\n }\n const args = Object.entries(operation.arguments)\n .map(([k, argument]) => {\n const baseType = argumentBaseTypeString(argument);\n const finalType = argument.isArray\n ? `[${baseType}]${argument.isArrayNullable ? '' : '!'}`\n : baseType;\n return `$${k}: ${finalType}`;\n })\n .join(', ');\n return args.length > 0 ? `(${args})` : '';\n}\n/**\n * Generates \"inner\" arguments string for a custom operation. For example,\n * in this operation:\n *\n * ```graphql\n * query MyQuery(InputString: String!) {\n * echoString(InputString: $InputString)\n * }\n * ```\n *\n * This function returns the inner arguments as a string:\n *\n * ```json\n * \"InputString: $InputString\"\n * ```\n *\n * @param operation Operation object from model introspection schema.\n * @returns \"outer\" arguments string\n */\nfunction innerArguments(operation) {\n if (operation.arguments === undefined) {\n return '';\n }\n const args = Object.keys(operation.arguments)\n .map((k) => `${k}: $${k}`)\n .join(', ');\n return args.length > 0 ? `(${args})` : '';\n}\n/**\n * Generates the selection set string for a custom operation. This is slightly\n * different than the selection set generation for models. If the custom op returns\n * a primitive or enum types, it doesn't require a selection set at all.\n *\n * E.g., the graphql might look like this:\n *\n * ```graphql\n * query MyQuery {\n * echoString(inputString: \"whatever\")\n * }\n * # ^\n * # |\n * # +-- no selection set\n * ```\n *\n * Non-primitive return type selection set generation will be similar to other\n * model operations.\n *\n * @param modelIntrospection The full code-generated introspection schema.\n * @param operation The operation object from the schema.\n * @returns The selection set as a string.\n */\nfunction operationSelectionSet(modelIntrospection, operation) {\n if (hasStringField(operation, 'type') ||\n hasStringField(operation.type, 'enum')) {\n return '';\n }\n else if (hasStringField(operation.type, 'nonModel')) {\n const nonModel = modelIntrospection.nonModels[operation.type.nonModel];\n return `{${selectionSetIRToString(getDefaultSelectionSetForNonModelWithIR(nonModel, modelIntrospection))}}`;\n }\n else if (hasStringField(operation.type, 'model')) {\n return `{${generateSelectionSet(modelIntrospection, operation.type.model)}}`;\n }\n else {\n return '';\n }\n}\n/**\n * Maps an arguments objec to graphql variables, removing superfluous args and\n * screaming loudly when required args are missing.\n *\n * @param operation The operation to construct graphql request variables for.\n * @param args The arguments to map variables from.\n * @returns The graphql variables object.\n */\nfunction operationVariables(operation, args = {}) {\n const variables = {};\n if (operation.arguments === undefined) {\n return variables;\n }\n for (const argDef of Object.values(operation.arguments)) {\n if (typeof args[argDef.name] !== 'undefined') {\n variables[argDef.name] = args[argDef.name];\n }\n else if (argDef.isRequired) {\n // At this point, the variable is both required and missing: We don't need\n // to continue. The operation is expected to fail.\n throw new Error(`${operation.name} requires arguments '${argDef.name}'`);\n }\n }\n return variables;\n}\n/**\n * Executes an operation from the given model intro schema against a client, returning\n * a fully instantiated model when relevant.\n *\n * @param client The client to operate `graphql()` calls through.\n * @param modelIntrospection The model intro schema to construct requests from.\n * @param operationType The high level graphql operation type.\n * @param operation The specific operation name, args, return type details.\n * @param args The arguments to provide to the operation as variables.\n * @param options Request options like headers, etc.\n * @param context SSR context if relevant.\n * @returns Result from the graphql request, model-instantiated when relevant.\n */\nfunction _op(client, modelIntrospection, operationType, operation, getInternals, args, options, context, customUserAgentDetails) {\n return selfAwareAsync(async (resultPromise) => {\n const { name: operationName } = operation;\n const auth = authModeParams(client, getInternals, options);\n const headers = getCustomHeaders(client, getInternals, options?.headers);\n const outerArgsString = outerArguments(operation);\n const innerArgsString = innerArguments(operation);\n const selectionSet = operationSelectionSet(modelIntrospection, operation);\n const returnTypeModelName = hasStringField(operation.type, 'model')\n ? operation.type.model\n : undefined;\n const query = `\n ${operationType.toLocaleLowerCase()}${outerArgsString} {\n ${operationName}${innerArgsString} ${selectionSet}\n }\n `;\n const variables = operationVariables(operation, args);\n const userAgentOverride = createUserAgentOverride(customUserAgentDetails);\n try {\n const basePromise = context\n ? client.graphql(context, {\n ...auth,\n query,\n variables,\n }, headers)\n : client.graphql({\n ...auth,\n query,\n variables,\n ...userAgentOverride,\n }, headers);\n const extendedPromise = extendCancellability(basePromise, resultPromise);\n const { data, extensions } = await extendedPromise;\n // flatten response\n if (data) {\n const [key] = Object.keys(data);\n const isArrayResult = Array.isArray(data[key]);\n // TODO: when adding support for custom selection set, flattening will need\n // to occur recursively. For now, it's expected that related models are not\n // present in the result. Only FK's are present. Any related model properties\n // should be replaced with lazy loaders under the current implementation.\n const flattenedResult = isArrayResult\n ? data[key].filter((x) => x)\n : data[key];\n // TODO: custom selection set. current selection set is default selection set only\n // custom selection set requires data-schema-type + runtime updates above.\n const initialized = returnTypeModelName\n ? initializeModel(client, returnTypeModelName, isArrayResult ? flattenedResult : [flattenedResult], modelIntrospection, auth.authMode, auth.authToken, !!context)\n : flattenedResult;\n return {\n data: !isArrayResult && Array.isArray(initialized)\n ? initialized.shift()\n : initialized,\n extensions,\n };\n }\n else {\n return { data: null, extensions };\n }\n }\n catch (error) {\n /**\n * The `data` type returned by `error` here could be:\n * 1) `null`\n * 2) an empty object\n * 3) \"populated\" but with a `null` value `{ getPost: null }`\n * 4) an actual record `{ getPost: { id: '1', title: 'Hello, World!' } }`\n */\n const { data, errors } = error;\n /**\n * `data` is not `null`, and is not an empty object:\n */\n if (data && Object.keys(data).length !== 0 && errors) {\n const [key] = Object.keys(data);\n const isArrayResult = Array.isArray(data[key]);\n // TODO: when adding support for custom selection set, flattening will need\n // to occur recursively. For now, it's expected that related models are not\n // present in the result. Only FK's are present. Any related model properties\n // should be replaced with lazy loaders under the current implementation.\n const flattenedResult = isArrayResult\n ? data[key].filter((x) => x)\n : data[key];\n /**\n * `flattenedResult` could be `null` here (e.g. `data: { getPost: null }`)\n * if `flattenedResult`, result is an actual record:\n */\n if (flattenedResult) {\n // TODO: custom selection set. current selection set is default selection set only\n // custom selection set requires data-schema-type + runtime updates above.\n const initialized = returnTypeModelName\n ? initializeModel(client, returnTypeModelName, isArrayResult ? flattenedResult : [flattenedResult], modelIntrospection, auth.authMode, auth.authToken, !!context)\n : flattenedResult;\n return {\n data: !isArrayResult && Array.isArray(initialized)\n ? initialized.shift()\n : initialized,\n errors,\n };\n }\n else {\n // was `data: { getPost: null }`)\n return handleSingularGraphQlError(error);\n }\n }\n else {\n // `data` is `null`:\n return handleSingularGraphQlError(error);\n }\n }\n });\n}\n/**\n * Executes an operation from the given model intro schema against a client, returning\n * a fully instantiated model when relevant.\n *\n * @param client The client to operate `graphql()` calls through.\n * @param modelIntrospection The model intro schema to construct requests from.\n * @param operation The specific operation name, args, return type details.\n * @param args The arguments to provide to the operation as variables.\n * @param options Request options like headers, etc.\n * @returns Result from the graphql request, model-instantiated when relevant.\n */\nfunction _opSubscription(client, modelIntrospection, operation, getInternals, args, options, customUserAgentDetails) {\n const operationType = 'subscription';\n const { name: operationName } = operation;\n const auth = authModeParams(client, getInternals, options);\n const headers = getCustomHeaders(client, getInternals, options?.headers);\n const outerArgsString = outerArguments(operation);\n const innerArgsString = innerArguments(operation);\n const selectionSet = operationSelectionSet(modelIntrospection, operation);\n const returnTypeModelName = hasStringField(operation.type, 'model')\n ? operation.type.model\n : undefined;\n const query = `\n ${operationType.toLocaleLowerCase()}${outerArgsString} {\n ${operationName}${innerArgsString} ${selectionSet}\n }\n `;\n const variables = operationVariables(operation, args);\n const userAgentOverride = createUserAgentOverride(customUserAgentDetails);\n const observable = client.graphql({\n ...auth,\n query,\n variables,\n ...userAgentOverride,\n }, headers);\n return observable.pipe(map((value) => {\n const [key] = Object.keys(value.data);\n const data = value.data[key];\n const [initialized] = returnTypeModelName\n ? initializeModel(client, returnTypeModelName, [data], modelIntrospection, auth.authMode, auth.authToken)\n : [data];\n return initialized;\n }));\n}\n\nexport { customOpFactory };\n//# sourceMappingURL=custom.mjs.map\n","import { resolveOwnerFields } from '../utils/resolveOwnerFields.mjs';\nimport { capitalize } from '../utils/stringTransformation.mjs';\nimport { selfAwareAsync } from '../utils/selfAwareAsync.mjs';\nimport { extendCancellability } from './cancellation.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nconst connectionType = {\n HAS_ONE: 'HAS_ONE',\n HAS_MANY: 'HAS_MANY',\n BELONGS_TO: 'BELONGS_TO',\n};\n// When generating an SK's KeyConditionInput name, string-like types map to String\nconst skGraphQlFieldTypeMap = {\n ID: 'ID',\n String: 'String',\n AWSDate: 'String',\n AWSTime: 'String',\n AWSDateTime: 'String',\n AWSTimestamp: 'Int',\n AWSEmail: 'String',\n AWSPhone: 'String',\n AWSURL: 'String',\n AWSIPAddress: 'String',\n AWSJSON: 'String',\n Boolean: 'Boolean',\n Int: 'Int',\n Float: 'Float',\n};\n// move to util\nconst resolvedSkName = (sk) => {\n if (sk.length === 1) {\n return sk[0];\n }\n else {\n return sk.reduce((acc, curr, idx) => {\n if (idx === 0) {\n return curr;\n }\n else {\n return acc + capitalize(curr);\n }\n }, '');\n }\n};\n/**\n * Crawls a model tree, starting with a given **individual** model instance record, looking\n * for related hasMany children to extract from their `items` containers.\n *\n * E.g., if we have a record like this:\n *\n * ```js\n * {\n * id: 'some-id',\n * children: {\n * items: [\n * { name: 'a' }\n * { name: 'b' }\n * { name: 'c' }\n * ]\n * }\n * }\n * ```\n *\n * And if `children` refers to *an array of another model* (as opposed to a custom type),\n * the `items` will be extracted. We do this because `items` is just the mechanism for nesting\n * child records -- we don't want customers to have to dig the items out in application code.\n * Ultimately, we return this \"flattened\" structure:\n *\n * ```js\n * {\n * id: 'some-id',\n * children: [\n * { name: 'a' }\n * { name: 'b' }\n * { name: 'c' }\n * ]\n * }\n * ```\n *\n * Notably, an identical record could be the result of a nested custom type that contains an\n * `items` property. This will *not* be flattened, because in that case the `items` property is\n * actually part of the customer's schema. Similarly if a model contains an explicit `items` field.\n *\n * @param modelIntrospection Top-level model introspection schema.\n * @param modelName The name of the model. Can be `undefined`. E.g., for customOperation return types.\n * @param modelRecord The individual \"model instance record\" to normalize.\n */\nconst flattenItems = (modelIntrospection, modelName, modelRecord) => {\n if (!modelRecord)\n return null;\n const mapped = {};\n for (const [fieldName, value] of Object.entries(modelRecord)) {\n const fieldDef = modelName\n ? modelIntrospection.models[modelName]?.fields[fieldName]\n : undefined;\n const dvPair = { fieldDef, value };\n if (isRelatedModelItemsArrayPair(dvPair)) {\n mapped[fieldName] = dvPair.value.items.map((itemValue) => flattenItems(modelIntrospection, dvPair.fieldDef.type.model, itemValue));\n }\n else if (isRelatedModelProperty(fieldDef)) {\n mapped[fieldName] = flattenItems(modelIntrospection, fieldDef.type.model, value);\n }\n else {\n mapped[fieldName] = value;\n }\n }\n return mapped;\n};\n/**\n * Determines whether the given field definition and associated result value\n * represent a related model array from a HasMany-type relationship.\n *\n * @param dv Pair of field definition and associated result value\n * @returns\n */\nfunction isRelatedModelItemsArrayPair(dv) {\n return (typeof dv.fieldDef?.type === 'object' &&\n 'model' in dv.fieldDef.type &&\n typeof dv.fieldDef.type.model === 'string' &&\n dv.fieldDef.isArray &&\n Array.isArray(dv.value?.items));\n}\n/**\n * Determines whether the given field definition represents a relationship\n * to another model.\n *\n * @param fieldDef\n * @returns\n */\nfunction isRelatedModelProperty(fieldDef) {\n return (typeof fieldDef?.type === 'object' &&\n 'model' in fieldDef.type &&\n typeof fieldDef.type.model === 'string');\n}\n// TODO: this should accept single result to support CRUD methods; create helper for array/list\nfunction initializeModel(client, modelName, result, modelIntrospection, authMode, authToken, context = false) {\n const introModel = modelIntrospection.models[modelName];\n const introModelFields = introModel.fields;\n const modelFields = Object.entries(introModelFields)\n .filter(([_, field]) => field?.type?.model !== undefined)\n .map(([fieldName]) => fieldName);\n return result.map((record) => {\n if (record === null || record === undefined) {\n return record;\n }\n const initializedRelationshipFields = {};\n for (const fieldName of modelFields) {\n const modelField = introModelFields[fieldName];\n const modelFieldType = modelField?.type;\n const relatedModelName = modelFieldType.model;\n const relatedModel = modelIntrospection.models[relatedModelName];\n const relatedModelPKFieldName = relatedModel.primaryKeyInfo.primaryKeyFieldName;\n const relatedModelSKFieldNames = relatedModel.primaryKeyInfo.sortKeyFieldNames;\n const relationType = modelField.association?.connectionType;\n let connectionFields = [];\n if (modelField.association &&\n 'associatedWith' in modelField.association) {\n connectionFields = modelField.association.associatedWith;\n }\n const targetNames = [];\n if (modelField.association && 'targetNames' in modelField.association) {\n targetNames.push(...modelField.association.targetNames);\n }\n switch (relationType) {\n case connectionType.BELONGS_TO: {\n const sortKeyValues = relatedModelSKFieldNames.reduce(\n // TODO(Eslint): is this implementation correct?\n // eslint-disable-next-line array-callback-return\n (acc, curVal) => {\n if (record[curVal]) {\n acc[curVal] = record[curVal];\n }\n return acc;\n }, {});\n // if get is disabled on the related model\n if (client.models[relatedModelName]?.get === undefined) {\n break;\n }\n if (context) {\n initializedRelationshipFields[fieldName] = (contextSpec, options) => {\n if (record[targetNames[0]]) {\n return client.models[relatedModelName].get(contextSpec, {\n [relatedModelPKFieldName]: record[targetNames[0]],\n ...sortKeyValues,\n }, {\n authMode: options?.authMode || authMode,\n authToken: options?.authToken || authToken,\n });\n }\n return { data: null };\n };\n }\n else {\n initializedRelationshipFields[fieldName] = (options) => {\n if (record[targetNames[0]]) {\n return client.models[relatedModelName].get({\n [relatedModelPKFieldName]: record[targetNames[0]],\n ...sortKeyValues,\n }, {\n authMode: options?.authMode || authMode,\n authToken: options?.authToken || authToken,\n });\n }\n return { data: null };\n };\n }\n break;\n }\n case connectionType.HAS_ONE:\n case connectionType.HAS_MANY: {\n /**\n * If the loader is a HAS_ONE, we just need to attempt to grab the first item\n * from the result.\n */\n const mapResult = relationType === connectionType.HAS_ONE\n ? (result) => {\n return {\n data: result?.data.shift() || null,\n errors: result.errors,\n extensions: result.extensions,\n };\n }\n : (result) => result;\n const parentPk = introModel.primaryKeyInfo.primaryKeyFieldName;\n const parentSK = introModel.primaryKeyInfo.sortKeyFieldNames;\n // M:N check - TODO: refactor\n const relatedModelField = relatedModel.fields[connectionFields[0]];\n const relatedModelFieldType = relatedModelField.type;\n if (relatedModelFieldType.model) {\n let relatedTargetNames = [];\n if (relatedModelField.association &&\n 'targetNames' in relatedModelField.association) {\n relatedTargetNames = relatedModelField.association?.targetNames;\n }\n const hasManyFilter = relatedTargetNames.map((field, idx) => {\n if (idx === 0) {\n return { [field]: { eq: record[parentPk] } };\n }\n return { [field]: { eq: record[parentSK[idx - 1]] } };\n });\n // if list is disabled on the related model\n if (client.models[relatedModelName]?.list === undefined) {\n break;\n }\n if (context) {\n initializedRelationshipFields[fieldName] = (contextSpec, options) => {\n if (record[parentPk]) {\n return selfAwareAsync(async (resultPromise) => {\n const basePromise = client.models[relatedModelName].list(contextSpec, {\n filter: { and: hasManyFilter },\n limit: options?.limit,\n nextToken: options?.nextToken,\n authMode: options?.authMode || authMode,\n authToken: options?.authToken || authToken,\n });\n const extendedBase = extendCancellability(basePromise, resultPromise);\n return mapResult((await extendedBase));\n });\n }\n return [];\n };\n }\n else {\n initializedRelationshipFields[fieldName] = (options) => {\n if (record[parentPk]) {\n return selfAwareAsync(async (resultPromise) => {\n const basePromise = client.models[relatedModelName].list({\n filter: { and: hasManyFilter },\n limit: options?.limit,\n nextToken: options?.nextToken,\n authMode: options?.authMode || authMode,\n authToken: options?.authToken || authToken,\n });\n const extendedBase = extendCancellability(basePromise, resultPromise);\n return mapResult((await extendedBase));\n });\n }\n return [];\n };\n }\n break;\n }\n const hasManyFilter = connectionFields.map((field, idx) => {\n if (idx === 0) {\n return { [field]: { eq: record[parentPk] } };\n }\n return { [field]: { eq: record[parentSK[idx - 1]] } };\n });\n // if list is disabled on the related model\n if (client.models[relatedModelName]?.list === undefined) {\n break;\n }\n if (context) {\n initializedRelationshipFields[fieldName] = (contextSpec, options) => {\n if (record[parentPk]) {\n return selfAwareAsync(async (resultPromise) => {\n const basePromise = client.models[relatedModelName].list(contextSpec, {\n filter: { and: hasManyFilter },\n limit: options?.limit,\n nextToken: options?.nextToken,\n authMode: options?.authMode || authMode,\n authToken: options?.authToken || authToken,\n });\n const extendedBase = extendCancellability(basePromise, resultPromise);\n return mapResult((await extendedBase));\n });\n }\n return [];\n };\n }\n else {\n initializedRelationshipFields[fieldName] = (options) => {\n if (record[parentPk]) {\n return selfAwareAsync(async (resultPromise) => {\n const basePromise = client.models[relatedModelName].list({\n filter: { and: hasManyFilter },\n limit: options?.limit,\n nextToken: options?.nextToken,\n authMode: options?.authMode || authMode,\n authToken: options?.authToken || authToken,\n });\n const extendedBase = extendCancellability(basePromise, resultPromise);\n return mapResult((await extendedBase));\n });\n }\n return [];\n };\n }\n break;\n }\n }\n }\n return { ...record, ...initializedRelationshipFields };\n });\n}\nconst graphQLOperationsInfo = {\n CREATE: { operationPrefix: 'create', usePlural: false },\n GET: { operationPrefix: 'get', usePlural: false },\n UPDATE: { operationPrefix: 'update', usePlural: false },\n DELETE: { operationPrefix: 'delete', usePlural: false },\n LIST: { operationPrefix: 'list', usePlural: true },\n INDEX_QUERY: { operationPrefix: '', usePlural: false },\n ONCREATE: { operationPrefix: 'onCreate', usePlural: false },\n ONUPDATE: { operationPrefix: 'onUpdate', usePlural: false },\n ONDELETE: { operationPrefix: 'onDelete', usePlural: false },\n OBSERVEQUERY: { operationPrefix: 'observeQuery', usePlural: false },\n};\nconst SELECTION_SET_WILDCARD = '*';\nconst getDefaultSelectionSetForNonModelWithIR = (nonModelDefinition, modelIntrospection) => {\n const { fields } = nonModelDefinition;\n const mappedFields = Object.values(fields)\n .map(({ type, name }) => {\n if (typeof type.enum === 'string') {\n return [name, FIELD_IR];\n }\n if (typeof type.nonModel === 'string') {\n return [\n name,\n getDefaultSelectionSetForNonModelWithIR(modelIntrospection.nonModels[type.nonModel], modelIntrospection),\n ];\n }\n if (typeof type === 'string') {\n return [name, FIELD_IR];\n }\n return undefined;\n })\n .filter((pair) => pair !== undefined);\n return Object.fromEntries(mappedFields);\n};\nconst getDefaultSelectionSetForModelWithIR = (modelDefinition, modelIntrospection) => {\n const { fields } = modelDefinition;\n const mappedFields = Object.values(fields)\n .map(({ type, name }) => {\n if (typeof type.enum === 'string' ||\n typeof type === 'string') {\n return [name, FIELD_IR];\n }\n if (typeof type.nonModel === 'string') {\n return [\n name,\n getDefaultSelectionSetForNonModelWithIR(modelIntrospection.nonModels[type.nonModel], modelIntrospection),\n ];\n }\n return undefined;\n })\n .filter((pair) => pair !== undefined);\n const ownerFields = resolveOwnerFields(modelDefinition).map((field) => [\n field,\n FIELD_IR,\n ]);\n return Object.fromEntries(mappedFields.concat(ownerFields));\n};\nfunction defaultSelectionSetForModel(modelDefinition) {\n // fields that are explicitly part of the graphql schema; not\n // inferred from owner auth rules.\n const { fields } = modelDefinition;\n const explicitFields = Object.values(fields)\n // Default selection set omits model fields\n .map(({ type, name }) => {\n if (typeof type === 'string')\n return name;\n if (typeof type === 'object') {\n if (typeof type?.enum === 'string') {\n return name;\n }\n else if (typeof type?.nonModel === 'string') {\n return `${name}.${SELECTION_SET_WILDCARD}`;\n }\n }\n return undefined;\n })\n .filter(Boolean);\n // fields used for owner auth rules that may or may not also\n // be explicit on the model.\n const ownerFields = resolveOwnerFields(modelDefinition);\n return Array.from(new Set(explicitFields.concat(ownerFields)));\n}\nconst FIELD_IR = '';\n/**\n * Generates nested Custom Selection Set IR from path\n *\n * @param modelDefinitions\n * @param modelName\n * @param selectionSet - array of object paths\n * @example\n * ### Given\n * `selectionSet = ['id', 'comments.post.id']`\n * ### Returns\n * ```ts\n * {\n * id: '',\n * comments: {\n * items: { post: { id: '' } }\n * }\n * }\n * ```\n */\nfunction customSelectionSetToIR(modelIntrospection, modelName, selectionSet) {\n const dotNotationToObject = (path, modelOrNonModelName) => {\n const [fieldName, ...rest] = path.split('.');\n const nested = rest[0];\n const modelOrNonModelDefinition = modelIntrospection.models[modelOrNonModelName] ??\n modelIntrospection.nonModels[modelOrNonModelName];\n const modelOrNonModelFields = modelOrNonModelDefinition?.fields;\n const relatedModel = modelOrNonModelFields?.[fieldName]?.type?.model;\n const relatedModelDefinition = modelIntrospection.models[relatedModel];\n const relatedNonModel = modelOrNonModelFields?.[fieldName]?.type?.nonModel;\n const relatedNonModelDefinition = modelIntrospection.nonModels[relatedNonModel];\n const isModelOrNonModelOrFieldType = relatedModelDefinition\n ? 'model'\n : relatedNonModelDefinition\n ? 'nonModel'\n : 'field';\n if (isModelOrNonModelOrFieldType === 'nonModel') {\n let result = {};\n if (!nested) {\n throw Error(`${fieldName} must declare a wildcard (*) or a field of custom type ${relatedNonModel}`);\n }\n if (nested === SELECTION_SET_WILDCARD) {\n result = {\n [fieldName]: getDefaultSelectionSetForNonModelWithIR(relatedNonModelDefinition, modelIntrospection),\n };\n }\n else {\n result = {\n [fieldName]: dotNotationToObject(rest.join('.'), relatedNonModel),\n };\n }\n return result;\n }\n else if (isModelOrNonModelOrFieldType === 'model') {\n let result = {};\n if (!nested) {\n throw Error(`${fieldName} must declare a wildcard (*) or a field of model ${relatedModel}`);\n }\n if (nested === SELECTION_SET_WILDCARD) {\n const nestedRelatedModelDefinition = modelIntrospection.models[relatedModel];\n result = {\n [fieldName]: getDefaultSelectionSetForModelWithIR(nestedRelatedModelDefinition, modelIntrospection),\n };\n }\n else {\n result = {\n [fieldName]: dotNotationToObject(rest.join('.'), relatedModel),\n };\n }\n if (modelOrNonModelFields[fieldName]?.isArray) {\n result = {\n [fieldName]: {\n items: result[fieldName],\n },\n };\n }\n return result;\n }\n else {\n const modelField = modelOrNonModelFields?.[fieldName];\n const nonModelDefinition = modelIntrospection.nonModels[modelOrNonModelName];\n const nonModelField = nonModelDefinition?.fields?.[fieldName];\n if (!nonModelDefinition) {\n const isOwnerField = resolveOwnerFields(modelOrNonModelDefinition).includes(fieldName);\n if (!modelField && !isOwnerField) {\n throw Error(`${fieldName} is not a field of model ${modelOrNonModelName}`);\n }\n }\n else {\n if (!nonModelField) {\n throw Error(`${fieldName} is not a field of custom type ${modelOrNonModelName}`);\n }\n }\n return { [fieldName]: FIELD_IR };\n }\n };\n return selectionSet.reduce((resultObj, path) => deepMergeSelectionSetObjects(dotNotationToObject(path, modelName), resultObj), {});\n}\n/**\n * Stringifies selection set IR\n * * @example\n * ### Given\n * ```ts\n * {\n * id: '',\n * comments: {\n * items: { post: { id: '' } }\n * }\n * }\n * ```\n * ### Returns\n * `'id comments { items { post { id } } }'`\n */\nfunction selectionSetIRToString(obj) {\n const res = [];\n Object.entries(obj).forEach(([fieldName, value]) => {\n if (value === FIELD_IR) {\n res.push(fieldName);\n }\n else if (typeof value === 'object' && value !== null) {\n if (value?.items) {\n res.push(fieldName, '{', 'items', '{', selectionSetIRToString(value.items), '}', '}');\n }\n else {\n res.push(fieldName, '{', selectionSetIRToString(value), '}');\n }\n }\n });\n return res.join(' ');\n}\n/**\n * Recursively merges selection set objects from `source` onto `target`.\n *\n * `target` will be updated. `source` will be left alone.\n *\n * @param source The object to merge into target.\n * @param target The object to be mutated.\n */\nfunction deepMergeSelectionSetObjects(source, target) {\n const isObject = (obj) => obj && typeof obj === 'object';\n for (const key in source) {\n // This verification avoids 'Prototype Pollution' issue\n if (!Object.prototype.hasOwnProperty.call(source, key))\n continue;\n if (Object.prototype.hasOwnProperty.call(target, key) &&\n isObject(target[key])) {\n deepMergeSelectionSetObjects(source[key], target[key]);\n }\n else {\n target[key] = source[key];\n }\n }\n return target;\n}\nfunction generateSelectionSet(modelIntrospection, modelName, selectionSet) {\n const modelDefinition = modelIntrospection.models[modelName];\n const selSetIr = customSelectionSetToIR(modelIntrospection, modelName, selectionSet ?? defaultSelectionSetForModel(modelDefinition));\n const selSetString = selectionSetIRToString(selSetIr);\n return selSetString;\n}\nfunction generateGraphQLDocument(modelIntrospection, modelDefinition, modelOperation, listArgs, indexMeta) {\n const { name, pluralName, fields, primaryKeyInfo: { isCustomPrimaryKey, primaryKeyFieldName, sortKeyFieldNames, }, attributes, } = modelDefinition;\n // Use pascal case of the model name to generate the operations and the arguments.\n // This is required to be in sync with the resources generated by the GraphQL transformers.\n const namePascalCase = name.charAt(0).toUpperCase() + name.slice(1);\n const pluralNamePascalCase = pluralName.charAt(0).toUpperCase() + pluralName.slice(1);\n const { operationPrefix, usePlural } = graphQLOperationsInfo[modelOperation];\n const { selectionSet } = listArgs || {};\n let graphQLFieldName;\n let indexQueryArgs;\n if (operationPrefix) {\n graphQLFieldName = `${operationPrefix}${usePlural ? pluralNamePascalCase : namePascalCase}`;\n }\n else if (indexMeta) {\n const { queryField, pk, sk = [] } = indexMeta;\n graphQLFieldName = queryField;\n /**\n * **a. Single field SK** -> single arg where name is the field name and the type is `Model${gqlFieldType}KeyConditionInput` (nullable)\n * Note: string-like data types e.g., AWSDateTime, AWSEmail, AWSPhone, etc. should map to String. See `skGraphQlFieldTypeMap` above\n * @example\n * ```\n * sk1: ModelStringKeyConditionInput\n * ```\n *\n * **b. Composite SK** -> single arg where the name is camelCase concatenation of all the field names that comprise the SK\n * and the type is `Model${modelName}${keyAttributeName}CompositeKeyConditionInput` (nullable)\n * @example\n * ```\n * sk1Sk2: ModelMyModelMyModelByPkAndSk1AndSk2CompositeKeyConditionInput\n */\n let skQueryArgs = {};\n if (sk.length === 1) {\n const [skField] = sk;\n const type = (typeof fields[skField].type === 'string'\n ? fields[skField].type\n : 'String');\n const normalizedType = skGraphQlFieldTypeMap[type];\n skQueryArgs = {\n [skField]: `Model${normalizedType}KeyConditionInput`,\n };\n }\n else if (sk.length > 1) {\n const compositeSkArgName = resolvedSkName(sk);\n const keyName = attributes?.find((attr) => attr?.properties?.queryField === queryField)?.properties?.name;\n skQueryArgs = {\n [compositeSkArgName]: `Model${capitalize(name)}${capitalize(keyName)}CompositeKeyConditionInput`,\n };\n }\n indexQueryArgs = {\n [pk]: `${Object.prototype.hasOwnProperty.call(fields[pk].type, 'enum')\n ? fields[pk].type.enum // AppSync schema sets enum type as the type of the enum fields that's used as PK\n : fields[pk].type}!`,\n ...skQueryArgs,\n };\n }\n else {\n throw new Error('Error generating GraphQL Document - invalid operation name');\n }\n let graphQLOperationType;\n let graphQLSelectionSet;\n let graphQLArguments;\n const selectionSetFields = generateSelectionSet(modelIntrospection, name, selectionSet);\n // default PK args for get and list operations\n // modified below for CPK\n const getPkArgs = {\n [primaryKeyFieldName]: `${fields[primaryKeyFieldName].type}!`,\n };\n const listPkArgs = {};\n /**\n * Generate query field args for the SK if it's defined\n *\n * **1. Get queries** require each SK field to be present as a separate arg where the type is the field's GraphQL scalar type (non-nullable)\n * @example\n * ```\n * sk1: String!, sk2: Int!\n * ```\n *\n * **2. List queries**\n *\n * **a. Single field SK** -> single arg where name is the field name and the type is `Model${gqlFieldType}KeyConditionInput` (nullable)\n * Note: string-like data types e.g., AWSDateTime, AWSEmail, AWSPhone, etc. should map to String. See `skGraphQlFieldTypeMap` above\n * @example\n * ```\n * sk1: ModelStringKeyConditionInput\n * ```\n *\n * **b. Composite SK** -> single arg where the name is camelCase concatenation of all the field names that comprise the SK\n * and the type is `Model${modelName}PrimaryCompositeKeyConditionInput` (nullable)\n * @example\n * ```\n * sk1Sk2: ModelMyModelPrimaryCompositeKeyConditionInput\n * ```\n */\n const generateSkArgs = (op) => {\n if (sortKeyFieldNames.length === 0)\n return {};\n if (op === 'get') {\n return sortKeyFieldNames.reduce((acc, fieldName) => {\n const fieldType = fields[fieldName].type;\n if (op === 'get') {\n acc[fieldName] = `${fieldType}!`; // ! - SK args are non-nullable in Get queries\n }\n return acc;\n }, {});\n }\n else {\n // list SK\n if (sortKeyFieldNames.length === 1) {\n // Single SK\n const [sk] = sortKeyFieldNames;\n const type = (typeof fields[sk].type === 'string' ? fields[sk].type : 'String');\n const normalizedType = skGraphQlFieldTypeMap[type];\n return {\n [sk]: `Model${normalizedType}KeyConditionInput`,\n };\n }\n else {\n // Composite SK\n const compositeSkArgName = resolvedSkName(sortKeyFieldNames);\n return {\n [compositeSkArgName]: `Model${capitalize(name)}PrimaryCompositeKeyConditionInput`,\n };\n }\n }\n };\n if (isCustomPrimaryKey) {\n Object.assign(getPkArgs, generateSkArgs('get'));\n Object.assign(listPkArgs, {\n // PK is only included in list query field args in the generated GQL\n // when explicitly specifying PK with .identifier(['fieldName']) or @primaryKey in the schema definition\n [primaryKeyFieldName]: `${fields[primaryKeyFieldName].type}`, // PK is always a nullable arg for list (no `!` after the type)\n sortDirection: 'ModelSortDirection',\n }, generateSkArgs('list'));\n }\n switch (modelOperation) {\n case 'CREATE':\n case 'UPDATE':\n case 'DELETE':\n graphQLArguments ??\n (graphQLArguments = {\n input: `${operationPrefix.charAt(0).toLocaleUpperCase() +\n operationPrefix.slice(1)}${namePascalCase}Input!`,\n });\n graphQLOperationType ?? (graphQLOperationType = 'mutation');\n // TODO(Eslint): this this case clause correct without the break statement?\n // eslint-disable-next-line no-fallthrough\n case 'GET':\n graphQLArguments ?? (graphQLArguments = getPkArgs);\n graphQLSelectionSet ?? (graphQLSelectionSet = selectionSetFields);\n // TODO(Eslint): this this case clause correct without the break statement?\n // eslint-disable-next-line no-fallthrough\n case 'LIST':\n graphQLArguments ??\n (graphQLArguments = {\n ...listPkArgs,\n // eslint doesn't like the ts-ignore, because it thinks it's unnecessary.\n // But TS doesn't like the `filter: ...` because it think it will always be\n // overwritten. (it won't be.) so, we need to ignore the TS error and then\n // ignore the eslint error on the ts-ignore.\n // eslint-disable-next-line\n // @ts-ignore\n filter: `Model${namePascalCase}FilterInput`,\n limit: 'Int',\n nextToken: 'String',\n });\n graphQLOperationType ?? (graphQLOperationType = 'query');\n graphQLSelectionSet ??\n (graphQLSelectionSet = `items { ${selectionSetFields} } nextToken __typename`);\n // TODO(Eslint): this this case clause correct without the break statement?\n // eslint-disable-next-line no-fallthrough\n case 'INDEX_QUERY':\n graphQLArguments ??\n (graphQLArguments = {\n ...indexQueryArgs,\n filter: `Model${namePascalCase}FilterInput`,\n sortDirection: 'ModelSortDirection',\n limit: 'Int',\n nextToken: 'String',\n });\n graphQLOperationType ?? (graphQLOperationType = 'query');\n graphQLSelectionSet ??\n (graphQLSelectionSet = `items { ${selectionSetFields} } nextToken __typename`);\n // TODO(Eslint): this this case clause correct without the break statement?\n // eslint-disable-next-line no-fallthrough\n case 'ONCREATE':\n case 'ONUPDATE':\n case 'ONDELETE':\n graphQLArguments ??\n (graphQLArguments = {\n filter: `ModelSubscription${namePascalCase}FilterInput`,\n });\n graphQLOperationType ?? (graphQLOperationType = 'subscription');\n graphQLSelectionSet ?? (graphQLSelectionSet = selectionSetFields);\n break;\n case 'OBSERVEQUERY':\n default:\n throw new Error('Internal error: Attempted to generate graphql document for observeQuery. Please report this error.');\n }\n const graphQLDocument = `${graphQLOperationType}${graphQLArguments\n ? `(${Object.entries(graphQLArguments).map(([fieldName, type]) => `$${fieldName}: ${type}`)})`\n : ''} { ${graphQLFieldName}${graphQLArguments\n ? `(${Object.keys(graphQLArguments).map((fieldName) => `${fieldName}: $${fieldName}`)})`\n : ''} { ${graphQLSelectionSet} } }`;\n return graphQLDocument;\n}\nfunction buildGraphQLVariables(modelDefinition, operation, arg, modelIntrospection, indexMeta) {\n const { fields, primaryKeyInfo: { isCustomPrimaryKey, primaryKeyFieldName, sortKeyFieldNames, }, } = modelDefinition;\n const skName = sortKeyFieldNames?.length && resolvedSkName(sortKeyFieldNames);\n let variables = {};\n // TODO: process input\n switch (operation) {\n case 'CREATE':\n variables = {\n input: arg\n ? normalizeMutationInput(arg, modelDefinition, modelIntrospection)\n : {},\n };\n break;\n case 'UPDATE':\n // readonly fields are not updated\n variables = {\n input: arg\n ? Object.fromEntries(Object.entries(normalizeMutationInput(arg, modelDefinition, modelIntrospection)).filter(([fieldName]) => {\n const { isReadOnly } = fields[fieldName];\n return !isReadOnly;\n }))\n : {},\n };\n break;\n case 'GET':\n case 'DELETE':\n // only identifiers are sent\n if (arg) {\n variables = isCustomPrimaryKey\n ? [primaryKeyFieldName, ...sortKeyFieldNames].reduce((acc, fieldName) => {\n acc[fieldName] = arg[fieldName];\n return acc;\n }, {})\n : { [primaryKeyFieldName]: arg[primaryKeyFieldName] };\n }\n if (operation === 'DELETE') {\n variables = { input: variables };\n }\n break;\n case 'LIST':\n if (arg?.filter) {\n variables.filter = arg.filter;\n }\n if (arg?.sortDirection) {\n variables.sortDirection = arg.sortDirection;\n }\n if (arg && arg[primaryKeyFieldName]) {\n variables[primaryKeyFieldName] = arg[primaryKeyFieldName];\n }\n if (skName && arg && arg[skName]) {\n variables[skName] = arg[skName];\n }\n if (arg?.nextToken) {\n variables.nextToken = arg.nextToken;\n }\n if (arg?.limit) {\n variables.limit = arg.limit;\n }\n break;\n case 'INDEX_QUERY': {\n const { pk, sk = [] } = indexMeta;\n const indexQuerySkName = sk?.length && resolvedSkName(sk);\n variables[pk] = arg[pk];\n if (indexQuerySkName && arg && arg[indexQuerySkName]) {\n variables[indexQuerySkName] = arg[indexQuerySkName];\n }\n if (arg?.filter) {\n variables.filter = arg.filter;\n }\n if (arg?.sortDirection) {\n variables.sortDirection = arg.sortDirection;\n }\n if (arg?.nextToken) {\n variables.nextToken = arg.nextToken;\n }\n if (arg?.limit) {\n variables.limit = arg.limit;\n }\n break;\n }\n case 'ONCREATE':\n case 'ONUPDATE':\n case 'ONDELETE':\n if (arg?.filter) {\n variables = { filter: arg.filter };\n }\n break;\n case 'OBSERVEQUERY':\n throw new Error('Internal error: Attempted to build variables for observeQuery. Please report this error.');\n default: {\n const exhaustiveCheck = operation;\n throw new Error(`Unhandled operation case: ${exhaustiveCheck}`);\n }\n }\n return variables;\n}\n/**\n * Iterates over mutation input values and resolves any model inputs to their corresponding join fields/values\n *\n * @example\n * ### Usage\n * ```ts\n * const result = normalizeMutationInput({ post: post }, model, modelDefinition);\n * ```\n * ### Result\n * ```ts\n * { postId: \"abc123\" }\n * ```\n *\n */\nfunction normalizeMutationInput(mutationInput, model, modelIntrospection) {\n const { fields } = model;\n const normalized = {};\n Object.entries(mutationInput).forEach(([inputFieldName, inputValue]) => {\n const fieldType = fields[inputFieldName]?.type;\n const relatedModelName = fieldType?.model;\n if (relatedModelName) {\n const association = fields[inputFieldName]?.association;\n const relatedModelDef = modelIntrospection.models[relatedModelName];\n const relatedModelPkInfo = relatedModelDef.primaryKeyInfo;\n if (association?.connectionType === connectionType.HAS_ONE) {\n const associationHasOne = association;\n associationHasOne.targetNames.forEach((targetName, idx) => {\n const associatedFieldName = associationHasOne.associatedWith[idx];\n normalized[targetName] = inputValue[associatedFieldName];\n });\n }\n if (association?.connectionType === connectionType.BELONGS_TO) {\n const associationBelongsTo = association;\n associationBelongsTo.targetNames.forEach((targetName, idx) => {\n if (idx === 0) {\n const associatedFieldName = relatedModelPkInfo.primaryKeyFieldName;\n normalized[targetName] = inputValue[associatedFieldName];\n }\n else {\n const associatedFieldName = relatedModelPkInfo.sortKeyFieldNames[idx - 1];\n normalized[targetName] = inputValue[associatedFieldName];\n }\n });\n }\n }\n else {\n normalized[inputFieldName] = inputValue;\n }\n });\n return normalized;\n}\n/**\n * Produces a parameter object that can contains auth mode/token overrides\n * only if present in either `options` (first) or configured on the `client`\n * as a fallback.\n *\n * @param client Configured client from `generateClient`\n * @param options Args/Options object from call site.\n * @returns\n */\nfunction authModeParams(client, getInternals, options = {}) {\n const internals = getInternals(client);\n return {\n authMode: options.authMode || internals.authMode,\n authToken: options.authToken || internals.authToken,\n };\n}\n/**\n * Retrieves custom headers from either the client or request options.\n * @param client V6Client | V6ClientSSRRequest | V6ClientSSRCookies - for extracting client headers\n * @param requestHeaders {@link CustomHeaders} - request headers\n * @returns custom headers as {@link CustomHeaders}\n */\nfunction getCustomHeaders(client, getInternals, requestHeaders) {\n let headers = getInternals(client).headers || {};\n // Individual request headers will take precedence over client headers.\n // We intentionally do *not* merge client and request headers.\n if (requestHeaders) {\n headers = requestHeaders;\n }\n return headers;\n}\n\nexport { authModeParams, buildGraphQLVariables, customSelectionSetToIR, flattenItems, generateGraphQLDocument, generateSelectionSet, getCustomHeaders, getDefaultSelectionSetForNonModelWithIR, graphQLOperationsInfo, initializeModel, normalizeMutationInput, selectionSetIRToString };\n//# sourceMappingURL=APIClient.mjs.map\n","/**\n * Given an introspection schema model, returns all owner fields.\n *\n * @param model Model from an introspection schema\n * @returns List of owner field names\n */\nfunction resolveOwnerFields(model) {\n const ownerFields = new Set();\n for (const attr of model.attributes || []) {\n if (isAuthAttribute(attr)) {\n for (const rule of attr.properties.rules) {\n if (rule.allow === 'owner') {\n ownerFields.add(rule.ownerField || 'owner');\n }\n else if (rule.allow === 'groups' && rule.groupsField !== undefined) {\n // only valid for dynamic group(s)\n // static group auth will have an array of predefined groups in the attribute, groups: string[]\n // but `groupsField` will be undefined\n ownerFields.add(rule.groupsField);\n }\n }\n }\n }\n return Array.from(ownerFields);\n}\n/**\n * Type guard that identifies an auth attribute with an attached rules list that\n * specifies an `allow` attribute at a minimum.\n *\n * @param attribute Any object. Ideally a model introspection schema model attribute\n * @returns True if given object is an auth attribute\n */\nfunction isAuthAttribute(attribute) {\n if (attribute?.type === 'auth') {\n if (typeof attribute?.properties === 'object') {\n if (Array.isArray(attribute?.properties?.rules)) {\n return (attribute?.properties?.rules).every((rule) => !!rule.allow);\n }\n }\n }\n return false;\n}\n\nexport { resolveOwnerFields };\n//# sourceMappingURL=resolveOwnerFields.mjs.map\n","/**\n * @param s string to capitalize\n * @returns capitalized string\n */\nfunction capitalize(s) {\n return `${s[0].toUpperCase()}${s.slice(1)}`;\n}\n\nexport { capitalize };\n//# sourceMappingURL=stringTransformation.mjs.map\n","/**\n * Executes an `async` resolver function, providing the `Promise`-to-be-returned as the\n * first argument to the resolver so that the resolver can refer to the `Promise` that\n * external callers will see.\n *\n * ```ts\n * const outer = selfAwareAsync(async inner => {\n * console.log(outer === inner); // true\n * });\n * ```\n *\n * This utility exists to reduce boilerplate in cases where promise resolving code needs\n * to track or register its \"own\" `Promise` *as seen by the caller* in some way. E.g.,\n * when mapping `Promise` chains for `client.cancel()`.\n *\n * @param resolver\n * @returns\n */\nfunction selfAwareAsync(resolver) {\n let resolve;\n let reject;\n const resultPromise = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n resolver(resultPromise)\n .then((result) => {\n resolve(result);\n })\n .catch((error) => {\n reject(error);\n });\n return resultPromise;\n}\n\nexport { selfAwareAsync };\n//# sourceMappingURL=selfAwareAsync.mjs.map\n","/**\n * A map of cancellable promise \"extensions\".\n *\n * Each entry value must either be a directly `cancel()`-able promise, or must\n * refer to another entry.\n *\n * When cancellation of a promise is requested, cancel\n * will check to see if the promise exists in the map. If it does, it pulls\n * the value and repeats the check. If not, it will perform the underlying\n * cancel operation.\n */\nconst promiseMap = new WeakMap();\nfunction extendCancellability(existingCancellablePromise, newPromiseToRegister) {\n promiseMap.set(newPromiseToRegister, existingCancellablePromise);\n return existingCancellablePromise.finally(() => {\n promiseMap.delete(newPromiseToRegister);\n });\n}\n/**\n * Wraps the existing `cancel()` method with logic to iteratively search for\n * the corresponding base level promise, if needed, that the core graphql client\n * knows how to cancel.\n *\n * @param client\n */\nfunction upgradeClientCancellation(client) {\n const innerCancel = client.cancel.bind(client);\n client.cancel = function (promise, message) {\n const visited = new Set();\n let targetPromise = promise;\n while (targetPromise && promiseMap.has(targetPromise)) {\n if (visited.has(targetPromise))\n throw new Error('A cycle was detected in the modeled graphql cancellation chain. This is a bug. Please report it!');\n visited.add(targetPromise);\n targetPromise = promiseMap.get(targetPromise);\n }\n // call `innerCancel` with `targetPromise!` to defer to existing implementation\n // on how to handle `null | undefined` or otherwise \"non-cancellable\" objects.\n return innerCancel(targetPromise, message);\n };\n}\n\nexport { extendCancellability, upgradeClientCancellation };\n//# sourceMappingURL=cancellation.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// import { GraphQLFormattedError } from '@aws-amplify/data-schema-types';\n/**\n * Handle errors for list return types (list and index query operations)\n */\nfunction handleListGraphQlError(error) {\n if (error?.errors) {\n // graphql errors pass through\n return {\n ...error,\n data: [],\n };\n }\n else {\n // non-graphql errors are re-thrown\n throw error;\n }\n}\n/**\n * Handle errors for singular return types (create, get, update, delete operations)\n */\nfunction handleSingularGraphQlError(error) {\n if (error.errors) {\n // graphql errors pass through\n return {\n ...error,\n data: null,\n };\n }\n else {\n // non-graphql errors are re-thrown\n throw error;\n }\n}\n\nexport { handleListGraphQlError, handleSingularGraphQlError };\n//# sourceMappingURL=utils.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Symbol used for internal user agent overrides.\n *\n * @internal\n * This symbol is intended for internal use within the Amplify library.\n * It may change or be removed in future versions without notice.\n * External usage of this symbol is discouraged and may lead to unexpected behavior.\n */\nconst INTERNAL_USER_AGENT_OVERRIDE = Symbol('INTERNAL_USER_AGENT_OVERRIDE');\nvar AiAction;\n(function (AiAction) {\n AiAction[\"CreateConversation\"] = \"1\";\n AiAction[\"GetConversation\"] = \"2\";\n AiAction[\"ListConversations\"] = \"3\";\n AiAction[\"DeleteConversation\"] = \"4\";\n AiAction[\"SendMessage\"] = \"5\";\n AiAction[\"ListMessages\"] = \"6\";\n AiAction[\"OnStreamEvent\"] = \"7\";\n AiAction[\"Generation\"] = \"8\";\n AiAction[\"UpdateConversation\"] = \"9\";\n})(AiAction || (AiAction = {}));\nconst getCustomUserAgentDetails = (action) => ({\n category: 'ai',\n action,\n});\n/**\n * Creates a user agent override object based on custom details.\n *\n * @internal\n * This function is intended for internal use within the Amplify library.\n * It may change or be removed in future versions without notice.\n *\n * @param customUserAgentDetails - Optional custom user agent details\n * @returns An object with INTERNAL_USER_AGENT_OVERRIDE symbol as key and customUserAgentDetails as value, or undefined if no details provided\n */\nfunction createUserAgentOverride(customUserAgentDetails) {\n return customUserAgentDetails\n ? { [INTERNAL_USER_AGENT_OVERRIDE]: customUserAgentDetails }\n : undefined;\n}\n\nexport { AiAction, INTERNAL_USER_AGENT_OVERRIDE, createUserAgentOverride, getCustomUserAgentDetails };\n//# sourceMappingURL=getCustomUserAgentDetails.mjs.map\n","import { createCreateConversationFunction } from '../../ai/createCreateConversationFunction.mjs';\nimport { createGetConversationFunction } from '../../ai/createGetConversationFunction.mjs';\nimport { createListConversationsFunction } from '../../ai/createListConversationsFunction.mjs';\nimport { createDeleteConversationFunction } from '../../ai/createDeleteConversationFunction.mjs';\nimport { createUpdateConversationFunction } from '../../ai/createUpdateConversationFunction.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction generateConversationsProperty(client, apiGraphQLConfig, getInternals) {\n const modelIntrospection = apiGraphQLConfig?.modelIntrospection;\n // conversations will be absent from model intro schema if no conversation routes\n // are present on the source schema.\n if (!modelIntrospection?.conversations) {\n return {};\n }\n const conversations = {};\n for (const { name, conversation, message, models, nonModels, enums, } of Object.values(modelIntrospection.conversations)) {\n const conversationModel = models[conversation.modelName];\n const conversationMessageModel = models[message.modelName];\n if (!conversationModel || !conversationMessageModel) {\n return {};\n }\n const conversationModelIntrospection = {\n ...modelIntrospection,\n models: {\n ...modelIntrospection.models,\n ...models,\n },\n nonModels: {\n ...modelIntrospection.nonModels,\n ...nonModels,\n },\n enums: {\n ...modelIntrospection.enums,\n ...enums,\n },\n };\n conversations[name] = {\n update: createUpdateConversationFunction(client, conversationModelIntrospection, name, conversationModel, conversationMessageModel, getInternals),\n create: createCreateConversationFunction(client, conversationModelIntrospection, name, conversationModel, conversationMessageModel, getInternals),\n get: createGetConversationFunction(client, conversationModelIntrospection, name, conversationModel, conversationMessageModel, getInternals),\n delete: createDeleteConversationFunction(client, conversationModelIntrospection, name, conversationModel, conversationMessageModel, getInternals),\n list: createListConversationsFunction(client, conversationModelIntrospection, name, conversationModel, conversationMessageModel, getInternals),\n };\n }\n return conversations;\n}\n\nexport { generateConversationsProperty };\n//# sourceMappingURL=generateConversationsProperty.mjs.map\n","import { getFactory } from '../operations/get.mjs';\nimport { convertItemToConversation } from './convertItemToConversation.mjs';\nimport { getCustomUserAgentDetails, AiAction } from './getCustomUserAgentDetails.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createCreateConversationFunction = (client, modelIntrospection, conversationRouteName, conversationModel, conversationMessageModel, getInternals) => async (input) => {\n const { name, metadata: metadataObject } = input ?? {};\n const metadata = JSON.stringify(metadataObject);\n const createOperation = getFactory(client, modelIntrospection, conversationModel, 'CREATE', getInternals, false, getCustomUserAgentDetails(AiAction.CreateConversation));\n const { data, errors } = await createOperation({ name, metadata });\n return {\n data: convertItemToConversation(client, modelIntrospection, data?.id, data?.createdAt, data?.updatedAt, conversationRouteName, conversationMessageModel, getInternals, data?.metadata, data?.name),\n errors,\n };\n};\n\nexport { createCreateConversationFunction };\n//# sourceMappingURL=createCreateConversationFunction.mjs.map\n","import { generateGraphQLDocument, buildGraphQLVariables, authModeParams, getCustomHeaders, flattenItems, initializeModel } from '../APIClient.mjs';\nimport { handleSingularGraphQlError } from './utils.mjs';\nimport { selfAwareAsync } from '../../utils/selfAwareAsync.mjs';\nimport { extendCancellability } from '../cancellation.mjs';\nimport { createUserAgentOverride } from '../ai/getCustomUserAgentDetails.mjs';\n\nfunction getFactory(client, modelIntrospection, model, operation, getInternals, useContext = false, customUserAgentDetails) {\n const getWithContext = (contextSpec, arg, options) => {\n return _get(client, modelIntrospection, model, arg, options, operation, getInternals, contextSpec, customUserAgentDetails);\n };\n const get = (arg, options) => {\n return _get(client, modelIntrospection, model, arg, options, operation, getInternals, undefined, customUserAgentDetails);\n };\n return useContext ? getWithContext : get;\n}\nfunction _get(client, modelIntrospection, model, arg, options, operation, getInternals, context, customUserAgentDetails) {\n return selfAwareAsync(async (resultPromise) => {\n const { name } = model;\n const query = generateGraphQLDocument(modelIntrospection, model, operation, options);\n const variables = buildGraphQLVariables(model, operation, arg, modelIntrospection);\n const auth = authModeParams(client, getInternals, options);\n const headers = getCustomHeaders(client, getInternals, options?.headers);\n const userAgentOverride = createUserAgentOverride(customUserAgentDetails);\n try {\n const basePromise = context\n ? client.graphql(context, {\n ...auth,\n query,\n variables,\n }, headers)\n : client.graphql({\n ...auth,\n query,\n variables,\n ...userAgentOverride,\n }, headers);\n const extendedPromise = extendCancellability(basePromise, resultPromise);\n const { data, extensions } = await extendedPromise;\n // flatten response\n if (data) {\n const [key] = Object.keys(data);\n const flattenedResult = flattenItems(modelIntrospection, name, data[key]);\n if (flattenedResult === null) {\n return { data: null, extensions };\n }\n else if (options?.selectionSet) {\n return { data: flattenedResult, extensions };\n }\n else {\n // TODO: refactor to avoid destructuring here\n const [initialized] = initializeModel(client, name, [flattenedResult], modelIntrospection, auth.authMode, auth.authToken, !!context);\n return { data: initialized, extensions };\n }\n }\n else {\n return { data: null, extensions };\n }\n }\n catch (error) {\n /**\n * The `data` type returned by `error` here could be:\n * 1) `null`\n * 2) an empty object\n * 3) \"populated\" but with a `null` value `{ getPost: null }`\n * 4) an actual record `{ getPost: { id: '1', title: 'Hello, World!' } }`\n */\n const { data, errors } = error;\n /**\n * `data` is not `null`, and is not an empty object:\n */\n if (data && Object.keys(data).length !== 0 && errors) {\n const [key] = Object.keys(data);\n const flattenedResult = flattenItems(modelIntrospection, name, data[key]);\n /**\n * `flattenedResult` could be `null` here (e.g. `data: { getPost: null }`)\n * if `flattenedResult`, result is an actual record:\n */\n if (flattenedResult) {\n if (options?.selectionSet) {\n return { data: flattenedResult, errors };\n }\n else {\n // TODO: refactor to avoid destructuring here\n const [initialized] = initializeModel(client, name, [flattenedResult], modelIntrospection, auth.authMode, auth.authToken, !!context);\n return { data: initialized, errors };\n }\n }\n else {\n // was `data: { getPost: null }`)\n return handleSingularGraphQlError(error);\n }\n }\n else {\n // `data` is `null`:\n return handleSingularGraphQlError(error);\n }\n }\n });\n}\n\nexport { getFactory };\n//# sourceMappingURL=get.mjs.map\n","import { createListMessagesFunction } from './createListMessagesFunction.mjs';\nimport { createOnStreamEventFunction } from './createOnStreamEventFunction.mjs';\nimport { createSendMessageFunction } from './createSendMessageFunction.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst convertItemToConversation = (client, modelIntrospection, conversationId, conversationCreatedAt, conversationUpdatedAt, conversationRouteName, conversationMessageModel, getInternals, conversationMetadata, conversationName) => {\n if (!conversationId) {\n throw new Error(`An error occurred converting a ${conversationRouteName} conversation: Missing ID`);\n }\n return {\n id: conversationId,\n createdAt: conversationCreatedAt,\n updatedAt: conversationUpdatedAt,\n metadata: conversationMetadata,\n name: conversationName,\n onStreamEvent: createOnStreamEventFunction(client, modelIntrospection, conversationId, conversationRouteName, getInternals),\n sendMessage: createSendMessageFunction(client, modelIntrospection, conversationId, conversationRouteName, getInternals),\n listMessages: createListMessagesFunction(client, modelIntrospection, conversationId, conversationMessageModel, getInternals),\n };\n};\n\nexport { convertItemToConversation };\n//# sourceMappingURL=convertItemToConversation.mjs.map\n","import { listFactory } from '../operations/list.mjs';\nimport { convertItemToConversationMessage } from './convertItemToConversationMessage.mjs';\nimport { getCustomUserAgentDetails, AiAction } from './getCustomUserAgentDetails.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createListMessagesFunction = (client, modelIntrospection, conversationId, conversationMessageModel, getInternals) => async (input) => {\n const list = listFactory(client, modelIntrospection, conversationMessageModel, getInternals, false, getCustomUserAgentDetails(AiAction.ListMessages));\n const { data, nextToken, errors } = await list({\n ...input,\n filter: { conversationId: { eq: conversationId } },\n });\n return {\n data: data.map((item) => convertItemToConversationMessage(item)),\n nextToken,\n errors,\n };\n};\n\nexport { createListMessagesFunction };\n//# sourceMappingURL=createListMessagesFunction.mjs.map\n","import { generateGraphQLDocument, buildGraphQLVariables, authModeParams, getCustomHeaders, flattenItems, initializeModel } from '../APIClient.mjs';\nimport { handleListGraphQlError } from './utils.mjs';\nimport { selfAwareAsync } from '../../utils/selfAwareAsync.mjs';\nimport { extendCancellability } from '../cancellation.mjs';\nimport { createUserAgentOverride } from '../ai/getCustomUserAgentDetails.mjs';\n\nfunction listFactory(client, modelIntrospection, model, getInternals, context = false, customUserAgentDetails) {\n const listWithContext = (contextSpec, args) => {\n return _list(client, modelIntrospection, model, getInternals, args, contextSpec, customUserAgentDetails);\n };\n const list = (args) => {\n return _list(client, modelIntrospection, model, getInternals, args, undefined, customUserAgentDetails);\n };\n return context ? listWithContext : list;\n}\nfunction _list(client, modelIntrospection, model, getInternals, args, contextSpec, customUserAgentDetails) {\n return selfAwareAsync(async (resultPromise) => {\n const { name } = model;\n const query = generateGraphQLDocument(modelIntrospection, model, 'LIST', args);\n const variables = buildGraphQLVariables(model, 'LIST', args, modelIntrospection);\n const auth = authModeParams(client, getInternals, args);\n const headers = getCustomHeaders(client, getInternals, args?.headers);\n const userAgentOverride = createUserAgentOverride(customUserAgentDetails);\n try {\n const basePromise = contextSpec\n ? client.graphql(contextSpec, {\n ...auth,\n query,\n variables,\n }, headers)\n : client.graphql({\n ...auth,\n query,\n variables,\n ...userAgentOverride,\n }, headers);\n const extendedPromise = extendCancellability(basePromise, resultPromise);\n const { data, extensions } = await extendedPromise;\n // flatten response\n if (data !== undefined) {\n const [key] = Object.keys(data);\n if (data[key].items) {\n const flattenedResult = data[key].items.map((value) => flattenItems(modelIntrospection, name, value));\n // don't init if custom selection set\n if (args?.selectionSet) {\n return {\n data: flattenedResult,\n nextToken: data[key].nextToken,\n extensions,\n };\n }\n else {\n const initialized = initializeModel(client, name, flattenedResult, modelIntrospection, auth.authMode, auth.authToken, !!contextSpec);\n return {\n data: initialized,\n nextToken: data[key].nextToken,\n extensions,\n };\n }\n }\n return {\n data: data[key],\n nextToken: data[key].nextToken,\n extensions,\n };\n }\n }\n catch (error) {\n /**\n * The `data` type returned by `error` here could be:\n * 1) `null`\n * 2) an empty object\n * 3) \"populated\" but with a `null` value `data: { listPosts: null }`\n * 4) actual records `data: { listPosts: items: [{ id: '1', ...etc }] }`\n */\n const { data, errors } = error;\n // `data` is not `null`, and is not an empty object:\n if (data !== undefined &&\n data !== null &&\n Object.keys(data).length !== 0 &&\n errors) {\n const [key] = Object.keys(data);\n if (data[key]?.items) {\n const flattenedResult = data[key].items.map((value) => flattenItems(modelIntrospection, name, value));\n /**\n * Check exists since `flattenedResult` could be `null`.\n * if `flattenedResult` exists, result is an actual record.\n */\n if (flattenedResult) {\n // don't init if custom selection set\n if (args?.selectionSet) {\n return {\n data: flattenedResult,\n nextToken: data[key]?.nextToken,\n errors,\n };\n }\n else {\n const initialized = initializeModel(client, name, flattenedResult, modelIntrospection, auth.authMode, auth.authToken, !!contextSpec);\n // data is full record w/out selection set:\n return {\n data: initialized,\n nextToken: data[key]?.nextToken,\n errors,\n };\n }\n }\n return {\n data: data[key],\n nextToken: data[key]?.nextToken,\n errors,\n };\n }\n else {\n // response is of type `data: { getPost: null }`)\n return handleListGraphQlError(error);\n }\n }\n else {\n // `data` is `null` or an empty object:\n return handleListGraphQlError(error);\n }\n }\n });\n}\n\nexport { listFactory };\n//# sourceMappingURL=list.mjs.map\n","import { deserializeContent } from './conversationMessageDeserializers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst convertItemToConversationMessage = ({ content, createdAt, id, conversationId, role, }) => ({\n content: deserializeContent(content ?? []),\n conversationId,\n createdAt,\n id,\n role,\n});\n\nexport { convertItemToConversationMessage };\n//# sourceMappingURL=convertItemToConversationMessage.mjs.map\n","import { fromBase64 } from '@smithy/util-base64';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst deserializeContent = (content) => content.map((block) => {\n if (block.image) {\n return deserializeImageBlock(block);\n }\n if (block.toolUse) {\n return deserializeToolUseBlock(block);\n }\n if (block.toolResult) {\n return deserializeToolResultBlock(block);\n }\n return removeNullsFromBlock(block);\n});\nconst deserializeImageBlock = ({ image }) => ({\n image: {\n ...image,\n source: {\n ...image.source,\n bytes: fromBase64(image.source.bytes),\n },\n },\n});\nconst deserializeJsonBlock = ({ json }) => ({\n json: JSON.parse(json),\n});\nconst deserializeToolUseBlock = ({ toolUse }) => ({\n toolUse: {\n ...toolUse,\n input: JSON.parse(toolUse.input),\n },\n});\nconst deserializeToolResultBlock = ({ toolResult, }) => ({\n toolResult: {\n toolUseId: toolResult.toolUseId,\n content: toolResult.content.map((toolResultBlock) => {\n if (toolResultBlock.image) {\n return deserializeImageBlock(toolResultBlock);\n }\n if (toolResultBlock.json) {\n return deserializeJsonBlock(toolResultBlock);\n }\n return removeNullsFromBlock(toolResultBlock);\n }),\n },\n});\nconst removeNullsFromBlock = (block) => Object.fromEntries(Object.entries(block).filter(([_, v]) => v !== null));\n\nexport { deserializeContent };\n//# sourceMappingURL=conversationMessageDeserializers.mjs.map\n","export * from \"./fromBase64\";\nexport * from \"./toBase64\";\n","import { alphabetByEncoding, bitsPerByte, bitsPerLetter } from \"./constants.browser\";\nexport const fromBase64 = (input) => {\n let totalByteLength = (input.length / 4) * 3;\n if (input.slice(-2) === \"==\") {\n totalByteLength -= 2;\n }\n else if (input.slice(-1) === \"=\") {\n totalByteLength--;\n }\n const out = new ArrayBuffer(totalByteLength);\n const dataView = new DataView(out);\n for (let i = 0; i < input.length; i += 4) {\n let bits = 0;\n let bitLength = 0;\n for (let j = i, limit = i + 3; j <= limit; j++) {\n if (input[j] !== \"=\") {\n if (!(input[j] in alphabetByEncoding)) {\n throw new TypeError(`Invalid character ${input[j]} in base64 string.`);\n }\n bits |= alphabetByEncoding[input[j]] << ((limit - j) * bitsPerLetter);\n bitLength += bitsPerLetter;\n }\n else {\n bits >>= bitsPerLetter;\n }\n }\n const chunkOffset = (i / 4) * 3;\n bits >>= bitLength % bitsPerByte;\n const byteLength = Math.floor(bitLength / bitsPerByte);\n for (let k = 0; k < byteLength; k++) {\n const offset = (byteLength - k - 1) * bitsPerByte;\n dataView.setUint8(chunkOffset + k, (bits & (255 << offset)) >> offset);\n }\n }\n return new Uint8Array(out);\n};\n","const alphabetByEncoding = {};\nconst alphabetByValue = new Array(64);\nfor (let i = 0, start = \"A\".charCodeAt(0), limit = \"Z\".charCodeAt(0); i + start <= limit; i++) {\n const char = String.fromCharCode(i + start);\n alphabetByEncoding[char] = i;\n alphabetByValue[i] = char;\n}\nfor (let i = 0, start = \"a\".charCodeAt(0), limit = \"z\".charCodeAt(0); i + start <= limit; i++) {\n const char = String.fromCharCode(i + start);\n const index = i + 26;\n alphabetByEncoding[char] = index;\n alphabetByValue[index] = char;\n}\nfor (let i = 0; i < 10; i++) {\n alphabetByEncoding[i.toString(10)] = i + 52;\n const char = i.toString(10);\n const index = i + 52;\n alphabetByEncoding[char] = index;\n alphabetByValue[index] = char;\n}\nalphabetByEncoding[\"+\"] = 62;\nalphabetByValue[62] = \"+\";\nalphabetByEncoding[\"/\"] = 63;\nalphabetByValue[63] = \"/\";\nconst bitsPerLetter = 6;\nconst bitsPerByte = 8;\nconst maxLetterValue = 0b111111;\nexport { alphabetByEncoding, alphabetByValue, bitsPerLetter, bitsPerByte, maxLetterValue };\n","import { fromUtf8 } from \"@smithy/util-utf8\";\nimport { alphabetByValue, bitsPerByte, bitsPerLetter, maxLetterValue } from \"./constants.browser\";\nexport function toBase64(_input) {\n let input;\n if (typeof _input === \"string\") {\n input = fromUtf8(_input);\n }\n else {\n input = _input;\n }\n const isArrayLike = typeof input === \"object\" && typeof input.length === \"number\";\n const isUint8Array = typeof input === \"object\" &&\n typeof input.byteOffset === \"number\" &&\n typeof input.byteLength === \"number\";\n if (!isArrayLike && !isUint8Array) {\n throw new Error(\"@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.\");\n }\n let str = \"\";\n for (let i = 0; i < input.length; i += 3) {\n let bits = 0;\n let bitLength = 0;\n for (let j = i, limit = Math.min(i + 3, input.length); j < limit; j++) {\n bits |= input[j] << ((limit - j - 1) * bitsPerByte);\n bitLength += bitsPerByte;\n }\n const bitClusterCount = Math.ceil(bitLength / bitsPerLetter);\n bits <<= bitClusterCount * bitsPerLetter - bitLength;\n for (let k = 1; k <= bitClusterCount; k++) {\n const offset = (bitClusterCount - k) * bitsPerLetter;\n str += alphabetByValue[(bits & (maxLetterValue << offset)) >> offset];\n }\n str += \"==\".slice(0, 4 - bitClusterCount);\n }\n return str;\n}\n","export * from \"./fromUtf8\";\nexport * from \"./toUint8Array\";\nexport * from \"./toUtf8\";\n","export const fromUtf8 = (input) => new TextEncoder().encode(input);\n","import { fromUtf8 } from \"./fromUtf8\";\nexport const toUint8Array = (data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n};\n","export const toUtf8 = (input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return new TextDecoder(\"utf-8\").decode(input);\n};\n","import { customOpFactory } from '../operations/custom.mjs';\nimport { getCustomUserAgentDetails, AiAction } from './getCustomUserAgentDetails.mjs';\nimport { convertItemToConversationStreamEvent } from './conversationStreamEventDeserializers.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createOnStreamEventFunction = (client, modelIntrospection, conversationId, conversationRouteName, getInternals) => (handler) => {\n const { conversations } = modelIntrospection;\n // Safe guard for standalone function. When called as part of client generation, this should never be falsy.\n if (!conversations) {\n return {};\n }\n const subscribeSchema = conversations[conversationRouteName].message.subscribe;\n const subscribeOperation = customOpFactory(client, modelIntrospection, 'subscription', subscribeSchema, false, getInternals, getCustomUserAgentDetails(AiAction.OnStreamEvent));\n return subscribeOperation({ conversationId }).subscribe((data) => {\n const { next, error } = convertItemToConversationStreamEvent(data);\n if (error)\n handler.error(error);\n if (next)\n handler.next(next);\n });\n};\n\nexport { createOnStreamEventFunction };\n//# sourceMappingURL=createOnStreamEventFunction.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst convertItemToConversationStreamEvent = ({ id, conversationId, associatedUserMessageId, contentBlockIndex, contentBlockDoneAtIndex, contentBlockDeltaIndex, contentBlockText, contentBlockToolUse, stopReason, errors, }) => {\n if (errors) {\n const error = {\n id,\n conversationId,\n associatedUserMessageId,\n errors,\n };\n return { error };\n }\n const next = removeNullsFromConversationStreamEvent({\n id,\n conversationId,\n associatedUserMessageId,\n contentBlockIndex,\n contentBlockDoneAtIndex,\n contentBlockDeltaIndex,\n text: contentBlockText,\n toolUse: deserializeToolUseBlock(contentBlockToolUse),\n stopReason,\n });\n return { next };\n};\nconst deserializeToolUseBlock = (contentBlockToolUse) => {\n if (contentBlockToolUse) {\n const toolUseBlock = {\n ...contentBlockToolUse,\n input: JSON.parse(contentBlockToolUse.input),\n };\n return toolUseBlock;\n }\n};\nconst removeNullsFromConversationStreamEvent = (block) => Object.fromEntries(Object.entries(block).filter(([_, v]) => v !== null));\n\nexport { convertItemToConversationStreamEvent };\n//# sourceMappingURL=conversationStreamEventDeserializers.mjs.map\n","import { customOpFactory } from '../operations/custom.mjs';\nimport { convertItemToConversationMessage } from './convertItemToConversationMessage.mjs';\nimport { serializeContent, serializeAiContext, serializeToolConfiguration } from './conversationMessageSerializers.mjs';\nimport { getCustomUserAgentDetails, AiAction } from './getCustomUserAgentDetails.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createSendMessageFunction = (client, modelIntrospection, conversationId, conversationRouteName, getInternals) => async (input) => {\n const { conversations } = modelIntrospection;\n // Safe guard for standalone function. When called as part of client generation, this should never be falsy.\n if (!conversations) {\n return {};\n }\n const processedInput = typeof input === 'string' ? { content: [{ text: input }] } : input;\n const { content, aiContext, toolConfiguration } = processedInput;\n const sendSchema = conversations[conversationRouteName].message.send;\n const sendOperation = customOpFactory(client, modelIntrospection, 'mutation', sendSchema, false, getInternals, getCustomUserAgentDetails(AiAction.SendMessage));\n const { data, errors } = await sendOperation({\n conversationId,\n content: serializeContent(content),\n ...(aiContext && { aiContext: serializeAiContext(aiContext) }),\n ...(toolConfiguration && {\n toolConfiguration: serializeToolConfiguration(toolConfiguration),\n }),\n });\n return {\n data: data ? convertItemToConversationMessage(data) : data,\n errors,\n };\n};\n\nexport { createSendMessageFunction };\n//# sourceMappingURL=createSendMessageFunction.mjs.map\n","import { toBase64 } from '@smithy/util-base64';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst serializeAiContext = (aiContext) => JSON.stringify(aiContext);\nconst serializeContent = (content) => content.map((block) => {\n if (block.image) {\n return serializeImageBlock(block);\n }\n if (block.toolResult) {\n return serializeToolResultBlock(block);\n }\n return block;\n});\nconst serializeToolConfiguration = ({ tools }) => ({\n tools: Object.entries(tools).map(([name, tool]) => ({\n toolSpec: {\n name,\n description: tool.description,\n inputSchema: {\n json: JSON.stringify(tool.inputSchema.json),\n },\n },\n })),\n});\nconst serializeImageBlock = ({ image }) => ({\n image: {\n ...image,\n source: {\n ...image.source,\n bytes: toBase64(image.source.bytes),\n },\n },\n});\nconst serializeJsonBlock = ({ json }) => ({\n json: JSON.stringify(json),\n});\nconst serializeToolResultBlock = ({ toolResult, }) => ({\n toolResult: {\n ...toolResult,\n content: toolResult.content.map((toolResultBlock) => {\n if (toolResultBlock.image) {\n return serializeImageBlock(toolResultBlock);\n }\n if (toolResultBlock.json) {\n return serializeJsonBlock(toolResultBlock);\n }\n return toolResultBlock;\n }),\n },\n});\n\nexport { serializeAiContext, serializeContent, serializeToolConfiguration };\n//# sourceMappingURL=conversationMessageSerializers.mjs.map\n","import { getFactory } from '../operations/get.mjs';\nimport { convertItemToConversation } from './convertItemToConversation.mjs';\nimport { getCustomUserAgentDetails, AiAction } from './getCustomUserAgentDetails.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createGetConversationFunction = (client, modelIntrospection, conversationRouteName, conversationModel, conversationMessageModel, getInternals) => async ({ id }) => {\n const get = getFactory(client, modelIntrospection, conversationModel, 'GET', getInternals, false, getCustomUserAgentDetails(AiAction.GetConversation));\n const { data, errors } = await get({ id });\n return {\n data: data\n ? convertItemToConversation(client, modelIntrospection, data.id, data.createdAt, data.updatedAt, conversationRouteName, conversationMessageModel, getInternals, data?.metadata, data?.name)\n : data,\n errors,\n };\n};\n\nexport { createGetConversationFunction };\n//# sourceMappingURL=createGetConversationFunction.mjs.map\n","import { listFactory } from '../operations/list.mjs';\nimport { convertItemToConversation } from './convertItemToConversation.mjs';\nimport { getCustomUserAgentDetails, AiAction } from './getCustomUserAgentDetails.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createListConversationsFunction = (client, modelIntrospection, conversationRouteName, conversationModel, conversationMessageModel, getInternals) => async (input) => {\n const list = listFactory(client, modelIntrospection, conversationModel, getInternals, false, getCustomUserAgentDetails(AiAction.ListConversations));\n const { data, nextToken, errors } = await list(input);\n return {\n data: data.map((datum) => {\n return convertItemToConversation(client, modelIntrospection, datum.id, datum.createdAt, datum.updatedAt, conversationRouteName, conversationMessageModel, getInternals, datum?.metadata, datum?.name);\n }),\n nextToken,\n errors,\n };\n};\n\nexport { createListConversationsFunction };\n//# sourceMappingURL=createListConversationsFunction.mjs.map\n","import { getFactory } from '../operations/get.mjs';\nimport { convertItemToConversation } from './convertItemToConversation.mjs';\nimport { getCustomUserAgentDetails, AiAction } from './getCustomUserAgentDetails.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createDeleteConversationFunction = (client, modelIntrospection, conversationRouteName, conversationModel, conversationMessageModel, getInternals) => async ({ id }) => {\n const deleteOperation = getFactory(client, modelIntrospection, conversationModel, 'DELETE', getInternals, false, getCustomUserAgentDetails(AiAction.DeleteConversation));\n const { data, errors } = await deleteOperation({ id });\n return {\n data: data\n ? convertItemToConversation(client, modelIntrospection, data?.id, data?.createdAt, data?.updatedAt, conversationRouteName, conversationMessageModel, getInternals, data?.metadata, data?.name)\n : data,\n errors,\n };\n};\n\nexport { createDeleteConversationFunction };\n//# sourceMappingURL=createDeleteConversationFunction.mjs.map\n","import { getFactory } from '../operations/get.mjs';\nimport { convertItemToConversation } from './convertItemToConversation.mjs';\nimport { getCustomUserAgentDetails, AiAction } from './getCustomUserAgentDetails.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createUpdateConversationFunction = (client, modelIntrospection, conversationRouteName, conversationModel, conversationMessageModel, getInternals) => async ({ id, metadata: metadataObject, name }) => {\n const metadata = JSON.stringify(metadataObject);\n const updateOperation = getFactory(client, modelIntrospection, conversationModel, 'UPDATE', getInternals, false, getCustomUserAgentDetails(AiAction.UpdateConversation));\n const { data, errors } = await updateOperation({ id, metadata, name });\n return {\n data: data\n ? convertItemToConversation(client, modelIntrospection, data?.id, data?.createdAt, data?.updatedAt, conversationRouteName, conversationMessageModel, getInternals, data?.metadata, data?.name)\n : data,\n errors,\n };\n};\n\nexport { createUpdateConversationFunction };\n//# sourceMappingURL=createUpdateConversationFunction.mjs.map\n","import { customOpFactory } from '../../operations/custom.mjs';\nimport { getCustomUserAgentDetails, AiAction } from '../../ai/getCustomUserAgentDetails.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction generateGenerationsProperty(client, apiGraphQLConfig, getInternals) {\n const modelIntrospection = apiGraphQLConfig?.modelIntrospection;\n // generations will be absent from model intro schema if no generation routes\n // are present on the source schema.\n if (!modelIntrospection?.generations) {\n return {};\n }\n const generations = {};\n for (const generation of Object.values(modelIntrospection.generations)) {\n generations[generation.name] = customOpFactory(client, modelIntrospection, 'query', generation, false, getInternals, getCustomUserAgentDetails(AiAction.Generation));\n }\n return generations;\n}\n\nexport { generateGenerationsProperty };\n//# sourceMappingURL=generateGenerationsProperty.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst generateEnumsProperty = (graphqlConfig) => {\n const modelIntrospection = graphqlConfig.modelIntrospection;\n if (!modelIntrospection) {\n return {};\n }\n const enums = {};\n for (const [_, enumData] of Object.entries(modelIntrospection.enums)) {\n enums[enumData.name] = {\n values: () => enumData.values,\n };\n }\n return enums;\n};\n\nexport { generateEnumsProperty };\n//# sourceMappingURL=generateEnumsProperty.mjs.map\n","import { listFactory } from '../../operations/list.mjs';\nimport { indexQueryFactory } from '../../operations/indexQuery.mjs';\nimport { getFactory } from '../../operations/get.mjs';\nimport { subscriptionFactory } from '../../operations/subscription.mjs';\nimport { observeQueryFactory } from '../../operations/observeQuery.mjs';\nimport { excludeDisabledOps, getSecondaryIndexesFromSchemaModel } from '../../clientUtils.mjs';\n\nfunction generateModelsProperty(client, apiGraphQLConfig, getInternals) {\n const models = {};\n const modelIntrospection = apiGraphQLConfig.modelIntrospection;\n if (!modelIntrospection) {\n return {};\n }\n const SUBSCRIPTION_OPS = ['ONCREATE', 'ONUPDATE', 'ONDELETE'];\n for (const model of Object.values(modelIntrospection.models)) {\n const { name } = model;\n models[name] = {};\n const enabledModelOps = excludeDisabledOps(modelIntrospection, name);\n Object.entries(enabledModelOps).forEach(([key, { operationPrefix }]) => {\n const operation = key;\n if (operation === 'LIST') {\n models[name][operationPrefix] = listFactory(client, modelIntrospection, model, getInternals);\n }\n else if (SUBSCRIPTION_OPS.includes(operation)) {\n models[name][operationPrefix] = subscriptionFactory(client, modelIntrospection, model, operation, getInternals);\n }\n else if (operation === 'OBSERVEQUERY') {\n models[name][operationPrefix] = observeQueryFactory(models, model);\n }\n else {\n models[name][operationPrefix] = getFactory(client, modelIntrospection, model, operation, getInternals);\n }\n });\n const secondaryIdxs = getSecondaryIndexesFromSchemaModel(model);\n for (const idx of secondaryIdxs) {\n models[name][idx.queryField] = indexQueryFactory(client, modelIntrospection, model, idx, getInternals);\n }\n }\n return models;\n}\n\nexport { generateModelsProperty };\n//# sourceMappingURL=generateModelsProperty.mjs.map\n","import { generateGraphQLDocument, buildGraphQLVariables, authModeParams, getCustomHeaders, flattenItems, initializeModel } from '../APIClient.mjs';\nimport { handleListGraphQlError } from './utils.mjs';\nimport { selfAwareAsync } from '../../utils/selfAwareAsync.mjs';\nimport { extendCancellability } from '../cancellation.mjs';\n\nfunction indexQueryFactory(client, modelIntrospection, model, indexMeta, getInternals, context = false) {\n const indexQueryWithContext = (contextSpec, args, options) => {\n return _indexQuery(client, modelIntrospection, model, indexMeta, getInternals, {\n ...args,\n ...options,\n }, contextSpec);\n };\n const indexQuery = (args, options) => {\n return _indexQuery(client, modelIntrospection, model, indexMeta, getInternals, {\n ...args,\n ...options,\n });\n };\n return context ? indexQueryWithContext : indexQuery;\n}\nfunction processGraphQlResponse(modelIntroSchema, modelName, result, selectionSet, modelInitializer) {\n const { data, extensions } = result;\n const [key] = Object.keys(data);\n if (data[key].items) {\n const flattenedResult = data[key].items.map((value) => flattenItems(modelIntroSchema, modelName, value));\n return {\n data: selectionSet ? flattenedResult : modelInitializer(flattenedResult),\n nextToken: data[key].nextToken,\n extensions,\n };\n }\n // Index queries are always list queries. No `items`? No flattening needed.\n return {\n data: data[key],\n nextToken: data[key].nextToken,\n extensions,\n };\n}\nfunction _indexQuery(client, modelIntrospection, model, indexMeta, getInternals, args, contextSpec) {\n return selfAwareAsync(async (resultPromise) => {\n const { name } = model;\n const query = generateGraphQLDocument(modelIntrospection, model, 'INDEX_QUERY', args, indexMeta);\n const variables = buildGraphQLVariables(model, 'INDEX_QUERY', args, modelIntrospection, indexMeta);\n const auth = authModeParams(client, getInternals, args);\n const modelInitializer = (flattenedResult) => initializeModel(client, name, flattenedResult, modelIntrospection, auth.authMode, auth.authToken, !!contextSpec);\n try {\n const headers = getCustomHeaders(client, getInternals, args?.headers);\n const graphQlParams = {\n ...auth,\n query,\n variables,\n };\n const requestArgs = [graphQlParams, headers];\n if (contextSpec !== undefined) {\n requestArgs.unshift(contextSpec);\n }\n const basePromise = client.graphql(...requestArgs);\n const extendedPromise = extendCancellability(basePromise, resultPromise);\n const response = await extendedPromise;\n if (response.data !== undefined) {\n return processGraphQlResponse(modelIntrospection, name, response, args?.selectionSet, modelInitializer);\n }\n }\n catch (error) {\n /**\n * The `data` type returned by `error` here could be:\n * 1) `null`\n * 2) an empty object\n * 3) \"populated\" but with a `null` value:\n * `data: { listByExampleId: null }`\n * 4) an actual record:\n * `data: { listByExampleId: items: [{ id: '1', ...etc } }]`\n */\n const { data, errors } = error;\n // `data` is not `null`, and is not an empty object:\n if (data !== undefined &&\n data !== null &&\n Object.keys(data).length !== 0 &&\n errors) {\n const [key] = Object.keys(data);\n if (data[key]?.items) {\n const flattenedResult = data[key]?.items.map((value) => flattenItems(modelIntrospection, name, value));\n /**\n * Check exists since `flattenedResult` could be `null`.\n * if `flattenedResult` exists, result is an actual record.\n */\n if (flattenedResult) {\n return {\n data: args?.selectionSet\n ? flattenedResult\n : modelInitializer(flattenedResult),\n nextToken: data[key]?.nextToken,\n };\n }\n }\n // response is of type `data: { listByExampleId: null }`\n return {\n data: data[key],\n nextToken: data[key]?.nextToken,\n };\n }\n else {\n // `data` is `null` or an empty object:\n return handleListGraphQlError(error);\n }\n }\n });\n}\n\nexport { indexQueryFactory };\n//# sourceMappingURL=indexQuery.mjs.map\n","import { map } from 'rxjs';\nimport { generateGraphQLDocument, buildGraphQLVariables, authModeParams, getCustomHeaders, flattenItems, initializeModel } from '../APIClient.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction subscriptionFactory(client, modelIntrospection, model, operation, getInternals) {\n const { name } = model;\n const subscription = (args) => {\n const query = generateGraphQLDocument(modelIntrospection, model, operation, args);\n const variables = buildGraphQLVariables(model, operation, args, modelIntrospection);\n const auth = authModeParams(client, getInternals, args);\n const headers = getCustomHeaders(client, getInternals, args?.headers);\n const observable = client.graphql({\n ...auth,\n query,\n variables,\n }, headers);\n return observable.pipe(map((value) => {\n const [key] = Object.keys(value.data);\n const data = value.data[key];\n const flattenedResult = flattenItems(modelIntrospection, name, data);\n if (flattenedResult === null) {\n return null;\n }\n else if (args?.selectionSet) {\n return flattenedResult;\n }\n else {\n const [initialized] = initializeModel(client, name, [flattenedResult], modelIntrospection, auth.authMode, auth.authToken);\n return initialized;\n }\n }));\n };\n return subscription;\n}\n\nexport { subscriptionFactory };\n//# sourceMappingURL=subscription.mjs.map\n","import { Observable } from 'rxjs';\nimport { resolvePKFields } from '../../utils/resolvePKFields.mjs';\nimport { findIndexByFields } from '../../utils/findIndexByFields.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction observeQueryFactory(models, model) {\n const { name } = model;\n const observeQuery = (arg) => new Observable((subscriber) => {\n // what we'll be sending to our subscribers\n const items = [];\n // To enqueue subscription messages while we collect our initial\n // result set.\n const messageQueue = [];\n // operation to take when message(s) arrive.\n // this operation will be swapped out once initial \"sync\" is complete\n // to immediately ingest messsages.\n let receiveMessages = (...messages) => {\n return messageQueue.push(...messages);\n };\n // start subscriptions\n const onCreateSub = models[name].onCreate(arg).subscribe({\n next(item) {\n receiveMessages({ item, type: 'create' });\n },\n error(error) {\n subscriber.error({ type: 'onCreate', error });\n },\n });\n const onUpdateSub = models[name].onUpdate(arg).subscribe({\n next(item) {\n receiveMessages({ item, type: 'update' });\n },\n error(error) {\n subscriber.error({ type: 'onUpdate', error });\n },\n });\n const onDeleteSub = models[name].onDelete(arg).subscribe({\n next(item) {\n receiveMessages({ item, type: 'delete' });\n },\n error(error) {\n subscriber.error({ type: 'onDelete', error });\n },\n });\n // consumes a list of messages and sends a snapshot\n function ingestMessages(messages) {\n for (const message of messages) {\n const idx = findIndexByFields(message.item, items, pkFields);\n switch (message.type) {\n case 'create':\n if (idx < 0)\n items.push(message.item);\n break;\n case 'update':\n if (idx >= 0)\n items[idx] = message.item;\n break;\n case 'delete':\n if (idx >= 0)\n items.splice(idx, 1);\n break;\n default:\n console.error('Unrecognized message in observeQuery.', message);\n }\n }\n subscriber.next({\n items,\n isSynced: true,\n });\n }\n const pkFields = resolvePKFields(model);\n // initial results\n (async () => {\n let firstPage = true;\n let nextToken = null;\n while (!subscriber.closed && (firstPage || nextToken)) {\n firstPage = false;\n const { data: page, errors, nextToken: _nextToken, } = await models[name].list({ ...arg, nextToken });\n nextToken = _nextToken;\n items.push(...page);\n // if there are no more pages and no items we already know about\n // that need to be merged in from sub, we're \"synced\"\n const isSynced = messageQueue.length === 0 &&\n (nextToken === null || nextToken === undefined);\n subscriber.next({\n items,\n isSynced,\n });\n if (Array.isArray(errors)) {\n for (const error of errors) {\n subscriber.error(error);\n }\n }\n }\n // play through the queue\n if (messageQueue.length > 0) {\n ingestMessages(messageQueue);\n }\n // switch the queue to write directly to the items collection\n receiveMessages = (...messages) => {\n ingestMessages(messages);\n return items.length;\n };\n })();\n // when subscriber unsubscribes, tear down internal subs\n return () => {\n // 1. tear down internal subs\n onCreateSub.unsubscribe();\n onUpdateSub.unsubscribe();\n onDeleteSub.unsubscribe();\n // 2. there is no need to explicitly stop paging. instead, we\n // just check `subscriber.closed` above before fetching each page.\n };\n });\n return observeQuery;\n}\n\nexport { observeQueryFactory };\n//# sourceMappingURL=observeQuery.mjs.map\n","/**\n * Given a SchemaModel from a ModelIntrospectionSchema, returns the primary key\n * as an array of field names.\n *\n * @param model The model object\n * @returns Array of field names\n */\nfunction resolvePKFields(model) {\n const { primaryKeyFieldName, sortKeyFieldNames } = model.primaryKeyInfo;\n return [primaryKeyFieldName, ...sortKeyFieldNames];\n}\n\nexport { resolvePKFields };\n//# sourceMappingURL=resolvePKFields.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Iterates through a collection to find a matching item and returns the index.\n *\n * @param needle The item to search for\n * @param haystack The collection to search\n * @param keyFields The fields used to indicate a match\n * @returns Index of `needle` in `haystack`, otherwise -1 if not found.\n */\nfunction findIndexByFields(needle, haystack, keyFields) {\n const searchObject = Object.fromEntries(keyFields.map((fieldName) => [fieldName, needle[fieldName]]));\n for (let i = 0; i < haystack.length; i++) {\n if (Object.keys(searchObject).every((k) => searchObject[k] === haystack[i][k])) {\n return i;\n }\n }\n return -1;\n}\n\nexport { findIndexByFields };\n//# sourceMappingURL=findIndexByFields.mjs.map\n","import { graphQLOperationsInfo } from './APIClient.mjs';\n\nconst attributeIsSecondaryIndex = (attr) => {\n return (attr.type === 'key' &&\n // presence of `name` property distinguishes GSI from primary index\n attr.properties?.name &&\n attr.properties?.queryField &&\n attr.properties?.fields.length > 0);\n};\nconst getSecondaryIndexesFromSchemaModel = (model) => {\n const idxs = model.attributes\n ?.filter(attributeIsSecondaryIndex)\n .map((attr) => {\n const queryField = attr.properties.queryField;\n const [pk, ...sk] = attr.properties.fields;\n return {\n queryField,\n pk,\n sk,\n };\n });\n return idxs || [];\n};\n/**\n * returns graphQLOperationsInfo, but filters out operations that were disabled via model().disableOperations([...])\n */\nconst excludeDisabledOps = (mis, modelName) => {\n /* Example model attributes in MIS {\n \"type\": \"model\",\n \"properties\": {\n \"subscriptions\": null,\n \"mutations\": { \"delete\": null }\n \"timestamps\": null\n } }*/\n const modelAttrs = mis.models[modelName].attributes?.find((attr) => attr.type === 'model');\n const coarseToFineDict = {\n queries: ['list', 'get', 'observeQuery'],\n mutations: ['create', 'update', 'delete'],\n subscriptions: ['onCreate', 'onUpdate', 'onDelete'],\n };\n const disabledOps = [];\n if (!modelAttrs) {\n return graphQLOperationsInfo;\n }\n if (modelAttrs.properties) {\n for (const [key, value] of Object.entries(modelAttrs.properties)) {\n // model.properties can contain other values that are not relevant to disabling ops, e.g. timestamps\n if (!(key in coarseToFineDict)) {\n continue;\n }\n if (value === null) {\n // coarse-grained disable, e.g. \"subscriptions\": null,\n disabledOps.push(...coarseToFineDict[key]);\n }\n else if (value instanceof Object) {\n // fine-grained, e.g. \"mutations\": { \"delete\": null }\n disabledOps.push(...Object.keys(value));\n }\n }\n }\n // observeQuery only exists on the client side, so can't be explicitly disabled via schema builder.\n // It's unusable without `list`\n if (disabledOps.includes('list')) {\n disabledOps.push('observeQuery');\n }\n // graphQLOperationsInfo keys are in caps\n const disabledOpsUpper = disabledOps.map((op) => op.toUpperCase());\n const filteredGraphQLOperations = Object.fromEntries(Object.entries(graphQLOperationsInfo).filter(([key]) => !disabledOpsUpper.includes(key)));\n return filteredGraphQLOperations;\n};\n\nexport { excludeDisabledOps, getSecondaryIndexesFromSchemaModel };\n//# sourceMappingURL=clientUtils.mjs.map\n","import { isApiGraphQLConfig } from './internals/utils/runtimeTypeGuards/isApiGraphQLProviderConfig.mjs';\nimport { generateCustomQueriesProperty, generateCustomMutationsProperty } from './internals/generateCustomOperationsProperty.mjs';\nimport { upgradeClientCancellation } from './internals/cancellation.mjs';\nimport './internals/ai/getCustomUserAgentDetails.mjs';\nimport '@smithy/util-base64';\nimport 'rxjs';\nimport { generateEnumsProperty } from './internals/utils/clientProperties/generateEnumsProperty.mjs';\nimport { generateModelsProperty } from './internals/server/generateModelsProperty.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n// TODO: separate import path\nfunction addSchemaToClientWithInstance(client, params, getInternals) {\n const apiGraphqlConfig = params.config?.API?.GraphQL;\n if (isApiGraphQLConfig(apiGraphqlConfig)) {\n upgradeClientCancellation(client);\n client.models = generateModelsProperty(client, params, getInternals);\n client.enums = generateEnumsProperty(apiGraphqlConfig);\n client.queries = generateCustomQueriesProperty(client, apiGraphqlConfig, getInternals);\n client.mutations = generateCustomMutationsProperty(client, apiGraphqlConfig, getInternals);\n }\n return client;\n}\n\nexport { addSchemaToClientWithInstance };\n//# sourceMappingURL=addSchemaToClientWithInstance.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction isApiGraphQLConfig(apiGraphQLConfig) {\n return apiGraphQLConfig !== undefined;\n}\n\nexport { isApiGraphQLConfig };\n//# sourceMappingURL=isApiGraphQLProviderConfig.mjs.map\n","import { listFactory } from '../operations/list.mjs';\nimport { indexQueryFactory } from '../operations/indexQuery.mjs';\nimport { getFactory } from '../operations/get.mjs';\nimport { excludeDisabledOps, getSecondaryIndexesFromSchemaModel } from '../clientUtils.mjs';\n\nfunction generateModelsProperty(client, params, getInternals) {\n const models = {};\n const { config } = params;\n const useContext = params.amplify === null;\n if (!config) {\n throw new Error('generateModelsProperty cannot retrieve Amplify config');\n }\n if (!config.API?.GraphQL) {\n return {};\n }\n const modelIntrospection = config.API.GraphQL.modelIntrospection;\n if (!modelIntrospection) {\n return {};\n }\n const SSR_UNSUPORTED_OPS = [\n 'ONCREATE',\n 'ONUPDATE',\n 'ONDELETE',\n 'OBSERVEQUERY',\n ];\n for (const model of Object.values(modelIntrospection.models)) {\n const { name } = model;\n models[name] = {};\n const enabledModelOps = excludeDisabledOps(modelIntrospection, name);\n Object.entries(enabledModelOps).forEach(([key, { operationPrefix }]) => {\n const operation = key;\n // subscriptions are not supported in SSR\n if (SSR_UNSUPORTED_OPS.includes(operation))\n return;\n if (operation === 'LIST') {\n models[name][operationPrefix] = listFactory(client, modelIntrospection, model, getInternals, useContext);\n }\n else {\n models[name][operationPrefix] = getFactory(client, modelIntrospection, model, operation, getInternals, useContext);\n }\n });\n const secondaryIdxs = getSecondaryIndexesFromSchemaModel(model);\n for (const idx of secondaryIdxs) {\n models[name][idx.queryField] = indexQueryFactory(client, modelIntrospection, model, idx, getInternals, useContext);\n }\n }\n return models;\n}\n\nexport { generateModelsProperty };\n//# sourceMappingURL=generateModelsProperty.mjs.map\n","import { Hub } from '@aws-amplify/core';\nimport { addSchemaToClient } from '@aws-amplify/data-schema/runtime';\nimport { __amplify, __authMode, __authToken, __headers, getInternals } from '../types/index.mjs';\nimport { isApiGraphQLConfig } from './utils/runtimeTypeGuards/isApiGraphQLProviderConfig.mjs';\nimport { isConfigureEventWithResourceConfig } from './utils/runtimeTypeGuards/isConfigureEventWithResourceConfig.mjs';\nimport { graphql, cancel, isCancelError } from './v6.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @private\n *\n * Creates a client that can be used to make GraphQL requests, using a provided `AmplifyClassV6`\n * compatible context object for config and auth fetching.\n *\n * @param params\n * @returns\n */\nfunction generateClient(params) {\n const client = {\n [__amplify]: params.amplify,\n [__authMode]: params.authMode,\n [__authToken]: params.authToken,\n [__headers]: params.headers,\n graphql,\n cancel,\n isCancelError,\n models: emptyProperty,\n enums: emptyProperty,\n queries: emptyProperty,\n mutations: emptyProperty,\n subscriptions: emptyProperty,\n };\n const apiGraphqlConfig = params.amplify.getConfig().API?.GraphQL;\n if (isApiGraphQLConfig(apiGraphqlConfig)) {\n addSchemaToClient(client, apiGraphqlConfig, getInternals);\n }\n else {\n // This happens when the `Amplify.configure()` call gets evaluated after the `generateClient()` call.\n //\n // Cause: when the `generateClient()` and the `Amplify.configure()` calls are located in\n // different source files, script bundlers may randomly arrange their orders in the production\n // bundle.\n //\n // With the current implementation, the `client.models` instance created by `generateClient()`\n // will be rebuilt on every `Amplify.configure()` call that's provided with a valid GraphQL\n // provider configuration.\n //\n // TODO: revisit, and reverify this approach when enabling multiple clients for multi-endpoints\n // configuration.\n generateModelsPropertyOnAmplifyConfigure(client);\n }\n return client;\n}\nconst generateModelsPropertyOnAmplifyConfigure = (clientRef) => {\n Hub.listen('core', coreEvent => {\n if (!isConfigureEventWithResourceConfig(coreEvent.payload)) {\n return;\n }\n const apiGraphQLConfig = coreEvent.payload.data.API?.GraphQL;\n if (isApiGraphQLConfig(apiGraphQLConfig)) {\n addSchemaToClient(clientRef, apiGraphQLConfig, getInternals);\n }\n });\n};\nconst emptyProperty = new Proxy({}, {\n get() {\n throw new Error('Client could not be generated. This is likely due to `Amplify.configure()` not being called prior to `generateClient()` or because the configuration passed to `Amplify.configure()` is missing GraphQL provider configuration.');\n },\n});\n\nexport { generateClient };\n//# sourceMappingURL=generateClient.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction isApiGraphQLConfig(apiGraphQLConfig) {\n return apiGraphQLConfig !== undefined;\n}\n\nexport { isApiGraphQLConfig };\n//# sourceMappingURL=isApiGraphQLProviderConfig.mjs.map\n","// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nfunction isConfigureEventWithResourceConfig(payload) {\n return payload.event === 'configure';\n}\n\nexport { isConfigureEventWithResourceConfig };\n//# sourceMappingURL=isConfigureEventWithResourceConfig.mjs.map\n","import * as internals_events_index from './internals/events/index.mjs';\nexport { internals_events_index as events };\nexport { GraphQLAPI, GraphQLAPIClass, graphqlOperation } from './GraphQLAPI.mjs';\nexport { GraphQLAuthError, __amplify, __authMode, __authToken, __headers, getInternals } from './types/index.mjs';\nexport { CONNECTION_STATE_CHANGE } from './Providers/constants.mjs';\nexport { CONTROL_MSG, ConnectionState } from './types/PubSub.mjs';\n//# sourceMappingURL=index.mjs.map\n","import { Amplify } from '@aws-amplify/core';\nimport { AppSyncEventProvider } from '../../Providers/AWSAppSyncEventsProvider/index.mjs';\nimport { appsyncRequest } from './appsyncRequest.mjs';\nimport { configure, normalizeAuth, serializeEvents } from './utils.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * @experimental API may change in future versions\n *\n * Establish a WebSocket connection to an Events channel\n *\n * @example\n * const channel = await events.connect(\"default/channel\")\n *\n * channel.subscribe({\n * next: (data) => { console.log(data) },\n * error: (err) => { console.error(err) },\n * })\n *\n * @example // authMode override\n * const channel = await events.connect(\"default/channel\", { authMode: \"userPool\" })\n *\n * @param channel - channel path; `/`\n * @param options - request overrides: `authMode`, `authToken`\n *\n */\nasync function connect(channel, options) {\n const providerOptions = configure();\n providerOptions.authenticationType = normalizeAuth(options?.authMode, providerOptions.authenticationType);\n await AppSyncEventProvider.connect(providerOptions);\n let _subscription;\n const sub = (observer, subOptions) => {\n const subscribeOptions = { ...providerOptions, query: channel };\n subscribeOptions.authenticationType = normalizeAuth(subOptions?.authMode, subscribeOptions.authenticationType);\n _subscription = AppSyncEventProvider\n .subscribe(subscribeOptions)\n .subscribe(observer);\n return _subscription;\n };\n const close = () => {\n _subscription && _subscription.unsubscribe();\n };\n return {\n subscribe: sub,\n close,\n // publish: pub,\n };\n}\n/**\n * @experimental API may change in future versions\n *\n * Publish events to a channel via HTTP request\n *\n * @example\n * await events.post(\"default/channel\", { some: \"event\" })\n *\n * @example // event batching\n * await events.post(\"default/channel\", [{ some: \"event\" }, { some: \"event2\" }])\n *\n * @example // authMode override\n * await events.post(\"default/channel\", { some: \"event\" }, { authMode: \"userPool\" })\n *\n * @param channel - channel path; `/`\n * @param event - JSON-serializable value or an array of values\n * @param options - request overrides: `authMode`, `authToken`\n *\n * @returns void on success\n * @throws on error\n */\nasync function post(channel, event, options) {\n const providerOptions = configure();\n providerOptions.authenticationType = normalizeAuth(options?.authMode, providerOptions.authenticationType);\n // trailing slash required in publish\n const normalizedChannelName = channel[0] === '/' ? channel : `/${channel}`;\n const publishOptions = {\n ...providerOptions,\n query: normalizedChannelName,\n variables: serializeEvents(event),\n authToken: options?.authToken,\n };\n const abortController = new AbortController();\n const res = await appsyncRequest(Amplify, publishOptions, {}, abortController);\n if (res.failed?.length > 0) {\n return res.failed;\n }\n}\n/**\n * @experimental API may change in future versions\n *\n * Close WebSocket connection, disconnect listeners and reconnect observers\n *\n * @example\n * await events.closeAll()\n *\n * @returns void on success\n * @throws on error\n */\nasync function closeAll() {\n await AppSyncEventProvider.close();\n}\n\nexport { closeAll, connect, post };\n//# sourceMappingURL=index.mjs.map\n","import { USER_AGENT_HEADER, getAmplifyUserAgent } from '@aws-amplify/core/internals/utils';\nimport { MESSAGE_TYPES, DEFAULT_KEEP_ALIVE_TIMEOUT } from '../constants.mjs';\nimport { AWSWebSocketProvider } from '../AWSWebSocketProvider/index.mjs';\nimport { awsRealTimeHeaderBasedAuth } from '../AWSWebSocketProvider/authHeaders.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst PROVIDER_NAME = 'AWSAppSyncEventsProvider';\nconst WS_PROTOCOL_NAME = 'aws-appsync-event-ws';\nconst CONNECT_URI = ''; // events does not expect a connect uri\nclass AWSAppSyncEventProvider extends AWSWebSocketProvider {\n constructor() {\n super({\n providerName: PROVIDER_NAME,\n wsProtocolName: WS_PROTOCOL_NAME,\n connectUri: CONNECT_URI,\n });\n }\n getProviderName() {\n return PROVIDER_NAME;\n }\n async connect(options) {\n super.connect(options);\n }\n subscribe(options, customUserAgentDetails) {\n return super.subscribe(options, customUserAgentDetails).pipe();\n }\n async publish(options, customUserAgentDetails) {\n super.publish(options, customUserAgentDetails);\n }\n async _prepareSubscriptionPayload({ options, subscriptionId, customUserAgentDetails, additionalCustomHeaders, libraryConfigHeaders, publish, }) {\n const { appSyncGraphqlEndpoint, authenticationType, query, apiKey, region, } = options;\n // This will be needed for WS publish\n // const data = {\n // \tevents: [variables],\n // };\n const serializedData = JSON.stringify({ channel: query });\n const headers = {\n ...(await awsRealTimeHeaderBasedAuth({\n apiKey,\n appSyncGraphqlEndpoint,\n authenticationType,\n payload: serializedData,\n canonicalUri: '',\n region,\n additionalCustomHeaders,\n })),\n ...libraryConfigHeaders,\n ...additionalCustomHeaders,\n [USER_AGENT_HEADER]: getAmplifyUserAgent(customUserAgentDetails),\n };\n // Commented out code will be needed for WS publish\n const subscriptionMessage = {\n id: subscriptionId,\n channel: query,\n // events: [JSON.stringify(variables)],\n authorization: {\n ...headers,\n },\n // payload: {\n // \tevents: serializedData,\n // \textensions: {\n // \t\tauthorization: {\n // \t\t\t...headers,\n // \t\t},\n // \t},\n // },\n type: publish\n ? MESSAGE_TYPES.EVENT_PUBLISH\n : MESSAGE_TYPES.EVENT_SUBSCRIBE,\n };\n const serializedSubscriptionMessage = JSON.stringify(subscriptionMessage);\n return serializedSubscriptionMessage;\n }\n _handleSubscriptionData(message) {\n this.logger.debug(`subscription message from AWS AppSync Events: ${message.data}`);\n const { id = '', event: payload, type, } = JSON.parse(String(message.data));\n const { observer = null, query = '', variables = {}, } = this.subscriptionObserverMap.get(id) || {};\n this.logger.debug({ id, observer, query, variables });\n if (type === MESSAGE_TYPES.DATA && payload) {\n const deserializedEvent = JSON.parse(payload);\n if (observer) {\n observer.next({ id, type, event: deserializedEvent });\n }\n else {\n this.logger.debug(`observer not found for id: ${id}`);\n }\n return [true, { id, type, payload: deserializedEvent }];\n }\n return [false, { id, type, payload }];\n }\n _unsubscribeMessage(subscriptionId) {\n return {\n id: subscriptionId,\n type: MESSAGE_TYPES.EVENT_STOP,\n };\n }\n _extractConnectionTimeout(data) {\n const { connectionTimeoutMs = DEFAULT_KEEP_ALIVE_TIMEOUT } = data;\n return connectionTimeoutMs;\n }\n _extractErrorCodeAndType(data) {\n const { errors: [{ errorType = '', errorCode = 0 } = {}] = [] } = data;\n return { errorCode, errorType };\n }\n}\nconst AppSyncEventProvider = new AWSAppSyncEventProvider();\n\nexport { AWSAppSyncEventProvider, AppSyncEventProvider };\n//# sourceMappingURL=index.mjs.map\n","import { AmplifyUrl, getAmplifyUserAgent } from '@aws-amplify/core/internals/utils';\nimport { post } from '@aws-amplify/api-rest/internals';\nimport '../../utils/resolveConfig.mjs';\nimport { resolveLibraryOptions } from '../../utils/resolveLibraryOptions.mjs';\nimport { repackageUnauthorizedError } from '../../utils/errors/repackageAuthError.mjs';\nimport { headerBasedAuth } from '../graphqlAuth.mjs';\nimport { isGraphQLResponseWithErrors } from '../utils/runtimeTypeGuards/isGraphQLResponseWithErrors.mjs';\n\nconst USER_AGENT_HEADER = 'x-amz-user-agent';\n// This is effectively a copy of InternalGraphQLAPI.ts._graphql(...)\n// Our existing unit tests are tightly coupled to the implementation, so i was unable to refactor\n// and extend _graphql() without having to change a bunch of tests as well... which in turn reduces confidence\n// that this feature will _not affect_ GQL behavior.\nasync function appsyncRequest(amplify, options, additionalHeaders = {}, abortController, customUserAgentDetails) {\n const { region, appSyncGraphqlEndpoint: endpoint, authenticationType: authMode, query, variables, } = options;\n if (!endpoint) {\n throw new Error('No endpoint');\n }\n const { withCredentials } = resolveLibraryOptions(amplify);\n const headers = await requestHeaders(amplify, options, additionalHeaders, customUserAgentDetails);\n const body = {\n channel: query,\n events: variables,\n };\n const signingServiceInfo = ['apiKey', 'none'].includes(authMode)\n ? undefined\n : {\n service: 'appsync',\n region,\n };\n const { body: responseBody } = await post(amplify, {\n url: new AmplifyUrl(endpoint),\n options: {\n headers,\n body,\n signingServiceInfo,\n withCredentials,\n },\n abortController,\n });\n const response = await responseBody.json();\n if (isGraphQLResponseWithErrors(response)) {\n throw repackageUnauthorizedError(response);\n }\n return response;\n}\n/**\n * Computes all the necessary HTTP headers for the request based on:\n * 1. Operation-level header options\n * 2. Amplify.configure custom headers\n * 3. AuthZ headers for explicit auth mode specified for operation ?? default auth mode in config\n *\n * @returns HTTP request headers key/value\n */\nasync function requestHeaders(amplify, options, additionalHeaders, customUserAgentDetails) {\n const { apiKey, appSyncGraphqlEndpoint: endpoint, authenticationType: authMode, query, variables, authToken, } = options;\n const { headers: customHeadersFn } = resolveLibraryOptions(amplify);\n let additionalCustomHeaders;\n if (typeof additionalHeaders === 'function') {\n const requestOptions = {\n method: 'POST',\n url: new AmplifyUrl(endpoint).toString(),\n queryString: query,\n };\n additionalCustomHeaders = await additionalHeaders(requestOptions);\n }\n else {\n additionalCustomHeaders = additionalHeaders;\n }\n // if an authorization header is set, have the operation-level authToken take precedence\n if (authToken) {\n additionalCustomHeaders = {\n ...additionalCustomHeaders,\n Authorization: authToken,\n };\n }\n const authHeaders = await headerBasedAuth(amplify, authMode, apiKey, additionalCustomHeaders);\n const customHeaders = customHeadersFn &&\n (await customHeadersFn({\n query,\n variables: variables,\n }));\n const headers = {\n ...authHeaders,\n // Custom headers included in Amplify configuration options:\n ...customHeaders,\n // Custom headers from individual requests or API client configuration:\n ...additionalCustomHeaders,\n // User agent headers:\n [USER_AGENT_HEADER]: getAmplifyUserAgent(customUserAgentDetails),\n };\n return headers;\n}\n\nexport { appsyncRequest };\n//# sourceMappingURL=appsyncRequest.mjs.map\n","import { Amplify } from '@aws-amplify/core';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst normalizeAuth = (explicitAuthMode, defaultAuthMode) => {\n if (!explicitAuthMode) {\n return defaultAuthMode;\n }\n if (explicitAuthMode === 'identityPool') {\n return 'iam';\n }\n return explicitAuthMode;\n};\nconst configure = () => {\n const config = Amplify.getConfig();\n const eventsConfig = config.API?.Events;\n if (!eventsConfig) {\n throw new Error('Amplify configuration is missing. Have you called Amplify.configure()?');\n }\n const configAuthMode = normalizeAuth(eventsConfig.defaultAuthMode, 'apiKey');\n const options = {\n appSyncGraphqlEndpoint: eventsConfig.endpoint,\n region: eventsConfig.region,\n authenticationType: configAuthMode,\n apiKey: eventsConfig.apiKey,\n };\n return options;\n};\n/**\n * Event API expects and array of JSON strings\n *\n * @param events - JSON-serializable value or an array of values\n * @returns array of JSON strings\n */\nconst serializeEvents = (events) => {\n if (Array.isArray(events)) {\n return events.map((ev, idx) => {\n const eventJson = JSON.stringify(ev);\n if (eventJson === undefined) {\n throw new Error(`Event must be a valid JSON value. Received ${ev} at index ${idx}`);\n }\n return eventJson;\n });\n }\n const eventJson = JSON.stringify(events);\n if (eventJson === undefined) {\n throw new Error(`Event must be a valid JSON value. Received ${events}`);\n }\n return [eventJson];\n};\n\nexport { configure, normalizeAuth, serializeEvents };\n//# sourceMappingURL=utils.mjs.map\n","import { isPresent } from 'ts-is-present';\nimport { getQueryClient } from '../../utils/queryClient';\nimport { medicalProfileFilesService } from '../../primary-record-types/apiTypes';\nimport { APITypes, Dynamo } from '../../primary-record-types';\nimport urls from '../../utils/urls';\n\nexport const longTermCacheStaleTime = 1000 * 60 * 10; // 10 minutes\n\nclass Builder {\n private _key: string[];\n static init() {\n return new Builder([]);\n }\n\n constructor(key: string[]) {\n this._key = key;\n }\n\n private _add(domain: string, value?: string) {\n this._key.push(domain);\n\n const maybeNormalizedEmptyString = value === '' ? '*' : value;\n if (maybeNormalizedEmptyString) {\n this._key.push(maybeNormalizedEmptyString);\n }\n\n return this;\n }\n\n private _normalizeMaybeArray = (value: string[] | string | undefined) => {\n if (Array.isArray(value)) {\n return [...value].sort().join(',');\n }\n\n return value;\n };\n\n public preferences() {\n return this._add('preferences');\n }\n\n public medicalProfileList() {\n return this._add('medicalProfileList');\n }\n\n public medicalProfile(medicalProfileId?: string) {\n return this._add('medicalProfile', medicalProfileId);\n }\n\n public folder(folderId?: string) {\n return this._add('folder', folderId);\n }\n\n public medicalProfileDetails() {\n return this._add('medicalProfileDetails');\n }\n\n public medicalProfileOwner() {\n return this._add('medicalProfileOwner');\n }\n\n public resources() {\n return this._add('resources');\n }\n\n public resourceCategory(resourceCategory?: string) {\n return this._add('resourceCategory', resourceCategory);\n }\n\n public sort(sort?: 'ascending' | 'descending') {\n return this._add('resourceCategorySort', sort);\n }\n\n public careTeamMember(careTeamMemberId?: string) {\n return this._add('careTeamMembers', careTeamMemberId);\n }\n\n public relatedCareTeamMember(relatedCareTeamMemberId?: string) {\n return this._add('relatedCareTeamMember', relatedCareTeamMemberId);\n }\n\n public auditLogs() {\n return this._add('auditLogs');\n }\n\n public auditLog(auditLogId?: string) {\n return this.auditLogs()._add('auditLog', auditLogId);\n }\n\n public auditLogTypes(auditLogTypes?: string[]) {\n return this.auditLogs()._add('auditLogTypes', this._normalizeMaybeArray(auditLogTypes));\n }\n\n public collaborator(collaboratorId?: string) {\n return this._add('collaborators', collaboratorId);\n }\n\n public collaboratorInvite(collaboratorInviteId?: string) {\n return this._add('collaboratorInvite', collaboratorInviteId);\n }\n\n public myInvites() {\n return this._add('myInvites');\n }\n\n public evaluatedPermissions() {\n return this._add('evaluatedPermissions');\n }\n\n public inboundTransferRequests() {\n return this._add('inboundTransferRequests');\n }\n\n public get key() {\n return this._key;\n }\n\n public contactDetails(contactDetailsId: string) {\n return this._add('contactDetails', contactDetailsId);\n }\n\n public idCard(idCardId?: string) {\n return this._add('idCard', idCardId);\n }\n\n public resourcesCount() {\n return this._add('resourcesCount');\n }\n\n public refreshProgress() {\n return this._add('refreshProgress');\n }\n\n public notes(noteId?: string) {\n return this._add('notes', noteId);\n }\n\n public userNotes() {\n return this._add('userNotes');\n }\n\n public profileNotes() {\n return this._add('profileNotes');\n }\n\n public careTeamMemberNotes(careTeamMemberId?: string) {\n return this._add('careTeamMemberNotes', careTeamMemberId);\n }\n\n public resourceNotes(resourceIds?: string[] | string) {\n return this._add('resourceNotes', this._normalizeMaybeArray(resourceIds));\n }\n\n public v2NotesEntity(isV2Note: boolean) {\n return this._add('v2NotesEntity', String(isV2Note));\n }\n\n public resourceCategoryNotes(category: string) {\n return this._add('resourceCategoryNotes', category);\n }\n\n public oneUpEndpoint(endpointId: string | number) {\n return this._add('oneUpEndpoint', String(endpointId));\n }\n\n public oneUpEndpointsSearch(search: string) {\n return this._add('oneUpEndpointsSearch', search);\n }\n\n public products() {\n return this._add('products');\n }\n\n public profilePaymentStatus() {\n return this._add('profilePaymentStatus');\n }\n\n public registrationCodeValidation(registrationCode: string) {\n return this._add('registrationCodeValidation', registrationCode);\n }\n\n public myRegistrationCode() {\n return this._add('myRegistrationCode');\n }\n\n public profileConnectedHealthSystems() {\n return this._add('profileConnectedHealthSystems');\n }\n\n public transferRequests() {\n return this._add('transferRequests');\n }\n\n public transferRequest(transferRequestId: string) {\n return this._add('transferRequest', transferRequestId);\n }\n\n public resource(resourceId?: string) {\n return this._add('resource', resourceId);\n }\n\n public relatedResources(resourceIds?: string | string[]) {\n return this._add('relatedResources', this._normalizeMaybeArray(resourceIds));\n }\n\n public user() {\n return this._add('user');\n }\n\n public webProducts() {\n return this._add('webProducts');\n }\n\n public paymentStatus() {\n return this._add('paymentStatus');\n }\n\n public oneUpHealthEndpoints() {\n return this._add('oneUpEndpoint');\n }\n\n public oneUpHealthEndpoint(endpointId: number | string) {\n return this.oneUpHealthEndpoints()._add(String(endpointId));\n }\n\n public oneUpHealthEndpointIngestions() {\n return this._add('oneUpHealthEndpointIngestions');\n }\n\n public resourceReferenceCounts(resourceId: string) {\n return this._add('resourceReferenceCounts', resourceId);\n }\n\n public processingReports() {\n return this._add('processingReports');\n }\n\n public chatsList(profileId: string) {\n return this._add('chatsList', profileId);\n }\n\n public chat(chatId: string) {\n return this._add('chat', chatId);\n }\n\n public relatedResourceSuggestions() {\n return this._add('relatedResourceSuggestions');\n }\n\n public relatedResourceDiscoveries() {\n return this._add('relatedResourceDiscoveries');\n }\n\n public sharedReport(sharedReportId?: string) {\n return this._add('sharedReport', sharedReportId);\n }\n\n public publicSharedReport(shareCode: string) {\n return this._add('publicSharedReport', shareCode);\n }\n\n public medicalProfileFile(medicalProfileFileId?: string) {\n return this._add('medicalProfileFile', medicalProfileFileId);\n }\n\n public polling() {\n return this._add('polling');\n }\n\n public pageImage(page: number) {\n return this._add('pageImage', String(page));\n }\n\n public audio() {\n return this._add('audio');\n }\n\n public search(searchText: string, searchType: medicalProfileFilesService.SearchType) {\n return this._add('search', searchText)._add('type', searchType);\n }\n\n public vaccineSearch(searchText: string) {\n return this._add('vaccine-search', searchText);\n }\n\n public featureToggles() {\n return this._add('featureToggles');\n }\n\n public labDateBuckets() {\n return this._add('labDateBuckets');\n }\n\n public dateLabs(date: string) {\n return this._add('dateLabs', date);\n }\n\n public labHistory(labCode: string) {\n return this._add('labHistory', labCode);\n }\n\n public uniqueLabCodes() {\n return this._add('uniqueLabCodes');\n }\n\n public organization() {\n return this._add('organization');\n }\n\n public hasOrganizationLogo() {\n return this._add('hasOrganizationLogo');\n }\n\n public groups() {\n return this._add('groups');\n }\n\n public invitationDefinitions(invitationDefinitionId?: string) {\n return this._add('invitationDefinitions', invitationDefinitionId);\n }\n\n public organizationUserInvitations(invitationId?: string) {\n return this._add('organizationUserInvitations', invitationId);\n }\n\n public myOrganizationInvitations() {\n return this._add('myOrganizationInvitations');\n }\n\n public getOrganizationUsers(organizationUserId?: string) {\n return this._add('organizationUsers', organizationUserId);\n }\n\n public getOrganizationUserGroups(organizationGroupUserId?: string) {\n return this._add('organizationUserGroups', organizationGroupUserId);\n }\n\n public getOrganizationClientInvitations(organizationClientInvitationId?: string) {\n return this._add('organizationClientInvitations', organizationClientInvitationId);\n }\n\n public myOrganizationClientInvitations() {\n return this._add('myOrganizationClientInvitations');\n }\n\n public clientRecordGroups() {\n return this._add('clientRecordGroups');\n }\n\n public organizationClientRecords(organizationClientRecordId?: string) {\n return this._add('organizationClientRecords', organizationClientRecordId);\n }\n\n public bulkOrganizationClientRecords(clientRecordIds: string[]) {\n return this.organizationClientRecords(clientRecordIds.sort().join(','));\n }\n\n public clientRecordInvitation() {\n return this._add('clientRecordInvitation');\n }\n\n public clientRecordHistory(profileId: string) {\n return this._add('clientRecordHistoryProfileId', profileId);\n }\n\n public organizationUsage() {\n return this._add('organizationUsage');\n }\n\n public maxMedicalProfiles() {\n return this._add('maxMedicalProfiles');\n }\n\n public organizationMedicalProfileFolderId(clientMedicalProfileId: string) {\n return this._add('organizationMedicalProfileFolderId', clientMedicalProfileId);\n }\n\n public description() {\n return this._add('description');\n }\n\n public metricType(type?: Dynamo.MedicalProfileUsageMetricType) {\n return this._add('metricType', type);\n }\n\n public fdaSearch(searchKey: string) {\n return this._add('fdaSearch', searchKey);\n }\n\n public paymentIntegrationStatus() {\n return this._add('paymentIntegrationStatus');\n }\n\n public paymentIntegrationBranding(logoType?: 'icon' | 'logo') {\n return this._add('paymentIntegrationBranding', logoType);\n }\n\n public clientRecordBillingDetails() {\n return this._add('clientRecordBillingDetails');\n }\n\n public invoiceItems(invoiceItemId?: string) {\n return this._add('invoiceItems', invoiceItemId);\n }\n\n public invoices(invoiceId?: string) {\n return this._add('invoices', invoiceId);\n }\n\n public canAddMedicalProfile() {\n return this._add('canAddMedicalProfile');\n }\n\n public collaboratorInvoices(invoiceId?: string) {\n return this._add('collaboratorInvoices', invoiceId);\n }\n\n public directive(directiveType: 'code-status' | 'poa') {\n return this._add('directive', directiveType);\n }\n\n public medicalProfileSearch(searchText: string) {\n return this._add('medical-profile-search', searchText);\n }\n\n public inAppNotifications() {\n return this._add('in-app-notifications');\n }\n\n public inAppNotificationCounts() {\n return this._add('in-app-notification-counts');\n }\n\n public clientInAppNotificationsCount() {\n return this._add('client-in-app-notifications-count');\n }\n\n public adminListedOrgs() {\n return this._add('admin-listed-orgs');\n }\n\n public visitInviteEmails() {\n return this._add('visitInviteEmails');\n }\n}\n\nexport const getProfileVisitInviteEmailsCacheKey = (medicalProfileId: string) =>\n Builder.init().medicalProfile(medicalProfileId).visitInviteEmails().key;\n\nexport const getAdminListedOrgsKey = () => Builder.init().adminListedOrgs().key;\n\nexport const getAllProfileInAppNotificationsCountKey = () =>\n Builder.init().medicalProfile().inAppNotifications().inAppNotificationCounts().key;\n\nexport const getProfileInAppNotificationKey = (medicalProfileId: string) =>\n Builder.init().medicalProfile(medicalProfileId).inAppNotifications().key;\n\nexport const getAuditLogCacheKey = (medicalProfileId: string, auditLogId?: string) =>\n Builder.init().medicalProfile(medicalProfileId).auditLog(auditLogId).key;\n\nexport const getAuditLogTypeQueryCacheKey = (medicalProfileId: string, auditLogTypes?: string[]) =>\n Builder.init().medicalProfile(medicalProfileId).auditLogTypes(auditLogTypes).key;\n\nexport const getRelatedCareTeamMemberCacheKey = (medicalProfileId: string, careTeamMemberId: string) =>\n Builder.init().medicalProfile(medicalProfileId).relatedCareTeamMember(careTeamMemberId).key;\n\nexport const getProfileCareTeamMembersCacheKey = (medicalProfileId: string) =>\n Builder.init().medicalProfile(medicalProfileId).careTeamMember().key;\n\nexport const getCareTeamMemberCacheKey = (medicalProfileId: string, careTeamMemberId: string) =>\n Builder.init().medicalProfile(medicalProfileId).careTeamMember(careTeamMemberId).key;\n\nexport const getProfileCollaboratorsCacheKey = (medicalProfileId: string) =>\n Builder.init().medicalProfile(medicalProfileId).collaborator().key;\n\nexport const getProfileCollaboratorCacheKey = (medicalProfileId: string, collaboratorId: string) =>\n Builder.init().medicalProfile(medicalProfileId).collaborator(collaboratorId).key;\n\nexport const getProfileCollaboratorInvoicesCacheKey = (medicalProfileId: string, collaboratorId: string) =>\n Builder.init().medicalProfile(medicalProfileId).collaborator(collaboratorId).collaboratorInvoices().key;\n\nexport const getProfileCollaboratorInvoiceCacheKey = (\n medicalProfileId: string,\n collaboratorId: string,\n invoiceId: string,\n) => Builder.init().medicalProfile(medicalProfileId).collaborator(collaboratorId).collaboratorInvoices(invoiceId).key;\n\nexport const getProfileCollaboratorInvitesCacheKey = (medicalProfileId: string) =>\n Builder.init().medicalProfile(medicalProfileId).collaboratorInvite().key;\n\nexport const getProfileCollaboratorInviteCacheKey = (medicalProfileId: string, collaboratorInviteId: string) =>\n Builder.init().medicalProfile(medicalProfileId).collaboratorInvite(collaboratorInviteId).key;\n\nexport const getCareTeamMemberCollaboratorsCacheKey = (medicalProfileId: string, careTeamMemberId: string) =>\n Builder.init().medicalProfile(medicalProfileId).careTeamMember(careTeamMemberId).collaborator().key;\n\nconst getProfileResourcesRootCacheKey = (medicalProfileId: string) =>\n Builder.init().medicalProfile(medicalProfileId).resources().key;\n\nconst getAllProfileRelatedResourcesCacheKey = (medicalProfileId: string) =>\n Builder.init().medicalProfile(medicalProfileId).resources().relatedResources().key;\n\nexport const getResourceReferenceCountsCacheKey = (medicalProfileId: string, resourceId: string) =>\n Builder.init().medicalProfile(medicalProfileId).resources().resourceReferenceCounts(resourceId).key;\n\nexport const getResourceRelatedCareTeamMembersCacheKey = (medicalProfileId: string, resourceIds: string | string[]) =>\n Builder.init().medicalProfile(medicalProfileId).resources().relatedResources(resourceIds).careTeamMember().key;\n\nexport const getMyInvitesCacheKey = () => Builder.init().myInvites().key;\n\nexport const getEvaluatedPermissionsCacheKey = (medicalProfileId: string) =>\n Builder.init().medicalProfile(medicalProfileId).evaluatedPermissions().key;\n\nexport const getInboundTransferRequestsCacheKey = () => Builder.init().inboundTransferRequests().key;\n\nexport const getTransferRequestCacheKey = (medicalProfileId: string, transferRequestId: string) =>\n Builder.init().medicalProfile(medicalProfileId).transferRequest(transferRequestId).key;\n\nexport const getProfilesRootCacheKey = () => Builder.init().medicalProfile();\n\nexport const getMedicalProfilesCacheKey = () => getProfilesRootCacheKey().medicalProfileList().key;\n\nexport const getMedicalProfileDetailsCacheKey = (medicalProfileId: string) =>\n Builder.init().medicalProfile(medicalProfileId).medicalProfileDetails().key;\n\nexport const getMedicalProfileOwnerCacheKey = (medicalProfileId: string) =>\n Builder.init().medicalProfile(medicalProfileId).medicalProfileOwner().key;\n\nexport const getMedicalProfileContactDetailsCacheKey = (medicalProfileId: string, contactDetailsId: string) =>\n Builder.init().medicalProfile(medicalProfileId).contactDetails(contactDetailsId).key;\n\nexport const getMedicalProfileIdCardsCacheKey = (medicalProfileId: string) =>\n Builder.init().medicalProfile(medicalProfileId).idCard().key;\n\nexport const getResourcesCountCacheKey = (medicalProfileId: string) =>\n Builder.init().medicalProfile(medicalProfileId).resources().resourcesCount().key;\n\nconst getRootMedicalProfileEndpointCacheKey = (medicalProfileId: string) =>\n Builder.init().medicalProfile(medicalProfileId).oneUpHealthEndpoints().key;\n\nexport const getOneUpHealthEndpointDetailsCacheKey = (medicalProfileId: string, endpointId: string | number) =>\n Builder.init().medicalProfile(medicalProfileId).oneUpHealthEndpoint(endpointId).key;\n\nexport const getOneUpHealthEndpointIngestionsCacheKey = (medicalProfileId: string, endpointId: string | number) =>\n Builder.init().medicalProfile(medicalProfileId).oneUpHealthEndpoint(endpointId).oneUpHealthEndpointIngestions().key;\n\nexport const getPublicSharedReportCacheKey = (shareCode: string) => Builder.init().publicSharedReport(shareCode).key;\n\nexport const getSharedReportCacheKey = (medicalProfileId: string, sharedReportId: string) =>\n Builder.init().medicalProfile(medicalProfileId).sharedReport(sharedReportId).key;\n\nexport const getSharedReportsCacheKey = (medicalProfileId: string) =>\n Builder.init().medicalProfile(medicalProfileId).sharedReport().key;\n\nexport const getMedicalProfileFileCacheKey = (medicalProfileId: string, medicalProfileFileId: string) =>\n Builder.init().medicalProfile(medicalProfileId).medicalProfileFile(medicalProfileFileId).key;\n\nexport const getMedicalProfileFilesCacheKey = (medicalProfileId: string) =>\n Builder.init().medicalProfile(medicalProfileId).medicalProfileFile().key;\n\nexport const getMedicalProfileFoldersCacheKey = (medicalProfileId: string, folderId: string) =>\n Builder.init().medicalProfile(medicalProfileId).medicalProfileFile().folder(folderId).key;\n\nexport const getMedicalProfileFilesFileCacheKey = (medicalProfileId: string, medicalProfileFileId: string) =>\n Builder.init().medicalProfile(medicalProfileId).medicalProfileFile(medicalProfileFileId).key;\n\nexport const getMedicalProfileFilesFilePollingCacheKey = (medicalProfileId: string, medicalProfileFileId: string) =>\n Builder.init().medicalProfile(medicalProfileId).medicalProfileFile(medicalProfileFileId).polling().key;\n\nexport const getVaccineSearchCacheKey = (searchText: string) => Builder.init().vaccineSearch(searchText).key;\n\nexport const getFDASearchCacheKey = (request: APITypes.medicalDataService.SearchFDADrugsRequest) => {\n let searchString = '';\n if (request.type === 'exact') {\n searchString = `exact-brandName:${request.brandName}-activeIngredients:${(request.activeIngredients || [])\n .sort()\n .join()}-dosageForm:${request.dosageForm}-route:${request.route}`;\n } else {\n searchString = `partial-${request.searchString}`;\n }\n\n return Builder.init().fdaSearch(searchString).key;\n};\n\nexport const getMedicalProfileFileSearchCacheKey = (\n medicalProfileId: string,\n searchText: string,\n searchType: medicalProfileFilesService.SearchType,\n) => Builder.init().medicalProfile(medicalProfileId).search(searchText, searchType).key;\n\nexport const getMedicalProfileFilePageImageCacheKey = (\n medicalProfileId: string,\n medicalProfileFileId: string,\n page: number,\n) => Builder.init().medicalProfile(medicalProfileId).medicalProfileFile(medicalProfileFileId).pageImage(page).key;\n\nexport const getMedicalProfileFilePageAudioCacheKey = (medicalProfileId: string, medicalProfileFileId: string) =>\n Builder.init().medicalProfile(medicalProfileId).medicalProfileFile(medicalProfileFileId).audio().key;\n\nexport const getProfileResourcesForCategoryCacheKey = (\n medicalProfileId: string,\n resourceCategory: string,\n sort?: 'ascending' | 'descending',\n) => Builder.init().medicalProfile(medicalProfileId).resources().resourceCategory(resourceCategory).sort(sort).key;\n\nexport const getProfileLabDateBucketsCacheKey = (medicalProfileId: string) =>\n Builder.init().medicalProfile(medicalProfileId).resources().labDateBuckets().key;\n\nexport const getDateLabsCacheKey = (medicalProfileId: string, date: string) =>\n Builder.init().medicalProfile(medicalProfileId).resources().dateLabs(date).key;\n\nexport const getUniqueLabCodesCacheKey = (medicalProfileId: string) =>\n Builder.init().medicalProfile(medicalProfileId).resources().uniqueLabCodes().key;\n\nexport const getLabHistoryCacheKey = (medicalProfileId: string, labCode: string) =>\n Builder.init().medicalProfile(medicalProfileId).resources().labHistory(labCode).key;\n\nexport const getProfileResourceForCategoryCacheKey = (\n medicalProfileId: string,\n resourceCategory: string,\n resourceId: string,\n) =>\n Builder.init().medicalProfile(medicalProfileId).resources().resourceCategory(resourceCategory).resource(resourceId)\n .key;\n\nexport const getRelatedResourcesCacheKey = (medicalProfileId: string, resourceCategory: string, resourceId: string) =>\n Builder.init()\n .medicalProfile(medicalProfileId)\n .resources()\n .resourceCategory(resourceCategory)\n .resource(resourceId)\n .relatedResources().key;\n\nexport const getRelatedResourcesSuggestionsCacheKey = (\n medicalProfileId: string,\n resourceCategory: string,\n resourceId: string,\n) =>\n Builder.init()\n .medicalProfile(medicalProfileId)\n .resources()\n .resourceCategory(resourceCategory)\n .resource(resourceId)\n .relatedResources()\n .relatedResourceSuggestions().key;\n\nexport const getRelatedResourcesDiscoveriesCacheKey = (\n medicalProfileId: string,\n resourceCategory: string,\n resourceId: string,\n) =>\n Builder.init()\n .medicalProfile(medicalProfileId)\n .resources()\n .resourceCategory(resourceCategory)\n .resource(resourceId)\n .relatedResources()\n .relatedResourceDiscoveries().key;\n\nexport const getProfileRefreshProgressCacheKey = (medicalProfileId: string) =>\n Builder.init().medicalProfile(medicalProfileId).refreshProgress().key;\n\nexport const getUserNotesCacheKey = () => Builder.init().notes().userNotes().key;\n\nconst getMedicalProfileNotesRootCacheKey = (medicalProfileId: string) =>\n Builder.init().medicalProfile(medicalProfileId).notes();\n\nexport const getProfileNotesCacheKey = (medicalProfileId: string) =>\n getMedicalProfileNotesRootCacheKey(medicalProfileId).profileNotes().key;\n\nexport const getCareTeamMemberNotesCacheKey = (medicalProfileId: string, careTeamMemberId: string) =>\n getMedicalProfileNotesRootCacheKey(medicalProfileId).careTeamMemberNotes(careTeamMemberId).key;\n\nexport const getResourceNotesCacheKey = (\n medicalProfileId: string,\n resourceIds: string[] | string,\n isV2Entity: boolean,\n) => getMedicalProfileNotesRootCacheKey(medicalProfileId).resourceNotes(resourceIds).v2NotesEntity(isV2Entity).key;\n\nexport const getResourceCategoryNotesCacheKey = (medicalProfileId: string, resourceCategory: string) =>\n getMedicalProfileNotesRootCacheKey(medicalProfileId).resourceCategoryNotes(resourceCategory).key;\n\nexport const getNoteCacheKey = (noteId: string) => {\n return Builder.init().notes(noteId).key;\n};\n\nexport const getAllUserNotesCacheKey = () => {\n return Builder.init().notes().key;\n};\n\nexport const getOneUpEndpointCacheKey = (endpointId: string | number) => {\n return Builder.init().oneUpEndpoint(endpointId).key;\n};\n\nexport const getOneUpEndpointsSearchCacheKey = (search: string) => {\n return Builder.init().oneUpEndpointsSearch(search).key;\n};\n\nexport const getProductsCacheKey = () => {\n return Builder.init().products().key;\n};\n\nexport const getProfilePaymentStatusCacheKey = () => {\n return Builder.init().profilePaymentStatus().key;\n};\n\nexport const getProfileConnectedHealthSystemsCacheKey = (medicalProfileId: string) => {\n return Builder.init().medicalProfile(medicalProfileId).profileConnectedHealthSystems().key;\n};\n\nexport const getProfileTransferRequestsCacheKey = (medicalProfileId?: string) => {\n return Builder.init().medicalProfile(medicalProfileId).transferRequests().key;\n};\n\nexport const getUserCacheKey = () => {\n return Builder.init().user().key;\n};\n\nexport const getRegistrationCodeValidationCacheKey = (registrationCode: string) => {\n return Builder.init().registrationCodeValidation(registrationCode).key;\n};\n\nexport const getWebProductsCacheKey = () => {\n return Builder.init().webProducts().key;\n};\n\nexport const getPaymentStatusCacheKey = () => {\n return Builder.init().paymentStatus().key;\n};\n\nexport const getProfileIdPaymentStatusCacheKey = (medicalProfileId: string) => {\n return Builder.init().profilePaymentStatus().medicalProfile(medicalProfileId).key;\n};\n\nexport const getCanAddMedicalProfileCacheKey = () => {\n return Builder.init().canAddMedicalProfile().key;\n};\n\nexport const getMyRegistrationCodeCacheKey = () => {\n return Builder.init().myRegistrationCode().key;\n};\n\nexport const getProfileProcessingReportsKey = (medicalProfileId: string) => {\n return Builder.init().medicalProfile(medicalProfileId).processingReports().key;\n};\n\nexport const getCareTeamMemberResourcesCacheKey = (\n medicalProfileId: string,\n careTeamMemberId: string,\n resourceCategory: string,\n) => {\n return Builder.init()\n .medicalProfile(medicalProfileId)\n .careTeamMember(careTeamMemberId)\n .resourceCategory(resourceCategory).key;\n};\n\nexport const getChatsListCacheKey = (profileId: string) => {\n return Builder.init().chatsList(profileId).key;\n};\n\nexport const getMedicalProfileChatKey = (medicalProfileId: string, chatId: string) => {\n return Builder.init().medicalProfile(medicalProfileId).chat(chatId).key;\n};\n\nexport const getFeatureTogglesKey = () => {\n return Builder.init().featureToggles().key;\n};\n\nexport const getOrganizationKey = () => {\n return Builder.init().organization().key;\n};\n\nexport const getHasOrganizationLogoKey = () => {\n return Builder.init().organization().hasOrganizationLogo().key;\n};\n\nexport const getOrganizationGroupsCacheKey = () => {\n return Builder.init().organization().groups().key;\n};\n\nexport const getOrganizationInvitationDefinitionsCacheKey = () => {\n return Builder.init().organization().invitationDefinitions().key;\n};\n\nexport const getOrganizationInvitationDefinitionCacheKey = (invitationDefinitionId: string) => {\n return Builder.init().organization().invitationDefinitions(invitationDefinitionId).key;\n};\n\nexport const getOrganizationUserInvitationsCacheKey = () => {\n return Builder.init().organization().organizationUserInvitations().key;\n};\n\nexport const getOrganizationUserInvitationCacheKey = (invitationId: string) => {\n return Builder.init().organization().organizationUserInvitations(invitationId).key;\n};\n\nexport const getMyOrganizationInvitationsCacheKey = () => {\n return Builder.init().myOrganizationInvitations().key;\n};\n\nexport const getOrganizationUsersCacheKey = () => {\n return Builder.init().organization().getOrganizationUsers().key;\n};\n\nexport const getOrganizationUserCacheKey = (organizationUserId: string) => {\n return Builder.init().organization().getOrganizationUsers(organizationUserId).key;\n};\n\nexport const getOrganizationUserGroupsCacheKey = (organizationUserId: string) => {\n return Builder.init().organization().getOrganizationUsers(organizationUserId).getOrganizationUserGroups().key;\n};\n\nexport const getOrganizationClientInvitationsCacheKey = () => {\n return Builder.init().organization().getOrganizationClientInvitations().key;\n};\n\nexport const getOrganizationClientInvitationCacheKey = (organizationClientInvitationId: string) => {\n return Builder.init().organization().getOrganizationClientInvitations(organizationClientInvitationId).key;\n};\n\nexport const getMyOrganizationClientInvitationsCacheKey = () => {\n return Builder.init().myOrganizationClientInvitations().key;\n};\n\nexport const getOrganizationMedicalProfilesCacheKey = (medicalProfileId?: string) => {\n return Builder.init().organization().medicalProfile(medicalProfileId).key;\n};\n\nexport const getOrganizationClientProfileNotificationCountCacheKey = () => {\n return Builder.init().organization().clientInAppNotificationsCount().key;\n};\n\nexport const getClientRecordGroupsCacheKey = (clientRecordId: string) => {\n return Builder.init().organization().organizationClientRecords(clientRecordId).clientRecordGroups().key;\n};\n\nexport const getOrganizationClientRecordsCacheKey = () => {\n return Builder.init().organization().organizationClientRecords().key;\n};\n\nexport const getOrganizationClientRecordsBulkCacheKey = (clientRecordIds: string[]) => {\n return Builder.init().organization().bulkOrganizationClientRecords(clientRecordIds).key;\n};\n\nexport const getOrganizationClientRecordHistoryCacheKey = (profileId: string) => {\n return Builder.init().organization().organizationClientRecords().clientRecordHistory(profileId).key;\n};\n\nexport const getOrganizationClientRecordCacheKey = (organizationClientRecordId: string) => {\n return Builder.init().organization().organizationClientRecords(organizationClientRecordId).key;\n};\n\nexport const getOrganizationClientRecordBillingDetailsCacheKey = (organizationClientRecordId: string) => {\n return Builder.init()\n .organization()\n .organizationClientRecords(organizationClientRecordId)\n .clientRecordBillingDetails().key;\n};\n\nexport const getClientRecordInvitationCacheKey = (organizationClientRecordId: string) => {\n return Builder.init().organization().organizationClientRecords(organizationClientRecordId).clientRecordInvitation()\n .key;\n};\n\nexport const getOrganizationNotesCacheKey = () => {\n return Builder.init().organization().notes().key;\n};\n\nexport const getOrganizationClientRecordNotesCacheKey = (organizationClientRecordId: string) => {\n return Builder.init().organization().organizationClientRecords(organizationClientRecordId).notes().key;\n};\n\nexport const getOrganizationCareTeamMembersCacheKey = () => {\n return Builder.init().organization().careTeamMember().key;\n};\n\nexport const getOrganizationCareTeamMemberCacheKey = (careTeamMemberId: string) => {\n return Builder.init().organization().careTeamMember(careTeamMemberId).key;\n};\n\nexport const getOrganizationClientRecordAuditLogsCacheKey = (organizationClientRecordId: string) => {\n return Builder.init().organization().organizationClientRecords(organizationClientRecordId).auditLogs().key;\n};\n\nexport const getOrganizationClientRecordInvoiceItemsCacheKey = (organizationClientRecordId: string) => {\n return Builder.init().organization().organizationClientRecords(organizationClientRecordId).invoiceItems().key;\n};\n\nexport const getOrganizationClientRecordInvoiceItemCacheKey = (\n organizationClientRecordId: string,\n invoiceItemId: string,\n) => {\n return Builder.init()\n .organization()\n .organizationClientRecords(organizationClientRecordId)\n .invoiceItems(invoiceItemId).key;\n};\n\nexport const getOrganizationClientRecordInvoicesCacheKey = (organizationClientRecordId: string) => {\n return Builder.init().organization().organizationClientRecords(organizationClientRecordId).invoices().key;\n};\n\nexport const getOrganizationClientRecordInvoiceCacheKey = (organizationClientRecordId: string, invoiceId: string) => {\n return Builder.init().organization().organizationClientRecords(organizationClientRecordId).invoices(invoiceId).key;\n};\n\nexport const getOrganizationUsageCacheKey = () => {\n return Builder.init().organization().organizationUsage().key;\n};\n\nexport const getMaxMedicalProfilesCacheKey = () => {\n return Builder.init().organization().organizationClientRecords().maxMedicalProfiles().key;\n};\n\nexport const getOrganizationMedicalProfileFolderIdCacheKey = (clientMedicalProfileId: string) => {\n return Builder.init()\n .organization()\n .organizationClientRecords()\n .organizationMedicalProfileFolderId(clientMedicalProfileId).key;\n};\n\nexport const getOrganizationPaymentIntegrationStatusCacheKey = () => {\n return Builder.init().organization().paymentIntegrationStatus().key;\n};\n\nconst getBaseOrganizationPaymentIntegrationBrandingCacheKey = () => {\n return Builder.init().organization().paymentIntegrationBranding().key;\n};\n\nexport const getOrganizationPaymentIntegrationBrandingImageCacheKey = (logoType: 'icon' | 'logo') => {\n return Builder.init().organization().paymentIntegrationBranding(logoType).key;\n};\n\nexport const getUserPreferencesCacheKey = () => {\n return Builder.init().preferences().key;\n};\n\nexport const getMedicalProfileResourceDescriptionForCategoryCacheKey = (\n medicalProfileId: string,\n resourceCategory: string,\n resourceId: string,\n) => {\n return Builder.init()\n .medicalProfile(medicalProfileId)\n .resources()\n .resourceCategory(resourceCategory)\n .resource(resourceId)\n .description().key;\n};\n\nconst getProfileMetricRootCacheKey = (medicalProfileId: string) => {\n return Builder.init().medicalProfile(medicalProfileId).metricType().key;\n};\n\nexport const getUsageMetricTypeCacheKey = (medicalProfileId: string, type: Dynamo.MedicalProfileUsageMetricType) => {\n return Builder.init().medicalProfile(medicalProfileId).metricType(type).key;\n};\n\nexport const getMedicalProfileDirectiveCacheKey = (medicalProfileId: string, directiveType: 'code-status' | 'poa') => {\n return Builder.init().medicalProfile(medicalProfileId).directive(directiveType).key;\n};\n\nexport const getMedicalProfileSearchCacheKey = (medicalProfileId: string, searchText: string) => {\n return Builder.init().medicalProfile(medicalProfileId).medicalProfileSearch(searchText).key;\n};\n\nconst UNIVERSAL_DELAY = 700;\n\ntype GetResetHandlerArgs = {\n getResetCacheKeys: (params: TParams) => string[][];\n resetDelay?: number;\n removeCache?: boolean;\n};\n\nconst getResetHandlers = (args: GetResetHandlerArgs) => {\n const maybeDelay = (fn: () => void) => () => {\n if (args.resetDelay !== 0) {\n setTimeout(fn, args.resetDelay || UNIVERSAL_DELAY);\n } else {\n fn();\n }\n };\n\n return {\n resetCache: (params: TParams) => {\n const queryClient = getQueryClient();\n const resetCache = maybeDelay(() => {\n args.getResetCacheKeys(params).forEach((key) => {\n if (args.removeCache) {\n queryClient.resetQueries({ queryKey: key });\n } else {\n queryClient.invalidateQueries({ queryKey: key });\n }\n });\n });\n\n return resetCache;\n },\n resetCacheWithDeferredParams: (): ((params: TParams) => void) => {\n const queryClient = getQueryClient();\n const resetCache = (params: TParams) => {\n maybeDelay(() => {\n args.getResetCacheKeys(params).forEach((key) => {\n if (args.removeCache) {\n queryClient.resetQueries({ queryKey: key });\n } else {\n queryClient.invalidateQueries({ queryKey: key });\n }\n });\n })();\n };\n\n return resetCache;\n },\n };\n};\n\nexport const onPatientMismatchConfirmedUpdate = getResetHandlers<{\n medicalProfileId: string;\n endpointId: string | number;\n}>({\n getResetCacheKeys: ({ medicalProfileId, endpointId }) => [\n getOneUpHealthEndpointDetailsCacheKey(medicalProfileId, endpointId),\n ],\n});\n\nexport const onRefreshCapabilityDiscovery = getResetHandlers<{\n medicalProfileId: string;\n endpointId: string | number;\n}>({\n getResetCacheKeys: ({ medicalProfileId, endpointId }) => [\n getOneUpHealthEndpointDetailsCacheKey(medicalProfileId, endpointId),\n getRootMedicalProfileEndpointCacheKey(medicalProfileId),\n getProfileConnectedHealthSystemsCacheKey(medicalProfileId),\n ],\n});\n\n/**\n * Resets metadata associated with a medical profile connections\n */\nexport const onResetProfileConnectionMetadata = getResetHandlers<{\n medicalProfileId: string;\n}>({\n getResetCacheKeys: ({ medicalProfileId }) => [\n getRootMedicalProfileEndpointCacheKey(medicalProfileId),\n getUsageMetricTypeCacheKey(medicalProfileId, 'file-upload'),\n getUsageMetricTypeCacheKey(medicalProfileId, 'portal-connect'),\n ],\n});\n\n/**\n * Related care team member updated or deleted\n */\nexport const onRelatedCareTeamMemberUpdate = getResetHandlers<{\n medicalProfileId: string;\n careTeamMemberId: string;\n}>({\n getResetCacheKeys: ({ medicalProfileId, careTeamMemberId }) => [\n getRelatedCareTeamMemberCacheKey(medicalProfileId, careTeamMemberId),\n ],\n});\n\n/**\n * Medical profile care team member is added, updated, or deleted\n */\nexport const onCareTeamUpdate = getResetHandlers<{\n medicalProfileId: string;\n}>({\n getResetCacheKeys: ({ medicalProfileId }) => [\n getProfileCareTeamMembersCacheKey(medicalProfileId),\n getProfileResourcesRootCacheKey(medicalProfileId),\n ],\n});\n\nexport const onCopyOrgCareTeamMemberSuccess = getResetHandlers<{ profileIds: string[] }>({\n getResetCacheKeys: ({ profileIds }) => [\n ...profileIds.map((medicalProfileId) => getProfileCareTeamMembersCacheKey(medicalProfileId)),\n ...profileIds.map((medicalProfileId) => getProfileResourcesRootCacheKey(medicalProfileId)),\n ],\n});\n\n/**\n * Emergency contact is added\n */\nexport const onEmergencyContactAdd = getResetHandlers<{\n medicalProfileId: string;\n}>({\n getResetCacheKeys: ({ medicalProfileId }) => [getProfileCareTeamMembersCacheKey(medicalProfileId)],\n});\n\n/**\n * On resource update.\n *\n * This clears all cached resource data for a profile to ensure reference counts, related resources, etc are in sync\n */\nexport const onResourceUpdate = getResetHandlers<{\n medicalProfileId: string;\n}>({\n getResetCacheKeys: ({ medicalProfileId }) => [\n getProfileResourcesRootCacheKey(medicalProfileId),\n getAuditLogTypeQueryCacheKey(medicalProfileId),\n ],\n resetDelay: 700,\n});\n\n/**\n * On a bulk resource edit or delete operation\n */\nexport const onResourceBulkUpdate = getResetHandlers<{\n medicalProfileId: string;\n}>({\n getResetCacheKeys: ({ medicalProfileId }) => [getProfileResourcesRootCacheKey(medicalProfileId)],\n});\n\n/**\n * On a bulk resource create operation\n */\nexport const onResourceBulkCreate = onResourceBulkUpdate;\n\n/**\n * On a resource -> care team member relationship is updated\n */\nexport const onResourceRelatedCareTeamMemberUpdates = getResetHandlers<{\n medicalProfileId: string;\n resourceCategory: string;\n}>({\n getResetCacheKeys: ({ medicalProfileId }) => [\n getAllProfileRelatedResourcesCacheKey(medicalProfileId),\n Builder.init().medicalProfile(medicalProfileId).careTeamMember().key,\n getResourceRelatedCareTeamMembersCacheKey(medicalProfileId, ''),\n ],\n});\n\n/**\n * On a medical profile collaborator is added, updated, or deleted\n */\nexport const onCollaboratorUpdate = getResetHandlers<{\n medicalProfileId: string;\n}>({\n getResetCacheKeys: ({ medicalProfileId }) => [\n getProfileCollaboratorsCacheKey(medicalProfileId),\n getProfileCollaboratorInvitesCacheKey(medicalProfileId),\n getProfileMetricRootCacheKey(medicalProfileId),\n ],\n});\n\nexport const onCollaboratorInviteUpdate = getResetHandlers<{\n medicalProfileId: string;\n}>({\n getResetCacheKeys: ({ medicalProfileId }) => [\n getProfileCollaboratorInvitesCacheKey(medicalProfileId),\n getProfileCollaboratorsCacheKey(medicalProfileId),\n getProfilePaymentStatusCacheKey(),\n getMedicalProfilesCacheKey(),\n getMyInvitesCacheKey(),\n getEvaluatedPermissionsCacheKey(medicalProfileId),\n ],\n resetDelay: 0,\n removeCache: true,\n});\n\n/**\n * Refresh the medical data ingest progress\n */\nexport const refreshProfileDataRefreshProgress = getResetHandlers<{\n medicalProfileId: string;\n}>({\n getResetCacheKeys: ({ medicalProfileId }) => [getProfileRefreshProgressCacheKey(medicalProfileId)],\n});\n\n/**\n * On and addition or deletion of medical profiles\n */\nexport const onMedicalProfileUpdate = getResetHandlers<{}>({\n getResetCacheKeys: () => [getMedicalProfilesCacheKey(), getProfilePaymentStatusCacheKey(), getUserCacheKey()],\n});\n\n/**\n * On a medical note update. Resets all notes for a profile and all notes for a user as well as profile files\n */\nexport const onNotesUpdate = getResetHandlers<{ medicalProfileId?: string; organizationClientRecordId?: string }>({\n getResetCacheKeys: ({ medicalProfileId, organizationClientRecordId }) =>\n [\n medicalProfileId ? getMedicalProfileNotesRootCacheKey(medicalProfileId).key : null,\n medicalProfileId ? getProfileResourcesRootCacheKey(medicalProfileId) : null,\n medicalProfileId ? getMedicalProfileFilesCacheKey(medicalProfileId) : null,\n medicalProfileId ? getUsageMetricTypeCacheKey(medicalProfileId, 'file-upload') : null,\n medicalProfileId ? getUsageMetricTypeCacheKey(medicalProfileId, 'audio-file-upload') : null,\n organizationClientRecordId ? getOrganizationClientRecordNotesCacheKey(organizationClientRecordId) : null,\n getOrganizationNotesCacheKey(),\n getAllUserNotesCacheKey(),\n ].filter(isPresent),\n resetDelay: 600,\n removeCache: true,\n});\n\n/**\n * When a note is added or deleted\n */\nexport const onNoteComment = getResetHandlers<{ medicalProfileId?: string }>({\n getResetCacheKeys: ({ medicalProfileId }) =>\n [\n medicalProfileId ? getMedicalProfileNotesRootCacheKey(medicalProfileId).key : null,\n medicalProfileId ? getProfileResourcesRootCacheKey(medicalProfileId) : null,\n getAllUserNotesCacheKey(),\n medicalProfileId ? getProfileInAppNotificationKey(medicalProfileId) : null,\n getAllProfileInAppNotificationsCountKey(),\n getOrganizationClientProfileNotificationCountCacheKey(),\n ].filter(isPresent),\n});\n\nexport const onOrgNoteCopiedToProfiles = getResetHandlers<{ profileIds: string[] }>({\n getResetCacheKeys: ({ profileIds }) =>\n profileIds.map((medicalProfileId) => getMedicalProfileNotesRootCacheKey(medicalProfileId).key),\n});\n\n/**\n * When a transfer request is accepted. Updates collaborators, profile list, payment status, transfer requests\n */\nexport const onTransferRequestResponse = getResetHandlers<{ medicalProfileId?: string }>({\n getResetCacheKeys: ({ medicalProfileId }) => [\n getProfileTransferRequestsCacheKey(medicalProfileId),\n getProfileCollaboratorsCacheKey(medicalProfileId!),\n getMedicalProfilesCacheKey(),\n getProfilePaymentStatusCacheKey(),\n ],\n});\n\n/**\n * When a transfer request is created or revoked. Updates the transfer requests\n */\nexport const onTransferRequestUpdated = getResetHandlers<{ medicalProfileId?: string }>({\n getResetCacheKeys: ({ medicalProfileId }) => [getProfileTransferRequestsCacheKey(medicalProfileId)],\n});\n\n/**\n * When profile id cards are added or deleted\n */\nexport const onIdCardUpdate = getResetHandlers<{ medicalProfileId: string }>({\n getResetCacheKeys: ({ medicalProfileId }) => [getMedicalProfileIdCardsCacheKey(medicalProfileId)],\n removeCache: true,\n});\n\n/**\n * Force reset product list\n */\nexport const onResetProducts = getResetHandlers<{}>({\n getResetCacheKeys: () => [getProductsCacheKey()],\n});\n\n/**\n * Reset payment status\n */\nexport const onResetPaymentStatus = getResetHandlers<{}>({\n getResetCacheKeys: () => [\n getProfilePaymentStatusCacheKey(),\n getPaymentStatusCacheKey(),\n getMyRegistrationCodeCacheKey(),\n Builder.init().medicalProfile().key, // Reset all medical profiles specifically for metric tracking\n ],\n});\n\n/**\n * on shared reports update\n */\nexport const onSharedReportUpdate = getResetHandlers<{ medicalProfileId: string }>({\n getResetCacheKeys: ({ medicalProfileId }) => [getSharedReportsCacheKey(medicalProfileId)],\n});\n\n/**\n * Reset payment status\n */\nexport const onProfileContactDetailsUpdate = getResetHandlers<{\n medicalProfileId: string;\n}>({\n getResetCacheKeys: ({ medicalProfileId }) => [getMedicalProfileDetailsCacheKey(medicalProfileId)],\n});\n\n/**\n * Reset connected health systems\n */\nexport const onResetConnectedHealthSystems = getResetHandlers<{ medicalProfileId: string }>({\n getResetCacheKeys: ({ medicalProfileId }) => [getProfileConnectedHealthSystemsCacheKey(medicalProfileId)],\n});\n\n/**\n * After initiating an automatic portal refresh, reset the connected health systems\n * There is a delay due to the relatively long async process of refreshing the portal\n */\nexport const onInitiatedAutomaticPortalRefresh = {\n portalMetadataResetHandler: getResetHandlers<{ medicalProfileId: string }>({\n getResetCacheKeys: ({ medicalProfileId }) => [getProfileConnectedHealthSystemsCacheKey(medicalProfileId)],\n resetDelay: 60 * 1000,\n }),\n usageHandler: getResetHandlers<{ medicalProfileId: string }>({\n getResetCacheKeys: ({ medicalProfileId }) => [getUsageMetricTypeCacheKey(medicalProfileId, 'portal-connect')],\n }),\n};\n\nexport const onTogglePortalAutomaticRefresh = getResetHandlers<{ medicalProfileId: string }>({\n getResetCacheKeys: ({ medicalProfileId }) => [getProfileConnectedHealthSystemsCacheKey(medicalProfileId)],\n});\n\nexport const onProcessReportInitiated = getResetHandlers<{ medicalProfileId: string }>({\n getResetCacheKeys: ({ medicalProfileId }) => [getProfileProcessingReportsKey(medicalProfileId)],\n});\n\nexport const onChatMessage = getResetHandlers<{ medicalProfileId: string; chatId: string }>({\n getResetCacheKeys: ({ medicalProfileId, chatId }) => [getMedicalProfileChatKey(medicalProfileId, chatId)],\n});\n\nexport const onChatCrud = getResetHandlers<{ medicalProfileId: string }>({\n getResetCacheKeys: ({ medicalProfileId }) => [\n getChatsListCacheKey(medicalProfileId),\n getUsageMetricTypeCacheKey(medicalProfileId, 'chat-message'),\n ],\n});\n\nexport const onRefreshChat = onChatMessage;\n\nexport const onAuditLogUpdate = getResetHandlers<{ medicalProfileId: string; auditLogId?: string }>({\n getResetCacheKeys: ({ medicalProfileId, auditLogId }) => [\n getAuditLogTypeQueryCacheKey(medicalProfileId),\n getAuditLogCacheKey(medicalProfileId, auditLogId),\n getProfileInAppNotificationKey(medicalProfileId),\n getAllProfileInAppNotificationsCountKey(),\n getOrganizationClientProfileNotificationCountCacheKey(),\n ],\n});\n\nexport const onAuditLogComment = getResetHandlers<{ medicalProfileId: string; auditLogId: string }>({\n getResetCacheKeys: ({ medicalProfileId, auditLogId }) => [\n getAuditLogTypeQueryCacheKey(medicalProfileId),\n getAuditLogCacheKey(medicalProfileId, auditLogId),\n getProfileInAppNotificationKey(medicalProfileId),\n getAllProfileInAppNotificationsCountKey(),\n getOrganizationClientProfileNotificationCountCacheKey(),\n getProfileInAppNotificationKey(medicalProfileId),\n ],\n});\n\nexport const onUpdateMedicalProfileFile = getResetHandlers<{ medicalProfileId: string }>({\n getResetCacheKeys: ({ medicalProfileId }) => [\n getMedicalProfileFilesCacheKey(medicalProfileId),\n getUsageMetricTypeCacheKey(medicalProfileId, 'file-upload'),\n ],\n});\n\nexport const onReprocessComplete = getResetHandlers<{ medicalProfileId: string; medicalProfileFileId: string }>({\n getResetCacheKeys: ({ medicalProfileId, medicalProfileFileId }) => [\n getMedicalProfileFileCacheKey(medicalProfileId, medicalProfileFileId),\n ],\n});\n\nexport const onDeletePortalConnection = getResetHandlers<{ medicalProfileId: string }>({\n getResetCacheKeys: ({ medicalProfileId }) => [getProfileConnectedHealthSystemsCacheKey(medicalProfileId)],\n});\n\nexport const onAuditLogMessage = getResetHandlers<{ medicalProfileIds: string[] }>({\n getResetCacheKeys: ({ medicalProfileIds }) => {\n const resetKeys = medicalProfileIds\n .map((id) => [getAuditLogTypeQueryCacheKey(id), getProfileInAppNotificationKey(id)])\n .flat();\n\n return resetKeys;\n },\n});\n\nexport const onUpdateOrganization = getResetHandlers<{}>({\n getResetCacheKeys: () => [getOrganizationKey()],\n});\n\nexport const onUpdateOrganizationPaymentIntegrationBranding = getResetHandlers<{ organizationId: string }>({\n getResetCacheKeys: ({ organizationId }) => [\n getBaseOrganizationPaymentIntegrationBrandingCacheKey(),\n [\n urls.api.organizations.paymentIntegration.brandingImage(organizationId, 'icon'),\n urls.api.organizations.paymentIntegration.brandingImage(organizationId, 'logo'),\n ],\n ],\n});\n\n/**\n * Anytime a group is created, updated, or deleted\n */\nexport const onUpdateOrganizationGroups = getResetHandlers<{}>({\n getResetCacheKeys: () => [getOrganizationGroupsCacheKey(), getOrganizationMedicalProfilesCacheKey()],\n resetDelay: 0,\n});\n\nexport const onUpdateOrganizationInvitationDefinitions = getResetHandlers<{}>({\n getResetCacheKeys: () => [getOrganizationInvitationDefinitionsCacheKey()],\n resetDelay: 0,\n});\n\nexport const onUpdateOrganizationUserInvitations = getResetHandlers<{}>({\n getResetCacheKeys: () => [getOrganizationUserInvitationsCacheKey()],\n resetDelay: 0,\n});\n\nexport const onUpdateMyOrganizationInvitation = getResetHandlers<{}>({\n getResetCacheKeys: () => [getMyOrganizationInvitationsCacheKey()],\n resetDelay: 0,\n});\n\nexport const onUpdateOrganizationUsers = getResetHandlers<{}>({\n getResetCacheKeys: () => [getOrganizationUsersCacheKey()],\n resetDelay: 0,\n});\n\nexport const onUpdateOrganizationUser = getResetHandlers<{ organizationUserId: string }>({\n getResetCacheKeys: ({ organizationUserId }) => [getOrganizationUserCacheKey(organizationUserId)],\n resetDelay: 0,\n});\n\nexport const onUpdateOrganizationClientInvitations = getResetHandlers<{}>({\n getResetCacheKeys: () => [getOrganizationClientInvitationsCacheKey(), getOrganizationClientRecordsCacheKey()],\n resetDelay: 0,\n});\n\nexport const onRespondToOrganizationClientInvitation = getResetHandlers<{}>({\n getResetCacheKeys: () => [getMyOrganizationClientInvitationsCacheKey(), getProfilesRootCacheKey().key],\n removeCache: true,\n resetDelay: 0,\n});\n\nexport const onUpdateOrganizationMedicalProfiles = getResetHandlers<{}>({\n getResetCacheKeys: () => [getOrganizationMedicalProfilesCacheKey(), getOrganizationClientRecordsCacheKey()],\n resetDelay: 0,\n});\n\nexport const onDeleteOrganizationMedicalProfile = getResetHandlers<{}>({\n getResetCacheKeys: () => [getOrganizationMedicalProfilesCacheKey(), getOrganizationClientRecordsCacheKey()],\n removeCache: true,\n resetDelay: 0,\n});\n\nexport const onUpdateOrganizationClientRecordGroups = getResetHandlers<{ clientRecordId: string }>({\n getResetCacheKeys: ({ clientRecordId }) => [\n getClientRecordGroupsCacheKey(clientRecordId),\n getOrganizationClientRecordsCacheKey(),\n ],\n resetDelay: 0,\n});\n\nexport const onUBulkUpdateOrganizationClientRecordGroups = getResetHandlers<{ clientRecordIds: string[] }>({\n getResetCacheKeys: ({ clientRecordIds }) => [\n ...clientRecordIds.map((_) => getClientRecordGroupsCacheKey(_)),\n getOrganizationClientRecordsCacheKey(),\n ],\n resetDelay: 0,\n});\n\nexport const onUpdateOrganizationClientRecords = getResetHandlers<{}>({\n getResetCacheKeys: () => [getOrganizationClientRecordsCacheKey()],\n resetDelay: 0,\n});\n\nexport const onClientInvitationsUpdate = getResetHandlers<{}>({\n getResetCacheKeys: () => [getOrganizationClientInvitationsCacheKey(), getOrganizationClientRecordsCacheKey()],\n resetDelay: 0,\n});\n\nexport const onInviteClientRecord = getResetHandlers<{}>({\n getResetCacheKeys: () => [getOrganizationClientInvitationsCacheKey(), getOrganizationClientRecordsCacheKey()],\n resetDelay: 0,\n});\n\nexport const onUpdateOrganizationCareTeamMembers = getResetHandlers<{}>({\n getResetCacheKeys: () => [getOrganizationCareTeamMembersCacheKey()],\n resetDelay: 0,\n});\n\nexport const onCreateOrganization = onUpdateOrganization;\n\nexport const onPersistFilesToClientProfiles = getResetHandlers<{ clientProfileIds: string[] }>({\n getResetCacheKeys: ({ clientProfileIds }) => [\n ...clientProfileIds.map((id) => getOrganizationMedicalProfilesCacheKey(id)),\n ...clientProfileIds.map((id) => getMedicalProfileFilesCacheKey(id)),\n ...clientProfileIds.map((id) => getOrganizationMedicalProfileFolderIdCacheKey(id)),\n ],\n removeCache: true,\n});\n\nexport const onPersistVisitsToClientProfiles = getResetHandlers<{ clientProfileIds: string[] }>({\n getResetCacheKeys: ({ clientProfileIds }) => [\n ...clientProfileIds.map((id) => getOrganizationMedicalProfilesCacheKey(id)),\n ...clientProfileIds.map((id) => getProfileResourcesRootCacheKey(id)),\n ],\n removeCache: true,\n});\n\nexport const onPreferencesUpdate = getResetHandlers<{}>({\n getResetCacheKeys: () => [getUserPreferencesCacheKey()],\n resetDelay: 0,\n removeCache: true,\n});\n\nexport const onChatMessageSent = getResetHandlers<{ medicalProfileId: string }>({\n getResetCacheKeys: ({ medicalProfileId }) => [getUsageMetricTypeCacheKey(medicalProfileId, 'chat-message')],\n});\n\nexport const onClientRecordBillingDetailsUpdate = getResetHandlers<{ organizationClientRecordId: string }>({\n getResetCacheKeys: ({ organizationClientRecordId }) => [\n getOrganizationClientRecordBillingDetailsCacheKey(organizationClientRecordId),\n ],\n});\n\nexport const onClientRecordInvoiceItemsUpdate = getResetHandlers<{ organizationClientRecordId: string }>({\n getResetCacheKeys: ({ organizationClientRecordId }) => [\n getOrganizationClientRecordInvoiceItemsCacheKey(organizationClientRecordId),\n getOrganizationClientRecordInvoicesCacheKey(organizationClientRecordId),\n ],\n});\n\nexport const onClientRecordInvoicesUpdate = getResetHandlers<{ organizationClientRecordId: string }>({\n getResetCacheKeys: ({ organizationClientRecordId }) => [\n getOrganizationClientRecordInvoiceItemsCacheKey(organizationClientRecordId),\n getOrganizationClientRecordInvoicesCacheKey(organizationClientRecordId),\n ],\n});\n\nexport const onPaymentStatusOrProfileCountUpdate = getResetHandlers<{}>({\n getResetCacheKeys: () => [getCanAddMedicalProfileCacheKey()],\n});\n\nexport const onSetupTestConnectedAccount = getResetHandlers<{}>({\n getResetCacheKeys: () => [getOrganizationKey()],\n});\n\nexport const onProfileDirectiveUpdate = getResetHandlers<{\n medicalProfileId: string;\n directiveType: 'code-status' | 'poa';\n}>({\n getResetCacheKeys: ({ medicalProfileId, directiveType }) => [\n getMedicalProfileDirectiveCacheKey(medicalProfileId, directiveType),\n ],\n});\n\nexport const onToggleInAppNotificationReadStatus = getResetHandlers<{ medicalProfileId: string }>({\n getResetCacheKeys: ({ medicalProfileId }) => [\n getProfileInAppNotificationKey(medicalProfileId),\n getAllProfileInAppNotificationsCountKey(),\n getOrganizationClientProfileNotificationCountCacheKey(),\n ],\n removeCache: true,\n});\n\nexport const onUpdateOrgPaidStatus = getResetHandlers<{}>({\n getResetCacheKeys: () => [getAdminListedOrgsKey()],\n});\n\nexport const onUpdateProfileVisitInviteEmails = getResetHandlers<{\n medicalProfileId: string;\n}>({\n getResetCacheKeys: ({ medicalProfileId }) => [getProfileVisitInviteEmailsCacheKey(medicalProfileId)],\n resetDelay: 0,\n});\n","import { QueryClient } from '@tanstack/react-query';\n\n// global query client that can be used outside of a hook but stays in sync with the rest of the app\nlet queryClient: QueryClient | null = null;\n\nexport const getQueryClient = (reset?: boolean) => {\n if (!queryClient || reset) {\n queryClient = new QueryClient({});\n }\n\n return queryClient;\n};\n","import { useQuery } from '@tanstack/react-query';\nimport React from 'react';\nimport useNotify from './useNotify';\n\nexport type useQueryCallbacksArgs = {\n query: ReturnType>;\n onSuccess?: (data: TReturnType) => void;\n onError?: () => void;\n};\n\nexport default function useQueryCallbacks({\n query,\n onSuccess,\n onError,\n}: useQueryCallbacksArgs): void {\n React.useEffect(() => {\n if (query.error) {\n onError?.();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [query.error]);\n\n React.useEffect(() => {\n if (query.isSuccess && !query.isFetching) {\n onSuccess?.(query.data);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [query.isSuccess, query.isFetching]);\n}\n\nexport type UseQueryNotifyArgs = {\n query: ReturnType>;\n successMessage?: string;\n errorMessage?: string;\n};\n\nexport function useQueryNotify({\n query,\n successMessage,\n errorMessage,\n}: UseQueryNotifyArgs): void {\n const notify = useNotify();\n\n useQueryCallbacks({\n query,\n onSuccess: () => {\n successMessage && notify('success', successMessage);\n },\n onError: () => {\n errorMessage && notify('error', errorMessage);\n },\n });\n}\n\nexport function useQueryErrorNotify(\n query: ReturnType>,\n errorMessage: string,\n): void {\n useQueryNotify({\n query,\n errorMessage,\n });\n}\n\nexport function useQuerySuccessNotify(\n query: ReturnType>,\n successMessage: string,\n): void {\n useQueryNotify({\n query,\n successMessage,\n });\n}\n","import { useMutation, useQuery } from '@tanstack/react-query';\nimport { APITypes } from '../../primary-record-types';\nimport urls from '../../utils/urls';\nimport useNotify from '../useNotify';\nimport { getIntl } from '../../utils/intl';\nimport { appAPI } from '../../utils/api';\nimport { onMedicalProfileUpdate, getMedicalProfilesCacheKey, onPaymentStatusOrProfileCountUpdate } from './cacheKeys';\nimport { useQueryErrorNotify } from '../useQueryCallbacks';\n\nconst intl = getIntl('useMedicalProfiles', {\n medicalProfilesLoadFailure: 'Failed to load Medical Profiles',\n createSuccess: 'Medical profile created successfully',\n createFailure: 'Failed to create Medical Profile',\n deleteSuccess: 'Medical profile deleted successfully',\n deleteFailure: 'Failed to delete Medical Profile',\n removeSelfAsCollaboratorSuccess: 'You have been removed as a collaborator',\n removeSelfAsCollaboratorFailure: 'Failed to remove you as a collaborator',\n});\n\nexport type UseMedicalProfileArgs = {\n onCreateMedicalProfileSuccess?: (result: APITypes.medicalProfileService.CreateMedicalProfileResponse) => void;\n noCreateSuccessNotification?: boolean;\n onDeleteMedicalProfileSuccess?: () => void;\n onRemoveSelfAsCollaboratorSuccess?: () => void;\n};\n\nexport type CreateEmergencyContactArgs = {\n emergencyContactDetails: APITypes.medicalProfileService.CreateEmergencyContactDetailsBody;\n medicalProfileId: string;\n};\n\nexport type UseMedicalProfilesReturnValue = {\n createMedicalProfile: (body: APITypes.medicalProfileService.CreateMedicalProfileRequest) => void;\n deleteMedicalProfile: (medicalProfileId: string) => void;\n removeSelfAsCollaborator: (medicalProfileId: string) => void;\n medicalProfiles: APITypes.medicalProfileService.ProfileListItem[];\n collaboratorMedicalProfiles: APITypes.medicalProfileService.ProfileListItem[];\n isLoadingProfiles: boolean;\n isCreatingProfile: boolean;\n isDeletingProfile: boolean;\n isRemovingSelfAsCollaborator: boolean;\n};\n\n// Deletes can take a while, so just keep track of all deleted ids in memory. This will prevent cache refreshes from still picking it up\nconst deletedMedicalProfileIds: string[] = [];\n\nexport default function useMedicalProfiles({\n onCreateMedicalProfileSuccess,\n noCreateSuccessNotification,\n onDeleteMedicalProfileSuccess,\n onRemoveSelfAsCollaboratorSuccess,\n}: UseMedicalProfileArgs = {}): UseMedicalProfilesReturnValue {\n const notify = useNotify();\n const medicalProfilesQuery = useQuery({\n queryKey: getMedicalProfilesCacheKey(),\n queryFn: async () => {\n const withPossibleDeletions = await appAPI.get(\n urls.api.medicalProfiles.medicalProfiles,\n );\n return {\n ...withPossibleDeletions,\n collaboratorProfiles: withPossibleDeletions.collaboratorProfiles.filter(\n (_) => !deletedMedicalProfileIds.includes(_.medicalProfileId),\n ),\n profiles: withPossibleDeletions.profiles.filter(\n (_) => !deletedMedicalProfileIds.includes(_.medicalProfileId),\n ),\n };\n },\n });\n useQueryErrorNotify(medicalProfilesQuery, intl('medicalProfilesLoadFailure'));\n\n const createMedicalProfile = useMutation({\n mutationFn: async (profile: APITypes.medicalProfileService.CreateMedicalProfileRequest) => {\n const res = (await appAPI.post(urls.api.medicalProfiles.medicalProfiles, {\n body: profile,\n })) as APITypes.medicalProfileService.CreateMedicalProfileResponse;\n return res;\n },\n onSuccess: (data) => {\n !noCreateSuccessNotification && notify('success', intl('createSuccess'));\n onCreateMedicalProfileSuccess?.(data);\n onPaymentStatusOrProfileCountUpdate.resetCache({})();\n onMedicalProfileUpdate.resetCache({})();\n },\n onError: () => {\n notify('error', intl('createFailure'));\n },\n });\n\n const deleteMedicalProfile = useMutation({\n mutationFn: async (medicalProfileId: string) => {\n await appAPI.del(urls.api.medicalProfiles.medicalProfile(medicalProfileId));\n },\n onSuccess: (_data, medicalProfileId) => {\n notify('success', intl('deleteSuccess'));\n onDeleteMedicalProfileSuccess?.();\n onMedicalProfileUpdate.resetCache({})();\n onPaymentStatusOrProfileCountUpdate.resetCache({})();\n deletedMedicalProfileIds.push(medicalProfileId);\n },\n onError: () => {\n notify('error', intl('deleteFailure'));\n },\n });\n\n const removeSelfAsCollaborator = useMutation({\n mutationFn: async (medicalProfileId: string) => {\n await appAPI.del(urls.api.collaborators.me(medicalProfileId));\n },\n onSuccess: () => {\n notify('success', intl('removeSelfAsCollaboratorSuccess'));\n onRemoveSelfAsCollaboratorSuccess?.();\n onMedicalProfileUpdate.resetCache({})();\n },\n onError: () => {\n notify('error', intl('removeSelfAsCollaboratorFailure'));\n },\n });\n return {\n medicalProfiles: medicalProfilesQuery.data?.profiles || [],\n collaboratorMedicalProfiles: medicalProfilesQuery.data?.collaboratorProfiles || [],\n isLoadingProfiles: medicalProfilesQuery.isLoading,\n createMedicalProfile: createMedicalProfile.mutateAsync,\n isCreatingProfile: createMedicalProfile.isPending,\n deleteMedicalProfile: deleteMedicalProfile.mutateAsync,\n isDeletingProfile: deleteMedicalProfile.isPending,\n removeSelfAsCollaborator: removeSelfAsCollaborator.mutateAsync,\n isRemovingSelfAsCollaborator: removeSelfAsCollaborator.isPending,\n };\n}\n","import useUser, { isUserPendingRegistration, useLoadedUser } from './api/useUser';\n\nexport type AppType = 'consumer' | 'professional';\n\n/**\n * Handles the scenario where the user is not yet loaded. Will fallback to consumer app type.\n */\nexport const useMaybeLoadingAppType = (): AppType => {\n const { user } = useUser({});\n const userType = user === 'loading' ? 'consumer' : user.type;\n return userType === 'professional' ? 'professional' : 'consumer';\n};\n\n/**\n * Handles the scenario where the user is not yet loaded or user type not explicitly specified.\n * Will fallback to undefined if the user is loading or pending registration.\n */\nexport const useExplicitAppType = (): AppType | undefined => {\n const { user } = useUser({});\n if (user === 'loading') {\n return undefined;\n } else if (user.type) {\n return user.type === 'professional' ? 'professional' : 'consumer';\n } else if (isUserPendingRegistration(user)) {\n // pending registration\n return undefined;\n } else {\n return user.type === 'professional' ? 'professional' : 'consumer';\n }\n};\n\nexport const useAppType = (): AppType => {\n const { user } = useLoadedUser({});\n return user.type === 'professional' ? 'professional' : 'consumer';\n};\n\nexport const useIsProApp = () => {\n return useAppType() === 'professional';\n};\n\nexport const useIsConsumerApp = () => {\n return useAppType() === 'consumer';\n};\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { APITypes, Dynamo } from '../../primary-record-types';\nimport urls from '../../utils/urls';\nimport useNotify from '../useNotify';\nimport { getIntl } from '../../utils/intl';\nimport { useClearInMemoryAvatarCache } from '../useAvatar';\nimport { appAPI } from '../../utils/api';\nimport { getUserCacheKey } from './cacheKeys';\nimport useQueryCallbacks, { useQueryErrorNotify } from '../useQueryCallbacks';\nimport { maybeStartBugsnagUserSession } from '../../utils/bugsnag';\nimport { useIsE2E } from '../useIsE2E';\nimport { useEnvironment } from '../useEnvironment';\n\nconst intl = getIntl('useUser', {\n updateSuccess: 'User updated successfully',\n updateFailure: 'User update failed',\n userLoadFailure: 'Failed to load user',\n promoCodeUpdateFailure: 'Failed to update promo code',\n deleteSuccess: 'User deleted successfully',\n deleteFailure: 'User deletion failed',\n});\n\nexport type UseUserArgs = {\n onUpdateSuccess?: () => void;\n onDeleteSuccess?: () => void;\n noUpdateMessage?: boolean;\n};\n\nexport type AvatarFileData = {\n name: string;\n base64: string;\n};\n\nexport type User = APITypes.userService.User;\n\nexport type UseUserReturnValue = {\n user: APITypes.userService.MeResponse | 'loading';\n isUpdatingUser: boolean;\n updateUser: (user: APITypes.userService.UpdateUserBody) => void;\n deleteUser: () => void;\n isDeletingUser: boolean;\n};\n\nexport const isUserPendingRegistration = (user: APITypes.userService.MeResponse): boolean => {\n return user.promptRegistration;\n};\n\nexport default function useUser({\n onUpdateSuccess,\n noUpdateMessage,\n onDeleteSuccess,\n}: UseUserArgs = {}): UseUserReturnValue {\n const isE2E = useIsE2E();\n const clearInMemoryAvatarCache = useClearInMemoryAvatarCache();\n const queryClient = useQueryClient();\n const notify = useNotify();\n const environment = useEnvironment();\n const userQuery = useQuery({\n queryKey: getUserCacheKey(),\n queryFn: async () => {\n return await appAPI.get(urls.api.users.me);\n },\n staleTime: 10 * 60 * 1000,\n });\n useQueryCallbacks({\n query: userQuery,\n onSuccess: (data: APITypes.userService.MeResponse) => {\n maybeStartBugsnagUserSession({\n user: data,\n isE2E,\n environment: environment === 'loading' ? 'prod' : environment,\n });\n },\n });\n useQueryErrorNotify(userQuery, intl('userLoadFailure'));\n\n const updateUserMutation = useMutation({\n mutationFn: async (user: APITypes.userService.UpdateUserBody) => {\n return await appAPI.put(urls.api.users.me, {\n body: user,\n });\n },\n onSuccess: (data) => {\n queryClient.setQueryData(getUserCacheKey(), data as any);\n\n !noUpdateMessage && notify('success', intl('updateSuccess'));\n onUpdateSuccess?.();\n clearInMemoryAvatarCache(urls.api.users.avatar);\n },\n onError: () => {\n notify('error', intl('updateFailure'));\n },\n });\n\n const deleteUserMutation = useMutation({\n mutationFn: async () => {\n await appAPI.del(urls.api.users.me);\n },\n onSuccess: () => {\n notify('success', intl('deleteSuccess'));\n onDeleteSuccess?.();\n },\n onError: () => {\n notify('error', intl('deleteFailure'));\n },\n });\n\n return {\n user: userQuery.isLoading ? 'loading' : userQuery.data,\n updateUser: updateUserMutation.mutate,\n isUpdatingUser: updateUserMutation.isPending,\n deleteUser: deleteUserMutation.mutate,\n isDeletingUser: deleteUserMutation.isPending,\n };\n}\n\nexport type UseLoadedUserReturnValue = Omit & {\n user: APITypes.userService.MeResponse;\n};\n\n/**\n * Same as useUser, but throws an error if the user is still loading. If within the app, it's guaranteed that a user\n * will be loaded. This avoids unnecessary and annoying load checks.\n */\nexport const useLoadedUser = (args: UseUserArgs): UseLoadedUserReturnValue => {\n const { user, ...rest } = useUser(args);\n\n if (user === 'loading') throw new Error('User is loading');\n\n return {\n user,\n ...rest,\n };\n};\n\nexport const useUserType = (): Dynamo.UserType => {\n const user = useLoadedUser({});\n\n return user.user.type || 'consumer';\n};\n","import Bugsnag from '@bugsnag/expo';\nimport BugsnagPluginReact from '@bugsnag/plugin-react';\nimport { APITypes } from '../primary-record-types';\nimport { Environment } from '../hooks/useEnvironment';\nimport { initialNavigationUrl } from './initialNavigationUrl';\nimport Constants from 'expo-constants';\n\nconst isRunningInExpoGo = Constants.appOwnership === 'expo';\n\nconst userSessionStartedHash: Record = {};\n\nexport type MaybeStartBugsnagUserSessionArgs = {\n user: APITypes.userService.MeResponse;\n isE2E: boolean;\n environment: Environment;\n};\n\nexport const maybeStartBugsnagUserSession = ({ user, isE2E, environment }: MaybeStartBugsnagUserSessionArgs) => {\n try {\n if (isE2E) {\n return;\n }\n\n if (window?.location?.hostname === 'localhost') {\n return;\n }\n\n // expo go or expo development mode\n if (isRunningInExpoGo || __DEV__) {\n return;\n }\n\n if (userSessionStartedHash[user.userId]) {\n return;\n }\n\n Bugsnag.start({\n // nosemgrep\n apiKey: 'ca0d74383a5800ebebe2d42a03f7ce6c',\n plugins: [new BugsnagPluginReact()],\n user: {\n id: user.userId,\n email: user.email,\n name: user.firstName + ' ' + user.lastName,\n },\n releaseStage: environment,\n onError: (event) => {\n event.addMetadata('App Context', {\n initialUrl: initialNavigationUrl,\n });\n },\n });\n\n userSessionStartedHash[user.userId] = true;\n } catch (error) {\n console.error('Failed to start Bugsnag user session', error);\n }\n};\n\nexport const notifyBugsnag = (error: Error) => {\n try {\n if (isRunningInExpoGo || __DEV__) return;\n\n Bugsnag.notify(error);\n } catch (error) {\n console.error('Failed to notify Bugsnag', error);\n }\n};\n","const name = 'Bugsnag Expo'\nconst { version } = require('../package.json')\nconst url = 'https://github.com/bugsnag/bugsnag-expo'\n\nconst React = require('react')\nconst Constants = require('expo-constants').default\n\nconst Client = require('@bugsnag/core/client')\nconst Event = require('@bugsnag/core/event')\nconst Session = require('@bugsnag/core/session')\nconst Breadcrumb = require('@bugsnag/core/breadcrumb')\n\nEvent.__type = 'expojs'\n\nconst delivery = require('@bugsnag/delivery-expo')\n\nconst schema = { ...require('@bugsnag/core/config').schema, ...require('./config') }\nconst BugsnagPluginReact = require('@bugsnag/plugin-react')\n\n// The NetInfo module makes requests to this URL to detect if the device is connected\n// to the internet. We don't want these requests to be recorded as breadcrumbs.\n// see https://github.com/react-native-community/react-native-netinfo/blob/d39b18c61e220d518d8403b6f4f4ab5bcc8c973c/src/index.ts#L16\nconst NET_INFO_REACHABILITY_URL = 'https://clients3.google.com/generate_204'\n\nconst internalPlugins = [\n require('@bugsnag/plugin-react-native-global-error-handler')(),\n require('@bugsnag/plugin-react-native-unhandled-rejection'),\n require('@bugsnag/plugin-expo-device'),\n require('@bugsnag/plugin-expo-app'),\n require('@bugsnag/plugin-console-breadcrumbs'),\n require('@bugsnag/plugin-network-breadcrumbs')([NET_INFO_REACHABILITY_URL, Constants.expoConfig?.logUrl || Constants.expoGoConfig?.logUrl]),\n require('@bugsnag/plugin-expo-app-state-breadcrumbs'),\n require('@bugsnag/plugin-expo-connectivity-breadcrumbs'),\n require('@bugsnag/plugin-react-native-orientation-breadcrumbs'),\n require('@bugsnag/plugin-browser-session'),\n new BugsnagPluginReact(React)\n]\n\nconst Bugsnag = {\n _client: null,\n createClient: (opts) => {\n // handle very simple use case where user supplies just the api key as a string\n if (typeof opts === 'string') opts = { apiKey: opts }\n if (!opts) opts = {}\n\n // read the api key from app.json if one is not explicitly passed\n if (!opts.apiKey) {\n opts.apiKey = Constants.expoConfig?.extra?.bugsnag?.apiKey\n }\n\n // read the version from app.json if one is not explicitly passed\n if (!opts.appVersion) {\n opts.appVersion = Constants.expoConfig?.version\n }\n\n const bugsnag = new Client(opts, schema, internalPlugins, { name, version, url })\n\n bugsnag._setDelivery(delivery)\n\n bugsnag._logger.debug('Loaded!')\n\n return bugsnag._config.autoTrackSessions\n ? bugsnag.startSession()\n : bugsnag\n },\n start: (opts) => {\n if (Bugsnag._client) {\n Bugsnag._client._logger.warn('Bugsnag.start() was called more than once. Ignoring.')\n return Bugsnag._client\n }\n Bugsnag._client = Bugsnag.createClient(opts)\n return Bugsnag._client\n },\n isStarted: () => {\n return Bugsnag._client != null\n }\n}\n\n// Object.keys(Client.prototype) does not work on native classes\n// because the methods are non enumerable\nObject.getOwnPropertyNames(Client.prototype).map((m) => {\n if (/^_/.test(m)) return\n Bugsnag[m] = function () {\n if (!Bugsnag._client) return console.warn(`Bugsnag.${m}() was called before Bugsnag.start()`)\n Bugsnag._client._depth += 1\n const ret = Bugsnag._client[m].apply(Bugsnag._client, arguments)\n Bugsnag._client._depth -= 1\n return ret\n }\n})\n\nmodule.exports = Bugsnag\n\nmodule.exports.Client = Client\nmodule.exports.Event = Event\nmodule.exports.Session = Session\nmodule.exports.Breadcrumb = Breadcrumb\n\n// Export a \"default\" property for compatibility with ESM imports\nmodule.exports.default = Bugsnag\n","{\n \"name\": \"@bugsnag/expo\",\n \"version\": \"52.0.0\",\n \"main\": \"src/notifier.js\",\n \"types\": \"types/bugsnag.d.ts\",\n \"description\": \"Bugsnag error reporter for Expo applications\",\n \"keywords\": [\n \"bugsnag\",\n \"expo\",\n \"react native\",\n \"exception\",\n \"error\",\n \"javascript\",\n \"monitoring\",\n \"reporting\",\n \"stability\",\n \"mobile\"\n ],\n \"homepage\": \"https://www.bugsnag.com/\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git@github.com:bugsnag/bugsnag-expo.git\"\n },\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"files\": [\n \"src\",\n \"hooks\",\n \"types\"\n ],\n \"author\": \"Bugsnag\",\n \"license\": \"MIT\",\n \"dependencies\": {\n \"@bugsnag/core\": \"^7.22.7\",\n \"@bugsnag/delivery-expo\": \"^52.0.0\",\n \"@bugsnag/plugin-browser-session\": \"^7.22.7\",\n \"@bugsnag/plugin-console-breadcrumbs\": \"^7.22.7\",\n \"@bugsnag/plugin-expo-app\": \"^52.0.0\",\n \"@bugsnag/plugin-expo-app-state-breadcrumbs\": \"^52.0.0\",\n \"@bugsnag/plugin-expo-connectivity-breadcrumbs\": \"^52.0.0\",\n \"@bugsnag/plugin-expo-device\": \"^52.0.0\",\n \"@bugsnag/plugin-network-breadcrumbs\": \"^7.22.7\",\n \"@bugsnag/plugin-react\": \"^7.22.7\",\n \"@bugsnag/plugin-react-native-global-error-handler\": \"^7.22.7\",\n \"@bugsnag/plugin-react-native-orientation-breadcrumbs\": \"^7.22.7\",\n \"@bugsnag/plugin-react-native-unhandled-rejection\": \"^7.22.7\",\n \"@bugsnag/source-maps\": \"^2.3.3\",\n \"bugsnag-build-reporter\": \"^2.0.0\"\n },\n \"devDependencies\": {\n \"expo-constants\": \"~17.0.3\"\n },\n \"peerDependencies\": {\n \"expo\": \"^52.0.0\",\n \"expo-constants\": \"~17.0.3\",\n \"promise\": \"^8.3.0\",\n \"react\": \"*\"\n },\n \"gitHead\": \"ec3eca1bfa9b84e5b804c5505df1f3008fbe6857\"\n}\n","import { CodedError, requireOptionalNativeModule } from 'expo-modules-core';\nimport { Platform, NativeModules } from 'react-native';\nimport { AppOwnership, ExecutionEnvironment, UserInterfaceIdiom, } from './Constants.types';\nimport ExponentConstants from './ExponentConstants';\nexport { AppOwnership, ExecutionEnvironment, UserInterfaceIdiom, };\nif (!ExponentConstants) {\n console.warn(\"No native ExponentConstants module found, are you sure the expo-constants's module is linked properly?\");\n}\nconst ExpoUpdates = requireOptionalNativeModule('ExpoUpdates');\nlet rawUpdatesManifest = null;\n// If expo-updates defines a non-empty manifest, prefer that one\nif (ExpoUpdates) {\n let updatesManifest;\n if (ExpoUpdates.manifest) {\n updatesManifest = ExpoUpdates.manifest;\n }\n else if (ExpoUpdates.manifestString) {\n updatesManifest = JSON.parse(ExpoUpdates.manifestString);\n }\n if (updatesManifest && Object.keys(updatesManifest).length > 0) {\n rawUpdatesManifest = updatesManifest;\n }\n}\n// If dev-launcher defines a non-empty manifest, prefer that one\nlet rawDevLauncherManifest = null;\nif (NativeModules.EXDevLauncher) {\n let devLauncherManifest;\n if (NativeModules.EXDevLauncher.manifestString) {\n devLauncherManifest = JSON.parse(NativeModules.EXDevLauncher.manifestString);\n }\n if (devLauncherManifest && Object.keys(devLauncherManifest).length > 0) {\n rawDevLauncherManifest = devLauncherManifest;\n }\n}\n// Fall back to ExponentConstants.manifest if we don't have one from Updates\nlet rawAppConfig = null;\nif (ExponentConstants && ExponentConstants.manifest) {\n const appConfig = ExponentConstants.manifest;\n // On Android we pass the manifest in JSON form so this step is necessary\n if (typeof appConfig === 'string') {\n rawAppConfig = JSON.parse(appConfig);\n }\n else {\n rawAppConfig = appConfig;\n }\n}\nlet rawManifest = rawUpdatesManifest ?? rawDevLauncherManifest ?? rawAppConfig;\nconst { name, appOwnership, ...nativeConstants } = (ExponentConstants || {});\nconst constants = {\n ...nativeConstants,\n // Ensure this is null in bare workflow\n appOwnership: appOwnership ?? null,\n};\nObject.defineProperties(constants, {\n /**\n * Use `manifest` property by default.\n * This property is only used for internal purposes.\n * It behaves similarly to the original one, but suppresses warning upon no manifest available.\n * `expo-asset` uses it to prevent users from seeing mentioned warning.\n */\n __unsafeNoWarnManifest: {\n get() {\n const maybeManifest = getManifest(true);\n if (!maybeManifest || !isEmbeddedManifest(maybeManifest)) {\n return null;\n }\n return maybeManifest;\n },\n enumerable: false,\n },\n __unsafeNoWarnManifest2: {\n get() {\n const maybeManifest = getManifest(true);\n if (!maybeManifest || !isExpoUpdatesManifest(maybeManifest)) {\n return null;\n }\n return maybeManifest;\n },\n enumerable: false,\n },\n manifest: {\n get() {\n const maybeManifest = getManifest();\n if (!maybeManifest || !isEmbeddedManifest(maybeManifest)) {\n return null;\n }\n return maybeManifest;\n },\n enumerable: true,\n },\n manifest2: {\n get() {\n const maybeManifest = getManifest();\n if (!maybeManifest || !isExpoUpdatesManifest(maybeManifest)) {\n return null;\n }\n return maybeManifest;\n },\n enumerable: true,\n },\n expoConfig: {\n get() {\n const maybeManifest = getManifest(true);\n if (!maybeManifest) {\n return null;\n }\n // if running an embedded update, maybeManifest is a EmbeddedManifest which doesn't have\n // the expo config. Instead, the embedded expo-constants app.config should be used.\n if (ExpoUpdates && ExpoUpdates.isEmbeddedLaunch) {\n return rawAppConfig;\n }\n if (isExpoUpdatesManifest(maybeManifest)) {\n return maybeManifest.extra?.expoClient ?? null;\n }\n else if (isEmbeddedManifest(maybeManifest)) {\n return maybeManifest;\n }\n return null;\n },\n enumerable: true,\n },\n expoGoConfig: {\n get() {\n const maybeManifest = getManifest(true);\n if (!maybeManifest) {\n return null;\n }\n if (isExpoUpdatesManifest(maybeManifest)) {\n return maybeManifest.extra?.expoGo ?? null;\n }\n else if (isEmbeddedManifest(maybeManifest)) {\n return maybeManifest;\n }\n return null;\n },\n enumerable: true,\n },\n easConfig: {\n get() {\n const maybeManifest = getManifest(true);\n if (!maybeManifest) {\n return null;\n }\n if (isExpoUpdatesManifest(maybeManifest)) {\n return maybeManifest.extra?.eas ?? null;\n }\n else if (isEmbeddedManifest(maybeManifest)) {\n return maybeManifest;\n }\n return null;\n },\n enumerable: true,\n },\n __rawManifest_TEST: {\n get() {\n return rawManifest;\n },\n set(value) {\n rawManifest = value;\n },\n enumerable: false,\n },\n});\nfunction isEmbeddedManifest(manifest) {\n return !isExpoUpdatesManifest(manifest);\n}\nfunction isExpoUpdatesManifest(manifest) {\n return 'metadata' in manifest;\n}\nfunction getManifest(suppressWarning = false) {\n if (!rawManifest) {\n const invalidManifestType = rawManifest === null ? 'null' : 'undefined';\n if (nativeConstants.executionEnvironment === ExecutionEnvironment.Bare &&\n Platform.OS !== 'web') {\n if (!suppressWarning) {\n console.warn(`Constants.manifest is ${invalidManifestType} because the embedded app.config could not be read. Ensure that you have installed the expo-constants build scripts if you need to read from Constants.manifest.`);\n }\n }\n else if (nativeConstants.executionEnvironment === ExecutionEnvironment.StoreClient ||\n nativeConstants.executionEnvironment === ExecutionEnvironment.Standalone) {\n // If we somehow get here, this is a truly exceptional state to be in.\n // Constants.manifest should *always* be defined in those contexts.\n throw new CodedError('ERR_CONSTANTS_MANIFEST_UNAVAILABLE', `Constants.manifest is ${invalidManifestType}, must be an object.`);\n }\n }\n return rawManifest;\n}\nexport default constants;\n//# sourceMappingURL=Constants.js.map","export var AppOwnership;\n(function (AppOwnership) {\n /**\n * The experience is running inside the Expo Go app.\n * @deprecated Use [`Constants.executionEnvironment`](#executionenvironment) instead.\n */\n AppOwnership[\"Expo\"] = \"expo\";\n})(AppOwnership || (AppOwnership = {}));\n// @docsMissing\nexport var ExecutionEnvironment;\n(function (ExecutionEnvironment) {\n ExecutionEnvironment[\"Bare\"] = \"bare\";\n ExecutionEnvironment[\"Standalone\"] = \"standalone\";\n ExecutionEnvironment[\"StoreClient\"] = \"storeClient\";\n})(ExecutionEnvironment || (ExecutionEnvironment = {}));\n// @needsAudit\n/**\n * Current supported values are `handset`, `tablet`, `desktop` and `tv`. CarPlay will show up\n * as `unsupported`.\n */\nexport var UserInterfaceIdiom;\n(function (UserInterfaceIdiom) {\n UserInterfaceIdiom[\"Handset\"] = \"handset\";\n UserInterfaceIdiom[\"Tablet\"] = \"tablet\";\n UserInterfaceIdiom[\"Desktop\"] = \"desktop\";\n UserInterfaceIdiom[\"TV\"] = \"tv\";\n UserInterfaceIdiom[\"Unsupported\"] = \"unsupported\";\n})(UserInterfaceIdiom || (UserInterfaceIdiom = {}));\n//# sourceMappingURL=Constants.types.js.map","import { ExecutionEnvironment } from './Constants.types';\nconst _sessionId = (Date.now() + '-' + Math.floor(Math.random() * 1000000000)).toString();\nfunction getBrowserName() {\n if (typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string') {\n const agent = navigator.userAgent.toLowerCase();\n if (agent.includes('edge')) {\n return 'Edge';\n }\n else if (agent.includes('edg')) {\n return 'Chromium Edge';\n }\n else if (agent.includes('opr') && !!window['opr']) {\n return 'Opera';\n }\n else if (agent.includes('chrome') && !!window['chrome']) {\n return 'Chrome';\n }\n else if (agent.includes('trident')) {\n return 'IE';\n }\n else if (agent.includes('firefox')) {\n return 'Firefox';\n }\n else if (agent.includes('safari')) {\n return 'Safari';\n }\n }\n return undefined;\n}\nexport default {\n get appOwnership() {\n return null;\n },\n get executionEnvironment() {\n return ExecutionEnvironment.Bare;\n },\n get sessionId() {\n return _sessionId;\n },\n get isHeadless() {\n if (typeof navigator === 'undefined')\n return true;\n return /\\bHeadlessChrome\\//.test(navigator.userAgent);\n },\n get expoVersion() {\n return this.manifest.sdkVersion || null;\n },\n get linkingUri() {\n if (typeof location !== 'undefined') {\n // On native this is `exp://`\n // On web we should use the protocol and hostname (location.origin)\n return location.origin;\n }\n else {\n return '';\n }\n },\n get expoRuntimeVersion() {\n return this.expoVersion;\n },\n get deviceName() {\n return getBrowserName();\n },\n get systemFonts() {\n // TODO: Bacon: Maybe possible.\n return [];\n },\n get statusBarHeight() {\n return 0;\n },\n get deviceYearClass() {\n // TODO: Bacon: The android version isn't very accurate either, maybe we could try and guess this value.\n return null;\n },\n get manifest() {\n // This is defined by @expo/webpack-config or babel-preset-expo.\n // If your site is bundled with a different config then you may not have access to the app.json automatically.\n return process.env.APP_MANIFEST || {};\n },\n get manifest2() {\n return null;\n },\n get experienceUrl() {\n if (typeof location !== 'undefined') {\n return location.origin;\n }\n else {\n return '';\n }\n },\n get debugMode() {\n return __DEV__;\n },\n async getWebViewUserAgentAsync() {\n if (typeof navigator !== 'undefined') {\n return navigator.userAgent;\n }\n else {\n return null;\n }\n },\n};\n//# sourceMappingURL=ExponentConstants.web.js.map","const config = require('./config')\nconst Event = require('./event')\nconst Breadcrumb = require('./breadcrumb')\nconst Session = require('./session')\nconst map = require('./lib/es-utils/map')\nconst includes = require('./lib/es-utils/includes')\nconst filter = require('./lib/es-utils/filter')\nconst reduce = require('./lib/es-utils/reduce')\nconst keys = require('./lib/es-utils/keys')\nconst assign = require('./lib/es-utils/assign')\nconst runCallbacks = require('./lib/callback-runner')\nconst metadataDelegate = require('./lib/metadata-delegate')\nconst runSyncCallbacks = require('./lib/sync-callback-runner')\nconst BREADCRUMB_TYPES = require('./lib/breadcrumb-types')\nconst { add, clear, merge } = require('./lib/feature-flag-delegate')\n\nconst noop = () => {}\n\nclass Client {\n constructor (configuration, schema = config.schema, internalPlugins = [], notifier) {\n // notifier id\n this._notifier = notifier\n\n // intialise opts and config\n this._config = {}\n this._schema = schema\n\n // i/o\n this._delivery = { sendSession: noop, sendEvent: noop }\n this._logger = { debug: noop, info: noop, warn: noop, error: noop }\n\n // plugins\n this._plugins = {}\n\n // state\n this._breadcrumbs = []\n this._session = null\n this._metadata = {}\n this._featuresIndex = {}\n this._features = []\n this._context = undefined\n this._user = {}\n\n // callbacks:\n // e: onError\n // s: onSession\n // sp: onSessionPayload\n // b: onBreadcrumb\n // (note these names are minified by hand because object\n // properties are not safe to minify automatically)\n this._cbs = {\n e: [],\n s: [],\n sp: [],\n b: []\n }\n\n // expose internal constructors\n this.Client = Client\n this.Event = Event\n this.Breadcrumb = Breadcrumb\n this.Session = Session\n\n this._config = this._configure(configuration, internalPlugins)\n map(internalPlugins.concat(this._config.plugins), pl => {\n if (pl) this._loadPlugin(pl)\n })\n\n // when notify() is called we need to know how many frames are from our own source\n // this inital value is 1 not 0 because we wrap notify() to ensure it is always\n // bound to have the client as its `this` value – see below.\n this._depth = 1\n\n const self = this\n const notify = this.notify\n this.notify = function () {\n return notify.apply(self, arguments)\n }\n }\n\n addMetadata (section, keyOrObj, maybeVal) {\n return metadataDelegate.add(this._metadata, section, keyOrObj, maybeVal)\n }\n\n getMetadata (section, key) {\n return metadataDelegate.get(this._metadata, section, key)\n }\n\n clearMetadata (section, key) {\n return metadataDelegate.clear(this._metadata, section, key)\n }\n\n addFeatureFlag (name, variant = null) {\n add(this._features, this._featuresIndex, name, variant)\n }\n\n addFeatureFlags (featureFlags) {\n merge(this._features, featureFlags, this._featuresIndex)\n }\n\n clearFeatureFlag (name) {\n clear(this._features, this._featuresIndex, name)\n }\n\n clearFeatureFlags () {\n this._features = []\n this._featuresIndex = {}\n }\n\n getContext () {\n return this._context\n }\n\n setContext (c) {\n this._context = c\n }\n\n _configure (opts, internalPlugins) {\n const schema = reduce(internalPlugins, (schema, plugin) => {\n if (plugin && plugin.configSchema) return assign({}, schema, plugin.configSchema)\n return schema\n }, this._schema)\n\n // accumulate configuration and error messages\n const { errors, config } = reduce(keys(schema), (accum, key) => {\n const defaultValue = schema[key].defaultValue(opts[key])\n\n if (opts[key] !== undefined) {\n const valid = schema[key].validate(opts[key])\n if (!valid) {\n accum.errors[key] = schema[key].message\n accum.config[key] = defaultValue\n } else {\n if (schema[key].allowPartialObject) {\n accum.config[key] = assign(defaultValue, opts[key])\n } else {\n accum.config[key] = opts[key]\n }\n }\n } else {\n accum.config[key] = defaultValue\n }\n\n return accum\n }, { errors: {}, config: {} })\n\n if (schema.apiKey) {\n // missing api key is the only fatal error\n if (!config.apiKey) throw new Error('No Bugsnag API Key set')\n // warn about an apikey that is not of the expected format\n if (!/^[0-9a-f]{32}$/i.test(config.apiKey)) errors.apiKey = 'should be a string of 32 hexadecimal characters'\n }\n\n // update and elevate some options\n this._metadata = assign({}, config.metadata)\n merge(this._features, config.featureFlags, this._featuresIndex)\n this._user = assign({}, config.user)\n this._context = config.context\n if (config.logger) this._logger = config.logger\n\n // add callbacks\n if (config.onError) this._cbs.e = this._cbs.e.concat(config.onError)\n if (config.onBreadcrumb) this._cbs.b = this._cbs.b.concat(config.onBreadcrumb)\n if (config.onSession) this._cbs.s = this._cbs.s.concat(config.onSession)\n\n // finally warn about any invalid config where we fell back to the default\n if (keys(errors).length) {\n this._logger.warn(generateConfigErrorMessage(errors, opts))\n }\n\n return config\n }\n\n getUser () {\n return this._user\n }\n\n setUser (id, email, name) {\n this._user = { id, email, name }\n }\n\n _loadPlugin (plugin) {\n const result = plugin.load(this)\n // JS objects are not the safest way to store arbitrarily keyed values,\n // so bookend the key with some characters that prevent tampering with\n // stuff like __proto__ etc. (only store the result if the plugin had a\n // name)\n if (plugin.name) this._plugins[`~${plugin.name}~`] = result\n return this\n }\n\n getPlugin (name) {\n return this._plugins[`~${name}~`]\n }\n\n _setDelivery (d) {\n this._delivery = d(this)\n }\n\n startSession () {\n const session = new Session()\n\n session.app.releaseStage = this._config.releaseStage\n session.app.version = this._config.appVersion\n session.app.type = this._config.appType\n\n session._user = assign({}, this._user)\n\n // run onSession callbacks\n const ignore = runSyncCallbacks(this._cbs.s, session, 'onSession', this._logger)\n\n if (ignore) {\n this._logger.debug('Session not started due to onSession callback')\n return this\n }\n return this._sessionDelegate.startSession(this, session)\n }\n\n addOnError (fn, front = false) {\n this._cbs.e[front ? 'unshift' : 'push'](fn)\n }\n\n removeOnError (fn) {\n this._cbs.e = filter(this._cbs.e, f => f !== fn)\n }\n\n _addOnSessionPayload (fn) {\n this._cbs.sp.push(fn)\n }\n\n addOnSession (fn) {\n this._cbs.s.push(fn)\n }\n\n removeOnSession (fn) {\n this._cbs.s = filter(this._cbs.s, f => f !== fn)\n }\n\n addOnBreadcrumb (fn, front = false) {\n this._cbs.b[front ? 'unshift' : 'push'](fn)\n }\n\n removeOnBreadcrumb (fn) {\n this._cbs.b = filter(this._cbs.b, f => f !== fn)\n }\n\n pauseSession () {\n return this._sessionDelegate.pauseSession(this)\n }\n\n resumeSession () {\n return this._sessionDelegate.resumeSession(this)\n }\n\n leaveBreadcrumb (message, metadata, type) {\n // coerce bad values so that the defaults get set\n message = typeof message === 'string' ? message : ''\n type = (typeof type === 'string' && includes(BREADCRUMB_TYPES, type)) ? type : 'manual'\n metadata = typeof metadata === 'object' && metadata !== null ? metadata : {}\n\n // if no message, discard\n if (!message) return\n\n const crumb = new Breadcrumb(message, metadata, type)\n\n // run onBreadcrumb callbacks\n const ignore = runSyncCallbacks(this._cbs.b, crumb, 'onBreadcrumb', this._logger)\n\n if (ignore) {\n this._logger.debug('Breadcrumb not attached due to onBreadcrumb callback')\n return\n }\n\n // push the valid crumb onto the queue and maintain the length\n this._breadcrumbs.push(crumb)\n if (this._breadcrumbs.length > this._config.maxBreadcrumbs) {\n this._breadcrumbs = this._breadcrumbs.slice(this._breadcrumbs.length - this._config.maxBreadcrumbs)\n }\n }\n\n _isBreadcrumbTypeEnabled (type) {\n const types = this._config.enabledBreadcrumbTypes\n\n return types === null || includes(types, type)\n }\n\n notify (maybeError, onError, postReportCallback = noop) {\n const event = Event.create(maybeError, true, undefined, 'notify()', this._depth + 1, this._logger)\n this._notify(event, onError, postReportCallback)\n }\n\n _notify (event, onError, postReportCallback = noop) {\n event.app = assign({}, event.app, {\n releaseStage: this._config.releaseStage,\n version: this._config.appVersion,\n type: this._config.appType\n })\n event.context = event.context || this._context\n event._metadata = assign({}, event._metadata, this._metadata)\n event._user = assign({}, event._user, this._user)\n event.breadcrumbs = this._breadcrumbs.slice()\n merge(event._features, this._features, event._featuresIndex)\n\n // exit early if events should not be sent on the current releaseStage\n if (this._config.enabledReleaseStages !== null && !includes(this._config.enabledReleaseStages, this._config.releaseStage)) {\n this._logger.warn('Event not sent due to releaseStage/enabledReleaseStages configuration')\n return postReportCallback(null, event)\n }\n\n const originalSeverity = event.severity\n\n const onCallbackError = err => {\n // errors in callbacks are tolerated but we want to log them out\n this._logger.error('Error occurred in onError callback, continuing anyway…')\n this._logger.error(err)\n }\n\n const callbacks = [].concat(this._cbs.e).concat(onError)\n runCallbacks(callbacks, event, onCallbackError, (err, shouldSend) => {\n if (err) onCallbackError(err)\n\n if (!shouldSend) {\n this._logger.debug('Event not sent due to onError callback')\n return postReportCallback(null, event)\n }\n\n if (this._isBreadcrumbTypeEnabled('error')) {\n // only leave a crumb for the error if actually got sent\n Client.prototype.leaveBreadcrumb.call(this, event.errors[0].errorClass, {\n errorClass: event.errors[0].errorClass,\n errorMessage: event.errors[0].errorMessage,\n severity: event.severity\n }, 'error')\n }\n\n if (originalSeverity !== event.severity) {\n event._handledState.severityReason = { type: 'userCallbackSetSeverity' }\n }\n\n if (event.unhandled !== event._handledState.unhandled) {\n event._handledState.severityReason.unhandledOverridden = true\n event._handledState.unhandled = event.unhandled\n }\n\n if (this._session) {\n this._session._track(event)\n event._session = this._session\n }\n\n this._delivery.sendEvent({\n apiKey: event.apiKey || this._config.apiKey,\n notifier: this._notifier,\n events: [event]\n }, (err) => postReportCallback(err, event))\n })\n }\n}\n\nconst generateConfigErrorMessage = (errors, rawInput) => {\n const er = new Error(\n `Invalid configuration\\n${map(keys(errors), key => ` - ${key} ${errors[key]}, got ${stringify(rawInput[key])}`).join('\\n\\n')}`)\n return er\n}\n\nconst stringify = val => {\n switch (typeof val) {\n case 'string':\n case 'number':\n case 'object':\n return JSON.stringify(val)\n default: return String(val)\n }\n}\n\nmodule.exports = Client\n","const filter = require('./lib/es-utils/filter')\nconst reduce = require('./lib/es-utils/reduce')\nconst keys = require('./lib/es-utils/keys')\nconst isArray = require('./lib/es-utils/is-array')\nconst includes = require('./lib/es-utils/includes')\nconst intRange = require('./lib/validators/int-range')\nconst stringWithLength = require('./lib/validators/string-with-length')\nconst listOfFunctions = require('./lib/validators/list-of-functions')\n\nconst BREADCRUMB_TYPES = require('./lib/breadcrumb-types')\nconst defaultErrorTypes = () => ({ unhandledExceptions: true, unhandledRejections: true })\n\nmodule.exports.schema = {\n apiKey: {\n defaultValue: () => null,\n message: 'is required',\n validate: stringWithLength\n },\n appVersion: {\n defaultValue: () => undefined,\n message: 'should be a string',\n validate: value => value === undefined || stringWithLength(value)\n },\n appType: {\n defaultValue: () => undefined,\n message: 'should be a string',\n validate: value => value === undefined || stringWithLength(value)\n },\n autoDetectErrors: {\n defaultValue: () => true,\n message: 'should be true|false',\n validate: value => value === true || value === false\n },\n enabledErrorTypes: {\n defaultValue: () => defaultErrorTypes(),\n message: 'should be an object containing the flags { unhandledExceptions:true|false, unhandledRejections:true|false }',\n allowPartialObject: true,\n validate: value => {\n // ensure we have an object\n if (typeof value !== 'object' || !value) return false\n const providedKeys = keys(value)\n const defaultKeys = keys(defaultErrorTypes())\n // ensure it only has a subset of the allowed keys\n if (filter(providedKeys, k => includes(defaultKeys, k)).length < providedKeys.length) return false\n // ensure all of the values are boolean\n if (filter(keys(value), k => typeof value[k] !== 'boolean').length > 0) return false\n return true\n }\n },\n onError: {\n defaultValue: () => [],\n message: 'should be a function or array of functions',\n validate: listOfFunctions\n },\n onSession: {\n defaultValue: () => [],\n message: 'should be a function or array of functions',\n validate: listOfFunctions\n },\n onBreadcrumb: {\n defaultValue: () => [],\n message: 'should be a function or array of functions',\n validate: listOfFunctions\n },\n endpoints: {\n defaultValue: () => ({\n notify: 'https://notify.bugsnag.com',\n sessions: 'https://sessions.bugsnag.com'\n }),\n message: 'should be an object containing endpoint URLs { notify, sessions }',\n validate: val =>\n // first, ensure it's an object\n (val && typeof val === 'object') &&\n (\n // notify and sessions must always be set\n stringWithLength(val.notify) && stringWithLength(val.sessions)\n ) &&\n // ensure no keys other than notify/session are set on endpoints object\n filter(keys(val), k => !includes(['notify', 'sessions'], k)).length === 0\n },\n autoTrackSessions: {\n defaultValue: val => true,\n message: 'should be true|false',\n validate: val => val === true || val === false\n },\n enabledReleaseStages: {\n defaultValue: () => null,\n message: 'should be an array of strings',\n validate: value => value === null || (isArray(value) && filter(value, f => typeof f === 'string').length === value.length)\n },\n releaseStage: {\n defaultValue: () => 'production',\n message: 'should be a string',\n validate: value => typeof value === 'string' && value.length\n },\n maxBreadcrumbs: {\n defaultValue: () => 25,\n message: 'should be a number ≤100',\n validate: value => intRange(0, 100)(value)\n },\n enabledBreadcrumbTypes: {\n defaultValue: () => BREADCRUMB_TYPES,\n message: `should be null or a list of available breadcrumb types (${BREADCRUMB_TYPES.join(',')})`,\n validate: value => value === null || (isArray(value) && reduce(value, (accum, maybeType) => {\n if (accum === false) return accum\n return includes(BREADCRUMB_TYPES, maybeType)\n }, true))\n },\n context: {\n defaultValue: () => undefined,\n message: 'should be a string',\n validate: value => value === undefined || typeof value === 'string'\n },\n user: {\n defaultValue: () => ({}),\n message: 'should be an object with { id, email, name } properties',\n validate: value =>\n (value === null) ||\n (value && reduce(\n keys(value),\n (accum, key) => accum && includes(['id', 'email', 'name'], key),\n true\n ))\n },\n metadata: {\n defaultValue: () => ({}),\n message: 'should be an object',\n validate: (value) => typeof value === 'object' && value !== null\n },\n logger: {\n defaultValue: () => undefined,\n message: 'should be null or an object with methods { debug, info, warn, error }',\n validate: value =>\n (!value) ||\n (value && reduce(\n ['debug', 'info', 'warn', 'error'],\n (accum, method) => accum && typeof value[method] === 'function',\n true\n ))\n },\n redactedKeys: {\n defaultValue: () => ['password'],\n message: 'should be an array of strings|regexes',\n validate: value =>\n isArray(value) && value.length === filter(value, s =>\n (typeof s === 'string' || (s && typeof s.test === 'function'))\n ).length\n },\n plugins: {\n defaultValue: () => ([]),\n message: 'should be an array of plugin objects',\n validate: value =>\n isArray(value) && value.length === filter(value, p =>\n (p && typeof p === 'object' && typeof p.load === 'function')\n ).length\n },\n featureFlags: {\n defaultValue: () => [],\n message: 'should be an array of objects that have a \"name\" property',\n validate: value =>\n isArray(value) && value.length === filter(value, feature =>\n feature && typeof feature === 'object' && typeof feature.name === 'string'\n ).length\n }\n}\n","const reduce = require('./reduce')\n\n// Array#filter\nmodule.exports = (arr, fn) =>\n reduce(arr, (accum, item, i, arr) => !fn(item, i, arr) ? accum : accum.concat(item), [])\n","// Array#reduce\nmodule.exports = (arr, fn, accum) => {\n let val = accum\n for (let i = 0, len = arr.length; i < len; i++) val = fn(val, arr[i], i, arr)\n return val\n}\n","/* eslint-disable-next-line no-prototype-builtins */\nconst _hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString')\nconst _dontEnums = [\n 'toString', 'toLocaleString', 'valueOf', 'hasOwnProperty',\n 'isPrototypeOf', 'propertyIsEnumerable', 'constructor'\n]\n\n// Object#keys\nmodule.exports = obj => {\n // stripped down version of\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/Keys\n const result = []\n let prop\n for (prop in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, prop)) result.push(prop)\n }\n if (!_hasDontEnumBug) return result\n for (let i = 0, len = _dontEnums.length; i < len; i++) {\n if (Object.prototype.hasOwnProperty.call(obj, _dontEnums[i])) result.push(_dontEnums[i])\n }\n return result\n}\n","// Array#isArray\nmodule.exports = obj => Object.prototype.toString.call(obj) === '[object Array]'\n","const reduce = require('./reduce')\n// Array#includes\nmodule.exports = (arr, x) =>\n reduce(arr, (accum, item, i, arr) => accum === true || item === x, false)\n","module.exports = (min = 1, max = Infinity) => value =>\n typeof value === 'number' &&\n parseInt('' + value, 10) === value &&\n value >= min && value <= max\n","module.exports = value => typeof value === 'string' && !!value.length\n","const filter = require('../es-utils/filter')\nconst isArray = require('../es-utils/is-array')\n\nmodule.exports = value => typeof value === 'function' || (isArray(value) && filter(value, f => typeof f === 'function').length === value.length)\n","module.exports = ['navigation', 'request', 'process', 'log', 'user', 'state', 'error', 'manual']\n","const ErrorStackParser = require('./lib/error-stack-parser')\nconst StackGenerator = require('stack-generator')\nconst hasStack = require('./lib/has-stack')\nconst map = require('./lib/es-utils/map')\nconst reduce = require('./lib/es-utils/reduce')\nconst filter = require('./lib/es-utils/filter')\nconst assign = require('./lib/es-utils/assign')\nconst metadataDelegate = require('./lib/metadata-delegate')\nconst featureFlagDelegate = require('./lib/feature-flag-delegate')\nconst isError = require('./lib/iserror')\n\nclass Event {\n constructor (errorClass, errorMessage, stacktrace = [], handledState = defaultHandledState(), originalError) {\n this.apiKey = undefined\n this.context = undefined\n this.groupingHash = undefined\n this.originalError = originalError\n\n this._handledState = handledState\n this.severity = this._handledState.severity\n this.unhandled = this._handledState.unhandled\n\n this.app = {}\n this.device = {}\n this.request = {}\n\n this.breadcrumbs = []\n this.threads = []\n\n this._metadata = {}\n this._features = []\n this._featuresIndex = {}\n this._user = {}\n this._session = undefined\n this._correlation = undefined\n\n this.errors = [\n createBugsnagError(errorClass, errorMessage, Event.__type, stacktrace)\n ]\n\n // Flags.\n // Note these are not initialised unless they are used\n // to save unnecessary bytes in the browser bundle\n\n /* this.attemptImmediateDelivery, default: true */\n }\n\n addMetadata (section, keyOrObj, maybeVal) {\n return metadataDelegate.add(this._metadata, section, keyOrObj, maybeVal)\n }\n\n /**\n * Associate this event with a specific trace. This is usually done automatically when\n * using bugsnag-js-performance, but can also be set manually if required.\n *\n * @param traceId the ID of the trace the event occurred within\n * @param spanId the ID of the span that the event occurred within\n */\n setTraceCorrelation (traceId, spanId) {\n if (typeof traceId === 'string') {\n this._correlation = { traceId, ...typeof spanId === 'string' ? { spanId } : { } }\n }\n }\n\n getMetadata (section, key) {\n return metadataDelegate.get(this._metadata, section, key)\n }\n\n clearMetadata (section, key) {\n return metadataDelegate.clear(this._metadata, section, key)\n }\n\n addFeatureFlag (name, variant = null) {\n featureFlagDelegate.add(this._features, this._featuresIndex, name, variant)\n }\n\n addFeatureFlags (featureFlags) {\n featureFlagDelegate.merge(this._features, featureFlags, this._featuresIndex)\n }\n\n getFeatureFlags () {\n return featureFlagDelegate.toEventApi(this._features)\n }\n\n clearFeatureFlag (name) {\n featureFlagDelegate.clear(this._features, this._featuresIndex, name)\n }\n\n clearFeatureFlags () {\n this._features = []\n this._featuresIndex = {}\n }\n\n getUser () {\n return this._user\n }\n\n setUser (id, email, name) {\n this._user = { id, email, name }\n }\n\n toJSON () {\n return {\n payloadVersion: '4',\n exceptions: map(this.errors, er => assign({}, er, { message: er.errorMessage })),\n severity: this.severity,\n unhandled: this._handledState.unhandled,\n severityReason: this._handledState.severityReason,\n app: this.app,\n device: this.device,\n request: this.request,\n breadcrumbs: this.breadcrumbs,\n context: this.context,\n groupingHash: this.groupingHash,\n metaData: this._metadata,\n user: this._user,\n session: this._session,\n featureFlags: this.getFeatureFlags(),\n correlation: this._correlation\n }\n }\n}\n\n// takes a stacktrace.js style stackframe (https://github.com/stacktracejs/stackframe)\n// and returns a Bugsnag compatible stackframe (https://docs.bugsnag.com/api/error-reporting/#json-payload)\nconst formatStackframe = frame => {\n const f = {\n file: frame.fileName,\n method: normaliseFunctionName(frame.functionName),\n lineNumber: frame.lineNumber,\n columnNumber: frame.columnNumber,\n code: undefined,\n inProject: undefined\n }\n // Some instances result in no file:\n // - calling notify() from chrome's terminal results in no file/method.\n // - non-error exception thrown from global code in FF\n // This adds one.\n if (f.lineNumber > -1 && !f.file && !f.method) {\n f.file = 'global code'\n }\n return f\n}\n\nconst normaliseFunctionName = name => /^global code$/i.test(name) ? 'global code' : name\n\nconst defaultHandledState = () => ({\n unhandled: false,\n severity: 'warning',\n severityReason: { type: 'handledException' }\n})\n\nconst ensureString = (str) => typeof str === 'string' ? str : ''\n\nfunction createBugsnagError (errorClass, errorMessage, type, stacktrace) {\n return {\n errorClass: ensureString(errorClass),\n errorMessage: ensureString(errorMessage),\n type,\n stacktrace: reduce(stacktrace, (accum, frame) => {\n const f = formatStackframe(frame)\n // don't include a stackframe if none of its properties are defined\n try {\n if (JSON.stringify(f) === '{}') return accum\n return accum.concat(f)\n } catch (e) {\n return accum\n }\n }, [])\n }\n}\n\nfunction getCauseStack (error) {\n if (error.cause) {\n return [error, ...getCauseStack(error.cause)]\n } else {\n return [error]\n }\n}\n\n// Helpers\n\nEvent.getStacktrace = function (error, errorFramesToSkip, backtraceFramesToSkip) {\n if (hasStack(error)) return ErrorStackParser.parse(error).slice(errorFramesToSkip)\n // error wasn't provided or didn't have a stacktrace so try to walk the callstack\n try {\n return filter(StackGenerator.backtrace(), frame =>\n (frame.functionName || '').indexOf('StackGenerator$$') === -1\n ).slice(1 + backtraceFramesToSkip)\n } catch (e) {\n return []\n }\n}\n\nEvent.create = function (maybeError, tolerateNonErrors, handledState, component, errorFramesToSkip = 0, logger) {\n const [error, internalFrames] = normaliseError(maybeError, tolerateNonErrors, component, logger)\n let event\n try {\n const stacktrace = Event.getStacktrace(\n error,\n // if an error was created/throw in the normaliseError() function, we need to\n // tell the getStacktrace() function to skip the number of frames we know will\n // be from our own functions. This is added to the number of frames deep we\n // were told about\n internalFrames > 0 ? 1 + internalFrames + errorFramesToSkip : 0,\n // if there's no stacktrace, the callstack may be walked to generated one.\n // this is how many frames should be removed because they come from our library\n 1 + errorFramesToSkip\n )\n event = new Event(error.name, error.message, stacktrace, handledState, maybeError)\n } catch (e) {\n event = new Event(error.name, error.message, [], handledState, maybeError)\n }\n if (error.name === 'InvalidError') {\n event.addMetadata(`${component}`, 'non-error parameter', makeSerialisable(maybeError))\n }\n if (error.cause) {\n const causes = getCauseStack(error).slice(1)\n const normalisedCauses = map(causes, (cause) => {\n // Only get stacktrace for error causes that are a valid JS Error and already have a stack\n const stacktrace = (isError(cause) && hasStack(cause)) ? ErrorStackParser.parse(cause) : []\n const [error] = normaliseError(cause, true, 'error cause')\n if (error.name === 'InvalidError') event.addMetadata('error cause', makeSerialisable(cause))\n return createBugsnagError(error.name, error.message, Event.__type, stacktrace)\n })\n\n event.errors.push(...normalisedCauses)\n }\n\n return event\n}\n\nconst makeSerialisable = (err) => {\n if (err === null) return 'null'\n if (err === undefined) return 'undefined'\n return err\n}\n\nconst normaliseError = (maybeError, tolerateNonErrors, component, logger) => {\n let error\n let internalFrames = 0\n\n const createAndLogInputError = (reason) => {\n const verb = (component === 'error cause' ? 'was' : 'received')\n if (logger) logger.warn(`${component} ${verb} a non-error: \"${reason}\"`)\n const err = new Error(`${component} ${verb} a non-error. See \"${component}\" tab for more detail.`)\n err.name = 'InvalidError'\n return err\n }\n\n // In some cases:\n //\n // - the promise rejection handler (both in the browser and node)\n // - the node uncaughtException handler\n //\n // We are really limited in what we can do to get a stacktrace. So we use the\n // tolerateNonErrors option to ensure that the resulting error communicates as\n // such.\n if (!tolerateNonErrors) {\n if (isError(maybeError)) {\n error = maybeError\n } else {\n error = createAndLogInputError(typeof maybeError)\n internalFrames += 2\n }\n } else {\n switch (typeof maybeError) {\n case 'string':\n case 'number':\n case 'boolean':\n error = new Error(String(maybeError))\n internalFrames += 1\n break\n case 'function':\n error = createAndLogInputError('function')\n internalFrames += 2\n break\n case 'object':\n if (maybeError !== null && isError(maybeError)) {\n error = maybeError\n } else if (maybeError !== null && hasNecessaryFields(maybeError)) {\n error = new Error(maybeError.message || maybeError.errorMessage)\n error.name = maybeError.name || maybeError.errorClass\n internalFrames += 1\n } else {\n error = createAndLogInputError(maybeError === null ? 'null' : 'unsupported object')\n internalFrames += 2\n }\n break\n default:\n error = createAndLogInputError('nothing')\n internalFrames += 2\n }\n }\n\n if (!hasStack(error)) {\n // in IE10/11 a new Error() doesn't have a stacktrace until you throw it, so try that here\n try {\n throw error\n } catch (e) {\n if (hasStack(e)) {\n error = e\n // if the error only got a stacktrace after we threw it here, we know it\n // will only have one extra internal frame from this function, regardless\n // of whether it went through createAndLogInputError() or not\n internalFrames = 1\n }\n }\n }\n\n return [error, internalFrames]\n}\n\n// default value for stacktrace.type\nEvent.__type = 'browserjs'\n\nconst hasNecessaryFields = error =>\n (typeof error.name === 'string' || typeof error.errorClass === 'string') &&\n (typeof error.message === 'string' || typeof error.errorMessage === 'string')\n\nmodule.exports = Event\n","module.exports = require('error-stack-parser')\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(,.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(').replace(/^.*?\\s+/, '');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\(.+\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n // if a location was matched, pass it to extractLocation() otherwise pass all sanitizedLine\n // because this line doesn't have function name\n var locationParts = this.extractLocation(location ? location[1] : sanitizedLine);\n var functionName = location && sanitizedLine || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stack-generator', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.StackGenerator = factory(root.StackFrame);\n }\n}(this, function(StackFrame) {\n return {\n backtrace: function StackGenerator$$backtrace(opts) {\n var stack = [];\n var maxStackSize = 10;\n\n if (typeof opts === 'object' && typeof opts.maxStackSize === 'number') {\n maxStackSize = opts.maxStackSize;\n }\n\n var curr = arguments.callee;\n while (curr && stack.length < maxStackSize && curr['arguments']) {\n // Allow V8 optimizations\n var args = new Array(curr['arguments'].length);\n for (var i = 0; i < args.length; ++i) {\n args[i] = curr['arguments'][i];\n }\n if (/function(?:\\s+([\\w$]+))+\\s*\\(/.test(curr.toString())) {\n stack.push(new StackFrame({functionName: RegExp.$1 || undefined, args: args}));\n } else {\n stack.push(new StackFrame({args: args}));\n }\n\n try {\n curr = curr.caller;\n } catch (e) {\n break;\n }\n }\n return stack;\n }\n };\n}));\n","// Given `err` which may be an error, does it have a stack property which is a string?\nmodule.exports = err =>\n !!err &&\n (!!err.stack || !!err.stacktrace || !!err['opera#sourceloc']) &&\n typeof (err.stack || err.stacktrace || err['opera#sourceloc']) === 'string' &&\n err.stack !== `${err.name}: ${err.message}`\n","const reduce = require('./reduce')\n\n// Array#map\nmodule.exports = (arr, fn) =>\n reduce(arr, (accum, item, i, arr) => accum.concat(fn(item, i, arr)), [])\n","// extends helper from babel\n// https://github.com/babel/babel/blob/916429b516e6466fd06588ee820e40e025d7f3a3/packages/babel-helpers/src/helpers.js#L377-L393\nmodule.exports = function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i]\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key]\n }\n }\n }\n return target\n}\n","const assign = require('./es-utils/assign')\n\nconst add = (state, section, keyOrObj, maybeVal) => {\n if (!section) return\n let updates\n\n // addMetadata(\"section\", null) -> clears section\n if (keyOrObj === null) return clear(state, section)\n\n // normalise the two supported input types into object form\n if (typeof keyOrObj === 'object') updates = keyOrObj\n if (typeof keyOrObj === 'string') updates = { [keyOrObj]: maybeVal }\n\n // exit if we don't have an updates object at this point\n if (!updates) return\n\n // preventing the __proto__ property from being used as a key\n if (section === '__proto__' || section === 'constructor' || section === 'prototype') {\n return\n }\n\n // ensure a section with this name exists\n if (!state[section]) state[section] = {}\n\n // merge the updates with the existing section\n state[section] = assign({}, state[section], updates)\n}\n\nconst get = (state, section, key) => {\n if (typeof section !== 'string') return undefined\n if (!key) {\n return state[section]\n }\n if (state[section]) {\n return state[section][key]\n }\n return undefined\n}\n\nconst clear = (state, section, key) => {\n if (typeof section !== 'string') return\n\n // clear an entire section\n if (!key) {\n delete state[section]\n return\n }\n\n // preventing the __proto__ property from being used as a key\n if (section === '__proto__' || section === 'constructor' || section === 'prototype') {\n return\n }\n\n // clear a single value from a section\n if (state[section]) {\n delete state[section][key]\n }\n}\n\nmodule.exports = { add, get, clear }\n","const map = require('./es-utils/map')\nconst filter = require('./es-utils/filter')\nconst isArray = require('./es-utils/is-array')\nconst jsonStringify = require('@bugsnag/safe-json-stringify')\n\nfunction add (existingFeatures, existingFeatureKeys, name, variant) {\n if (typeof name !== 'string') {\n return\n }\n\n if (variant === undefined) {\n variant = null\n } else if (variant !== null && typeof variant !== 'string') {\n variant = jsonStringify(variant)\n }\n\n const existingIndex = existingFeatureKeys[name]\n if (typeof existingIndex === 'number') {\n existingFeatures[existingIndex] = { name, variant }\n return\n }\n\n existingFeatures.push({ name, variant })\n existingFeatureKeys[name] = existingFeatures.length - 1\n}\n\nfunction merge (existingFeatures, newFeatures, existingFeatureKeys) {\n if (!isArray(newFeatures)) {\n return\n }\n\n for (let i = 0; i < newFeatures.length; ++i) {\n const feature = newFeatures[i]\n\n if (feature === null || typeof feature !== 'object') {\n continue\n }\n\n // 'add' will handle if 'name' doesn't exist & 'variant' is optional\n add(existingFeatures, existingFeatureKeys, feature.name, feature.variant)\n }\n\n return existingFeatures\n}\n\n// convert feature flags from a map of 'name -> variant' into the format required\n// by the Bugsnag Event API:\n// [{ featureFlag: 'name', variant: 'variant' }, { featureFlag: 'name 2' }]\nfunction toEventApi (featureFlags) {\n return map(\n filter(featureFlags, Boolean),\n ({ name, variant }) => {\n const flag = { featureFlag: name }\n\n // don't add a 'variant' property unless there's actually a value\n if (typeof variant === 'string') {\n flag.variant = variant\n }\n\n return flag\n }\n )\n}\n\nfunction clear (features, featuresIndex, name) {\n const existingIndex = featuresIndex[name]\n if (typeof existingIndex === 'number') {\n features[existingIndex] = null\n delete featuresIndex[name]\n }\n}\n\nmodule.exports = { add, clear, merge, toEventApi }\n","module.exports = function (data, replacer, space, opts) {\n var redactedKeys = opts && opts.redactedKeys ? opts.redactedKeys : []\n var redactedPaths = opts && opts.redactedPaths ? opts.redactedPaths : []\n return JSON.stringify(\n prepareObjForSerialization(data, redactedKeys, redactedPaths),\n replacer,\n space\n )\n}\n\nvar MAX_DEPTH = 20\nvar MAX_EDGES = 25000\nvar MIN_PRESERVED_DEPTH = 8\n\nvar REPLACEMENT_NODE = '...'\n\nfunction isError (o) {\n return o instanceof Error ||\n /^\\[object (Error|(Dom)?Exception)\\]$/.test(Object.prototype.toString.call(o))\n}\n\nfunction throwsMessage (err) {\n return '[Throws: ' + (err ? err.message : '?') + ']'\n}\n\nfunction find (haystack, needle) {\n for (var i = 0, len = haystack.length; i < len; i++) {\n if (haystack[i] === needle) return true\n }\n return false\n}\n\n// returns true if the string `path` starts with any of the provided `paths`\nfunction isDescendent (paths, path) {\n for (var i = 0, len = paths.length; i < len; i++) {\n if (path.indexOf(paths[i]) === 0) return true\n }\n return false\n}\n\nfunction shouldRedact (patterns, key) {\n for (var i = 0, len = patterns.length; i < len; i++) {\n if (typeof patterns[i] === 'string' && patterns[i].toLowerCase() === key.toLowerCase()) return true\n if (patterns[i] && typeof patterns[i].test === 'function' && patterns[i].test(key)) return true\n }\n return false\n}\n\nfunction isArray (obj) {\n return Object.prototype.toString.call(obj) === '[object Array]'\n}\n\nfunction safelyGetProp (obj, prop) {\n try {\n return obj[prop]\n } catch (err) {\n return throwsMessage(err)\n }\n}\n\nfunction prepareObjForSerialization (obj, redactedKeys, redactedPaths) {\n var seen = [] // store references to objects we have seen before\n var edges = 0\n\n function visit (obj, path) {\n function edgesExceeded () {\n return path.length > MIN_PRESERVED_DEPTH && edges > MAX_EDGES\n }\n\n edges++\n\n if (path.length > MAX_DEPTH) return REPLACEMENT_NODE\n if (edgesExceeded()) return REPLACEMENT_NODE\n if (obj === null || typeof obj !== 'object') return obj\n if (find(seen, obj)) return '[Circular]'\n\n seen.push(obj)\n\n if (typeof obj.toJSON === 'function') {\n try {\n // we're not going to count this as an edge because it\n // replaces the value of the currently visited object\n edges--\n var fResult = visit(obj.toJSON(), path)\n seen.pop()\n return fResult\n } catch (err) {\n return throwsMessage(err)\n }\n }\n\n var er = isError(obj)\n if (er) {\n edges--\n var eResult = visit({ name: obj.name, message: obj.message }, path)\n seen.pop()\n return eResult\n }\n\n if (isArray(obj)) {\n var aResult = []\n for (var i = 0, len = obj.length; i < len; i++) {\n if (edgesExceeded()) {\n aResult.push(REPLACEMENT_NODE)\n break\n }\n aResult.push(visit(obj[i], path.concat('[]')))\n }\n seen.pop()\n return aResult\n }\n\n var result = {}\n try {\n for (var prop in obj) {\n if (!Object.prototype.hasOwnProperty.call(obj, prop)) continue\n if (isDescendent(redactedPaths, path.join('.')) && shouldRedact(redactedKeys, prop)) {\n result[prop] = '[REDACTED]'\n continue\n }\n if (edgesExceeded()) {\n result[prop] = REPLACEMENT_NODE\n break\n }\n result[prop] = visit(safelyGetProp(obj, prop), path.concat(prop))\n }\n } catch (e) {}\n seen.pop()\n return result\n }\n\n return visit(obj, [])\n}\n","module.exports = require('iserror')\n","\n/**\n * Expose `isError`.\n */\n\nmodule.exports = isError;\n\n/**\n * Test whether `value` is error object.\n *\n * @param {*} value\n * @returns {boolean}\n */\n\nfunction isError(value) {\n switch (Object.prototype.toString.call(value)) {\n case '[object Error]': return true;\n case '[object Exception]': return true;\n case '[object DOMException]': return true;\n default: return value instanceof Error;\n }\n}\n","class Breadcrumb {\n constructor (message, metadata, type, timestamp = new Date()) {\n this.type = type\n this.message = message\n this.metadata = metadata\n this.timestamp = timestamp\n }\n\n toJSON () {\n return {\n type: this.type,\n name: this.message,\n timestamp: this.timestamp,\n metaData: this.metadata\n }\n }\n}\n\nmodule.exports = Breadcrumb\n","const cuid = require('@bugsnag/cuid')\n\nclass Session {\n constructor () {\n this.id = cuid()\n this.startedAt = new Date()\n this._handled = 0\n this._unhandled = 0\n this._user = {}\n this.app = {}\n this.device = {}\n }\n\n getUser () {\n return this._user\n }\n\n setUser (id, email, name) {\n this._user = { id, email, name }\n }\n\n toJSON () {\n return {\n id: this.id,\n startedAt: this.startedAt,\n events: { handled: this._handled, unhandled: this._unhandled }\n }\n }\n\n _track (event) {\n this[event._handledState.unhandled ? '_unhandled' : '_handled'] += 1\n }\n}\n\nmodule.exports = Session\n","/**\n * cuid.js\n * Collision-resistant UID generator for browsers and node.\n * Sequential for fast db lookups and recency sorting.\n * Safe for element IDs and server-side lookups.\n *\n * Extracted from CLCTR\n *\n * Copyright (c) Eric Elliott 2012\n * MIT License\n */\n\nvar fingerprint = require('./lib/fingerprint.js');\nvar isCuid = require('./lib/is-cuid.js');\nvar pad = require('./lib/pad.js');\n\nvar c = 0,\n blockSize = 4,\n base = 36,\n discreteValues = Math.pow(base, blockSize);\n\nfunction randomBlock () {\n return pad((Math.random() *\n discreteValues << 0)\n .toString(base), blockSize);\n}\n\nfunction safeCounter () {\n c = c < discreteValues ? c : 0;\n c++; // this is not subliminal\n return c - 1;\n}\n\nfunction cuid () {\n // Starting with a lowercase letter makes\n // it HTML element ID friendly.\n var letter = 'c', // hard-coded allows for sequential access\n\n // timestamp\n // warning: this exposes the exact date and time\n // that the uid was created.\n timestamp = new Date().getTime().toString(base),\n\n // Prevent same-machine collisions.\n counter = pad(safeCounter().toString(base), blockSize),\n\n // A few chars to generate distinct ids for different\n // clients (so different computers are far less\n // likely to generate the same id)\n print = fingerprint(),\n\n // Grab some more chars from Math.random()\n random = randomBlock() + randomBlock();\n\n return letter + timestamp + counter + print + random;\n}\n\ncuid.fingerprint = fingerprint;\ncuid.isCuid = isCuid;\n\nmodule.exports = cuid;\n","var pad = require('./pad.js');\n\nvar env = typeof window === 'object' ? window : self;\nvar globalCount = 0;\nfor (var prop in env) {\n if (Object.hasOwnProperty.call(env, prop)) globalCount++;\n}\nvar mimeTypesLength = navigator.mimeTypes ? navigator.mimeTypes.length : 0;\nvar clientId = pad((mimeTypesLength +\n navigator.userAgent.length).toString(36) +\n globalCount.toString(36), 4);\n\nmodule.exports = function fingerprint () {\n return clientId;\n};\n","module.exports = function pad (num, size) {\n var s = '000000000' + num;\n return s.substr(s.length - size);\n};\n","/**\n * Check the provided value is a valid device id\n * @param {unknown} value\n * @returns\n */\nmodule.exports = function isCuid (value) {\n return typeof value === 'string' && (/^c[a-z0-9]{20,32}$/).test(value);\n};\n","const some = require('./async-every')\n\nmodule.exports = (callbacks, event, onCallbackError, cb) => {\n // This function is how we support different kinds of callback:\n // - synchronous - return value\n // - node-style async with callback - cb(err, value)\n // - promise/thenable - resolve(value)\n // It normalises each of these into the lowest common denominator – a node-style callback\n const runMaybeAsyncCallback = (fn, cb) => {\n if (typeof fn !== 'function') return cb(null)\n try {\n // if function appears sync…\n if (fn.length !== 2) {\n const ret = fn(event)\n // check if it returned a \"thenable\" (promise)\n if (ret && typeof ret.then === 'function') {\n return ret.then(\n // resolve\n val => setTimeout(() => cb(null, val)),\n // reject\n err => {\n setTimeout(() => {\n onCallbackError(err)\n return cb(null, true)\n })\n }\n )\n }\n return cb(null, ret)\n }\n // if function is async…\n fn(event, (err, result) => {\n if (err) {\n onCallbackError(err)\n return cb(null)\n }\n cb(null, result)\n })\n } catch (e) {\n onCallbackError(e)\n cb(null)\n }\n }\n\n some(callbacks, runMaybeAsyncCallback, cb)\n}\n","// This is a heavily modified/simplified version of\n// https://github.com/othiym23/async-some\n// with the logic flipped so that it is akin to the\n// synchronous \"every\" method instead of \"some\".\n\n// run the asynchronous test function (fn) over each item in the array (arr)\n// in series until:\n// - fn(item, cb) => calls cb(null, false)\n// - or the end of the array is reached\n// the callback (cb) will be passed (null, false) if any of the items in arr\n// caused fn to call back with false, otherwise it will be passed (null, true)\nmodule.exports = (arr, fn, cb) => {\n let index = 0\n\n const next = () => {\n if (index >= arr.length) return cb(null, true)\n fn(arr[index], (err, result) => {\n if (err) return cb(err)\n if (result === false) return cb(null, false)\n index++\n next()\n })\n }\n\n next()\n}\n","module.exports = (callbacks, callbackArg, callbackType, logger) => {\n let ignore = false\n const cbs = callbacks.slice()\n while (!ignore) {\n if (!cbs.length) break\n try {\n ignore = cbs.pop()(callbackArg) === false\n } catch (e) {\n logger.error(`Error occurred in ${callbackType} callback, continuing anyway…`)\n logger.error(e)\n }\n }\n return ignore\n}\n","const payload = require('@bugsnag/core/lib/json-payload')\nconst UndeliveredPayloadQueue = require('./queue')\nconst NetworkStatus = require('./network-status')\nconst RedeliveryLoop = require('./redelivery')\nconst Crypto = require('expo-crypto')\n\nmodule.exports = (client, fetch = global.fetch) => {\n const networkStatus = new NetworkStatus()\n\n const send = (url, opts, cb) => {\n fetch(url, opts)\n .then(response => {\n if (response.ok) return response.text()\n const err = new Error(`Bad status code from API: ${response.status}`)\n err.isRetryable = isRetryable(response.status)\n return Promise.reject(err)\n })\n .then(() => cb(null))\n .catch(err => cb(err))\n }\n\n const logError = e => client._logger.error('Error redelivering payload', e)\n\n const enqueue = async (payloadKind, failedPayload) => {\n client._logger.info(`Writing ${payloadKind} payload to cache`)\n await queues[payloadKind].enqueue(failedPayload, logError)\n if (networkStatus.isConnected) queueConsumers[payloadKind].start()\n }\n\n const onerror = async (err, failedPayload, payloadKind, cb) => {\n client._logger.error(`${payloadKind} failed to send…\\n${(err && err.stack) ? err.stack : err}`, err)\n if (failedPayload && err.isRetryable !== false) enqueue(payloadKind, failedPayload)\n cb(err)\n }\n\n const { queues, queueConsumers } = initRedelivery(networkStatus, client._logger, send)\n\n const hash = payload => Crypto.digestStringAsync(Crypto.CryptoDigestAlgorithm.SHA1, payload)\n\n return {\n sendEvent: async (event, cb = () => {}) => {\n const url = client._config.endpoints.notify\n\n let body, opts\n try {\n body = payload.event(event, client._config.redactedKeys)\n opts = {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'Bugsnag-Api-Key': event.apiKey || client._config.apiKey,\n 'Bugsnag-Integrity': `sha1 ${await hash(body)}`,\n 'Bugsnag-Payload-Version': '4',\n 'Bugsnag-Sent-At': (new Date()).toISOString()\n },\n body\n }\n if (!networkStatus.isConnected || event.attemptImmediateDelivery === false) {\n enqueue('event', { url, opts })\n return cb(null)\n }\n client._logger.info(`Sending event ${event.events[0].errors[0].errorClass}: ${event.events[0].errors[0].errorMessage}`)\n send(url, opts, err => {\n if (err) {\n // do not retry oversized payloads regardless of status code\n if (body.length > 10e5) {\n client._logger.warn(`Discarding over-sized event (${body.length / 10e5} MB) after failed delivery`)\n err.isRetryable = false\n }\n return onerror(err, { url, opts }, 'event', cb)\n }\n cb(null)\n })\n } catch (e) {\n onerror(e, { url, opts }, 'event', cb)\n }\n },\n\n sendSession: async (session, cb = () => {}) => {\n const url = client._config.endpoints.sessions\n\n let body, opts\n try {\n body = payload.session(session, client._config.redactedKeys)\n opts = {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'Bugsnag-Api-Key': client._config.apiKey,\n 'Bugsnag-Integrity': `sha1 ${await hash(body)}`,\n 'Bugsnag-Payload-Version': '1',\n 'Bugsnag-Sent-At': (new Date()).toISOString()\n },\n body\n }\n if (!networkStatus.isConnected) {\n enqueue('session', { url, opts })\n return cb(null)\n }\n client._logger.info('Sending session')\n send(url, opts, err => {\n if (err) return onerror(err, { url, opts }, 'session', cb)\n cb(null)\n })\n } catch (e) {\n onerror(e, { url, opts }, 'session', cb)\n }\n }\n }\n}\n\nconst initRedelivery = (networkStatus, logger, send) => {\n const onQueueError = e => logger.error('UndeliveredPayloadQueue error', e)\n const queues = {\n event: new UndeliveredPayloadQueue('event', onQueueError),\n session: new UndeliveredPayloadQueue('session', onQueueError)\n }\n\n const onLoopError = (e) =>\n logger.error('An error occurred attempting to redeliver a payload', e)\n const queueConsumers = {\n event: new RedeliveryLoop(send, queues.event, onLoopError),\n session: new RedeliveryLoop(send, queues.session, onLoopError)\n }\n\n Promise.all([queues.event.init(), queues.session.init()])\n .then(() => {\n networkStatus.watch(isConnected => {\n if (isConnected) {\n queueConsumers.event.start()\n queueConsumers.session.start()\n } else {\n queueConsumers.event.stop()\n queueConsumers.session.stop()\n }\n })\n })\n .catch(onQueueError)\n\n return { queues, queueConsumers }\n}\n\n// basically, if it starts with a 4, don't retry (unless it's in the list of exceptions)\nconst isRetryable = status => {\n return (\n status < 400 ||\n status > 499 ||\n [\n 408, // timeout\n 429 // too many requests\n ].includes(status))\n}\n","const jsonStringify = require('@bugsnag/safe-json-stringify')\nconst EVENT_REDACTION_PATHS = [\n 'events.[].metaData',\n 'events.[].breadcrumbs.[].metaData',\n 'events.[].request'\n]\n\nmodule.exports.event = (event, redactedKeys) => {\n let payload = jsonStringify(event, null, null, { redactedPaths: EVENT_REDACTION_PATHS, redactedKeys })\n if (payload.length > 10e5) {\n event.events[0]._metadata = {\n notifier:\n`WARNING!\nSerialized payload was ${payload.length / 10e5}MB (limit = 1MB)\nmetadata was removed`\n }\n payload = jsonStringify(event, null, null, { redactedPaths: EVENT_REDACTION_PATHS, redactedKeys })\n }\n return payload\n}\n\nmodule.exports.session = (session, redactedKeys) => {\n const payload = jsonStringify(session, null, null)\n return payload\n}\n","const FileSystem = require('expo-file-system')\n\nconst MAX_ITEMS = 64\nconst PAYLOAD_PATH = `${FileSystem.cacheDirectory}bugsnag`\nconst filenameRe = /^bugsnag-.*\\.json$/\n\n/*\n * This class resembles FIFO queue in which to store undelivered payloads.\n */\nmodule.exports = class UndeliveredPayloadQueue {\n constructor (resource, onerror = () => {}) {\n this._resource = resource\n this._path = `${PAYLOAD_PATH}/${this._resource}`\n this._onerror = onerror\n this._truncating = false\n this._initCall = null\n }\n\n /*\n * Calls _init(), ensuring it only does that task once returning\n * the same promise to each concurrent caller\n */\n async init () {\n // we don't want multiple calls to init() to incur multiple attempts at creating\n // the directory, so we assign the existing _init() call\n if (this._initCall) return this._initCall\n this._initCall = this._init()\n .then(() => { this._initCall = null })\n .catch(e => {\n this._initCall = null\n throw e\n })\n return this._initCall\n }\n\n /*\n * Ensure the persistent cache directory exists\n */\n async _init () {\n if (await this._checkCacheDirExists()) return\n try {\n await FileSystem.makeDirectoryAsync(this._path, { intermediates: true })\n } catch (e) {\n // Expo has a bug where `makeDirectoryAsync` can error, even though it succesfully\n // created the directory. See:\n // https://github.com/expo/expo/issues/2050\n // https://forums.expo.io/t/makedirectoryasync-error-could-not-be-created/11916\n //\n // To tolerate this, after getting an error, we check whether the directory\n // now exist, swallowing the error if so, rethrowing if not.\n if (await this._checkCacheDirExists()) return\n throw e\n }\n }\n\n /*\n * Check if the cache directory exists\n */\n async _checkCacheDirExists () {\n const { exists, isDirectory } = await FileSystem.getInfoAsync(this._path)\n return exists && isDirectory\n }\n\n /*\n * Keeps the queue size bounded by MAX_LENGTH\n */\n async _truncate () {\n // this isn't atomic so only enter this method once at any time\n if (this._truncating) return\n this._truncating = true\n\n try {\n // list the payloads in order\n const payloads = (await FileSystem.readDirectoryAsync(this._path))\n .filter(f => filenameRe.test(f)).sort()\n\n // figure out how many over MAX_ITEMS we are\n const diff = payloads.length - MAX_ITEMS\n\n // do nothing if within the limit\n if (diff < 0) {\n this._truncating = false\n return\n }\n\n // wait for each of the items over the limit to be removed\n await Promise.all(\n payloads.slice(0, diff)\n .map(f => this.remove(`${this._path}/${f}`))\n )\n\n // done\n this._truncating = false\n } catch (e) {\n this._truncating = false\n this._onerror(e)\n }\n }\n\n /*\n * Adds an item to the end of the queue\n */\n async enqueue (req) {\n try {\n await this.init()\n await FileSystem.writeAsStringAsync(\n `${this._path}/${generateFilename(this._resource)}`,\n JSON.stringify({ ...req, retries: 0 })\n )\n this._truncate()\n } catch (e) {\n this._onerror(e)\n }\n }\n\n /*\n * Returns the oldest item in the queue without removing it\n */\n async peek () {\n try {\n const payloads = await FileSystem.readDirectoryAsync(this._path)\n const payloadFileName = payloads.filter(f => filenameRe.test(f)).sort()[0]\n if (!payloadFileName) return null\n const id = `${this._path}/${payloadFileName}`\n\n try {\n const payloadJson = await FileSystem.readAsStringAsync(id)\n const payload = JSON.parse(payloadJson)\n return { id, payload }\n } catch (e) {\n // if we got here it's because\n // a) JSON.parse failed or\n // b) the file can no longer be read (maybe it was truncated?)\n // in both cases we want to speculatively remove it and try peeking again\n await this.remove(id)\n return this.peek()\n }\n } catch (e) {\n this._onerror(e)\n return null\n }\n }\n\n /*\n * Removes an item from the queue by its id (full path).\n * Tolerant of errors while removing.\n */\n async remove (id) {\n try {\n await FileSystem.deleteAsync(id)\n } catch (e) {\n this._onerror(e)\n }\n }\n\n /*\n * Applies the provided updates to an item. This does a 1-level shallow merge on\n * an object, i.e. it replaces top level keys\n */\n async update (id, updates) {\n try {\n const payloadJson = await FileSystem.readAsStringAsync(id)\n const payload = JSON.parse(payloadJson)\n const updatedPayload = { ...payload, ...updates }\n await FileSystem.writeAsStringAsync(id, JSON.stringify(updatedPayload))\n } catch (e) {\n this._onerror(e)\n }\n }\n}\n\n// create a random 16 byte uri\nconst uid = () => {\n return Array(16).fill(1).reduce((accum, val) => {\n return accum + Math.floor(Math.random() * 10).toString()\n }, '')\n}\n\nconst generateFilename = module.exports.generateFilename = resource =>\n `bugsnag-${resource}-${(new Date()).toISOString()}-${uid()}.json`\n","export * from './FileSystem';\nexport * from './FileSystem.types';\n","import { type EventSubscription, UnavailabilityError, uuid } from 'expo-modules-core';\nimport { Platform } from 'react-native';\n\nimport ExponentFileSystem from './ExponentFileSystem';\nimport {\n DownloadOptions,\n DownloadPauseState,\n FileSystemNetworkTaskProgressCallback,\n DownloadProgressData,\n UploadProgressData,\n FileInfo,\n FileSystemAcceptedUploadHttpMethod,\n FileSystemDownloadResult,\n FileSystemRequestDirectoryPermissionsResult,\n FileSystemSessionType,\n FileSystemUploadOptions,\n FileSystemUploadResult,\n FileSystemUploadType,\n ProgressEvent,\n ReadingOptions,\n WritingOptions,\n DeletingOptions,\n InfoOptions,\n RelocatingOptions,\n MakeDirectoryOptions,\n} from './FileSystem.types';\n\nif (!ExponentFileSystem) {\n console.warn(\n \"No native ExponentFileSystem module found, are you sure the expo-file-system's module is linked properly?\"\n );\n}\n\nfunction normalizeEndingSlash(p: string | null): string | null {\n if (p != null) {\n return p.replace(/\\/*$/, '') + '/';\n }\n return null;\n}\n\n/**\n * `file://` URI pointing to the directory where user documents for this app will be stored.\n * Files stored here will remain until explicitly deleted by the app. Ends with a trailing `/`.\n * Example uses are for files the user saves that they expect to see again.\n */\nexport const documentDirectory = normalizeEndingSlash(ExponentFileSystem.documentDirectory);\n\n/**\n * `file://` URI pointing to the directory where temporary files used by this app will be stored.\n * Files stored here may be automatically deleted by the system when low on storage.\n * Example uses are for downloaded or generated files that the app just needs for one-time usage.\n */\nexport const cacheDirectory = normalizeEndingSlash(ExponentFileSystem.cacheDirectory);\n\n/**\n * URI to the directory where assets bundled with the application are stored.\n */\nexport const bundleDirectory = normalizeEndingSlash(ExponentFileSystem.bundleDirectory);\n\n/**\n * Get metadata information about a file, directory or external content/asset.\n * @param fileUri URI to the file or directory. See [supported URI schemes](#supported-uri-schemes).\n * @param options A map of options represented by [`InfoOptions`](#infooptions) type.\n * @return A Promise that resolves to a `FileInfo` object. If no item exists at this URI,\n * the returned Promise resolves to `FileInfo` object in form of `{ exists: false, isDirectory: false }`.\n */\nexport async function getInfoAsync(fileUri: string, options: InfoOptions = {}): Promise {\n if (!ExponentFileSystem.getInfoAsync) {\n throw new UnavailabilityError('expo-file-system', 'getInfoAsync');\n }\n return await ExponentFileSystem.getInfoAsync(fileUri, options);\n}\n\n/**\n * Read the entire contents of a file as a string. Binary will be returned in raw format, you will need to append `data:image/png;base64,` to use it as Base64.\n * @param fileUri `file://` or [SAF](#saf-uri) URI to the file or directory.\n * @param options A map of read options represented by [`ReadingOptions`](#readingoptions) type.\n * @return A Promise that resolves to a string containing the entire contents of the file.\n */\nexport async function readAsStringAsync(\n fileUri: string,\n options: ReadingOptions = {}\n): Promise {\n if (!ExponentFileSystem.readAsStringAsync) {\n throw new UnavailabilityError('expo-file-system', 'readAsStringAsync');\n }\n return await ExponentFileSystem.readAsStringAsync(fileUri, options);\n}\n\n/**\n * Takes a `file://` URI and converts it into content URI (`content://`) so that it can be accessed by other applications outside of Expo.\n * @param fileUri The local URI of the file. If there is no file at this URI, an exception will be thrown.\n * @example\n * ```js\n * FileSystem.getContentUriAsync(uri).then(cUri => {\n * console.log(cUri);\n * IntentLauncher.startActivityAsync('android.intent.action.VIEW', {\n * data: cUri,\n * flags: 1,\n * });\n * });\n * ```\n * @return Returns a Promise that resolves to a `string` containing a `content://` URI pointing to the file.\n * The URI is the same as the `fileUri` input parameter but in a different format.\n * @platform android\n */\nexport async function getContentUriAsync(fileUri: string): Promise {\n if (Platform.OS === 'android') {\n if (!ExponentFileSystem.getContentUriAsync) {\n throw new UnavailabilityError('expo-file-system', 'getContentUriAsync');\n }\n return await ExponentFileSystem.getContentUriAsync(fileUri);\n } else {\n return fileUri;\n }\n}\n\n/**\n * Write the entire contents of a file as a string.\n * @param fileUri `file://` or [SAF](#saf-uri) URI to the file or directory.\n * > Note: when you're using SAF URI the file needs to exist. You can't create a new file.\n * @param contents The string to replace the contents of the file with.\n * @param options A map of write options represented by [`WritingOptions`](#writingoptions) type.\n */\nexport async function writeAsStringAsync(\n fileUri: string,\n contents: string,\n options: WritingOptions = {}\n): Promise {\n if (!ExponentFileSystem.writeAsStringAsync) {\n throw new UnavailabilityError('expo-file-system', 'writeAsStringAsync');\n }\n return await ExponentFileSystem.writeAsStringAsync(fileUri, contents, options);\n}\n\n/**\n * Delete a file or directory. If the URI points to a directory, the directory and all its contents are recursively deleted.\n * @param fileUri `file://` or [SAF](#saf-uri) URI to the file or directory.\n * @param options A map of write options represented by [`DeletingOptions`](#deletingoptions) type.\n */\nexport async function deleteAsync(fileUri: string, options: DeletingOptions = {}): Promise {\n if (!ExponentFileSystem.deleteAsync) {\n throw new UnavailabilityError('expo-file-system', 'deleteAsync');\n }\n return await ExponentFileSystem.deleteAsync(fileUri, options);\n}\n\nexport async function deleteLegacyDocumentDirectoryAndroid(): Promise {\n if (Platform.OS !== 'android' || documentDirectory == null) {\n return;\n }\n const legacyDocumentDirectory = `${documentDirectory}ExperienceData/`;\n return await deleteAsync(legacyDocumentDirectory, { idempotent: true });\n}\n\n/**\n * Move a file or directory to a new location.\n * @param options A map of move options represented by [`RelocatingOptions`](#relocatingoptions) type.\n */\nexport async function moveAsync(options: RelocatingOptions): Promise {\n if (!ExponentFileSystem.moveAsync) {\n throw new UnavailabilityError('expo-file-system', 'moveAsync');\n }\n return await ExponentFileSystem.moveAsync(options);\n}\n\n/**\n * Create a copy of a file or directory. Directories are recursively copied with all of their contents.\n * It can be also used to copy content shared by other apps to local filesystem.\n * @param options A map of move options represented by [`RelocatingOptions`](#relocatingoptions) type.\n */\nexport async function copyAsync(options: RelocatingOptions): Promise {\n if (!ExponentFileSystem.copyAsync) {\n throw new UnavailabilityError('expo-file-system', 'copyAsync');\n }\n return await ExponentFileSystem.copyAsync(options);\n}\n\n/**\n * Create a new empty directory.\n * @param fileUri `file://` URI to the new directory to create.\n * @param options A map of create directory options represented by [`MakeDirectoryOptions`](#makedirectoryoptions) type.\n */\nexport async function makeDirectoryAsync(\n fileUri: string,\n options: MakeDirectoryOptions = {}\n): Promise {\n if (!ExponentFileSystem.makeDirectoryAsync) {\n throw new UnavailabilityError('expo-file-system', 'makeDirectoryAsync');\n }\n return await ExponentFileSystem.makeDirectoryAsync(fileUri, options);\n}\n\n/**\n * Enumerate the contents of a directory.\n * @param fileUri `file://` URI to the directory.\n * @return A Promise that resolves to an array of strings, each containing the name of a file or directory contained in the directory at `fileUri`.\n */\nexport async function readDirectoryAsync(fileUri: string): Promise {\n if (!ExponentFileSystem.readDirectoryAsync) {\n throw new UnavailabilityError('expo-file-system', 'readDirectoryAsync');\n }\n return await ExponentFileSystem.readDirectoryAsync(fileUri);\n}\n\n/**\n * Gets the available internal disk storage size, in bytes. This returns the free space on the data partition that hosts all of the internal storage for all apps on the device.\n * @return Returns a Promise that resolves to the number of bytes available on the internal disk.\n */\nexport async function getFreeDiskStorageAsync(): Promise {\n if (!ExponentFileSystem.getFreeDiskStorageAsync) {\n throw new UnavailabilityError('expo-file-system', 'getFreeDiskStorageAsync');\n }\n return await ExponentFileSystem.getFreeDiskStorageAsync();\n}\n\n/**\n * Gets total internal disk storage size, in bytes. This is the total capacity of the data partition that hosts all the internal storage for all apps on the device.\n * @return Returns a Promise that resolves to a number that specifies the total internal disk storage capacity in bytes.\n */\nexport async function getTotalDiskCapacityAsync(): Promise {\n if (!ExponentFileSystem.getTotalDiskCapacityAsync) {\n throw new UnavailabilityError('expo-file-system', 'getTotalDiskCapacityAsync');\n }\n return await ExponentFileSystem.getTotalDiskCapacityAsync();\n}\n\n/**\n * Download the contents at a remote URI to a file in the app's file system. The directory for a local file uri must exist prior to calling this function.\n * @param uri The remote URI to download from.\n * @param fileUri The local URI of the file to download to. If there is no file at this URI, a new one is created.\n * If there is a file at this URI, its contents are replaced. The directory for the file must exist.\n * @param options A map of download options represented by [`DownloadOptions`](#downloadoptions) type.\n * @example\n * ```js\n * FileSystem.downloadAsync(\n * 'http://techslides.com/demos/sample-videos/small.mp4',\n * FileSystem.documentDirectory + 'small.mp4'\n * )\n * .then(({ uri }) => {\n * console.log('Finished downloading to ', uri);\n * })\n * .catch(error => {\n * console.error(error);\n * });\n * ```\n * @return Returns a Promise that resolves to a `FileSystemDownloadResult` object.\n */\nexport async function downloadAsync(\n uri: string,\n fileUri: string,\n options: DownloadOptions = {}\n): Promise {\n if (!ExponentFileSystem.downloadAsync) {\n throw new UnavailabilityError('expo-file-system', 'downloadAsync');\n }\n\n return await ExponentFileSystem.downloadAsync(uri, fileUri, {\n sessionType: FileSystemSessionType.BACKGROUND,\n ...options,\n });\n}\n\n/**\n * Upload the contents of the file pointed by `fileUri` to the remote url.\n * @param url The remote URL, where the file will be sent.\n * @param fileUri The local URI of the file to send. The file must exist.\n * @param options A map of download options represented by [`FileSystemUploadOptions`](#filesystemuploadoptions) type.\n * @example\n * **Client**\n *\n * ```js\n * import * as FileSystem from 'expo-file-system';\n *\n * try {\n * const response = await FileSystem.uploadAsync(`http://192.168.0.1:1234/binary-upload`, fileUri, {\n * fieldName: 'file',\n * httpMethod: 'PATCH',\n * uploadType: FileSystem.FileSystemUploadType.BINARY_CONTENT,\n * });\n * console.log(JSON.stringify(response, null, 4));\n * } catch (error) {\n * console.log(error);\n * }\n * ```\n *\n * **Server**\n *\n * Please refer to the \"[Server: Handling multipart requests](#server-handling-multipart-requests)\" example - there is code for a simple Node.js server.\n * @return Returns a Promise that resolves to `FileSystemUploadResult` object.\n */\nexport async function uploadAsync(\n url: string,\n fileUri: string,\n options: FileSystemUploadOptions = {}\n): Promise {\n if (!ExponentFileSystem.uploadAsync) {\n throw new UnavailabilityError('expo-file-system', 'uploadAsync');\n }\n\n return await ExponentFileSystem.uploadAsync(url, fileUri, {\n sessionType: FileSystemSessionType.BACKGROUND,\n uploadType: FileSystemUploadType.BINARY_CONTENT,\n ...options,\n httpMethod: (options.httpMethod || 'POST').toUpperCase(),\n });\n}\n\n/**\n * Create a `DownloadResumable` object which can start, pause, and resume a download of contents at a remote URI to a file in the app's file system.\n * > Note: You need to call `downloadAsync()`, on a `DownloadResumable` instance to initiate the download.\n * The `DownloadResumable` object has a callback that provides download progress updates.\n * Downloads can be resumed across app restarts by using `AsyncStorage` to store the `DownloadResumable.savable()` object for later retrieval.\n * The `savable` object contains the arguments required to initialize a new `DownloadResumable` object to resume the download after an app restart.\n * The directory for a local file uri must exist prior to calling this function.\n * @param uri The remote URI to download from.\n * @param fileUri The local URI of the file to download to. If there is no file at this URI, a new one is created.\n * If there is a file at this URI, its contents are replaced. The directory for the file must exist.\n * @param options A map of download options represented by [`DownloadOptions`](#downloadoptions) type.\n * @param callback This function is called on each data write to update the download progress.\n * > **Note**: When the app has been moved to the background, this callback won't be fired until it's moved to the foreground.\n * @param resumeData The string which allows the api to resume a paused download. This is set on the `DownloadResumable` object automatically when a download is paused.\n * When initializing a new `DownloadResumable` this should be `null`.\n */\nexport function createDownloadResumable(\n uri: string,\n fileUri: string,\n options?: DownloadOptions,\n callback?: FileSystemNetworkTaskProgressCallback,\n resumeData?: string\n): DownloadResumable {\n return new DownloadResumable(uri, fileUri, options, callback, resumeData);\n}\n\nexport function createUploadTask(\n url: string,\n fileUri: string,\n options?: FileSystemUploadOptions,\n callback?: FileSystemNetworkTaskProgressCallback\n): UploadTask {\n return new UploadTask(url, fileUri, options, callback);\n}\n\nexport abstract class FileSystemCancellableNetworkTask<\n T extends DownloadProgressData | UploadProgressData,\n> {\n private _uuid = uuid.v4();\n protected taskWasCanceled = false;\n private subscription?: EventSubscription | null;\n\n // @docsMissing\n public async cancelAsync(): Promise {\n if (!ExponentFileSystem.networkTaskCancelAsync) {\n throw new UnavailabilityError('expo-file-system', 'networkTaskCancelAsync');\n }\n\n this.removeSubscription();\n this.taskWasCanceled = true;\n return await ExponentFileSystem.networkTaskCancelAsync(this.uuid);\n }\n\n protected isTaskCancelled(): boolean {\n if (this.taskWasCanceled) {\n console.warn('This task was already canceled.');\n return true;\n }\n\n return false;\n }\n\n protected get uuid(): string {\n return this._uuid;\n }\n\n protected abstract getEventName(): string;\n\n protected abstract getCallback(): FileSystemNetworkTaskProgressCallback | undefined;\n\n protected addSubscription() {\n if (this.subscription) {\n return;\n }\n\n this.subscription = ExponentFileSystem.addListener(\n this.getEventName(),\n (event: ProgressEvent) => {\n if (event.uuid === this.uuid) {\n const callback = this.getCallback();\n if (callback) {\n callback(event.data as T);\n }\n }\n }\n );\n }\n\n protected removeSubscription() {\n if (!this.subscription) {\n return;\n }\n this.subscription.remove();\n this.subscription = null;\n }\n}\n\nexport class UploadTask extends FileSystemCancellableNetworkTask {\n private options: FileSystemUploadOptions;\n\n constructor(\n private url: string,\n private fileUri: string,\n options?: FileSystemUploadOptions,\n private callback?: FileSystemNetworkTaskProgressCallback\n ) {\n super();\n\n const httpMethod = (options?.httpMethod?.toUpperCase() ||\n 'POST') as FileSystemAcceptedUploadHttpMethod;\n\n this.options = {\n sessionType: FileSystemSessionType.BACKGROUND,\n uploadType: FileSystemUploadType.BINARY_CONTENT,\n ...options,\n httpMethod,\n };\n }\n\n protected getEventName(): string {\n return 'expo-file-system.uploadProgress';\n }\n protected getCallback(): FileSystemNetworkTaskProgressCallback | undefined {\n return this.callback;\n }\n\n // @docsMissing\n public async uploadAsync(): Promise {\n if (!ExponentFileSystem.uploadTaskStartAsync) {\n throw new UnavailabilityError('expo-file-system', 'uploadTaskStartAsync');\n }\n\n if (this.isTaskCancelled()) {\n return;\n }\n\n this.addSubscription();\n const result = await ExponentFileSystem.uploadTaskStartAsync(\n this.url,\n this.fileUri,\n this.uuid,\n this.options\n );\n this.removeSubscription();\n\n return result;\n }\n}\n\nexport class DownloadResumable extends FileSystemCancellableNetworkTask {\n constructor(\n private url: string,\n private _fileUri: string,\n private options: DownloadOptions = {},\n private callback?: FileSystemNetworkTaskProgressCallback,\n private resumeData?: string\n ) {\n super();\n }\n\n public get fileUri(): string {\n return this._fileUri;\n }\n\n protected getEventName(): string {\n return 'expo-file-system.downloadProgress';\n }\n\n protected getCallback(): FileSystemNetworkTaskProgressCallback | undefined {\n return this.callback;\n }\n\n /**\n * Download the contents at a remote URI to a file in the app's file system.\n * @return Returns a Promise that resolves to `FileSystemDownloadResult` object, or to `undefined` when task was cancelled.\n */\n async downloadAsync(): Promise {\n if (!ExponentFileSystem.downloadResumableStartAsync) {\n throw new UnavailabilityError('expo-file-system', 'downloadResumableStartAsync');\n }\n\n if (this.isTaskCancelled()) {\n return;\n }\n\n this.addSubscription();\n return await ExponentFileSystem.downloadResumableStartAsync(\n this.url,\n this._fileUri,\n this.uuid,\n this.options,\n this.resumeData\n );\n }\n\n /**\n * Pause the current download operation. `resumeData` is added to the `DownloadResumable` object after a successful pause operation.\n * Returns an object that can be saved with `AsyncStorage` for future retrieval (the same object that is returned from calling `FileSystem.DownloadResumable.savable()`).\n * @return Returns a Promise that resolves to `DownloadPauseState` object.\n */\n async pauseAsync(): Promise {\n if (!ExponentFileSystem.downloadResumablePauseAsync) {\n throw new UnavailabilityError('expo-file-system', 'downloadResumablePauseAsync');\n }\n\n if (this.isTaskCancelled()) {\n return {\n fileUri: this._fileUri,\n options: this.options,\n url: this.url,\n };\n }\n\n const pauseResult = await ExponentFileSystem.downloadResumablePauseAsync(this.uuid);\n this.removeSubscription();\n if (pauseResult) {\n this.resumeData = pauseResult.resumeData;\n return this.savable();\n } else {\n throw new Error('Unable to generate a savable pause state');\n }\n }\n\n /**\n * Resume a paused download operation.\n * @return Returns a Promise that resolves to `FileSystemDownloadResult` object, or to `undefined` when task was cancelled.\n */\n async resumeAsync(): Promise {\n if (!ExponentFileSystem.downloadResumableStartAsync) {\n throw new UnavailabilityError('expo-file-system', 'downloadResumableStartAsync');\n }\n\n if (this.isTaskCancelled()) {\n return;\n }\n\n this.addSubscription();\n return await ExponentFileSystem.downloadResumableStartAsync(\n this.url,\n this.fileUri,\n this.uuid,\n this.options,\n this.resumeData\n );\n }\n\n /**\n * Method to get the object which can be saved with `AsyncStorage` for future retrieval.\n * @returns Returns object in shape of `DownloadPauseState` type.\n */\n savable(): DownloadPauseState {\n return {\n url: this.url,\n fileUri: this.fileUri,\n options: this.options,\n resumeData: this.resumeData,\n };\n }\n}\n\nconst baseReadAsStringAsync = readAsStringAsync;\nconst baseWriteAsStringAsync = writeAsStringAsync;\nconst baseDeleteAsync = deleteAsync;\nconst baseMoveAsync = moveAsync;\nconst baseCopyAsync = copyAsync;\n\n/**\n * The `StorageAccessFramework` is a namespace inside of the `expo-file-system` module, which encapsulates all functions which can be used with [SAF URIs](#saf-uri).\n * You can read more about SAF in the [Android documentation](https://developer.android.com/guide/topics/providers/document-provider).\n *\n * @example\n * # Basic Usage\n *\n * ```ts\n * import { StorageAccessFramework } from 'expo-file-system';\n *\n * // Requests permissions for external directory\n * const permissions = await StorageAccessFramework.requestDirectoryPermissionsAsync();\n *\n * if (permissions.granted) {\n * // Gets SAF URI from response\n * const uri = permissions.directoryUri;\n *\n * // Gets all files inside of selected directory\n * const files = await StorageAccessFramework.readDirectoryAsync(uri);\n * alert(`Files inside ${uri}:\\n\\n${JSON.stringify(files)}`);\n * }\n * ```\n *\n * # Migrating an album\n *\n * ```ts\n * import * as MediaLibrary from 'expo-media-library';\n * import * as FileSystem from 'expo-file-system';\n * const { StorageAccessFramework } = FileSystem;\n *\n * async function migrateAlbum(albumName: string) {\n * // Gets SAF URI to the album\n * const albumUri = StorageAccessFramework.getUriForDirectoryInRoot(albumName);\n *\n * // Requests permissions\n * const permissions = await StorageAccessFramework.requestDirectoryPermissionsAsync(albumUri);\n * if (!permissions.granted) {\n * return;\n * }\n *\n * const permittedUri = permissions.directoryUri;\n * // Checks if users selected the correct folder\n * if (!permittedUri.includes(albumName)) {\n * return;\n * }\n *\n * const mediaLibraryPermissions = await MediaLibrary.requestPermissionsAsync();\n * if (!mediaLibraryPermissions.granted) {\n * return;\n * }\n *\n * // Moves files from external storage to internal storage\n * await StorageAccessFramework.moveAsync({\n * from: permittedUri,\n * to: FileSystem.documentDirectory!,\n * });\n *\n * const outputDir = FileSystem.documentDirectory! + albumName;\n * const migratedFiles = await FileSystem.readDirectoryAsync(outputDir);\n *\n * // Creates assets from local files\n * const [newAlbumCreator, ...assets] = await Promise.all(\n * migratedFiles.map>(\n * async fileName => await MediaLibrary.createAssetAsync(outputDir + '/' + fileName)\n * )\n * );\n *\n * // Album was empty\n * if (!newAlbumCreator) {\n * return;\n * }\n *\n * // Creates a new album in the scoped directory\n * const newAlbum = await MediaLibrary.createAlbumAsync(albumName, newAlbumCreator, false);\n * if (assets.length) {\n * await MediaLibrary.addAssetsToAlbumAsync(assets, newAlbum, false);\n * }\n * }\n * ```\n * @platform Android\n */\nexport namespace StorageAccessFramework {\n /**\n * Gets a [SAF URI](#saf-uri) pointing to a folder in the Android root directory. You can use this function to get URI for\n * `StorageAccessFramework.requestDirectoryPermissionsAsync()` when you trying to migrate an album. In that case, the name of the album is the folder name.\n * @param folderName The name of the folder which is located in the Android root directory.\n * @return Returns a [SAF URI](#saf-uri) to a folder.\n */\n export function getUriForDirectoryInRoot(folderName: string) {\n return `content://com.android.externalstorage.documents/tree/primary:${folderName}/document/primary:${folderName}`;\n }\n\n /**\n * Allows users to select a specific directory, granting your app access to all of the files and sub-directories within that directory.\n * @param initialFileUrl The [SAF URI](#saf-uri) of the directory that the file picker should display when it first loads.\n * If URI is incorrect or points to a non-existing folder, it's ignored.\n * @platform android 11+\n * @return Returns a Promise that resolves to `FileSystemRequestDirectoryPermissionsResult` object.\n */\n export async function requestDirectoryPermissionsAsync(\n initialFileUrl: string | null = null\n ): Promise {\n if (!ExponentFileSystem.requestDirectoryPermissionsAsync) {\n throw new UnavailabilityError(\n 'expo-file-system',\n 'StorageAccessFramework.requestDirectoryPermissionsAsync'\n );\n }\n\n return await ExponentFileSystem.requestDirectoryPermissionsAsync(initialFileUrl);\n }\n\n /**\n * Enumerate the contents of a directory.\n * @param dirUri [SAF](#saf-uri) URI to the directory.\n * @return A Promise that resolves to an array of strings, each containing the full [SAF URI](#saf-uri) of a file or directory contained in the directory at `fileUri`.\n */\n export async function readDirectoryAsync(dirUri: string): Promise {\n if (!ExponentFileSystem.readSAFDirectoryAsync) {\n throw new UnavailabilityError(\n 'expo-file-system',\n 'StorageAccessFramework.readDirectoryAsync'\n );\n }\n return await ExponentFileSystem.readSAFDirectoryAsync(dirUri);\n }\n\n /**\n * Creates a new empty directory.\n * @param parentUri The [SAF](#saf-uri) URI to the parent directory.\n * @param dirName The name of new directory.\n * @return A Promise that resolves to a [SAF URI](#saf-uri) to the created directory.\n */\n export async function makeDirectoryAsync(parentUri: string, dirName: string): Promise {\n if (!ExponentFileSystem.makeSAFDirectoryAsync) {\n throw new UnavailabilityError(\n 'expo-file-system',\n 'StorageAccessFramework.makeDirectoryAsync'\n );\n }\n return await ExponentFileSystem.makeSAFDirectoryAsync(parentUri, dirName);\n }\n\n /**\n * Creates a new empty file.\n * @param parentUri The [SAF](#saf-uri) URI to the parent directory.\n * @param fileName The name of new file **without the extension**.\n * @param mimeType The MIME type of new file.\n * @return A Promise that resolves to a [SAF URI](#saf-uri) to the created file.\n */\n export async function createFileAsync(\n parentUri: string,\n fileName: string,\n mimeType: string\n ): Promise {\n if (!ExponentFileSystem.createSAFFileAsync) {\n throw new UnavailabilityError('expo-file-system', 'StorageAccessFramework.createFileAsync');\n }\n return await ExponentFileSystem.createSAFFileAsync(parentUri, fileName, mimeType);\n }\n\n /**\n * Alias for [`writeAsStringAsync`](#filesystemwriteasstringasyncfileuri-contents-options) method.\n */\n export const writeAsStringAsync = baseWriteAsStringAsync;\n /**\n * Alias for [`readAsStringAsync`](#filesystemreadasstringasyncfileuri-options) method.\n */\n export const readAsStringAsync = baseReadAsStringAsync;\n /**\n * Alias for [`deleteAsync`](#filesystemdeleteasyncfileuri-options) method.\n */\n export const deleteAsync = baseDeleteAsync;\n /**\n * Alias for [`moveAsync`](#filesystemmoveasyncoptions) method.\n */\n export const moveAsync = baseMoveAsync;\n /**\n * Alias for [`copyAsync`](#filesystemcopyasyncoptions) method.\n */\n export const copyAsync = baseCopyAsync;\n}\n","import ExponentFileSystemShim from './ExponentFileSystemShim';\nexport default ExponentFileSystemShim;\n","import { NativeModule } from 'expo-modules-core';\n\nimport type { ExponentFileSystemModule, FileSystemEvents } from './types';\n\nexport default class FileSystemShim\n extends NativeModule\n implements ExponentFileSystemModule\n{\n documentDirectory = null;\n cacheDirectory = null;\n bundleDirectory = null;\n}\n","/**\n * These values can be used to define how sessions work on iOS.\n * @platform ios\n */\nexport enum FileSystemSessionType {\n /**\n * Using this mode means that the downloading/uploading session on the native side will work even if the application is moved to background.\n * If the task completes while the application is in background, the Promise will be either resolved immediately or (if the application execution has already been stopped) once the app is moved to foreground again.\n * > Note: The background session doesn't fail if the server or your connection is down. Rather, it continues retrying until the task succeeds or is canceled manually.\n */\n BACKGROUND = 0,\n /**\n * Using this mode means that downloading/uploading session on the native side will be terminated once the application becomes inactive (e.g. when it goes to background).\n * Bringing the application to foreground again would trigger Promise rejection.\n */\n FOREGROUND = 1,\n}\n\nexport enum FileSystemUploadType {\n /**\n * The file will be sent as a request's body. The request can't contain additional data.\n */\n BINARY_CONTENT = 0,\n /**\n * An [RFC 2387-compliant](https://www.ietf.org/rfc/rfc2387.txt) request body. The provided file will be encoded into HTTP request.\n * This request can contain additional data represented by [`UploadOptionsMultipart`](#uploadoptionsmultipart) type.\n */\n MULTIPART = 1,\n}\n\nexport type DownloadOptions = {\n /**\n * If `true`, include the MD5 hash of the file in the returned object. Provided for convenience since it is common to check the integrity of a file immediately after downloading.\n * @default false\n */\n md5?: boolean;\n // @docsMissing\n cache?: boolean;\n /**\n * An object containing all the HTTP header fields and their values for the download network request. The keys and values of the object are the header names and values respectively.\n */\n headers?: Record;\n /**\n * A session type. Determines if tasks can be handled in the background. On Android, sessions always work in the background and you can't change it.\n * @default FileSystemSessionType.BACKGROUND\n * @platform ios\n */\n sessionType?: FileSystemSessionType;\n};\n\nexport type FileSystemHttpResult = {\n /**\n * An object containing all the HTTP response header fields and their values for the download network request.\n * The keys and values of the object are the header names and values respectively.\n */\n headers: Record;\n /**\n * The HTTP response status code for the download network request.\n */\n status: number;\n // @docsMissing\n mimeType: string | null;\n};\n\nexport type FileSystemDownloadResult = FileSystemHttpResult & {\n /**\n * A `file://` URI pointing to the file. This is the same as the `fileUri` input parameter.\n */\n uri: string;\n /**\n * Present if the `md5` option was truthy. Contains the MD5 hash of the file.\n */\n md5?: string;\n};\n\n/**\n * @deprecated Use `FileSystemDownloadResult` instead.\n */\nexport type DownloadResult = FileSystemDownloadResult;\n\nexport type FileSystemUploadOptions = (UploadOptionsBinary | UploadOptionsMultipart) & {\n /**\n * An object containing all the HTTP header fields and their values for the upload network request.\n * The keys and values of the object are the header names and values respectively.\n */\n headers?: Record;\n /**\n * The request method.\n * @default FileSystemAcceptedUploadHttpMethod.POST\n */\n httpMethod?: FileSystemAcceptedUploadHttpMethod;\n /**\n * A session type. Determines if tasks can be handled in the background. On Android, sessions always work in the background and you can't change it.\n * @default FileSystemSessionType.BACKGROUND\n * @platform ios\n */\n sessionType?: FileSystemSessionType;\n};\n\n/**\n * Upload options when upload type is set to binary.\n */\nexport type UploadOptionsBinary = {\n /**\n * Upload type determines how the file will be sent to the server.\n * Value will be `FileSystemUploadType.BINARY_CONTENT`.\n */\n uploadType?: FileSystemUploadType;\n};\n\n/**\n * Upload options when upload type is set to multipart.\n */\nexport type UploadOptionsMultipart = {\n /**\n * Upload type determines how the file will be sent to the server.\n * Value will be `FileSystemUploadType.MULTIPART`.\n */\n uploadType: FileSystemUploadType;\n /**\n * The name of the field which will hold uploaded file. Defaults to the file name without an extension.\n */\n fieldName?: string;\n /**\n * The MIME type of the provided file. If not provided, the module will try to guess it based on the extension.\n */\n mimeType?: string;\n /**\n * Additional form properties. They will be located in the request body.\n */\n parameters?: Record;\n};\n\nexport type FileSystemUploadResult = FileSystemHttpResult & {\n /**\n * The body of the server response.\n */\n body: string;\n};\n\n// @docsMissing\nexport type FileSystemNetworkTaskProgressCallback<\n T extends DownloadProgressData | UploadProgressData,\n> = (data: T) => void;\n\n/**\n * @deprecated use `FileSystemNetworkTaskProgressCallback` instead.\n */\nexport type DownloadProgressCallback = FileSystemNetworkTaskProgressCallback;\n\nexport type DownloadProgressData = {\n /**\n * The total bytes written by the download operation.\n */\n totalBytesWritten: number;\n /**\n * The total bytes expected to be written by the download operation. A value of `-1` means that the server did not return the `Content-Length` header\n * and the total size is unknown. Without this header, you won't be able to track the download progress.\n */\n totalBytesExpectedToWrite: number;\n};\n\nexport type UploadProgressData = {\n /**\n * The total bytes sent by the upload operation.\n */\n totalBytesSent: number;\n /**\n * The total bytes expected to be sent by the upload operation.\n */\n totalBytesExpectedToSend: number;\n};\n\nexport type DownloadPauseState = {\n /**\n * The remote URI to download from.\n */\n url: string;\n /**\n * The local URI of the file to download to. If there is no file at this URI, a new one is created. If there is a file at this URI, its contents are replaced.\n */\n fileUri: string;\n /**\n * Object representing the file download options.\n */\n options: DownloadOptions;\n /**\n * The string which allows the API to resume a paused download.\n */\n resumeData?: string;\n};\n\nexport type FileInfo =\n /**\n * Object returned when file exist.\n */\n | {\n /**\n * Signifies that the requested file exist.\n */\n exists: true;\n /**\n * A `file://` URI pointing to the file. This is the same as the `fileUri` input parameter.\n */\n uri: string;\n /**\n * The size of the file in bytes. If operating on a source such as an iCloud file, only present if the `size` option was truthy.\n */\n size: number;\n /**\n * Boolean set to `true` if this is a directory and `false` if it is a file.\n */\n isDirectory: boolean;\n /**\n * The last modification time of the file expressed in seconds since epoch.\n */\n modificationTime: number;\n /**\n * Present if the `md5` option was truthy. Contains the MD5 hash of the file.\n */\n md5?: string;\n }\n /**\n * Object returned when file do not exist.\n */\n | {\n exists: false;\n uri: string;\n isDirectory: false;\n };\n\n/**\n * These values can be used to define how file system data is read / written.\n */\nexport enum EncodingType {\n /**\n * Standard encoding format.\n */\n UTF8 = 'utf8',\n /**\n * Binary, radix-64 representation.\n */\n Base64 = 'base64',\n}\n\n// @docsMissing\nexport type FileSystemAcceptedUploadHttpMethod = 'POST' | 'PUT' | 'PATCH';\n\nexport type ReadingOptions = {\n /**\n * The encoding format to use when reading the file.\n * @default EncodingType.UTF8\n */\n encoding?: EncodingType | 'utf8' | 'base64';\n /**\n * Optional number of bytes to skip. This option is only used when `encoding: FileSystem.EncodingType.Base64` and `length` is defined.\n * */\n position?: number;\n /**\n * Optional number of bytes to read. This option is only used when `encoding: FileSystem.EncodingType.Base64` and `position` is defined.\n */\n length?: number;\n};\n\nexport type WritingOptions = {\n /**\n * The encoding format to use when writing the file.\n * @default FileSystem.EncodingType.UTF8\n */\n encoding?: EncodingType | 'utf8' | 'base64';\n};\n\nexport type DeletingOptions = {\n /**\n * If `true`, don't throw an error if there is no file or directory at this URI.\n * @default false\n */\n idempotent?: boolean;\n};\n\nexport type InfoOptions = {\n /**\n * Whether to return the MD5 hash of the file.\n * @default false\n */\n md5?: boolean;\n /**\n * Explicitly specify that the file size should be included. For example, skipping this can prevent downloading the file if it's stored in iCloud.\n * The size is always returned for `file://` locations.\n */\n size?: boolean;\n};\n\nexport type RelocatingOptions = {\n /**\n * URI or [SAF](#saf-uri) URI to the asset, file, or directory. See [supported URI schemes](#supported-uri-schemes-1).\n */\n from: string;\n /**\n * `file://` URI to the file or directory which should be its new location.\n */\n to: string;\n};\n\nexport type MakeDirectoryOptions = {\n /**\n * If `true`, don't throw an error if there is no file or directory at this URI.\n * @default false\n */\n intermediates?: boolean;\n};\n\n// @docsMissing\nexport type ProgressEvent = {\n uuid: string;\n data: T;\n};\n\nexport type FileSystemRequestDirectoryPermissionsResult =\n /**\n * If the permissions were not granted.\n */\n | {\n granted: false;\n }\n /**\n * If the permissions were granted.\n */\n | {\n granted: true;\n /**\n * The [SAF URI](#saf-uri) to the user's selected directory. Available only if permissions were granted.\n */\n directoryUri: string;\n };\n","const NetInfo = require('@react-native-community/netinfo')\n\n/*\n * This class provides the following:\n * - a boolean `isConnected` property which reflects the current status\n * - a `watch(fn)` calls a callback to be called whenever isConnected changes state\n */\nmodule.exports = class NetworkStatus {\n constructor () {\n this.isConnected = false\n this._watchers = []\n this._watch()\n }\n\n watch (fn) {\n this._watchers.push(fn)\n fn(this.isConnected)\n }\n\n _update (isConnected) {\n this.isConnected = isConnected\n this._watchers.forEach(w => w(this.isConnected))\n }\n\n _watch () {\n // get the initial status\n NetInfo.fetch().then(state => {\n this._update(state.isConnected)\n // then listen for subsequent changes\n NetInfo.addEventListener(state => {\n this._update(state.isConnected)\n })\n })\n }\n}\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 * @format\n */\nimport { useState, useEffect, useCallback } from 'react';\nimport { Platform } from 'react-native';\nimport DEFAULT_CONFIGURATION from './internal/defaultConfiguration';\nimport NativeInterface from './internal/nativeInterface';\nimport State from './internal/state';\nimport * as Types from './internal/types'; // Stores the currently used configuration\n\nlet _configuration = DEFAULT_CONFIGURATION; // Stores the singleton reference to the state manager\n\nlet _state = null;\n\nconst createState = () => {\n return new State(_configuration);\n}; // Track ongoing requests\n\n\nlet isRequestInProgress = false;\nlet requestQueue = [];\n/**\n * Configures the library with the given configuration. Note that calling this will stop all\n * previously added listeners from being called again. It is best to call this right when your\n * application is started to avoid issues. The configuration sets up a global singleton instance.\n *\n * @param configuration The new configuration to set.\n */\n\nexport function configure(configuration) {\n _configuration = { ...DEFAULT_CONFIGURATION,\n ...configuration\n };\n\n if (_state) {\n _state.tearDown();\n\n _state = createState();\n }\n\n if (Platform.OS === 'ios') {\n NativeInterface.configure(configuration);\n }\n}\n/**\n * Returns a `Promise` that resolves to a `NetInfoState` object.\n * This function operates on the global singleton instance configured using `configure()`\n *\n * @param [requestedInterface] interface from which to obtain the information\n *\n * @returns A Promise which contains the current connection state.\n */\n\nexport function fetch(requestedInterface) {\n if (!_state) {\n _state = createState();\n }\n\n return _state.latest(requestedInterface);\n}\n/**\n * Force-refreshes the internal state of the global singleton managed by this library.\n *\n * @returns A Promise which contains the updated connection state.\n */\n\nexport function refresh() {\n if (!_state) {\n _state = createState();\n } // If a request is already in progress, return a promise that will resolve when the current request finishes\n\n\n if (isRequestInProgress) {\n return new Promise(resolve => {\n requestQueue.push(resolve);\n });\n }\n\n isRequestInProgress = true;\n return _state._fetchCurrentState().then(result => {\n requestQueue.forEach(resolve => resolve(result));\n requestQueue = [];\n return result;\n }).finally(() => {\n isRequestInProgress = false;\n });\n}\n/**\n * Subscribe to the global singleton's connection information. The callback is called with a parameter of type\n * [`NetInfoState`](README.md#netinfostate) whenever the connection state changes. Your listener\n * will be called with the latest information soon after you subscribe and then with any\n * subsequent changes afterwards. You should not assume that the listener is called in the same\n * way across devices or platforms.\n *\n * @param listener The listener which is called when the network state changes.\n *\n * @returns A function which can be called to unsubscribe.\n */\n\nexport function addEventListener(listener) {\n if (!_state) {\n _state = createState();\n }\n\n _state.add(listener);\n\n return () => {\n _state && _state.remove(listener);\n };\n}\n/**\n * A React Hook into this library's singleton which updates when the connection state changes.\n *\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns The connection state.\n */\n\nexport function useNetInfo(configuration) {\n if (configuration) {\n configure(configuration);\n }\n\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null\n });\n useEffect(() => {\n const unsubscribe = addEventListener(setNetInfo);\n return () => unsubscribe();\n }, []);\n return netInfo;\n}\n/**\n * A React Hook which manages an isolated instance of the network info manager.\n * This is not a hook into a singleton shared state. NetInfo.configure, NetInfo.addEventListener,\n * NetInfo.fetch, NetInfo.refresh are performed on a global singleton and have no affect on this hook.\n * @param {boolean} isPaused - Pause the internal network checks.\n * @param {Partial} configuration - Configure the isolated network checker managed by this hook\n *\n * @returns the netInfo state and a refresh function\n */\n\nexport function useNetInfoInstance(isPaused = false, configuration) {\n const [networkInfoManager, setNetworkInfoManager] = useState();\n const [netInfo, setNetInfo] = useState({\n type: Types.NetInfoStateType.unknown,\n isConnected: null,\n isInternetReachable: null,\n details: null\n });\n useEffect(() => {\n if (isPaused) {\n return;\n }\n\n const config = { ...DEFAULT_CONFIGURATION,\n ...configuration\n };\n const state = new State(config);\n setNetworkInfoManager(state);\n state.add(setNetInfo);\n return state.tearDown;\n }, [isPaused, configuration]);\n const refresh = useCallback(() => {\n if (networkInfoManager && !isRequestInProgress) {\n isRequestInProgress = true;\n\n networkInfoManager._fetchCurrentState().finally(() => {\n isRequestInProgress = false;\n });\n }\n }, [networkInfoManager]);\n return {\n netInfo,\n refresh\n };\n}\nexport * from './internal/types';\nexport default {\n configure,\n fetch,\n refresh,\n addEventListener,\n useNetInfo,\n useNetInfoInstance\n};\n//# sourceMappingURL=index.js.map","const DEFAULT_CONFIGURATION = {\n reachabilityUrl: '/',\n reachabilityMethod: \"HEAD\",\n reachabilityHeaders: {},\n reachabilityTest: response => Promise.resolve(response.status === 200),\n reachabilityShortTimeout: 5 * 1000,\n // 5s\n reachabilityLongTimeout: 60 * 1000,\n // 60s\n reachabilityRequestTimeout: 15 * 1000,\n // 15s\n reachabilityShouldRun: () => true,\n shouldFetchWiFiSSID: true,\n useNativeReachability: true\n};\nexport default DEFAULT_CONFIGURATION;\n//# sourceMappingURL=defaultConfiguration.web.js.map","/**\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 * @format\n */\nimport { NativeEventEmitter } from 'react-native';\nimport RNCNetInfo from './nativeModule';\nimport { DEVICE_CONNECTIVITY_EVENT } from './privateTypes';\nconst nativeEventEmitter = new NativeEventEmitter(); // Listen to connectivity events\n\nRNCNetInfo.addListener(DEVICE_CONNECTIVITY_EVENT, event => {\n nativeEventEmitter.emit(DEVICE_CONNECTIVITY_EVENT, event);\n});\nexport default { ...RNCNetInfo,\n eventEmitter: nativeEventEmitter\n};\n//# sourceMappingURL=nativeInterface.web.js.map","/**\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 * @format\n */\nimport { DEVICE_CONNECTIVITY_EVENT } from './privateTypes';\nimport { NetInfoCellularGeneration, NetInfoStateType } from './types'; // See https://wicg.github.io/netinfo/#dom-connectiontype\n\n// Use a constant test of this form because in SSR on next.js, optional chaining is not sufficient,\n// but this test correctly detects that window is not available and allows for conditionals before access\nconst isWindowPresent = typeof window !== 'undefined'; // Check if window exists and if the browser supports the connection API\n\nconst connection = isWindowPresent && !window.hasOwnProperty('tizen') && !window.hasOwnProperty('webOS') ? window.navigator.connection || window.navigator.mozConnection || window.navigator.webkitConnection : undefined; // Map browser types to native types\n\nconst typeMapping = {\n bluetooth: NetInfoStateType.bluetooth,\n cellular: NetInfoStateType.cellular,\n ethernet: NetInfoStateType.ethernet,\n none: NetInfoStateType.none,\n other: NetInfoStateType.other,\n unknown: NetInfoStateType.unknown,\n wifi: NetInfoStateType.wifi,\n wimax: NetInfoStateType.wimax,\n mixed: NetInfoStateType.other\n};\nconst effectiveTypeMapping = {\n '2g': NetInfoCellularGeneration['2g'],\n '3g': NetInfoCellularGeneration['3g'],\n '4g': NetInfoCellularGeneration['4g'],\n 'slow-2g': NetInfoCellularGeneration['2g']\n}; // Determine current state of connection\n\nconst getCurrentState = _requestedInterface => {\n const isConnected = isWindowPresent ? navigator.onLine : false;\n const baseState = {\n isInternetReachable: null\n }; // If we don't have a connection object, we return minimal information\n\n if (!connection) {\n if (isConnected) {\n const state = { ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive: false\n }\n };\n return state;\n }\n\n const state = { ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type: NetInfoStateType.none,\n details: null\n };\n return state;\n } // Otherwise try to return detailed information\n\n\n const isConnectionExpensive = connection.saveData;\n const type = connection.type ? typeMapping[connection.type] : isConnected ? NetInfoStateType.other : NetInfoStateType.unknown;\n\n if (type === NetInfoStateType.bluetooth) {\n const state = { ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive\n }\n };\n return state;\n } else if (type === NetInfoStateType.cellular) {\n const state = { ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n cellularGeneration: effectiveTypeMapping[connection.effectiveType] || null,\n carrier: null\n }\n };\n return state;\n } else if (type === NetInfoStateType.ethernet) {\n const state = { ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ipAddress: null,\n subnet: null\n }\n };\n return state;\n } else if (type === NetInfoStateType.wifi) {\n const state = { ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive,\n ssid: null,\n bssid: null,\n strength: null,\n ipAddress: null,\n subnet: null,\n frequency: null,\n linkSpeed: null,\n rxLinkSpeed: null,\n txLinkSpeed: null\n }\n };\n return state;\n } else if (type === NetInfoStateType.wimax) {\n const state = { ...baseState,\n isConnected: true,\n type,\n details: {\n isConnectionExpensive\n }\n };\n return state;\n } else if (type === NetInfoStateType.none) {\n const state = { ...baseState,\n isConnected: false,\n isInternetReachable: false,\n type,\n details: null\n };\n return state;\n } else if (type === NetInfoStateType.unknown) {\n const state = { ...baseState,\n isConnected,\n isInternetReachable: null,\n type,\n details: null\n };\n return state;\n }\n\n const state = { ...baseState,\n isConnected: true,\n type: NetInfoStateType.other,\n details: {\n isConnectionExpensive\n }\n };\n return state;\n};\n\nconst handlers = [];\nconst nativeHandlers = [];\nconst RNCNetInfo = {\n addListener(type, handler) {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT:\n {\n const nativeHandler = () => {\n handler(getCurrentState());\n };\n\n if (connection) {\n connection.addEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.addEventListener('online', nativeHandler, false);\n window.addEventListener('offline', nativeHandler, false);\n }\n } // Remember handlers\n\n\n handlers.push(handler);\n nativeHandlers.push(nativeHandler);\n break;\n }\n }\n },\n\n removeListeners(type, handler) {\n switch (type) {\n case DEVICE_CONNECTIVITY_EVENT:\n {\n // Get native handler\n const index = handlers.indexOf(handler);\n const nativeHandler = nativeHandlers[index];\n\n if (connection) {\n connection.removeEventListener('change', nativeHandler);\n } else {\n if (isWindowPresent) {\n window.removeEventListener('online', nativeHandler);\n window.removeEventListener('offline', nativeHandler);\n }\n } // Remove handlers\n\n\n handlers.splice(index, 1);\n nativeHandlers.splice(index, 1);\n break;\n }\n }\n },\n\n async getCurrentState(requestedInterface) {\n return getCurrentState(requestedInterface);\n },\n\n configure() {\n return;\n }\n\n};\nexport default RNCNetInfo;\n//# sourceMappingURL=nativeModule.web.js.map","/**\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 * @format\n */\nexport const DEVICE_CONNECTIVITY_EVENT = 'netInfo.networkStatusDidChange'; // Certain properties are optional when sent by the native module and are handled by the JS code\n//# sourceMappingURL=privateTypes.js.map","/**\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 * @format\n */\nexport let NetInfoStateType;\n\n(function (NetInfoStateType) {\n NetInfoStateType[\"unknown\"] = \"unknown\";\n NetInfoStateType[\"none\"] = \"none\";\n NetInfoStateType[\"cellular\"] = \"cellular\";\n NetInfoStateType[\"wifi\"] = \"wifi\";\n NetInfoStateType[\"bluetooth\"] = \"bluetooth\";\n NetInfoStateType[\"ethernet\"] = \"ethernet\";\n NetInfoStateType[\"wimax\"] = \"wimax\";\n NetInfoStateType[\"vpn\"] = \"vpn\";\n NetInfoStateType[\"other\"] = \"other\";\n})(NetInfoStateType || (NetInfoStateType = {}));\n\nexport let NetInfoCellularGeneration;\n\n(function (NetInfoCellularGeneration) {\n NetInfoCellularGeneration[\"2g\"] = \"2g\";\n NetInfoCellularGeneration[\"3g\"] = \"3g\";\n NetInfoCellularGeneration[\"4g\"] = \"4g\";\n NetInfoCellularGeneration[\"5g\"] = \"5g\";\n})(NetInfoCellularGeneration || (NetInfoCellularGeneration = {}));\n//# sourceMappingURL=types.js.map","function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\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 * @format\n */\nimport NativeInterface from './nativeInterface';\nimport InternetReachability from './internetReachability';\nimport * as PrivateTypes from './privateTypes';\nexport default class State {\n constructor(configuration) {\n _defineProperty(this, \"_nativeEventSubscription\", null);\n\n _defineProperty(this, \"_subscriptions\", new Set());\n\n _defineProperty(this, \"_latestState\", null);\n\n _defineProperty(this, \"_internetReachability\", void 0);\n\n _defineProperty(this, \"_handleNativeStateUpdate\", state => {\n // Update the internet reachability module\n this._internetReachability.update(state); // Convert the state from native to JS shape\n\n\n const convertedState = this._convertState(state); // Update the listeners\n\n\n this._latestState = convertedState;\n\n this._subscriptions.forEach(handler => handler(convertedState));\n });\n\n _defineProperty(this, \"_handleInternetReachabilityUpdate\", isInternetReachable => {\n if (!this._latestState) {\n return;\n }\n\n const nextState = { ...this._latestState,\n isInternetReachable\n };\n this._latestState = nextState;\n\n this._subscriptions.forEach(handler => handler(nextState));\n });\n\n _defineProperty(this, \"_fetchCurrentState\", async requestedInterface => {\n const state = await NativeInterface.getCurrentState(requestedInterface); // Update the internet reachability module\n\n this._internetReachability.update(state); // Convert and store the new state\n\n\n const convertedState = this._convertState(state);\n\n if (!requestedInterface) {\n this._latestState = convertedState;\n\n this._subscriptions.forEach(handler => handler(convertedState));\n }\n\n return convertedState;\n });\n\n _defineProperty(this, \"_convertState\", input => {\n if (typeof input.isInternetReachable === 'boolean') {\n return input;\n } else {\n return { ...input,\n isInternetReachable: this._internetReachability.currentState()\n };\n }\n });\n\n _defineProperty(this, \"latest\", requestedInterface => {\n if (requestedInterface) {\n return this._fetchCurrentState(requestedInterface);\n } else if (this._latestState) {\n return Promise.resolve(this._latestState);\n } else {\n return this._fetchCurrentState();\n }\n });\n\n _defineProperty(this, \"add\", handler => {\n // Add the subscription handler to our set\n this._subscriptions.add(handler); // Send it the latest data we have\n\n\n if (this._latestState) {\n handler(this._latestState);\n } else {\n this.latest().then(handler);\n }\n });\n\n _defineProperty(this, \"remove\", handler => {\n this._subscriptions.delete(handler);\n });\n\n _defineProperty(this, \"tearDown\", () => {\n if (this._internetReachability) {\n this._internetReachability.tearDown();\n }\n\n if (this._nativeEventSubscription) {\n this._nativeEventSubscription.remove();\n }\n\n this._subscriptions.clear();\n });\n\n // Add the listener to the internet connectivity events\n this._internetReachability = new InternetReachability(configuration, this._handleInternetReachabilityUpdate); // Add the subscription to the native events\n\n this._nativeEventSubscription = NativeInterface.eventEmitter.addListener(PrivateTypes.DEVICE_CONNECTIVITY_EVENT, this._handleNativeStateUpdate); // Fetch the current state from the native module\n\n this._fetchCurrentState();\n }\n\n}\n//# sourceMappingURL=state.js.map","function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\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 * @format\n */\nexport default class InternetReachability {\n constructor(configuration, listener) {\n _defineProperty(this, \"_configuration\", void 0);\n\n _defineProperty(this, \"_listener\", void 0);\n\n _defineProperty(this, \"_isInternetReachable\", undefined);\n\n _defineProperty(this, \"_currentInternetReachabilityCheckHandler\", null);\n\n _defineProperty(this, \"_currentTimeoutHandle\", null);\n\n _defineProperty(this, \"_setIsInternetReachable\", isInternetReachable => {\n if (this._isInternetReachable === isInternetReachable) {\n return;\n }\n\n this._isInternetReachable = isInternetReachable;\n\n this._listener(this._isInternetReachable);\n });\n\n _defineProperty(this, \"_setExpectsConnection\", expectsConnection => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n\n this._currentInternetReachabilityCheckHandler = null;\n } // Cancel any pending timeout\n\n\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n\n if (expectsConnection && this._configuration.reachabilityShouldRun()) {\n // If we expect a connection, start the process for finding if we have one\n // Set the state to \"null\" if it was previously false\n if (!this._isInternetReachable) {\n this._setIsInternetReachable(null);\n } // Start a network request to check for internet\n\n\n this._currentInternetReachabilityCheckHandler = this._checkInternetReachability();\n } else {\n // If we don't expect a connection or don't run reachability check, just change the state to \"false\"\n this._setIsInternetReachable(false);\n }\n });\n\n _defineProperty(this, \"_checkInternetReachability\", () => {\n const controller = new AbortController();\n const responsePromise = fetch(this._configuration.reachabilityUrl, {\n headers: this._configuration.reachabilityHeaders,\n method: this._configuration.reachabilityMethod,\n cache: 'no-cache',\n signal: controller.signal\n }); // Create promise that will reject after the request timeout has been reached\n\n let timeoutHandle;\n const timeoutPromise = new Promise((_, reject) => {\n timeoutHandle = setTimeout(() => reject('timedout'), this._configuration.reachabilityRequestTimeout);\n }); // Create promise that makes it possible to cancel a pending request through a reject\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n\n let cancel = () => {};\n\n const cancelPromise = new Promise((_, reject) => {\n cancel = () => reject('canceled');\n });\n const promise = Promise.race([responsePromise, timeoutPromise, cancelPromise]).then(response => {\n return this._configuration.reachabilityTest(response);\n }).then(result => {\n this._setIsInternetReachable(result);\n\n const nextTimeoutInterval = this._isInternetReachable ? this._configuration.reachabilityLongTimeout : this._configuration.reachabilityShortTimeout;\n this._currentTimeoutHandle = setTimeout(this._checkInternetReachability, nextTimeoutInterval);\n }).catch(error => {\n if ('canceled' === error) {\n controller.abort();\n } else {\n if ('timedout' === error) {\n controller.abort();\n }\n\n this._setIsInternetReachable(false);\n\n this._currentTimeoutHandle = setTimeout(this._checkInternetReachability, this._configuration.reachabilityShortTimeout);\n }\n }) // Clear request timeout and propagate any errors\n .then(() => {\n clearTimeout(timeoutHandle);\n }, error => {\n clearTimeout(timeoutHandle);\n throw error;\n });\n return {\n promise,\n cancel\n };\n });\n\n _defineProperty(this, \"update\", state => {\n if (typeof state.isInternetReachable === 'boolean' && this._configuration.useNativeReachability) {\n this._setIsInternetReachable(state.isInternetReachable);\n } else {\n this._setExpectsConnection(state.isConnected);\n }\n });\n\n _defineProperty(this, \"currentState\", () => {\n return this._isInternetReachable;\n });\n\n _defineProperty(this, \"tearDown\", () => {\n // Cancel any pending check\n if (this._currentInternetReachabilityCheckHandler !== null) {\n this._currentInternetReachabilityCheckHandler.cancel();\n\n this._currentInternetReachabilityCheckHandler = null;\n } // Cancel any pending timeout\n\n\n if (this._currentTimeoutHandle !== null) {\n clearTimeout(this._currentTimeoutHandle);\n this._currentTimeoutHandle = null;\n }\n });\n\n this._configuration = configuration;\n this._listener = listener;\n }\n\n}\n//# sourceMappingURL=internetReachability.js.map","const RETRY_INTERVAL_MS = 30 * 1000\nconst MAX_RETRIES = 5\n\n/*\n * This class consumes from a queue of undelivered payloads and attempts to re-send\n * them. If delivery succeeds, the item is removed from the queue. If it fails, the\n * item is updated with with number of attempted retries. However, if MAX_RETRIES is\n * reached the item is removed from the queue.\n */\nmodule.exports = class RedeliveryLoop {\n constructor (\n send,\n queue,\n onerror = () => {},\n retryInterval = RETRY_INTERVAL_MS,\n maxRetries = MAX_RETRIES\n ) {\n this._send = send\n this._queue = queue\n this._onerror = onerror\n this._retryInterval = retryInterval\n this._maxRetries = maxRetries\n\n this._timer = null\n this._stopped = true\n }\n\n stop () {\n this._stopped = true\n clearTimeout(this._timer)\n }\n\n start () {\n // no-op if we're already running\n if (!this._stopped) return\n this._stopped = false\n this._schedule(0)\n }\n\n _schedule (t) {\n if (this._stopped) return\n this._timer = setTimeout(this._redeliver.bind(this), t)\n }\n\n async _redeliver () {\n try {\n // pop a failed request off of the queue\n const res = await this._queue.peek()\n\n // if there isn't anything on the queue, stop the loop\n if (!res) {\n this.stop()\n return\n }\n\n const { id, payload } = res\n\n // if there is, attempt to deliver it\n this._send(payload.url, payload.opts, async (err) => {\n try {\n if (err) {\n this._onerror(err)\n\n if (err.isRetryable === false) {\n await this._queue.remove(id)\n return this._schedule(0)\n }\n\n if (payload.retries >= this._maxRetries) {\n await this._queue.remove(id)\n } else {\n // increment the retry count and save it\n const updates = { retries: payload.retries + 1 }\n await this._queue.update(id, updates)\n }\n\n // this request failed so wait a while before retrying\n return this._schedule(this._retryInterval)\n }\n\n // this request succeeded, grab another immediately after we delete this one\n await this._queue.remove(id)\n this._schedule(0)\n } catch (e) {\n this._onerror(e)\n this._schedule(0)\n }\n })\n } catch (e) {\n this._onerror(e)\n }\n }\n}\n","import { toByteArray } from 'base64-js';\nimport { UnavailabilityError } from 'expo-modules-core';\nimport { CryptoDigestAlgorithm, CryptoEncoding } from './Crypto.types';\nimport ExpoCrypto from './ExpoCrypto';\nexport * from './Crypto.types';\nclass CryptoError extends TypeError {\n code = 'ERR_CRYPTO';\n constructor(message) {\n super(`expo-crypto: ${message}`);\n }\n}\n// @needsAudit\n/**\n * Generates completely random bytes using native implementations. The `byteCount` property\n * is a `number` indicating the number of bytes to generate in the form of a `Uint8Array`.\n * Falls back to `Math.random` during development to prevent issues with React Native Debugger.\n * @param byteCount - A number within the range from `0` to `1024`. Anything else will throw a `TypeError`.\n * @return An array of random bytes with the same length as the `byteCount`.\n */\nexport function getRandomBytes(byteCount) {\n assertByteCount(byteCount, 'getRandomBytes');\n const validByteCount = Math.floor(byteCount);\n if (__DEV__) {\n if (!global.nativeCallSyncHook || global.__REMOTEDEV__) {\n // remote javascript debugging is enabled\n const array = new Uint8Array(validByteCount);\n for (let i = 0; i < validByteCount; i++) {\n array[i] = Math.floor(Math.random() * 256);\n }\n return array;\n }\n }\n if (ExpoCrypto.getRandomValues) {\n const byteArray = new Uint8Array(validByteCount);\n ExpoCrypto.getRandomValues(byteArray);\n return byteArray;\n }\n else if (ExpoCrypto.getRandomBase64String) {\n const base64 = ExpoCrypto.getRandomBase64String(validByteCount);\n return toByteArray(base64);\n }\n else {\n throw new UnavailabilityError('expo-crypto', 'getRandomBytes');\n }\n}\n// @needsAudit\n/**\n * Generates completely random bytes using native implementations. The `byteCount` property\n * is a `number` indicating the number of bytes to generate in the form of a `Uint8Array`.\n * @param byteCount - A number within the range from `0` to `1024`. Anything else will throw a `TypeError`.\n * @return A promise that fulfills with an array of random bytes with the same length as the `byteCount`.\n */\nexport async function getRandomBytesAsync(byteCount) {\n assertByteCount(byteCount, 'getRandomBytesAsync');\n const validByteCount = Math.floor(byteCount);\n if (ExpoCrypto.getRandomValues) {\n const byteArray = new Uint8Array(validByteCount);\n ExpoCrypto.getRandomValues(byteArray);\n return byteArray;\n }\n else if (ExpoCrypto.getRandomBase64StringAsync) {\n const base64 = await ExpoCrypto.getRandomBase64StringAsync(validByteCount);\n return toByteArray(base64);\n }\n else {\n throw new UnavailabilityError('expo-crypto', 'getRandomBytesAsync');\n }\n}\nfunction assertByteCount(value, methodName) {\n if (typeof value !== 'number' ||\n isNaN(value) ||\n Math.floor(value) < 0 ||\n Math.floor(value) > 1024) {\n throw new TypeError(`expo-crypto: ${methodName}(${value}) expected a valid number from range 0...1024`);\n }\n}\nfunction assertAlgorithm(algorithm) {\n if (!Object.values(CryptoDigestAlgorithm).includes(algorithm)) {\n throw new CryptoError(`Invalid algorithm provided. Expected one of: CryptoDigestAlgorithm.${Object.keys(CryptoDigestAlgorithm).join(', AlgCryptoDigestAlgorithmorithm.')}`);\n }\n}\nfunction assertData(data) {\n if (typeof data !== 'string') {\n throw new CryptoError(`Invalid data provided. Expected a string.`);\n }\n}\nfunction assertEncoding(encoding) {\n if (!Object.values(CryptoEncoding).includes(encoding)) {\n throw new CryptoError(`Invalid encoding provided. Expected one of: CryptoEncoding.${Object.keys(CryptoEncoding).join(', CryptoEncoding.')}`);\n }\n}\n// @needsAudit\n/**\n * The `digestStringAsync()` method of `Crypto` generates a digest of the supplied `data` string with the provided digest `algorithm`.\n * A digest is a short fixed-length value derived from some variable-length input. **Cryptographic digests** should exhibit _collision-resistance_,\n * meaning that it's very difficult to generate multiple inputs that have equal digest values.\n * You can specify the returned string format as one of `CryptoEncoding`. By default, the resolved value will be formatted as a `HEX` string.\n * On web, this method can only be called from a secure origin (HTTPS) otherwise, an error will be thrown.\n *\n * @param algorithm The cryptographic hash function to use to transform a block of data into a fixed-size output.\n * @param data The value that will be used to generate a digest.\n * @param options Format of the digest string. Defaults to: `CryptoDigestOptions.HEX`.\n * @return Return a Promise which fulfills with a value representing the hashed input.\n *\n * @example\n * ```ts\n * const digest = await Crypto.digestStringAsync(\n * Crypto.CryptoDigestAlgorithm.SHA512,\n * '🥓 Easy to Digest! 💙'\n * );\n * ```\n */\nexport async function digestStringAsync(algorithm, data, options = { encoding: CryptoEncoding.HEX }) {\n if (!ExpoCrypto.digestStringAsync) {\n throw new UnavailabilityError('expo-crypto', 'digestStringAsync');\n }\n assertAlgorithm(algorithm);\n assertData(data);\n assertEncoding(options.encoding);\n return await ExpoCrypto.digestStringAsync(algorithm, data, options);\n}\n/**\n * The `getRandomValues()` method of `Crypto` fills a provided `TypedArray` with cryptographically secure random values.\n *\n * @param typedArray An integer based [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) to fill with cryptographically secure random values. It modifies the input array in place.\n * @return The input array filled with cryptographically secure random values.\n *\n * @example\n * ```ts\n * const byteArray = new Uint8Array(16);\n * Crypto.getRandomValues(byteArray);\n * console.log('Your lucky bytes: ' + byteArray);\n * ```\n */\nexport function getRandomValues(typedArray) {\n ExpoCrypto.getRandomValues(typedArray);\n return typedArray;\n}\n/**\n * The `randomUUID()` method returns a unique identifier based on the V4 UUID spec (RFC4122).\n * It uses cryptographically secure random values to generate the UUID.\n *\n * @return A string containing a newly generated UUIDv4 identifier\n * @example\n * ```ts\n * const UUID = Crypto.randomUUID();\n * console.log('Your UUID: ' + UUID);\n * ```\n */\nexport function randomUUID() {\n return ExpoCrypto.randomUUID();\n}\nconst digestLengths = {\n [CryptoDigestAlgorithm.SHA1]: 20,\n [CryptoDigestAlgorithm.SHA256]: 32,\n [CryptoDigestAlgorithm.SHA384]: 48,\n [CryptoDigestAlgorithm.SHA512]: 64,\n [CryptoDigestAlgorithm.MD2]: 16,\n [CryptoDigestAlgorithm.MD4]: 16,\n [CryptoDigestAlgorithm.MD5]: 16,\n};\n/**\n * The `digest()` method of `Crypto` generates a digest of the supplied `TypedArray` of bytes `data` with the provided digest `algorithm`.\n * A digest is a short fixed-length value derived from some variable-length input. **Cryptographic digests** should exhibit _collision-resistance_,\n * meaning that it's very difficult to generate multiple inputs that have equal digest values.\n * On web, this method can only be called from a secure origin (HTTPS) otherwise, an error will be thrown.\n *\n * @param algorithm The cryptographic hash function to use to transform a block of data into a fixed-size output.\n * @param data The value that will be used to generate a digest.\n * @return A Promise which fulfills with an ArrayBuffer representing the hashed input.\n * @example\n * ```ts\n * const array = new Uint8Array([1, 2, 3, 4, 5]);\n * const digest = await Crypto.digest(Crypto.CryptoDigestAlgorithm.SHA512, array);\n * console.log('Your digest: ' + digest);\n * ```\n */\nexport function digest(algorithm, data) {\n return new Promise((resolve, reject) => {\n try {\n if (typeof ExpoCrypto.digestAsync === 'function') {\n resolve(ExpoCrypto.digestAsync(algorithm, data));\n }\n else {\n const output = new Uint8Array(digestLengths[algorithm]);\n ExpoCrypto.digest(algorithm, output, data);\n resolve(output.buffer);\n }\n }\n catch (error) {\n reject(error);\n }\n });\n}\n//# sourceMappingURL=Crypto.js.map","// @needsAudit\n/**\n * [`Cryptographic hash function`](https://developer.mozilla.org/en-US/docs/Glossary/Cryptographic_hash_function)\n */\nexport var CryptoDigestAlgorithm;\n(function (CryptoDigestAlgorithm) {\n /**\n * `160` bits.\n */\n CryptoDigestAlgorithm[\"SHA1\"] = \"SHA-1\";\n /**\n * `256` bits. Collision Resistant.\n */\n CryptoDigestAlgorithm[\"SHA256\"] = \"SHA-256\";\n /**\n * `384` bits. Collision Resistant.\n */\n CryptoDigestAlgorithm[\"SHA384\"] = \"SHA-384\";\n /**\n * `512` bits. Collision Resistant.\n */\n CryptoDigestAlgorithm[\"SHA512\"] = \"SHA-512\";\n /**\n * `128` bits.\n * @platform ios\n */\n CryptoDigestAlgorithm[\"MD2\"] = \"MD2\";\n /**\n * `128` bits.\n * @platform ios\n */\n CryptoDigestAlgorithm[\"MD4\"] = \"MD4\";\n /**\n * `128` bits.\n * @platform android\n * @platform ios\n */\n CryptoDigestAlgorithm[\"MD5\"] = \"MD5\";\n})(CryptoDigestAlgorithm || (CryptoDigestAlgorithm = {}));\n// @needsAudit\nexport var CryptoEncoding;\n(function (CryptoEncoding) {\n CryptoEncoding[\"HEX\"] = \"hex\";\n /**\n * Has trailing padding. Does not wrap lines. Does not have a trailing newline.\n */\n CryptoEncoding[\"BASE64\"] = \"base64\";\n})(CryptoEncoding || (CryptoEncoding = {}));\n//# sourceMappingURL=Crypto.types.js.map","import { CodedError } from 'expo-modules-core';\nimport { CryptoEncoding } from './Crypto.types';\nconst getCrypto = () => window.crypto ?? window.msCrypto;\nexport default {\n async digestStringAsync(algorithm, data, options) {\n if (!crypto.subtle) {\n throw new CodedError('ERR_CRYPTO_UNAVAILABLE', 'Access to the WebCrypto API is restricted to secure origins (localhost/https).');\n }\n const encoder = new TextEncoder();\n const buffer = encoder.encode(data);\n const hashedData = await crypto.subtle.digest(algorithm, buffer);\n if (options.encoding === CryptoEncoding.HEX) {\n return hexString(hashedData);\n }\n else if (options.encoding === CryptoEncoding.BASE64) {\n return btoa(String.fromCharCode(...new Uint8Array(hashedData)));\n }\n throw new CodedError('ERR_CRYPTO_DIGEST', 'Invalid encoding type provided.');\n },\n getRandomBytes(length) {\n const array = new Uint8Array(length);\n return getCrypto().getRandomValues(array);\n },\n async getRandomBytesAsync(length) {\n const array = new Uint8Array(length);\n return getCrypto().getRandomValues(array);\n },\n getRandomValues(typedArray) {\n return getCrypto().getRandomValues(typedArray);\n },\n randomUUID() {\n return getCrypto().randomUUID();\n },\n digestAsync(algorithm, data) {\n return getCrypto().subtle.digest(algorithm, data);\n },\n};\nfunction hexString(buffer) {\n const byteArray = new Uint8Array(buffer);\n const hexCodes = [...byteArray].map((value) => {\n const hexCode = value.toString(16);\n const paddedHexCode = hexCode.padStart(2, '0');\n return paddedHexCode;\n });\n return hexCodes.join('');\n}\n//# sourceMappingURL=ExpoCrypto.web.js.map","/* global __DEV__ */\n\nconst { schema } = require('@bugsnag/core/config')\nconst Constants = require('expo-constants').default\nconst stringWithLength = require('@bugsnag/core/lib/validators/string-with-length')\n\n// If the developer property is not present it means the app is\n// not connected to a development tool and is either a published app running in\n// the Expo client, or a standalone app\nconst IS_PRODUCTION = !Constants.expoConfig?.developer && !Constants.expoGoConfig?.developer\n\n// The app can still run in production \"mode\" in development environments, in which\n// cases the global boolean __DEV__ will be set to true\nconst IS_PRODUCTION_MODE = typeof __DEV__ === 'undefined' || __DEV__ !== true\n\nmodule.exports = {\n logger: {\n ...schema.logger,\n defaultValue: () => getPrefixedConsole()\n },\n releaseStage: {\n ...schema.releaseStage,\n defaultValue: () => {\n if (IS_PRODUCTION) return 'production'\n if (IS_PRODUCTION_MODE) return 'local-prod'\n return 'local-dev'\n }\n },\n codeBundleId: {\n defaultValue: () => undefined,\n message: 'should be a string',\n validate: val => val === undefined || stringWithLength(val)\n }\n}\n\nconst getPrefixedConsole = () => {\n return ['debug', 'info', 'warn', 'error'].reduce((accum, method) => {\n // console.error causes standalone expo apps to reload on android\n // so don't do any logging that level – use console.warn instead\n const consoleMethod = (IS_PRODUCTION && method === 'error') ? console.warn : console[method]\n accum[method] = consoleMethod.bind(console, '[bugsnag]')\n return accum\n }, {})\n}\n","(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.BugsnagPluginReact = f()}})(function(){var define,module,exports;\nvar _$src_1 = {};\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n_$src_1 = /*#__PURE__*/function () {\n function BugsnagPluginReact() {\n // Fetch React from the window object, if it exists\n var globalReact = typeof window !== 'undefined' && window.React;\n this.name = 'react';\n this.lazy = arguments.length === 0 && !globalReact;\n if (!this.lazy) {\n this.React = (arguments.length <= 0 ? undefined : arguments[0]) || globalReact;\n if (!this.React) throw new Error('@bugsnag/plugin-react reference to `React` was undefined');\n }\n }\n var _proto = BugsnagPluginReact.prototype;\n _proto.load = function load(client) {\n if (!this.lazy) {\n var ErrorBoundary = createClass(this.React, client);\n ErrorBoundary.createErrorBoundary = function () {\n return ErrorBoundary;\n };\n return ErrorBoundary;\n }\n var BugsnagPluginReactLazyInitializer = function () {\n throw new Error(\"@bugsnag/plugin-react was used incorrectly. Valid usage is as follows:\\nPass React to the plugin constructor\\n\\n `Bugsnag.start({ plugins: [new BugsnagPluginReact(React)] })`\\nand then call `const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary()`\\n\\nOr if React is not available until after Bugsnag has started,\\nconstruct the plugin with no arguments\\n `Bugsnag.start({ plugins: [new BugsnagPluginReact()] })`,\\nthen pass in React when available to construct your error boundary\\n `const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary(React)`\");\n };\n BugsnagPluginReactLazyInitializer.createErrorBoundary = function (React) {\n if (!React) throw new Error('@bugsnag/plugin-react reference to `React` was undefined');\n return createClass(React, client);\n };\n return BugsnagPluginReactLazyInitializer;\n };\n return BugsnagPluginReact;\n}();\nvar formatComponentStack = function (str) {\n var lines = str.split(/\\n/g);\n var ret = '';\n for (var line = 0, len = lines.length; line < len; line++) {\n if (lines[line].length) ret += \"\" + (ret.length ? '\\n' : '') + lines[line].trim();\n }\n return ret;\n};\nvar createClass = function (React, client) {\n return /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(ErrorBoundary, _React$Component);\n function ErrorBoundary(props) {\n var _this;\n _this = _React$Component.call(this, props) || this;\n _this.state = {\n error: null,\n info: null\n };\n _this.handleClearError = _this.handleClearError.bind(_assertThisInitialized(_this));\n return _this;\n }\n var _proto2 = ErrorBoundary.prototype;\n _proto2.handleClearError = function handleClearError() {\n this.setState({\n error: null,\n info: null\n });\n };\n _proto2.componentDidCatch = function componentDidCatch(error, info) {\n var onError = this.props.onError;\n var handledState = {\n severity: 'error',\n unhandled: true,\n severityReason: {\n type: 'unhandledException'\n }\n };\n var event = client.Event.create(error, true, handledState, 1);\n if (info && info.componentStack) info.componentStack = formatComponentStack(info.componentStack);\n event.addMetadata('react', info);\n client._notify(event, onError);\n this.setState({\n error: error,\n info: info\n });\n };\n _proto2.render = function render() {\n var error = this.state.error;\n if (error) {\n var FallbackComponent = this.props.FallbackComponent;\n if (FallbackComponent) return React.createElement(FallbackComponent, _extends({}, this.state, {\n clearError: this.handleClearError\n }));\n return null;\n }\n return this.props.children;\n };\n return ErrorBoundary;\n }(React.Component);\n};\n_$src_1.formatComponentStack = formatComponentStack;\n_$src_1[\"default\"] = _$src_1;\n\nreturn _$src_1;\n\n});\n//# sourceMappingURL=bugsnag-react.js.map\n","/*\n* Automatically notifies Bugsnag when React Native's global error handler is called\n*/\n\nmodule.exports = (ErrorUtils = global.ErrorUtils) => ({\n load: (client) => {\n if (!client._config.autoDetectErrors) return\n if (!client._config.enabledErrorTypes.unhandledExceptions) return\n if (!ErrorUtils) {\n client._logger.warn('ErrorUtils is not defined. Can’t attach a global error handler.')\n return\n }\n const prev = ErrorUtils.getGlobalHandler()\n\n ErrorUtils.setGlobalHandler((error, isFatal) => {\n const event = client.Event.create(error, true, {\n severity: 'error',\n unhandled: true,\n severityReason: { type: 'unhandledException' }\n }, 'ErrorUtils globalHandler', 1)\n event.attemptImmediateDelivery = false\n client._notify(event, () => {}, () => {\n if (typeof prev === 'function') prev(error, isFatal)\n })\n })\n }\n})\n","/*\n* Automatically notifies Bugsnag when an unhandled promise rejection happens in React Native\n*/\n\n/* global __DEV__ */\n\nconst rnPromise = require('promise/setimmediate/rejection-tracking')\n\nmodule.exports = {\n load: (client) => {\n // Do not attach any listeners if autoDetectErrors is disabled or unhandledRejections are not an enabled error type\n if (!client._config.autoDetectErrors || !client._config.enabledErrorTypes.unhandledRejections) return () => { }\n\n // Check if Hermes is available and is being used for promises\n // React Native v0.63 and v0.64 include global.HermesInternal but not 'hasPromise'\n if (global?.HermesInternal?.hasPromise?.() && global.HermesInternal.enablePromiseRejectionTracker) {\n global.HermesInternal.enablePromiseRejectionTracker({\n allRejections: true,\n onUnhandled: (id, rejection = {}) => {\n const event = client.Event.create(rejection, false, {\n severity: 'error',\n unhandled: true,\n severityReason: { type: 'unhandledPromiseRejection' }\n }, 'promise rejection tracking', 1)\n\n client._notify(event)\n\n // adding our own onUnhandled callback means the default handler doesn't get called, so make it happen here\n if (typeof __DEV__ !== 'undefined' && __DEV__) rnInternalOnUnhandled(id, rejection)\n }\n })\n\n return () => { }\n }\n\n // Otherwise, attach notifier to 'default' promise\n rnPromise.enable({\n allRejections: true,\n onUnhandled: (id, error) => {\n const event = client.Event.create(error, false, {\n severity: 'error',\n unhandled: true,\n severityReason: { type: 'unhandledPromiseRejection' }\n }, 'promise rejection tracking', 1)\n client._notify(event)\n // adding our own onUnhandled callback means the default handler doesn't get called, so make it happen here\n if (typeof __DEV__ !== 'undefined' && __DEV__) rnInternalOnUnhandled(id, error)\n }\n })\n\n return () => rnPromise.disable()\n }\n}\n\n// This is a direct copy (with flow types removed) from RN internal code. In v0.64+ it is possible to reference, but in\n// older versions we can't access it so simply have to copy it.\n// https://github.com/facebook/react-native/blob/4409642811c787052e0baeb92e2679a96002c1e3/Libraries/Promise.js#L21-L46\nconst rnInternalOnUnhandled = (id, rejection) => {\n let message\n let stack\n\n const stringValue = Object.prototype.toString.call(rejection)\n if (stringValue === '[object Error]') {\n message = Error.prototype.toString.call(rejection)\n const error = rejection\n stack = error.stack\n } else {\n try {\n message = require('pretty-format')(rejection)\n } catch {\n message =\n typeof rejection === 'string'\n ? rejection\n : JSON.stringify(rejection)\n }\n }\n\n const warning =\n `Possible Unhandled Promise Rejection (id: ${id}):\\n` +\n `${message || ''}\\n` +\n (stack == null ? '' : stack)\n console.warn(warning)\n}\n","'use strict';\n\nvar Promise = require('./core');\n\nvar DEFAULT_WHITELIST = [\n ReferenceError,\n TypeError,\n RangeError\n];\n\nvar enabled = false;\nexports.disable = disable;\nfunction disable() {\n enabled = false;\n Promise._B = null;\n Promise._C = null;\n}\n\nexports.enable = enable;\nfunction enable(options) {\n options = options || {};\n if (enabled) disable();\n enabled = true;\n var id = 0;\n var displayId = 0;\n var rejections = {};\n Promise._B = function (promise) {\n if (\n promise._y === 2 && // IS REJECTED\n rejections[promise._E]\n ) {\n if (rejections[promise._E].logged) {\n onHandled(promise._E);\n } else {\n clearTimeout(rejections[promise._E].timeout);\n }\n delete rejections[promise._E];\n }\n };\n Promise._C = function (promise, err) {\n if (promise._x === 0) { // not yet handled\n promise._E = id++;\n rejections[promise._E] = {\n displayId: null,\n error: err,\n timeout: setTimeout(\n onUnhandled.bind(null, promise._E),\n // For reference errors and type errors, this almost always\n // means the programmer made a mistake, so log them after just\n // 100ms\n // otherwise, wait 2 seconds to see if they get handled\n matchWhitelist(err, DEFAULT_WHITELIST)\n ? 100\n : 2000\n ),\n logged: false\n };\n }\n };\n function onUnhandled(id) {\n if (\n options.allRejections ||\n matchWhitelist(\n rejections[id].error,\n options.whitelist || DEFAULT_WHITELIST\n )\n ) {\n rejections[id].displayId = displayId++;\n if (options.onUnhandled) {\n rejections[id].logged = true;\n options.onUnhandled(\n rejections[id].displayId,\n rejections[id].error\n );\n } else {\n rejections[id].logged = true;\n logError(\n rejections[id].displayId,\n rejections[id].error\n );\n }\n }\n }\n function onHandled(id) {\n if (rejections[id].logged) {\n if (options.onHandled) {\n options.onHandled(rejections[id].displayId, rejections[id].error);\n } else if (!rejections[id].onUnhandled) {\n console.warn(\n 'Promise Rejection Handled (id: ' + rejections[id].displayId + '):'\n );\n console.warn(\n ' This means you can ignore any previous messages of the form \"Possible Unhandled Promise Rejection\" with id ' +\n rejections[id].displayId + '.'\n );\n }\n }\n }\n}\n\nfunction logError(id, error) {\n console.warn('Possible Unhandled Promise Rejection (id: ' + id + '):');\n var errStr = (error && (error.stack || error)) + '';\n errStr.split('\\n').forEach(function (line) {\n console.warn(' ' + line);\n });\n}\n\nfunction matchWhitelist(error, list) {\n return list.some(function (cls) {\n return error instanceof cls;\n });\n}","'use strict';\n\n\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._x = 0;\n this._y = 0;\n this._z = null;\n this._A = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._B = null;\nPromise._C = null;\nPromise._D = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._y === 3) {\n self = self._z;\n }\n if (Promise._B) {\n Promise._B(self);\n }\n if (self._y === 0) {\n if (self._x === 0) {\n self._x = 1;\n self._A = deferred;\n return;\n }\n if (self._x === 1) {\n self._x = 2;\n self._A = [self._A, deferred];\n return;\n }\n self._A.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n setImmediate(function() {\n var cb = self._y === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._y === 1) {\n resolve(deferred.promise, self._z);\n } else {\n reject(deferred.promise, self._z);\n }\n return;\n }\n var ret = tryCallOne(cb, self._z);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._y = 3;\n self._z = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._y = 1;\n self._z = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._y = 2;\n self._z = newValue;\n if (Promise._C) {\n Promise._C(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._x === 1) {\n handle(self, self._A);\n self._A = null;\n }\n if (self._x === 2) {\n for (var i = 0; i < self._A.length; i++) {\n handle(self, self._A[i]);\n }\n self._A = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n","const Device = require('expo-device')\nconst Constants = require('expo-constants').default\nconst { Dimensions, Platform } = require('react-native')\nconst rnVersion = require('react-native/package.json').version\nconst cuid = require('@bugsnag/cuid')\nconst SecureStore = require('expo-secure-store')\n\nconst DEVICE_ID_KEY = 'bugsnag-anonymous-id'\n\nmodule.exports = {\n load: client => {\n let orientation\n const updateOrientation = () => {\n const { height, width } = Dimensions.get('screen')\n if (height > width) {\n orientation = 'portrait'\n } else if (height < width) {\n orientation = 'landscape'\n } else {\n orientation = undefined\n }\n }\n Dimensions.addEventListener('change', updateOrientation)\n\n // get the initial orientation\n updateOrientation()\n\n let deviceId\n if (Platform.OS === 'android' || Platform.OS === 'ios') {\n const storeOptions = {\n requireAuthentication: false,\n keychainAccessible: SecureStore.ALWAYS_THIS_DEVICE_ONLY\n }\n\n deviceId = SecureStore.getItem(DEVICE_ID_KEY, storeOptions)\n if (!deviceId || !cuid.isCuid(deviceId)) {\n deviceId = cuid()\n SecureStore.setItem(DEVICE_ID_KEY, deviceId, storeOptions)\n }\n }\n\n const device = {\n id: deviceId,\n manufacturer: Device.manufacturer,\n model: Device.modelName,\n modelNumber: Device.modelId || undefined,\n osName: Platform.OS,\n osVersion: Device.osVersion,\n runtimeVersions: {\n reactNative: rnVersion,\n expoApp: Constants.expoVersion,\n expoSdk: Constants.expoConfig?.sdkVersion,\n androidApiLevel: Platform.OS === 'android' ? String(Platform.Version) : undefined\n },\n totalMemory: Device.totalMemory\n }\n\n client.addOnSession(session => {\n session.device = { ...session.device, ...device }\n addDefaultAppType(session)\n addDefaultUserId(session)\n })\n\n client.addOnError(event => {\n event.device = { ...event.device, time: new Date(), orientation, ...device }\n event.addMetadata('device', {\n isDevice: Device.isDevice,\n appOwnership: Constants.appOwnership\n })\n addDefaultAppType(event)\n addDefaultUserId(event)\n }, true)\n }\n}\n\nfunction addDefaultAppType (eventOrSession) {\n // default app.type to device.osName\n if (eventOrSession.device && eventOrSession.device.osName) {\n eventOrSession.app = eventOrSession.app || {}\n\n if (!eventOrSession.app.type) {\n eventOrSession.app.type = eventOrSession.device.osName\n }\n }\n}\n\nfunction addDefaultUserId (eventOrSession) {\n // device id is also used to populate the user id field, if it's not already set\n const user = eventOrSession.getUser()\n if (!user || !user.id) {\n eventOrSession.setUser(eventOrSession.device.id)\n }\n}\n","import { UnavailabilityError } from 'expo-modules-core';\nimport { DeviceType } from './Device.types';\nimport ExpoDevice from './ExpoDevice';\nexport { DeviceType };\n/**\n * `true` if the app is running on a real device and `false` if running in a simulator or emulator.\n * On web, this is always set to `true`.\n */\nexport const isDevice = ExpoDevice ? ExpoDevice.isDevice : true;\n/**\n * The device brand. The consumer-visible brand of the product/hardware. On web, this value is always `null`.\n *\n * @example\n * ```js\n * Device.brand; // Android: \"google\", \"xiaomi\"; iOS: \"Apple\"; web: null\n * ```\n * @platform android\n * @platform ios\n */\nexport const brand = ExpoDevice ? ExpoDevice.brand : null;\n/**\n * The actual device manufacturer of the product or hardware. This value of this field may be `null` if it cannot be determined.\n *\n * To view difference between `brand` and `manufacturer` on Android see [official documentation](https://developer.android.com/reference/android/os/Build).\n *\n * @example\n * ```js\n * Device.manufacturer; // Android: \"Google\", \"xiaomi\"; iOS: \"Apple\"; web: \"Google\", null\n * ```\n */\nexport const manufacturer = ExpoDevice ? ExpoDevice.manufacturer : null;\n/**\n * The internal model ID of the device. This is useful for programmatically identifying the type of device and is not a human-friendly string.\n * On web and Android, this value is always `null`.\n *\n * @example\n * ```js\n * Device.modelId; // iOS: \"iPhone7,2\"; Android: null; web: null\n * ```\n * @platform ios\n */\nexport const modelId = ExpoDevice ? ExpoDevice.modelId || null : null;\n/**\n * The human-friendly name of the device model. This is the name that people would typically use to refer to the device rather than a programmatic model identifier.\n * This value of this field may be `null` if it cannot be determined.\n *\n * @example\n * ```js\n * Device.modelName; // Android: \"Pixel 2\"; iOS: \"iPhone XS Max\"; web: \"iPhone\", null\n * ```\n */\nexport const modelName = ExpoDevice ? ExpoDevice.modelName : null;\n/**\n * The specific configuration or name of the industrial design. It represents the device's name when it was designed during manufacturing into mass production.\n * On Android, it corresponds to [`Build.DEVICE`](https://developer.android.com/reference/android/os/Build#DEVICE). On web and iOS, this value is always `null`.\n *\n * @example\n * ```js\n * Device.designName; // Android: \"kminilte\"; iOS: null; web: null\n * ```\n * @platform android\n */\nexport const designName = ExpoDevice ? ExpoDevice.designName || null : null;\n/**\n * The device's overall product name chosen by the device implementer containing the development name or code name of the device.\n * Corresponds to [`Build.PRODUCT`](https://developer.android.com/reference/android/os/Build#PRODUCT). On web and iOS, this value is always `null`.\n *\n * @example\n * ```js\n * Device.productName; // Android: \"kminiltexx\"; iOS: null; web: null\n * ```\n * @platform android\n */\nexport const productName = ExpoDevice ? ExpoDevice.productName || null : null;\n/**\n * The type of the device as a [`DeviceType`](#devicetype) enum value.\n *\n * On Android, for devices other than TVs, the device type is determined by the screen resolution (screen diagonal size), so the result may not be completely accurate.\n * If the screen diagonal length is between 3\" and 6.9\", the method returns `DeviceType.PHONE`. For lengths between 7\" and 18\", the method returns `DeviceType.TABLET`.\n * Otherwise, the method returns `DeviceType.UNKNOWN`.\n *\n * @example\n * ```js\n * Device.deviceType; // UNKNOWN, PHONE, TABLET, TV, DESKTOP\n * ```\n */\nexport const deviceType = ExpoDevice ? ExpoDevice.deviceType : null;\n/**\n * The [device year class](https://github.com/facebook/device-year-class) of this device. On web, this value is always `null`.\n */\nexport const deviceYearClass = ExpoDevice ? ExpoDevice.deviceYearClass : null;\n/**\n * The device's total memory, in bytes. This is the total memory accessible to the kernel, but not necessarily to a single app.\n * This is basically the amount of RAM the device has, not including below-kernel fixed allocations like DMA buffers, RAM for the baseband CPU, etc…\n * On web, this value is always `null`.\n *\n * @example\n * ```js\n * Device.totalMemory; // 17179869184\n * ```\n */\nexport const totalMemory = ExpoDevice ? ExpoDevice.totalMemory : null;\n/**\n * A list of supported processor architecture versions. The device expects the binaries it runs to be compiled for one of these architectures.\n * This value is `null` if the supported architectures could not be determined, particularly on web.\n *\n * @example\n * ```js\n * Device.supportedCpuArchitectures; // ['arm64 v8', 'Intel x86-64h Haswell', 'arm64-v8a', 'armeabi-v7a\", 'armeabi']\n * ```\n */\nexport const supportedCpuArchitectures = ExpoDevice\n ? ExpoDevice.supportedCpuArchitectures\n : null;\n/**\n * The name of the OS running on the device.\n *\n * @example\n * ```js\n * Device.osName; // Android: \"Android\"; iOS: \"iOS\" or \"iPadOS\"; web: \"iOS\", \"Android\", \"Windows\"\n * ```\n */\nexport const osName = ExpoDevice ? ExpoDevice.osName : null;\n/**\n * The human-readable OS version string. Note that the version string may not always contain three numbers separated by dots.\n *\n * @example\n * ```js\n * Device.osVersion; // Android: \"4.0.3\"; iOS: \"12.3.1\"; web: \"11.0\", \"8.1.0\"\n * ```\n */\nexport const osVersion = ExpoDevice ? ExpoDevice.osVersion : null;\n/**\n * The build ID of the OS that more precisely identifies the version of the OS. On Android, this corresponds to `Build.DISPLAY` (not `Build.ID`)\n * and currently is a string as described [here](https://source.android.com/setup/start/build-numbers). On iOS, this corresponds to `kern.osversion`\n * and is the detailed OS version sometimes displayed next to the more human-readable version. On web, this value is always `null`.\n *\n * @example\n * ```js\n * Device.osBuildId; // Android: \"PSR1.180720.075\"; iOS: \"16F203\"; web: null\n * ```\n */\nexport const osBuildId = ExpoDevice ? ExpoDevice.osBuildId : null;\n/**\n * The internal build ID of the OS running on the device. On Android, this corresponds to `Build.ID`.\n * On iOS, this is the same value as [`Device.osBuildId`](#deviceosbuildid). On web, this value is always `null`.\n *\n * @example\n * ```js\n * Device.osInternalBuildId; // Android: \"MMB29K\"; iOS: \"16F203\"; web: null,\n * ```\n */\nexport const osInternalBuildId = ExpoDevice ? ExpoDevice.osInternalBuildId : null;\n/**\n * A string that uniquely identifies the build of the currently running system OS. On Android, it follows this template:\n * - `$(BRAND)/$(PRODUCT)/$(DEVICE)/$(BOARD):$(VERSION.RELEASE)/$(ID)/$(VERSION.INCREMENTAL):$(TYPE)/\\$(TAGS)`\n * On web and iOS, this value is always `null`.\n *\n * @example\n * ```js\n * Device.osBuildFingerprint;\n * // Android: \"google/sdk_gphone_x86/generic_x86:9/PSR1.180720.075/5124027:user/release-keys\";\n * // iOS: null; web: null\n * ```\n * @platform android\n */\nexport const osBuildFingerprint = ExpoDevice\n ? ExpoDevice.osBuildFingerprint || null\n : null;\n/**\n * The Android SDK version of the software currently running on this hardware device. This value never changes while a device is booted,\n * but it may increase when the hardware manufacturer provides an OS update. See [here](https://developer.android.com/reference/android/os/Build.VERSION_CODES.html)\n * to see all possible version codes and corresponding versions. On iOS and web, this value is always `null`.\n *\n * @example\n * ```js\n * Device.platformApiLevel; // Android: 19; iOS: null; web: null\n * ```\n * @platform android\n */\nexport const platformApiLevel = ExpoDevice\n ? ExpoDevice.platformApiLevel || null\n : null;\n/**\n * The human-readable name of the device, which may be set by the device's user. If the device name is unavailable, particularly on web, this value is `null`.\n *\n * > On iOS 16 and newer, this value will be set to generic \"iPhone\" until you add the correct entitlement, see [iOS Capabilities page](/build-reference/ios-capabilities)\n * > to learn how to add one and check out [Apple documentation](https://developer.apple.com/documentation/uikit/uidevice/1620015-name#discussion)\n * > for more details on this change.\n *\n * @example\n * ```js\n * Device.deviceName; // \"Vivian's iPhone XS\"\n * ```\n */\nexport const deviceName = ExpoDevice ? ExpoDevice.deviceName : null;\n/**\n * Checks the type of the device as a [`DeviceType`](#devicetype) enum value.\n *\n * On Android, for devices other than TVs, the device type is determined by the screen resolution (screen diagonal size), so the result may not be completely accurate.\n * If the screen diagonal length is between 3\" and 6.9\", the method returns `DeviceType.PHONE`. For lengths between 7\" and 18\", the method returns `DeviceType.TABLET`.\n * Otherwise, the method returns `DeviceType.UNKNOWN`.\n *\n * @return Returns a promise that resolves to a [`DeviceType`](#devicetype) enum value.\n * @example\n * ```js\n * await Device.getDeviceTypeAsync();\n * // DeviceType.PHONE\n * ```\n */\nexport async function getDeviceTypeAsync() {\n if (!ExpoDevice.getDeviceTypeAsync) {\n throw new UnavailabilityError('expo-device', 'getDeviceTypeAsync');\n }\n return await ExpoDevice.getDeviceTypeAsync();\n}\n/**\n * Gets the uptime since the last reboot of the device, in milliseconds. Android devices do not count time spent in deep sleep.\n * @return Returns a promise that resolves to a `number` that represents the milliseconds since last reboot.\n * @example\n * ```js\n * await Device.getUptimeAsync();\n * // 4371054\n * ```\n * @platform android\n * @platform ios\n */\nexport async function getUptimeAsync() {\n if (!ExpoDevice.getUptimeAsync) {\n throw new UnavailabilityError('expo-device', 'getUptimeAsync');\n }\n return await ExpoDevice.getUptimeAsync();\n}\n/**\n * Returns the maximum amount of memory that the Java VM will attempt to use. If there is no inherent limit then `Number.MAX_SAFE_INTEGER` is returned.\n * @return Returns a promise that resolves to the maximum available memory that the Java VM will use, in bytes.\n * @example\n * ```js\n * await Device.getMaxMemoryAsync();\n * // 402653184\n * ```\n * @platform android\n */\nexport async function getMaxMemoryAsync() {\n if (!ExpoDevice.getMaxMemoryAsync) {\n throw new UnavailabilityError('expo-device', 'getMaxMemoryAsync');\n }\n let maxMemory = await ExpoDevice.getMaxMemoryAsync();\n if (maxMemory === -1) {\n maxMemory = Number.MAX_SAFE_INTEGER;\n }\n return maxMemory;\n}\n/**\n * > **warning** This method is experimental and is not completely reliable. See description below.\n *\n * Checks whether the device has been rooted (Android) or jailbroken (iOS). This is not completely reliable because there exist solutions to bypass root-detection\n * on both [iOS](https://www.theiphonewiki.com/wiki/XCon) and [Android](https://tweakerlinks.com/how-to-bypass-apps-root-detection-in-android-device/).\n * Further, many root-detection checks can be bypassed via reverse engineering.\n * - On Android, it's implemented in a way to find all possible files paths that contain the `\"su\"` executable but some devices that are not rooted may also have this executable. Therefore, there's no guarantee that this method will always return correctly.\n * - On iOS, [these jailbreak checks](https://www.theiphonewiki.com/wiki/Bypassing_Jailbreak_Detection) are used to detect if a device is rooted/jailbroken. However, since there are closed-sourced solutions such as [xCon](https://www.theiphonewiki.com/wiki/XCon) that aim to hook every known method and function responsible for informing an application of a jailbroken device, this method may not reliably detect devices that have xCon or similar packages installed.\n * - On web, this always resolves to `false` even if the device is rooted.\n * @return Returns a promise that resolves to a `boolean` that specifies whether this device is rooted.\n * @example\n * ```js\n * await Device.isRootedExperimentalAsync();\n * // true or false\n * ```\n */\nexport async function isRootedExperimentalAsync() {\n if (!ExpoDevice.isRootedExperimentalAsync) {\n throw new UnavailabilityError('expo-device', 'isRootedExperimentalAsync');\n }\n return await ExpoDevice.isRootedExperimentalAsync();\n}\n/**\n * **Using this method requires you to [add the `REQUEST_INSTALL_PACKAGES` permission](./../config/app/#permissions).**\n * Returns whether applications can be installed for this user via the system's [`ACTION_INSTALL_PACKAGE`](https://developer.android.com/reference/android/content/Intent.html#ACTION_INSTALL_PACKAGE)\n * mechanism rather than through the OS's default app store, like Google Play.\n * @return Returns a promise that resolves to a `boolean` that represents whether the calling package is allowed to request package installation.\n * @example\n * ```js\n * await Device.isSideLoadingEnabledAsync();\n * // true or false\n * ```\n * @platform android\n */\nexport async function isSideLoadingEnabledAsync() {\n if (!ExpoDevice.isSideLoadingEnabledAsync) {\n throw new UnavailabilityError('expo-device', 'isSideLoadingEnabledAsync');\n }\n return await ExpoDevice.isSideLoadingEnabledAsync();\n}\n/**\n * Gets a list of features that are available on the system. The feature names are platform-specific.\n * See [Android documentation]()\n * to learn more about this implementation.\n * @return Returns a promise that resolves to an array of strings, each of which is a platform-specific name of a feature available on the current device.\n * On iOS and web, the promise always resolves to an empty array.\n * @example\n * ```js\n * await Device.getPlatformFeaturesAsync();\n * // [\n * // 'android.software.adoptable_storage',\n * // 'android.software.backup',\n * // 'android.hardware.sensor.accelerometer',\n * // 'android.hardware.touchscreen',\n * // ]\n * ```\n * @platform android\n */\nexport async function getPlatformFeaturesAsync() {\n if (!ExpoDevice.getPlatformFeaturesAsync) {\n return [];\n }\n return await ExpoDevice.getPlatformFeaturesAsync();\n}\n/**\n * Tells if the device has a specific system feature.\n * @param feature The platform-specific name of the feature to check for on the device. You can get all available system features with `Device.getSystemFeatureAsync()`.\n * See [Android documentation]() to view acceptable feature strings.\n * @return Returns a promise that resolves to a boolean value indicating whether the device has the specified system feature.\n * On iOS and web, the promise always resolves to `false`.\n * @example\n * ```js\n * await Device.hasPlatformFeatureAsync('amazon.hardware.fire_tv');\n * // true or false\n * ```\n * @platform android\n */\nexport async function hasPlatformFeatureAsync(feature) {\n if (!ExpoDevice.hasPlatformFeatureAsync) {\n return false;\n }\n return await ExpoDevice.hasPlatformFeatureAsync(feature);\n}\n//# sourceMappingURL=Device.js.map","/**\n * An enum representing the different types of devices supported by Expo.\n */\nexport var DeviceType;\n(function (DeviceType) {\n /**\n * An unrecognized device type.\n */\n DeviceType[DeviceType[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n /**\n * Mobile phone handsets, typically with a touch screen and held in one hand.\n */\n DeviceType[DeviceType[\"PHONE\"] = 1] = \"PHONE\";\n /**\n * Tablet computers, typically with a touch screen that is larger than a usual phone.\n */\n DeviceType[DeviceType[\"TABLET\"] = 2] = \"TABLET\";\n /**\n * Desktop or laptop computers, typically with a keyboard and mouse.\n */\n DeviceType[DeviceType[\"DESKTOP\"] = 3] = \"DESKTOP\";\n /**\n * Device with TV-based interfaces.\n */\n DeviceType[DeviceType[\"TV\"] = 4] = \"TV\";\n})(DeviceType || (DeviceType = {}));\n//# sourceMappingURL=Device.types.js.map","import { Platform } from 'expo-modules-core';\nimport UAParser from 'ua-parser-js';\nimport { DeviceType } from './Device.types';\nlet result = null;\nif (Platform.isDOMAvailable) {\n const parser = new UAParser(window.navigator.userAgent);\n result = parser.getResult();\n}\nfunction convertGiBtoBytes(gib) {\n return Math.round(gib * 1024 ** 3);\n}\nfunction getDeviceType() {\n switch (result?.device?.type) {\n case 'mobile':\n return DeviceType.PHONE;\n case 'tablet':\n return DeviceType.TABLET;\n case 'smarttv':\n return DeviceType.TV;\n case 'console':\n case 'embedded':\n case 'wearable':\n return DeviceType.UNKNOWN;\n default:\n return DeviceType.DESKTOP;\n }\n}\nexport default {\n get isDevice() {\n return true;\n },\n get brand() {\n return null;\n },\n get manufacturer() {\n return (result && result.device.vendor) || null;\n },\n get modelName() {\n return (result && result.device.model) || null;\n },\n get deviceYearClass() {\n return null;\n },\n get deviceType() {\n return getDeviceType();\n },\n get totalMemory() {\n if (Platform.isDOMAvailable && 'deviceMemory' in navigator) {\n const { deviceMemory } = navigator;\n return convertGiBtoBytes(deviceMemory);\n }\n return null;\n },\n get supportedCpuArchitectures() {\n return result && result.cpu.architecture ? [result.cpu.architecture] : null;\n },\n get osName() {\n return (result && result.os.name) || '';\n },\n get osVersion() {\n return (result && result.os.version) || '';\n },\n get osBuildId() {\n return null;\n },\n get osInternalBuildId() {\n return null;\n },\n get deviceName() {\n return null;\n },\n async getDeviceTypeAsync() {\n return getDeviceType();\n },\n async isRootedExperimentalAsync() {\n return false;\n },\n};\n//# sourceMappingURL=ExpoDevice.web.js.map","/////////////////////////////////////////////////////////////////////////////////\n/* UAParser.js v0.7.39\n Copyright © 2012-2021 Faisal Salman \n MIT License *//*\n Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data.\n Supports browser & node.js environment. \n Demo : https://faisalman.github.io/ua-parser-js\n Source : https://github.com/faisalman/ua-parser-js */\n/////////////////////////////////////////////////////////////////////////////////\n\n(function (window, undefined) {\n\n 'use strict';\n\n //////////////\n // Constants\n /////////////\n\n\n var LIBVERSION = '0.7.39',\n EMPTY = '',\n UNKNOWN = '?',\n FUNC_TYPE = 'function',\n UNDEF_TYPE = 'undefined',\n OBJ_TYPE = 'object',\n STR_TYPE = 'string',\n MAJOR = 'major',\n MODEL = 'model',\n NAME = 'name',\n TYPE = 'type',\n VENDOR = 'vendor',\n VERSION = 'version',\n ARCHITECTURE= 'architecture',\n CONSOLE = 'console',\n MOBILE = 'mobile',\n TABLET = 'tablet',\n SMARTTV = 'smarttv',\n WEARABLE = 'wearable',\n EMBEDDED = 'embedded',\n UA_MAX_LENGTH = 500;\n\n var AMAZON = 'Amazon',\n APPLE = 'Apple',\n ASUS = 'ASUS',\n BLACKBERRY = 'BlackBerry',\n BROWSER = 'Browser',\n CHROME = 'Chrome',\n EDGE = 'Edge',\n FIREFOX = 'Firefox',\n GOOGLE = 'Google',\n HUAWEI = 'Huawei',\n LG = 'LG',\n MICROSOFT = 'Microsoft',\n MOTOROLA = 'Motorola',\n OPERA = 'Opera',\n SAMSUNG = 'Samsung',\n SHARP = 'Sharp',\n SONY = 'Sony',\n XIAOMI = 'Xiaomi',\n ZEBRA = 'Zebra',\n FACEBOOK = 'Facebook',\n CHROMIUM_OS = 'Chromium OS',\n MAC_OS = 'Mac OS',\n SUFFIX_BROWSER = ' Browser';\n\n ///////////\n // Helper\n //////////\n\n var extend = function (regexes, extensions) {\n var mergedRegexes = {};\n for (var i in regexes) {\n if (extensions[i] && extensions[i].length % 2 === 0) {\n mergedRegexes[i] = extensions[i].concat(regexes[i]);\n } else {\n mergedRegexes[i] = regexes[i];\n }\n }\n return mergedRegexes;\n },\n enumerize = function (arr) {\n var enums = {};\n for (var i=0; i 0) {\n if (q.length === 2) {\n if (typeof q[1] == FUNC_TYPE) {\n // assign modified match\n this[q[0]] = q[1].call(this, match);\n } else {\n // assign given value, ignore regex match\n this[q[0]] = q[1];\n }\n } else if (q.length === 3) {\n // check whether function or regex\n if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) {\n // call function (usually string mapper)\n this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined;\n } else {\n // sanitize match using given regex\n this[q[0]] = match ? match.replace(q[1], q[2]) : undefined;\n }\n } else if (q.length === 4) {\n this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined;\n }\n } else {\n this[q] = match ? match : undefined;\n }\n }\n }\n }\n i += 2;\n }\n },\n\n strMapper = function (str, map) {\n\n for (var i in map) {\n // check if current value is array\n if (typeof map[i] === OBJ_TYPE && map[i].length > 0) {\n for (var j = 0; j < map[i].length; j++) {\n if (has(map[i][j], str)) {\n return (i === UNKNOWN) ? undefined : i;\n }\n }\n } else if (has(map[i], str)) {\n return (i === UNKNOWN) ? undefined : i;\n }\n }\n return map.hasOwnProperty('*') ? map['*'] : str;\n };\n\n ///////////////\n // String map\n //////////////\n\n // Safari < 3.0\n var oldSafariMap = {\n '1.0' : '/8',\n '1.2' : '/1',\n '1.3' : '/3',\n '2.0' : '/412',\n '2.0.2' : '/416',\n '2.0.3' : '/417',\n '2.0.4' : '/419',\n '?' : '/'\n },\n windowsVersionMap = {\n 'ME' : '4.90',\n 'NT 3.11' : 'NT3.51',\n 'NT 4.0' : 'NT4.0',\n '2000' : 'NT 5.0',\n 'XP' : ['NT 5.1', 'NT 5.2'],\n 'Vista' : 'NT 6.0',\n '7' : 'NT 6.1',\n '8' : 'NT 6.2',\n '8.1' : 'NT 6.3',\n '10' : ['NT 6.4', 'NT 10.0'],\n 'RT' : 'ARM'\n };\n\n //////////////\n // Regex map\n /////////////\n\n var regexes = {\n\n browser : [[\n\n /\\b(?:crmo|crios)\\/([\\w\\.]+)/i // Chrome for Android/iOS\n ], [VERSION, [NAME, 'Chrome']], [\n /edg(?:e|ios|a)?\\/([\\w\\.]+)/i // Microsoft Edge\n ], [VERSION, [NAME, 'Edge']], [\n\n // Presto based\n /(opera mini)\\/([-\\w\\.]+)/i, // Opera Mini\n /(opera [mobiletab]{3,6})\\b.+version\\/([-\\w\\.]+)/i, // Opera Mobi/Tablet\n /(opera)(?:.+version\\/|[\\/ ]+)([\\w\\.]+)/i // Opera\n ], [NAME, VERSION], [\n /opios[\\/ ]+([\\w\\.]+)/i // Opera mini on iphone >= 8.0\n ], [VERSION, [NAME, OPERA+' Mini']], [\n /\\bop(?:rg)?x\\/([\\w\\.]+)/i // Opera GX\n ], [VERSION, [NAME, OPERA+' GX']], [\n /\\bopr\\/([\\w\\.]+)/i // Opera Webkit\n ], [VERSION, [NAME, OPERA]], [\n\n // Mixed\n /\\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\\/ ]?([\\w\\.]+)/i // Baidu\n ], [VERSION, [NAME, 'Baidu']], [\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\\/ ]?([\\w\\.]*)/i, \n // Lunascape/Maxthon/Netfront/Jasmine/Blazer/Sleipnir\n // Trident based\n /(avant|iemobile|slim)\\s?(?:browser)?[\\/ ]?([\\w\\.]*)/i, // Avant/IEMobile/SlimBrowser\n /(?:ms|\\()(ie) ([\\w\\.]+)/i, // Internet Explorer\n\n // Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon\n /(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio)\\/([-\\w\\.]+)/i,\n // Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ//Vivaldi/DuckDuckGo/Klar/Helio\n /(heytap|ovi)browser\\/([\\d\\.]+)/i, // HeyTap/Ovi\n /(weibo)__([\\d\\.]+)/i // Weibo\n ], [NAME, VERSION], [\n /quark(?:pc)?\\/([-\\w\\.]+)/i // Quark\n ], [VERSION, [NAME, 'Quark']], [\n /\\bddg\\/([\\w\\.]+)/i // DuckDuckGo\n ], [VERSION, [NAME, 'DuckDuckGo']], [\n /(?:\\buc? ?browser|(?:juc.+)ucweb)[\\/ ]?([\\w\\.]+)/i // UCBrowser\n ], [VERSION, [NAME, 'UC'+BROWSER]], [\n /microm.+\\bqbcore\\/([\\w\\.]+)/i, // WeChat Desktop for Windows Built-in Browser\n /\\bqbcore\\/([\\w\\.]+).+microm/i,\n /micromessenger\\/([\\w\\.]+)/i // WeChat\n ], [VERSION, [NAME, 'WeChat']], [\n /konqueror\\/([\\w\\.]+)/i // Konqueror\n ], [VERSION, [NAME, 'Konqueror']], [\n /trident.+rv[: ]([\\w\\.]{1,9})\\b.+like gecko/i // IE11\n ], [VERSION, [NAME, 'IE']], [\n /ya(?:search)?browser\\/([\\w\\.]+)/i // Yandex\n ], [VERSION, [NAME, 'Yandex']], [\n /slbrowser\\/([\\w\\.]+)/i // Smart Lenovo Browser\n ], [VERSION, [NAME, 'Smart Lenovo '+BROWSER]], [\n /(avast|avg)\\/([\\w\\.]+)/i // Avast/AVG Secure Browser\n ], [[NAME, /(.+)/, '$1 Secure '+BROWSER], VERSION], [\n /\\bfocus\\/([\\w\\.]+)/i // Firefox Focus\n ], [VERSION, [NAME, FIREFOX+' Focus']], [\n /\\bopt\\/([\\w\\.]+)/i // Opera Touch\n ], [VERSION, [NAME, OPERA+' Touch']], [\n /coc_coc\\w+\\/([\\w\\.]+)/i // Coc Coc Browser\n ], [VERSION, [NAME, 'Coc Coc']], [\n /dolfin\\/([\\w\\.]+)/i // Dolphin\n ], [VERSION, [NAME, 'Dolphin']], [\n /coast\\/([\\w\\.]+)/i // Opera Coast\n ], [VERSION, [NAME, OPERA+' Coast']], [\n /miuibrowser\\/([\\w\\.]+)/i // MIUI Browser\n ], [VERSION, [NAME, 'MIUI '+BROWSER]], [\n /fxios\\/([-\\w\\.]+)/i // Firefox for iOS\n ], [VERSION, [NAME, FIREFOX]], [\n /\\bqihu|(qi?ho?o?|360)browser/i // 360\n ], [[NAME, '360' + SUFFIX_BROWSER]], [\n /\\b(qq)\\/([\\w\\.]+)/i // QQ\n ], [[NAME, /(.+)/, '$1Browser'], VERSION], [\n /(oculus|sailfish|huawei|vivo|pico)browser\\/([\\w\\.]+)/i\n ], [[NAME, /(.+)/, '$1' + SUFFIX_BROWSER], VERSION], [ // Oculus/Sailfish/HuaweiBrowser/VivoBrowser/PicoBrowser\n /samsungbrowser\\/([\\w\\.]+)/i // Samsung Internet\n ], [VERSION, [NAME, SAMSUNG + ' Internet']], [\n /(comodo_dragon)\\/([\\w\\.]+)/i // Comodo Dragon\n ], [[NAME, /_/g, ' '], VERSION], [\n /metasr[\\/ ]?([\\d\\.]+)/i // Sogou Explorer\n ], [VERSION, [NAME, 'Sogou Explorer']], [\n /(sogou)mo\\w+\\/([\\d\\.]+)/i // Sogou Mobile\n ], [[NAME, 'Sogou Mobile'], VERSION], [\n /(electron)\\/([\\w\\.]+) safari/i, // Electron-based App\n /(tesla)(?: qtcarbrowser|\\/(20\\d\\d\\.[-\\w\\.]+))/i, // Tesla\n /m?(qqbrowser|2345Explorer)[\\/ ]?([\\w\\.]+)/i // QQBrowser/2345 Browser\n ], [NAME, VERSION], [\n /(lbbrowser|rekonq)/i, // LieBao Browser/Rekonq\n /\\[(linkedin)app\\]/i // LinkedIn App for iOS & Android\n ], [NAME], [\n\n // WebView\n /((?:fban\\/fbios|fb_iab\\/fb4a)(?!.+fbav)|;fbav\\/([\\w\\.]+);)/i // Facebook App for iOS & Android\n ], [[NAME, FACEBOOK], VERSION], [\n /(Klarna)\\/([\\w\\.]+)/i, // Klarna Shopping Browser for iOS & Android\n /(kakao(?:talk|story))[\\/ ]([\\w\\.]+)/i, // Kakao App\n /(naver)\\(.*?(\\d+\\.[\\w\\.]+).*\\)/i, // Naver InApp\n /safari (line)\\/([\\w\\.]+)/i, // Line App for iOS\n /\\b(line)\\/([\\w\\.]+)\\/iab/i, // Line App for Android\n /(alipay)client\\/([\\w\\.]+)/i, // Alipay\n /(twitter)(?:and| f.+e\\/([\\w\\.]+))/i, // Twitter\n /(chromium|instagram|snapchat)[\\/ ]([-\\w\\.]+)/i // Chromium/Instagram/Snapchat\n ], [NAME, VERSION], [\n /\\bgsa\\/([\\w\\.]+) .*safari\\//i // Google Search Appliance on iOS\n ], [VERSION, [NAME, 'GSA']], [\n /musical_ly(?:.+app_?version\\/|_)([\\w\\.]+)/i // TikTok\n ], [VERSION, [NAME, 'TikTok']], [\n\n /headlesschrome(?:\\/([\\w\\.]+)| )/i // Chrome Headless\n ], [VERSION, [NAME, CHROME+' Headless']], [\n\n / wv\\).+(chrome)\\/([\\w\\.]+)/i // Chrome WebView\n ], [[NAME, CHROME+' WebView'], VERSION], [\n\n /droid.+ version\\/([\\w\\.]+)\\b.+(?:mobile safari|safari)/i // Android Browser\n ], [VERSION, [NAME, 'Android '+BROWSER]], [\n\n /(chrome|omniweb|arora|[tizenoka]{5} ?browser)\\/v?([\\w\\.]+)/i // Chrome/OmniWeb/Arora/Tizen/Nokia\n ], [NAME, VERSION], [\n\n /version\\/([\\w\\.\\,]+) .*mobile\\/\\w+ (safari)/i // Mobile Safari\n ], [VERSION, [NAME, 'Mobile Safari']], [\n /version\\/([\\w(\\.|\\,)]+) .*(mobile ?safari|safari)/i // Safari & Safari Mobile\n ], [VERSION, NAME], [\n /webkit.+?(mobile ?safari|safari)(\\/[\\w\\.]+)/i // Safari < 3.0\n ], [NAME, [VERSION, strMapper, oldSafariMap]], [\n\n /(webkit|khtml)\\/([\\w\\.]+)/i\n ], [NAME, VERSION], [\n\n // Gecko based\n /(navigator|netscape\\d?)\\/([-\\w\\.]+)/i // Netscape\n ], [[NAME, 'Netscape'], VERSION], [\n /(wolvic)\\/([\\w\\.]+)/i // Wolvic\n ], [NAME, VERSION], [\n /mobile vr; rv:([\\w\\.]+)\\).+firefox/i // Firefox Reality\n ], [VERSION, [NAME, FIREFOX+' Reality']], [\n /ekiohf.+(flow)\\/([\\w\\.]+)/i, // Flow\n /(swiftfox)/i, // Swiftfox\n /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\\/ ]?([\\w\\.\\+]+)/i,\n // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror\n /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\\/([-\\w\\.]+)$/i,\n // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix\n /(firefox)\\/([\\w\\.]+)/i, // Other Firefox-based\n /(mozilla)\\/([\\w\\.]+) .+rv\\:.+gecko\\/\\d+/i, // Mozilla\n\n // Other\n /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\\. ]?browser)[-\\/ ]?v?([\\w\\.]+)/i,\n // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Obigo/Mosaic/Go/ICE/UP.Browser\n /(links) \\(([\\w\\.]+)/i // Links\n ], [NAME, [VERSION, /_/g, '.']], [\n \n /(cobalt)\\/([\\w\\.]+)/i // Cobalt\n ], [NAME, [VERSION, /master.|lts./, \"\"]]\n ],\n\n cpu : [[\n\n /(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\\)]/i // AMD64 (x64)\n ], [[ARCHITECTURE, 'amd64']], [\n\n /(ia32(?=;))/i // IA32 (quicktime)\n ], [[ARCHITECTURE, lowerize]], [\n\n /((?:i[346]|x)86)[;\\)]/i // IA32 (x86)\n ], [[ARCHITECTURE, 'ia32']], [\n\n /\\b(aarch64|arm(v?8e?l?|_?64))\\b/i // ARM64\n ], [[ARCHITECTURE, 'arm64']], [\n\n /\\b(arm(?:v[67])?ht?n?[fl]p?)\\b/i // ARMHF\n ], [[ARCHITECTURE, 'armhf']], [\n\n // PocketPC mistakenly identified as PowerPC\n /windows (ce|mobile); ppc;/i\n ], [[ARCHITECTURE, 'arm']], [\n\n /((?:ppc|powerpc)(?:64)?)(?: mac|;|\\))/i // PowerPC\n ], [[ARCHITECTURE, /ower/, EMPTY, lowerize]], [\n\n /(sun4\\w)[;\\)]/i // SPARC\n ], [[ARCHITECTURE, 'sparc']], [\n\n /((?:avr32|ia64(?=;))|68k(?=\\))|\\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\\b|pa-risc)/i\n // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC\n ], [[ARCHITECTURE, lowerize]]\n ],\n\n device : [[\n\n //////////////////////////\n // MOBILES & TABLETS\n /////////////////////////\n\n // Samsung\n /\\b(sch-i[89]0\\d|shw-m380s|sm-[ptx]\\w{2,4}|gt-[pn]\\d{2,4}|sgh-t8[56]9|nexus 10)/i\n ], [MODEL, [VENDOR, SAMSUNG], [TYPE, TABLET]], [\n /\\b((?:s[cgp]h|gt|sm)-(?![lr])\\w+|sc[g-]?[\\d]+a?|galaxy nexus)/i,\n /samsung[- ]((?!sm-[lr])[-\\w]+)/i,\n /sec-(sgh\\w+)/i\n ], [MODEL, [VENDOR, SAMSUNG], [TYPE, MOBILE]], [\n\n // Apple\n /(?:\\/|\\()(ip(?:hone|od)[\\w, ]*)(?:\\/|;)/i // iPod/iPhone\n ], [MODEL, [VENDOR, APPLE], [TYPE, MOBILE]], [\n /\\((ipad);[-\\w\\),; ]+apple/i, // iPad\n /applecoremedia\\/[\\w\\.]+ \\((ipad)/i,\n /\\b(ipad)\\d\\d?,\\d\\d?[;\\]].+ios/i\n ], [MODEL, [VENDOR, APPLE], [TYPE, TABLET]], [\n /(macintosh);/i\n ], [MODEL, [VENDOR, APPLE]], [\n\n // Sharp\n /\\b(sh-?[altvz]?\\d\\d[a-ekm]?)/i\n ], [MODEL, [VENDOR, SHARP], [TYPE, MOBILE]], [\n\n // Huawei\n /\\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\\d{2})\\b(?!.+d\\/s)/i\n ], [MODEL, [VENDOR, HUAWEI], [TYPE, TABLET]], [\n /(?:huawei|honor)([-\\w ]+)[;\\)]/i,\n /\\b(nexus 6p|\\w{2,4}e?-[atu]?[ln][\\dx][012359c][adn]?)\\b(?!.+d\\/s)/i\n ], [MODEL, [VENDOR, HUAWEI], [TYPE, MOBILE]], [\n\n // Xiaomi\n /\\b(poco[\\w ]+|m2\\d{3}j\\d\\d[a-z]{2})(?: bui|\\))/i, // Xiaomi POCO\n /\\b; (\\w+) build\\/hm\\1/i, // Xiaomi Hongmi 'numeric' models\n /\\b(hm[-_ ]?note?[_ ]?(?:\\d\\w)?) bui/i, // Xiaomi Hongmi\n /\\b(redmi[\\-_ ]?(?:note|k)?[\\w_ ]+)(?: bui|\\))/i, // Xiaomi Redmi\n /oid[^\\)]+; (m?[12][0-389][01]\\w{3,6}[c-y])( bui|; wv|\\))/i, // Xiaomi Redmi 'numeric' models\n /\\b(mi[-_ ]?(?:a\\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\\d?\\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\\))/i // Xiaomi Mi\n ], [[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, MOBILE]], [\n /oid[^\\)]+; (2\\d{4}(283|rpbf)[cgl])( bui|\\))/i, // Redmi Pad\n /\\b(mi[-_ ]?(?:pad)(?:[\\w_ ]+))(?: bui|\\))/i // Mi Pad tablets\n ],[[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, TABLET]], [\n\n // OPPO\n /; (\\w+) bui.+ oppo/i,\n /\\b(cph[12]\\d{3}|p(?:af|c[al]|d\\w|e[ar])[mt]\\d0|x9007|a101op)\\b/i\n ], [MODEL, [VENDOR, 'OPPO'], [TYPE, MOBILE]], [\n /\\b(opd2\\d{3}a?) bui/i\n ], [MODEL, [VENDOR, 'OPPO'], [TYPE, TABLET]], [\n\n // Vivo\n /vivo (\\w+)(?: bui|\\))/i,\n /\\b(v[12]\\d{3}\\w?[at])(?: bui|;)/i\n ], [MODEL, [VENDOR, 'Vivo'], [TYPE, MOBILE]], [\n\n // Realme\n /\\b(rmx[1-3]\\d{3})(?: bui|;|\\))/i\n ], [MODEL, [VENDOR, 'Realme'], [TYPE, MOBILE]], [\n\n // Motorola\n /\\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\\b[\\w ]+build\\//i,\n /\\bmot(?:orola)?[- ](\\w*)/i,\n /((?:moto[\\w\\(\\) ]+|xt\\d{3,4}|nexus 6)(?= bui|\\)))/i\n ], [MODEL, [VENDOR, MOTOROLA], [TYPE, MOBILE]], [\n /\\b(mz60\\d|xoom[2 ]{0,2}) build\\//i\n ], [MODEL, [VENDOR, MOTOROLA], [TYPE, TABLET]], [\n\n // LG\n /((?=lg)?[vl]k\\-?\\d{3}) bui| 3\\.[-\\w; ]{10}lg?-([06cv9]{3,4})/i\n ], [MODEL, [VENDOR, LG], [TYPE, TABLET]], [\n /(lm(?:-?f100[nv]?|-[\\w\\.]+)(?= bui|\\))|nexus [45])/i,\n /\\blg[-e;\\/ ]+((?!browser|netcast|android tv)\\w+)/i,\n /\\blg-?([\\d\\w]+) bui/i\n ], [MODEL, [VENDOR, LG], [TYPE, MOBILE]], [\n\n // Lenovo\n /(ideatab[-\\w ]+)/i,\n /lenovo ?(s[56]000[-\\w]+|tab(?:[\\w ]+)|yt[-\\d\\w]{6}|tb[-\\d\\w]{6})/i\n ], [MODEL, [VENDOR, 'Lenovo'], [TYPE, TABLET]], [\n\n // Nokia\n /(?:maemo|nokia).*(n900|lumia \\d+)/i,\n /nokia[-_ ]?([-\\w\\.]*)/i\n ], [[MODEL, /_/g, ' '], [VENDOR, 'Nokia'], [TYPE, MOBILE]], [\n\n // Google\n /(pixel c)\\b/i // Google Pixel C\n ], [MODEL, [VENDOR, GOOGLE], [TYPE, TABLET]], [\n /droid.+; (pixel[\\daxl ]{0,6})(?: bui|\\))/i // Google Pixel\n ], [MODEL, [VENDOR, GOOGLE], [TYPE, MOBILE]], [\n\n // Sony\n /droid.+ (a?\\d[0-2]{2}so|[c-g]\\d{4}|so[-gl]\\w+|xq-a\\w[4-7][12])(?= bui|\\).+chrome\\/(?![1-6]{0,1}\\d\\.))/i\n ], [MODEL, [VENDOR, SONY], [TYPE, MOBILE]], [\n /sony tablet [ps]/i,\n /\\b(?:sony)?sgp\\w+(?: bui|\\))/i\n ], [[MODEL, 'Xperia Tablet'], [VENDOR, SONY], [TYPE, TABLET]], [\n\n // OnePlus\n / (kb2005|in20[12]5|be20[12][59])\\b/i,\n /(?:one)?(?:plus)? (a\\d0\\d\\d)(?: b|\\))/i\n ], [MODEL, [VENDOR, 'OnePlus'], [TYPE, MOBILE]], [\n\n // Amazon\n /(alexa)webm/i,\n /(kf[a-z]{2}wi|aeo(?!bc)\\w\\w)( bui|\\))/i, // Kindle Fire without Silk / Echo Show\n /(kf[a-z]+)( bui|\\)).+silk\\//i // Kindle Fire HD\n ], [MODEL, [VENDOR, AMAZON], [TYPE, TABLET]], [\n /((?:sd|kf)[0349hijorstuw]+)( bui|\\)).+silk\\//i // Fire Phone\n ], [[MODEL, /(.+)/g, 'Fire Phone $1'], [VENDOR, AMAZON], [TYPE, MOBILE]], [\n\n // BlackBerry\n /(playbook);[-\\w\\),; ]+(rim)/i // BlackBerry PlayBook\n ], [MODEL, VENDOR, [TYPE, TABLET]], [\n /\\b((?:bb[a-f]|st[hv])100-\\d)/i,\n /\\(bb10; (\\w+)/i // BlackBerry 10\n ], [MODEL, [VENDOR, BLACKBERRY], [TYPE, MOBILE]], [\n\n // Asus\n /(?:\\b|asus_)(transfo[prime ]{4,10} \\w+|eeepc|slider \\w+|nexus 7|padfone|p00[cj])/i\n ], [MODEL, [VENDOR, ASUS], [TYPE, TABLET]], [\n / (z[bes]6[027][012][km][ls]|zenfone \\d\\w?)\\b/i\n ], [MODEL, [VENDOR, ASUS], [TYPE, MOBILE]], [\n\n // HTC\n /(nexus 9)/i // HTC Nexus 9\n ], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [\n /(htc)[-;_ ]{1,2}([\\w ]+(?=\\)| bui)|\\w+)/i, // HTC\n\n // ZTE\n /(zte)[- ]([\\w ]+?)(?: bui|\\/|\\))/i,\n /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\\.))|sony(?!-bra))[-_ ]?([-\\w]*)/i // Alcatel/GeeksPhone/Nexian/Panasonic/Sony\n ], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [\n\n // TCL\n /droid [\\w\\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\\w*(\\)| bui)/i\n ], [MODEL, [VENDOR, 'TCL'], [TYPE, TABLET]], [\n\n // itel\n /(itel) ((\\w+))/i\n ], [[VENDOR, lowerize], MODEL, [TYPE, strMapper, { 'tablet' : ['p10001l', 'w7001'], '*' : 'mobile' }]], [\n\n // Acer\n /droid.+; ([ab][1-7]-?[0178a]\\d\\d?)/i\n ], [MODEL, [VENDOR, 'Acer'], [TYPE, TABLET]], [\n\n // Meizu\n /droid.+; (m[1-5] note) bui/i,\n /\\bmz-([-\\w]{2,})/i\n ], [MODEL, [VENDOR, 'Meizu'], [TYPE, MOBILE]], [\n \n // Ulefone\n /; ((?:power )?armor(?:[\\w ]{0,8}))(?: bui|\\))/i\n ], [MODEL, [VENDOR, 'Ulefone'], [TYPE, MOBILE]], [\n\n // Nothing\n /droid.+; (a(?:015|06[35]|142p?))/i\n ], [MODEL, [VENDOR, 'Nothing'], [TYPE, MOBILE]], [\n\n // MIXED\n /(blackberry|benq|palm(?=\\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\\w]*)/i,\n // BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron\n /(hp) ([\\w ]+\\w)/i, // HP iPAQ\n /(asus)-?(\\w+)/i, // Asus\n /(microsoft); (lumia[\\w ]+)/i, // Microsoft Lumia\n /(lenovo)[-_ ]?([-\\w]+)/i, // Lenovo\n /(jolla)/i, // Jolla\n /(oppo) ?([\\w ]+) bui/i // OPPO\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /(kobo)\\s(ereader|touch)/i, // Kobo\n /(archos) (gamepad2?)/i, // Archos\n /(hp).+(touchpad(?!.+tablet)|tablet)/i, // HP TouchPad\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /(nook)[\\w ]+build\\/(\\w+)/i, // Nook\n /(dell) (strea[kpr\\d ]*[\\dko])/i, // Dell Streak\n /(le[- ]+pan)[- ]+(\\w{1,9}) bui/i, // Le Pan Tablets\n /(trinity)[- ]*(t\\d{3}) bui/i, // Trinity Tablets\n /(gigaset)[- ]+(q\\w{1,9}) bui/i, // Gigaset Tablets\n /(vodafone) ([\\w ]+)(?:\\)| bui)/i // Vodafone\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /(surface duo)/i // Surface Duo\n ], [MODEL, [VENDOR, MICROSOFT], [TYPE, TABLET]], [\n /droid [\\d\\.]+; (fp\\du?)(?: b|\\))/i // Fairphone\n ], [MODEL, [VENDOR, 'Fairphone'], [TYPE, MOBILE]], [\n /(u304aa)/i // AT&T\n ], [MODEL, [VENDOR, 'AT&T'], [TYPE, MOBILE]], [\n /\\bsie-(\\w*)/i // Siemens\n ], [MODEL, [VENDOR, 'Siemens'], [TYPE, MOBILE]], [\n /\\b(rct\\w+) b/i // RCA Tablets\n ], [MODEL, [VENDOR, 'RCA'], [TYPE, TABLET]], [\n /\\b(venue[\\d ]{2,7}) b/i // Dell Venue Tablets\n ], [MODEL, [VENDOR, 'Dell'], [TYPE, TABLET]], [\n /\\b(q(?:mv|ta)\\w+) b/i // Verizon Tablet\n ], [MODEL, [VENDOR, 'Verizon'], [TYPE, TABLET]], [\n /\\b(?:barnes[& ]+noble |bn[rt])([\\w\\+ ]*) b/i // Barnes & Noble Tablet\n ], [MODEL, [VENDOR, 'Barnes & Noble'], [TYPE, TABLET]], [\n /\\b(tm\\d{3}\\w+) b/i\n ], [MODEL, [VENDOR, 'NuVision'], [TYPE, TABLET]], [\n /\\b(k88) b/i // ZTE K Series Tablet\n ], [MODEL, [VENDOR, 'ZTE'], [TYPE, TABLET]], [\n /\\b(nx\\d{3}j) b/i // ZTE Nubia\n ], [MODEL, [VENDOR, 'ZTE'], [TYPE, MOBILE]], [\n /\\b(gen\\d{3}) b.+49h/i // Swiss GEN Mobile\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, MOBILE]], [\n /\\b(zur\\d{3}) b/i // Swiss ZUR Tablet\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [\n /\\b((zeki)?tb.*\\b) b/i // Zeki Tablets\n ], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [\n /\\b([yr]\\d{2}) b/i,\n /\\b(dragon[- ]+touch |dt)(\\w{5}) b/i // Dragon Touch Tablet\n ], [[VENDOR, 'Dragon Touch'], MODEL, [TYPE, TABLET]], [\n /\\b(ns-?\\w{0,9}) b/i // Insignia Tablets\n ], [MODEL, [VENDOR, 'Insignia'], [TYPE, TABLET]], [\n /\\b((nxa|next)-?\\w{0,9}) b/i // NextBook Tablets\n ], [MODEL, [VENDOR, 'NextBook'], [TYPE, TABLET]], [\n /\\b(xtreme\\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i // Voice Xtreme Phones\n ], [[VENDOR, 'Voice'], MODEL, [TYPE, MOBILE]], [\n /\\b(lvtel\\-)?(v1[12]) b/i // LvTel Phones\n ], [[VENDOR, 'LvTel'], MODEL, [TYPE, MOBILE]], [\n /\\b(ph-1) /i // Essential PH-1\n ], [MODEL, [VENDOR, 'Essential'], [TYPE, MOBILE]], [\n /\\b(v(100md|700na|7011|917g).*\\b) b/i // Envizen Tablets\n ], [MODEL, [VENDOR, 'Envizen'], [TYPE, TABLET]], [\n /\\b(trio[-\\w\\. ]+) b/i // MachSpeed Tablets\n ], [MODEL, [VENDOR, 'MachSpeed'], [TYPE, TABLET]], [\n /\\btu_(1491) b/i // Rotor Tablets\n ], [MODEL, [VENDOR, 'Rotor'], [TYPE, TABLET]], [\n /(shield[\\w ]+) b/i // Nvidia Shield Tablets\n ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, TABLET]], [\n /(sprint) (\\w+)/i // Sprint Phones\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /(kin\\.[onetw]{3})/i // Microsoft Kin\n ], [[MODEL, /\\./g, ' '], [VENDOR, MICROSOFT], [TYPE, MOBILE]], [\n /droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\\)/i // Zebra\n ], [MODEL, [VENDOR, ZEBRA], [TYPE, TABLET]], [\n /droid.+; (ec30|ps20|tc[2-8]\\d[kx])\\)/i\n ], [MODEL, [VENDOR, ZEBRA], [TYPE, MOBILE]], [\n\n ///////////////////\n // SMARTTVS\n ///////////////////\n\n /smart-tv.+(samsung)/i // Samsung\n ], [VENDOR, [TYPE, SMARTTV]], [\n /hbbtv.+maple;(\\d+)/i\n ], [[MODEL, /^/, 'SmartTV'], [VENDOR, SAMSUNG], [TYPE, SMARTTV]], [\n /(nux; netcast.+smarttv|lg (netcast\\.tv-201\\d|android tv))/i // LG SmartTV\n ], [[VENDOR, LG], [TYPE, SMARTTV]], [\n /(apple) ?tv/i // Apple TV\n ], [VENDOR, [MODEL, APPLE+' TV'], [TYPE, SMARTTV]], [\n /crkey/i // Google Chromecast\n ], [[MODEL, CHROME+'cast'], [VENDOR, GOOGLE], [TYPE, SMARTTV]], [\n /droid.+aft(\\w+)( bui|\\))/i // Fire TV\n ], [MODEL, [VENDOR, AMAZON], [TYPE, SMARTTV]], [\n /\\(dtv[\\);].+(aquos)/i,\n /(aquos-tv[\\w ]+)\\)/i // Sharp\n ], [MODEL, [VENDOR, SHARP], [TYPE, SMARTTV]],[\n /(bravia[\\w ]+)( bui|\\))/i // Sony\n ], [MODEL, [VENDOR, SONY], [TYPE, SMARTTV]], [\n /(mitv-\\w{5}) bui/i // Xiaomi\n ], [MODEL, [VENDOR, XIAOMI], [TYPE, SMARTTV]], [\n /Hbbtv.*(technisat) (.*);/i // TechniSAT\n ], [VENDOR, MODEL, [TYPE, SMARTTV]], [\n /\\b(roku)[\\dx]*[\\)\\/]((?:dvp-)?[\\d\\.]*)/i, // Roku\n /hbbtv\\/\\d+\\.\\d+\\.\\d+ +\\([\\w\\+ ]*; *([\\w\\d][^;]*);([^;]*)/i // HbbTV devices\n ], [[VENDOR, trim], [MODEL, trim], [TYPE, SMARTTV]], [\n /\\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\\b/i // SmartTV from Unidentified Vendors\n ], [[TYPE, SMARTTV]], [\n\n ///////////////////\n // CONSOLES\n ///////////////////\n\n /(ouya)/i, // Ouya\n /(nintendo) ([wids3utch]+)/i // Nintendo\n ], [VENDOR, MODEL, [TYPE, CONSOLE]], [\n /droid.+; (shield) bui/i // Nvidia\n ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [\n /(playstation [345portablevi]+)/i // Playstation\n ], [MODEL, [VENDOR, SONY], [TYPE, CONSOLE]], [\n /\\b(xbox(?: one)?(?!; xbox))[\\); ]/i // Microsoft Xbox\n ], [MODEL, [VENDOR, MICROSOFT], [TYPE, CONSOLE]], [\n\n ///////////////////\n // WEARABLES\n ///////////////////\n\n /\\b(sm-[lr]\\d\\d[05][fnuw]?s?)\\b/i // Samsung Galaxy Watch\n ], [MODEL, [VENDOR, SAMSUNG], [TYPE, WEARABLE]], [\n /((pebble))app/i // Pebble\n ], [VENDOR, MODEL, [TYPE, WEARABLE]], [\n /(watch)(?: ?os[,\\/]|\\d,\\d\\/)[\\d\\.]+/i // Apple Watch\n ], [MODEL, [VENDOR, APPLE], [TYPE, WEARABLE]], [\n /droid.+; (glass) \\d/i // Google Glass\n ], [MODEL, [VENDOR, GOOGLE], [TYPE, WEARABLE]], [\n /droid.+; (wt63?0{2,3})\\)/i\n ], [MODEL, [VENDOR, ZEBRA], [TYPE, WEARABLE]], [\n /(quest( \\d| pro)?)/i // Oculus Quest\n ], [MODEL, [VENDOR, FACEBOOK], [TYPE, WEARABLE]], [\n\n ///////////////////\n // EMBEDDED\n ///////////////////\n\n /(tesla)(?: qtcarbrowser|\\/[-\\w\\.]+)/i // Tesla\n ], [VENDOR, [TYPE, EMBEDDED]], [\n /(aeobc)\\b/i // Echo Dot\n ], [MODEL, [VENDOR, AMAZON], [TYPE, EMBEDDED]], [\n\n ////////////////////\n // MIXED (GENERIC)\n ///////////////////\n\n /droid .+?; ([^;]+?)(?: bui|; wv\\)|\\) applew).+? mobile safari/i // Android Phones from Unidentified Vendors\n ], [MODEL, [TYPE, MOBILE]], [\n /droid .+?; ([^;]+?)(?: bui|\\) applew).+?(?! mobile) safari/i // Android Tablets from Unidentified Vendors\n ], [MODEL, [TYPE, TABLET]], [\n /\\b((tablet|tab)[;\\/]|focus\\/\\d(?!.+mobile))/i // Unidentifiable Tablet\n ], [[TYPE, TABLET]], [\n /(phone|mobile(?:[;\\/]| [ \\w\\/\\.]*safari)|pda(?=.+windows ce))/i // Unidentifiable Mobile\n ], [[TYPE, MOBILE]], [\n /(android[-\\w\\. ]{0,9});.+buil/i // Generic Android Device\n ], [MODEL, [VENDOR, 'Generic']]\n ],\n\n engine : [[\n\n /windows.+ edge\\/([\\w\\.]+)/i // EdgeHTML\n ], [VERSION, [NAME, EDGE+'HTML']], [\n\n /webkit\\/537\\.36.+chrome\\/(?!27)([\\w\\.]+)/i // Blink\n ], [VERSION, [NAME, 'Blink']], [\n\n /(presto)\\/([\\w\\.]+)/i, // Presto\n /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\\/([\\w\\.]+)/i, // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna\n /ekioh(flow)\\/([\\w\\.]+)/i, // Flow\n /(khtml|tasman|links)[\\/ ]\\(?([\\w\\.]+)/i, // KHTML/Tasman/Links\n /(icab)[\\/ ]([23]\\.[\\d\\.]+)/i, // iCab\n /\\b(libweb)/i\n ], [NAME, VERSION], [\n\n /rv\\:([\\w\\.]{1,9})\\b.+(gecko)/i // Gecko\n ], [VERSION, NAME]\n ],\n\n os : [[\n\n // Windows\n /microsoft (windows) (vista|xp)/i // Windows (iTunes)\n ], [NAME, VERSION], [\n /(windows (?:phone(?: os)?|mobile))[\\/ ]?([\\d\\.\\w ]*)/i // Windows Phone\n ], [NAME, [VERSION, strMapper, windowsVersionMap]], [\n /windows nt 6\\.2; (arm)/i, // Windows RT\n /windows[\\/ ]?([ntce\\d\\. ]+\\w)(?!.+xbox)/i,\n /(?:win(?=3|9|n)|win 9x )([nt\\d\\.]+)/i\n ], [[VERSION, strMapper, windowsVersionMap], [NAME, 'Windows']], [\n\n // iOS/macOS\n /ip[honead]{2,4}\\b(?:.*os ([\\w]+) like mac|; opera)/i, // iOS\n /(?:ios;fbsv\\/|iphone.+ios[\\/ ])([\\d\\.]+)/i,\n /cfnetwork\\/.+darwin/i\n ], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [\n /(mac os x) ?([\\w\\. ]*)/i,\n /(macintosh|mac_powerpc\\b)(?!.+haiku)/i // Mac OS\n ], [[NAME, MAC_OS], [VERSION, /_/g, '.']], [\n\n // Mobile OSes\n /droid ([\\w\\.]+)\\b.+(android[- ]x86|harmonyos)/i // Android-x86/HarmonyOS\n ], [VERSION, NAME], [ // Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS\n /(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\\/ ]?([\\w\\.]*)/i,\n /(blackberry)\\w*\\/([\\w\\.]*)/i, // Blackberry\n /(tizen|kaios)[\\/ ]([\\w\\.]+)/i, // Tizen/KaiOS\n /\\((series40);/i // Series 40\n ], [NAME, VERSION], [\n /\\(bb(10);/i // BlackBerry 10\n ], [VERSION, [NAME, BLACKBERRY]], [\n /(?:symbian ?os|symbos|s60(?=;)|series60)[-\\/ ]?([\\w\\.]*)/i // Symbian\n ], [VERSION, [NAME, 'Symbian']], [\n /mozilla\\/[\\d\\.]+ \\((?:mobile|tablet|tv|mobile; [\\w ]+); rv:.+ gecko\\/([\\w\\.]+)/i // Firefox OS\n ], [VERSION, [NAME, FIREFOX+' OS']], [\n /web0s;.+rt(tv)/i,\n /\\b(?:hp)?wos(?:browser)?\\/([\\w\\.]+)/i // WebOS\n ], [VERSION, [NAME, 'webOS']], [\n /watch(?: ?os[,\\/]|\\d,\\d\\/)([\\d\\.]+)/i // watchOS\n ], [VERSION, [NAME, 'watchOS']], [\n\n // Google Chromecast\n /crkey\\/([\\d\\.]+)/i // Google Chromecast\n ], [VERSION, [NAME, CHROME+'cast']], [\n /(cros) [\\w]+(?:\\)| ([\\w\\.]+)\\b)/i // Chromium OS\n ], [[NAME, CHROMIUM_OS], VERSION],[\n\n // Smart TVs\n /panasonic;(viera)/i, // Panasonic Viera\n /(netrange)mmh/i, // Netrange\n /(nettv)\\/(\\d+\\.[\\w\\.]+)/i, // NetTV\n\n // Console\n /(nintendo|playstation) ([wids345portablevuch]+)/i, // Nintendo/Playstation\n /(xbox); +xbox ([^\\);]+)/i, // Microsoft Xbox (360, One, X, S, Series X, Series S)\n\n // Other\n /\\b(joli|palm)\\b ?(?:os)?\\/?([\\w\\.]*)/i, // Joli/Palm\n /(mint)[\\/\\(\\) ]?(\\w*)/i, // Mint\n /(mageia|vectorlinux)[; ]/i, // Mageia/VectorLinux\n /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\\/ ]?(?!chrom|package)([-\\w\\.]*)/i,\n // Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire\n /(hurd|linux) ?([\\w\\.]*)/i, // Hurd/Linux\n /(gnu) ?([\\w\\.]*)/i, // GNU\n /\\b([-frentopcghs]{0,5}bsd|dragonfly)[\\/ ]?(?!amd|[ix346]{1,2}86)([\\w\\.]*)/i, // FreeBSD/NetBSD/OpenBSD/PC-BSD/GhostBSD/DragonFly\n /(haiku) (\\w+)/i // Haiku\n ], [NAME, VERSION], [\n /(sunos) ?([\\w\\.\\d]*)/i // Solaris\n ], [[NAME, 'Solaris'], VERSION], [\n /((?:open)?solaris)[-\\/ ]?([\\w\\.]*)/i, // Solaris\n /(aix) ((\\d)(?=\\.|\\)| )[\\w\\.])*/i, // AIX\n /\\b(beos|os\\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i, // BeOS/OS2/AmigaOS/MorphOS/OpenVMS/Fuchsia/HP-UX/SerenityOS\n /(unix) ?([\\w\\.]*)/i // UNIX\n ], [NAME, VERSION]\n ]\n };\n\n /////////////////\n // Constructor\n ////////////////\n\n var UAParser = function (ua, extensions) {\n\n if (typeof ua === OBJ_TYPE) {\n extensions = ua;\n ua = undefined;\n }\n\n if (!(this instanceof UAParser)) {\n return new UAParser(ua, extensions).getResult();\n }\n\n var _navigator = (typeof window !== UNDEF_TYPE && window.navigator) ? window.navigator : undefined;\n var _ua = ua || ((_navigator && _navigator.userAgent) ? _navigator.userAgent : EMPTY);\n var _uach = (_navigator && _navigator.userAgentData) ? _navigator.userAgentData : undefined;\n var _rgxmap = extensions ? extend(regexes, extensions) : regexes;\n var _isSelfNav = _navigator && _navigator.userAgent == _ua;\n\n this.getBrowser = function () {\n var _browser = {};\n _browser[NAME] = undefined;\n _browser[VERSION] = undefined;\n rgxMapper.call(_browser, _ua, _rgxmap.browser);\n _browser[MAJOR] = majorize(_browser[VERSION]);\n // Brave-specific detection\n if (_isSelfNav && _navigator && _navigator.brave && typeof _navigator.brave.isBrave == FUNC_TYPE) {\n _browser[NAME] = 'Brave';\n }\n return _browser;\n };\n this.getCPU = function () {\n var _cpu = {};\n _cpu[ARCHITECTURE] = undefined;\n rgxMapper.call(_cpu, _ua, _rgxmap.cpu);\n return _cpu;\n };\n this.getDevice = function () {\n var _device = {};\n _device[VENDOR] = undefined;\n _device[MODEL] = undefined;\n _device[TYPE] = undefined;\n rgxMapper.call(_device, _ua, _rgxmap.device);\n if (_isSelfNav && !_device[TYPE] && _uach && _uach.mobile) {\n _device[TYPE] = MOBILE;\n }\n // iPadOS-specific detection: identified as Mac, but has some iOS-only properties\n if (_isSelfNav && _device[MODEL] == 'Macintosh' && _navigator && typeof _navigator.standalone !== UNDEF_TYPE && _navigator.maxTouchPoints && _navigator.maxTouchPoints > 2) {\n _device[MODEL] = 'iPad';\n _device[TYPE] = TABLET;\n }\n return _device;\n };\n this.getEngine = function () {\n var _engine = {};\n _engine[NAME] = undefined;\n _engine[VERSION] = undefined;\n rgxMapper.call(_engine, _ua, _rgxmap.engine);\n return _engine;\n };\n this.getOS = function () {\n var _os = {};\n _os[NAME] = undefined;\n _os[VERSION] = undefined;\n rgxMapper.call(_os, _ua, _rgxmap.os);\n if (_isSelfNav && !_os[NAME] && _uach && _uach.platform && _uach.platform != 'Unknown') {\n _os[NAME] = _uach.platform \n .replace(/chrome os/i, CHROMIUM_OS)\n .replace(/macos/i, MAC_OS); // backward compatibility\n }\n return _os;\n };\n this.getResult = function () {\n return {\n ua : this.getUA(),\n browser : this.getBrowser(),\n engine : this.getEngine(),\n os : this.getOS(),\n device : this.getDevice(),\n cpu : this.getCPU()\n };\n };\n this.getUA = function () {\n return _ua;\n };\n this.setUA = function (ua) {\n _ua = (typeof ua === STR_TYPE && ua.length > UA_MAX_LENGTH) ? trim(ua, UA_MAX_LENGTH) : ua;\n return this;\n };\n this.setUA(_ua);\n return this;\n };\n\n UAParser.VERSION = LIBVERSION;\n UAParser.BROWSER = enumerize([NAME, VERSION, MAJOR]);\n UAParser.CPU = enumerize([ARCHITECTURE]);\n UAParser.DEVICE = enumerize([MODEL, VENDOR, TYPE, CONSOLE, MOBILE, SMARTTV, TABLET, WEARABLE, EMBEDDED]);\n UAParser.ENGINE = UAParser.OS = enumerize([NAME, VERSION]);\n\n ///////////\n // Export\n //////////\n\n // check js environment\n if (typeof(exports) !== UNDEF_TYPE) {\n // nodejs env\n if (typeof module !== UNDEF_TYPE && module.exports) {\n exports = module.exports = UAParser;\n }\n exports.UAParser = UAParser;\n } else {\n // requirejs env (optional)\n if (typeof(define) === FUNC_TYPE && define.amd) {\n define(function () {\n return UAParser;\n });\n } else if (typeof window !== UNDEF_TYPE) {\n // browser env\n window.UAParser = UAParser;\n }\n }\n\n // jQuery/Zepto specific (optional)\n // Note:\n // In AMD env the global scope should be kept clean, but jQuery is an exception.\n // jQuery always exports to global scope, unless jQuery.noConflict(true) is used,\n // and we should catch that.\n var $ = typeof window !== UNDEF_TYPE && (window.jQuery || window.Zepto);\n if ($ && !$.ua) {\n var parser = new UAParser();\n $.ua = parser.getResult();\n $.ua.get = function () {\n return parser.getUA();\n };\n $.ua.set = function (ua) {\n parser.setUA(ua);\n var result = parser.getResult();\n for (var prop in result) {\n $.ua[prop] = result[prop];\n }\n };\n }\n\n})(typeof window === 'object' ? window : this);\n","{\n \"name\": \"react-native\",\n \"version\": \"0.76.7\",\n \"description\": \"A framework for building native apps using React\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/facebook/react-native.git\",\n \"directory\": \"packages/react-native\"\n },\n \"homepage\": \"https://reactnative.dev/\",\n \"keywords\": [\n \"react\",\n \"react-native\",\n \"android\",\n \"ios\",\n \"mobile\",\n \"cross-platform\",\n \"app-framework\",\n \"mobile-development\"\n ],\n \"bugs\": \"https://github.com/facebook/react-native/issues\",\n \"engines\": {\n \"node\": \">=18\"\n },\n \"bin\": {\n \"react-native\": \"cli.js\"\n },\n \"types\": \"types\",\n \"jest-junit\": {\n \"outputDirectory\": \"reports/junit\",\n \"outputName\": \"js-test-results.xml\"\n },\n \"files\": [\n \"android\",\n \"build.gradle.kts\",\n \"cli.js\",\n \"flow\",\n \"gradle.properties\",\n \"gradle/libs.versions.toml\",\n \"index.js\",\n \"interface.js\",\n \"jest-preset.js\",\n \"jest\",\n \"Libraries\",\n \"LICENSE\",\n \"React-Core.podspec\",\n \"react-native.config.js\",\n \"React.podspec\",\n \"React\",\n \"!React/Fabric/RCTThirdPartyFabricComponentsProvider.*\",\n \"ReactAndroid\",\n \"ReactApple\",\n \"ReactCommon\",\n \"README.md\",\n \"rn-get-polyfills.js\",\n \"scripts/compose-source-maps.js\",\n \"scripts/find-node-for-xcode.sh\",\n \"scripts/bundle.js\",\n \"scripts/generate-codegen-artifacts.js\",\n \"scripts/generate-provider-cli.js\",\n \"scripts/generate-specs-cli.js\",\n \"scripts/codegen\",\n \"!scripts/codegen/__tests__\",\n \"!scripts/codegen/__test_fixtures__\",\n \"scripts/hermes/hermes-utils.js\",\n \"scripts/hermes/prepare-hermes-for-build.js\",\n \"scripts/ios-configure-glog.sh\",\n \"scripts/xcode/ccache-clang++.sh\",\n \"scripts/xcode/ccache-clang.sh\",\n \"scripts/xcode/ccache.conf\",\n \"scripts/xcode/with-environment.sh\",\n \"scripts/native_modules.rb\",\n \"scripts/node-binary.sh\",\n \"scripts/packager.sh\",\n \"scripts/packager-reporter.js\",\n \"scripts/react_native_pods_utils/script_phases.rb\",\n \"scripts/react_native_pods_utils/script_phases.sh\",\n \"scripts/react_native_pods.rb\",\n \"scripts/cocoapods\",\n \"!scripts/cocoapods/__tests__\",\n \"scripts/react-native-xcode.sh\",\n \"sdks/.hermesversion\",\n \"sdks/hermes-engine\",\n \"sdks/hermesc\",\n \"settings.gradle.kts\",\n \"src\",\n \"template.config.js\",\n \"template\",\n \"!template/node_modules\",\n \"!template/package-lock.json\",\n \"!template/yarn.lock\",\n \"third-party-podspecs\",\n \"types\"\n ],\n \"scripts\": {\n \"prepack\": \"node ./scripts/prepack.js\",\n \"featureflags-check\": \"node ./scripts/featureflags/index.js --verify-unchanged\",\n \"featureflags-update\": \"node ./scripts/featureflags/index.js\"\n },\n \"peerDependencies\": {\n \"@types/react\": \"^18.2.6\",\n \"react\": \"^18.2.0\"\n },\n \"peerDependenciesMeta\": {\n \"@types/react\": {\n \"optional\": true\n }\n },\n \"dependencies\": {\n \"@jest/create-cache-key-function\": \"^29.6.3\",\n \"@react-native/assets-registry\": \"0.76.7\",\n \"@react-native/codegen\": \"0.76.7\",\n \"@react-native/community-cli-plugin\": \"0.76.7\",\n \"@react-native/gradle-plugin\": \"0.76.7\",\n \"@react-native/js-polyfills\": \"0.76.7\",\n \"@react-native/normalize-colors\": \"0.76.7\",\n \"@react-native/virtualized-lists\": \"0.76.7\",\n \"abort-controller\": \"^3.0.0\",\n \"anser\": \"^1.4.9\",\n \"ansi-regex\": \"^5.0.0\",\n \"babel-jest\": \"^29.7.0\",\n \"babel-plugin-syntax-hermes-parser\": \"^0.23.1\",\n \"base64-js\": \"^1.5.1\",\n \"chalk\": \"^4.0.0\",\n \"commander\": \"^12.0.0\",\n \"event-target-shim\": \"^5.0.1\",\n \"flow-enums-runtime\": \"^0.0.6\",\n \"glob\": \"^7.1.1\",\n \"invariant\": \"^2.2.4\",\n \"jest-environment-node\": \"^29.6.3\",\n \"jsc-android\": \"^250231.0.0\",\n \"memoize-one\": \"^5.0.0\",\n \"metro-runtime\": \"^0.81.0\",\n \"metro-source-map\": \"^0.81.0\",\n \"mkdirp\": \"^0.5.1\",\n \"nullthrows\": \"^1.1.1\",\n \"pretty-format\": \"^29.7.0\",\n \"promise\": \"^8.3.0\",\n \"react-devtools-core\": \"^5.3.1\",\n \"react-refresh\": \"^0.14.0\",\n \"regenerator-runtime\": \"^0.13.2\",\n \"scheduler\": \"0.24.0-canary-efb381bbf-20230505\",\n \"semver\": \"^7.1.3\",\n \"stacktrace-parser\": \"^0.1.10\",\n \"whatwg-fetch\": \"^3.0.0\",\n \"ws\": \"^6.2.3\",\n \"yargs\": \"^17.6.2\"\n },\n \"codegenConfig\": {\n \"libraries\": [\n {\n \"name\": \"FBReactNativeSpec\",\n \"type\": \"modules\",\n \"ios\": {},\n \"android\": {},\n \"jsSrcsDir\": \"src\"\n },\n {\n \"name\": \"rncore\",\n \"type\": \"components\",\n \"ios\": {},\n \"android\": {},\n \"jsSrcsDir\": \"src\"\n }\n ]\n }\n}\n","import ExpoSecureStore from './ExpoSecureStore';\nimport { byteCountOverLimit, VALUE_BYTES_LIMIT } from './byteCounter';\n// @needsAudit\n/**\n * The data in the keychain item cannot be accessed after a restart until the device has been\n * unlocked once by the user. This may be useful if you need to access the item when the phone\n * is locked.\n */\nexport const AFTER_FIRST_UNLOCK = ExpoSecureStore.AFTER_FIRST_UNLOCK;\n// @needsAudit\n/**\n * Similar to `AFTER_FIRST_UNLOCK`, except the entry is not migrated to a new device when restoring\n * from a backup.\n */\nexport const AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY = ExpoSecureStore.AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY;\n// @needsAudit\n/**\n * The data in the keychain item can always be accessed regardless of whether the device is locked.\n * This is the least secure option.\n *\n * @deprecated Use an accessibility level that provides some user protection, such as `AFTER_FIRST_UNLOCK`.\n */\nexport const ALWAYS = ExpoSecureStore.ALWAYS;\n// @needsAudit\n/**\n * Similar to `WHEN_UNLOCKED_THIS_DEVICE_ONLY`, except the user must have set a passcode in order to\n * store an entry. If the user removes their passcode, the entry will be deleted.\n */\nexport const WHEN_PASSCODE_SET_THIS_DEVICE_ONLY = ExpoSecureStore.WHEN_PASSCODE_SET_THIS_DEVICE_ONLY;\n// @needsAudit\n/**\n * Similar to `ALWAYS`, except the entry is not migrated to a new device when restoring from a backup.\n *\n * @deprecated Use an accessibility level that provides some user protection, such as `AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY`.\n */\nexport const ALWAYS_THIS_DEVICE_ONLY = ExpoSecureStore.ALWAYS_THIS_DEVICE_ONLY;\n// @needsAudit\n/**\n * The data in the keychain item can be accessed only while the device is unlocked by the user.\n */\nexport const WHEN_UNLOCKED = ExpoSecureStore.WHEN_UNLOCKED;\n// @needsAudit\n/**\n * Similar to `WHEN_UNLOCKED`, except the entry is not migrated to a new device when restoring from\n * a backup.\n */\nexport const WHEN_UNLOCKED_THIS_DEVICE_ONLY = ExpoSecureStore.WHEN_UNLOCKED_THIS_DEVICE_ONLY;\n// @needsAudit\n/**\n * Returns whether the SecureStore API is enabled on the current device. This does not check the app\n * permissions.\n *\n * @return Promise which fulfils witch `boolean`, indicating whether the SecureStore API is available\n * on the current device. Currently, this resolves `true` on Android and iOS only.\n */\nexport async function isAvailableAsync() {\n return !!ExpoSecureStore.getValueWithKeyAsync;\n}\n// @needsAudit\n/**\n * Delete the value associated with the provided key.\n *\n * @param key The key that was used to store the associated value.\n * @param options An [`SecureStoreOptions`](#securestoreoptions) object.\n *\n * @return A promise that rejects if the value can't be deleted.\n */\nexport async function deleteItemAsync(key, options = {}) {\n ensureValidKey(key);\n await ExpoSecureStore.deleteValueWithKeyAsync(key, options);\n}\n// @needsAudit\n/**\n * Reads the stored value associated with the provided key.\n *\n * @param key The key that was used to store the associated value.\n * @param options An [`SecureStoreOptions`](#securestoreoptions) object.\n *\n * @return A promise that resolves to the previously stored value. It resolves with `null` if there is no entry\n * for the given key or if the key has been invalidated. It rejects if an error occurs while retrieving the value.\n *\n * > Keys are invalidated by the system when biometrics change, such as adding a new fingerprint or changing the face profile used for face recognition.\n * > After a key has been invalidated, it becomes impossible to read its value.\n * > This only applies to values stored with `requireAuthentication` set to `true`.\n */\nexport async function getItemAsync(key, options = {}) {\n ensureValidKey(key);\n return await ExpoSecureStore.getValueWithKeyAsync(key, options);\n}\n// @needsAudit\n/**\n * Stores a key–value pair.\n *\n * @param key The key to associate with the stored value. Keys may contain alphanumeric characters, `.`, `-`, and `_`.\n * @param value The value to store. Size limit is 2048 bytes.\n * @param options An [`SecureStoreOptions`](#securestoreoptions) object.\n *\n * @return A promise that rejects if value cannot be stored on the device.\n */\nexport async function setItemAsync(key, value, options = {}) {\n ensureValidKey(key);\n if (!isValidValue(value)) {\n throw new Error(`Invalid value provided to SecureStore. Values must be strings; consider JSON-encoding your values if they are serializable.`);\n }\n await ExpoSecureStore.setValueWithKeyAsync(value, key, options);\n}\n/**\n * Stores a key–value pair synchronously.\n * > **Note:** This function blocks the JavaScript thread, so the application may not be interactive when the `requireAuthentication` option is set to `true` until the user authenticates.\n *\n * @param key The key to associate with the stored value. Keys may contain alphanumeric characters, `.`, `-`, and `_`.\n * @param value The value to store. Size limit is 2048 bytes.\n * @param options An [`SecureStoreOptions`](#securestoreoptions) object.\n *\n */\nexport function setItem(key, value, options = {}) {\n ensureValidKey(key);\n if (!isValidValue(value)) {\n throw new Error(`Invalid value provided to SecureStore. Values must be strings; consider JSON-encoding your values if they are serializable.`);\n }\n return ExpoSecureStore.setValueWithKeySync(value, key, options);\n}\n/**\n * Synchronously reads the stored value associated with the provided key.\n * > **Note:** This function blocks the JavaScript thread, so the application may not be interactive when reading a value with `requireAuthentication`\n * > option set to `true` until the user authenticates.\n * @param key The key that was used to store the associated value.\n * @param options An [`SecureStoreOptions`](#securestoreoptions) object.\n *\n * @return Previously stored value. It resolves with `null` if there is no entry\n * for the given key or if the key has been invalidated.\n */\nexport function getItem(key, options = {}) {\n ensureValidKey(key);\n return ExpoSecureStore.getValueWithKeySync(key, options);\n}\n/**\n * Checks if the value can be saved with `requireAuthentication` option enabled.\n * @return `true` if the device supports biometric authentication and the enrolled method is sufficiently secure. Otherwise, returns `false`. Always returns false on tvOS.\n * @platform android\n * @platform ios\n */\nexport function canUseBiometricAuthentication() {\n return ExpoSecureStore.canUseBiometricAuthentication();\n}\nfunction ensureValidKey(key) {\n if (!isValidKey(key)) {\n throw new Error(`Invalid key provided to SecureStore. Keys must not be empty and contain only alphanumeric characters, \".\", \"-\", and \"_\".`);\n }\n}\nfunction isValidKey(key) {\n return typeof key === 'string' && /^[\\w.-]+$/.test(key);\n}\nfunction isValidValue(value) {\n if (typeof value !== 'string') {\n return false;\n }\n if (byteCountOverLimit(value, VALUE_BYTES_LIMIT)) {\n console.warn(`Value being stored in SecureStore is larger than ${VALUE_BYTES_LIMIT} bytes and it may not be stored successfully. In a future SDK version, this call may throw an error.`);\n }\n return true;\n}\n//# sourceMappingURL=SecureStore.js.map","export default {};\n//# sourceMappingURL=ExpoSecureStore.web.js.map","export const VALUE_BYTES_LIMIT = 2048;\n// note this probably could be JS-engine dependent\n// inspired by https://stackoverflow.com/a/39488643\nexport function byteCountOverLimit(value, limit) {\n let bytes = 0;\n for (let i = 0; i < value.length; i++) {\n const codePoint = value.charCodeAt(i);\n // Lone surrogates cannot be passed to encodeURI\n if (codePoint >= 0xd800 && codePoint < 0xe000) {\n if (codePoint < 0xdc00 && i + 1 < value.length) {\n const next = value.charCodeAt(i + 1);\n if (next >= 0xdc00 && next < 0xe000) {\n bytes += 4;\n if (bytes > limit) {\n return true;\n }\n i++;\n continue;\n }\n }\n }\n bytes += codePoint < 0x80 ? 1 : codePoint < 0x800 ? 2 : 3;\n if (bytes > limit) {\n return true;\n }\n }\n return bytes > limit;\n}\n//# sourceMappingURL=byteCounter.js.map","const Application = require('expo-application')\nconst Constants = require('expo-constants').default\nconst { AppState, Platform } = require('react-native')\n\nconst appStart = new Date()\n\nmodule.exports = {\n load: client => {\n let lastEnteredForeground = appStart\n let lastState = AppState.currentState\n\n AppState.addEventListener('change', newState => {\n if (newState === 'active' && lastState !== 'active') {\n lastEnteredForeground = new Date()\n }\n lastState = newState\n })\n\n let bundleVersion, versionCode\n\n if (Constants.appOwnership !== 'expo') {\n if (Platform.OS === 'ios') {\n bundleVersion = Application.nativeBuildVersion\n } else if (Platform.OS === 'android') {\n versionCode = Application.nativeBuildVersion\n }\n }\n\n client.addOnSession(session => {\n session.app.versionCode = versionCode\n session.app.bundleVersion = bundleVersion\n\n if (client._config.codeBundleId) {\n session.app.codeBundleId = client._config.codeBundleId\n }\n })\n\n client.addOnError(event => {\n const now = new Date()\n const inForeground = AppState.currentState === 'active'\n\n event.app.inForeground = inForeground\n event.app.duration = now - appStart\n\n if (inForeground) {\n event.app.durationInForeground = now - lastEnteredForeground\n }\n\n if (client._config.codeBundleId) {\n event.app.codeBundleId = client._config.codeBundleId\n }\n\n event.app.versionCode = versionCode\n event.app.bundleVersion = bundleVersion\n }, true)\n }\n}\n","import { Platform, UnavailabilityError } from 'expo-modules-core';\nimport { ApplicationReleaseType } from './Application.types';\nimport ExpoApplication from './ExpoApplication';\n// @needsAudit\n/**\n * The human-readable version of the native application that may be displayed in the app store.\n * At time when native app is built, on Android, this is the version name set by `version`\n * in app config, and on iOS, the `Info.plist` value for `CFBundleShortVersionString`.\n * On web, this value is `null`.\n * @example\n * `\"2.11.0\"`\n */\nexport const nativeApplicationVersion = ExpoApplication\n ? ExpoApplication.nativeApplicationVersion || null\n : null;\n// @needsAudit\n/**\n * The internal build version of the native application that the app stores may use to distinguish\n * between different binaries. At the time when native app is built, On Android, this is the version\n * code set by `android.versionCode` in app config, and on iOS, the `Info.plist` value for\n * `CFBundleVersion` (set with `ios.buildNumber` value in app config in a standalone app).\n * On web, this value is `null`. The return type on Android and iOS is `string`.\n * @example\n * Android: `\"114\"`, iOS: `\"2.11.0\"`\n */\nexport const nativeBuildVersion = ExpoApplication\n ? ExpoApplication.nativeBuildVersion || null\n : null;\n// @needsAudit\n/**\n * The human-readable name of the application that is displayed with the app's icon on the device's\n * home screen or desktop. On Android and iOS, this value is a `string` unless the name could not be\n * retrieved, in which case this value will be `null`. On web this value is `null`.\n * @example\n * `\"Expo\"`, `\"Yelp\"`, `\"Instagram\"`\n */\nexport const applicationName = ExpoApplication\n ? ExpoApplication.applicationName || null\n : null;\n// @needsAudit\n/**\n * The ID of the application. On Android, this is the application ID. On iOS, this is the bundle ID.\n * On web, this is `null`.\n * @example\n * `\"com.cocoacasts.scribbles\"`, `\"com.apple.Pages\"`\n */\nexport const applicationId = ExpoApplication\n ? ExpoApplication.applicationId || null\n : null;\n// @needsAudit\n/**\n * Gets the value of [`Settings.Secure.ANDROID_ID`](https://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID).\n * This is a hexadecimal `string` unique to each combination of app-signing key, user, and device.\n * The value may change if a factory reset is performed on the device or if an APK signing key changes.\n * For more information about how the platform handles `ANDROID_ID` in Android 8.0 (API level 26)\n * and higher, see [Android 8.0 Behavior Changes](https://developer.android.com/about/versions/oreo/android-8.0-changes.html#privacy-all).\n * On iOS and web, this function is unavailable.\n * > In versions of the platform lower than Android 8.0 (API level 26), this value remains constant\n * > for the lifetime of the user's device. See the [ANDROID_ID](https://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID)\n * > official docs for more information.\n * @example\n * `\"dd96dec43fb81c97\"`\n * @platform android\n */\nexport function getAndroidId() {\n if (Platform.OS !== 'android') {\n throw new UnavailabilityError('expo-application', 'androidId');\n }\n return ExpoApplication.androidId;\n}\n// @needsAudit\n/**\n * Gets the referrer URL of the installed app with the [`Install Referrer API`](https://developer.android.com/google/play/installreferrer)\n * from the Google Play Store. In practice, the referrer URL may not be a complete, absolute URL.\n * @return A `Promise` that fulfills with a `string` of the referrer URL of the installed app.\n *\n * @example\n * ```ts\n * await Application.getInstallReferrerAsync();\n * // \"utm_source=google-play&utm_medium=organic\"\n * ```\n * @platform android\n */\nexport async function getInstallReferrerAsync() {\n if (!ExpoApplication.getInstallReferrerAsync) {\n throw new UnavailabilityError('expo-application', 'getInstallReferrerAsync');\n }\n return await ExpoApplication.getInstallReferrerAsync();\n}\n// @needsAudit\n/**\n * Gets the iOS \"identifier for vendor\" ([IDFV](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor))\n * value, a string ID that uniquely identifies a device to the app’s vendor. This method may\n * sometimes return `nil`, in which case wait and call the method again later. This might happen\n * when the device has been restarted before the user has unlocked the device.\n *\n * The OS will change the vendor identifier if all apps from the current app's vendor have been\n * uninstalled.\n *\n * @return A `Promise` that fulfills with a `string` specifying the app's vendor ID. Apps from the\n * same vendor will return the same ID. See Apple's documentation for more information about the\n * vendor ID's semantics.\n *\n * @example\n * ```ts\n * await Application.getIosIdForVendorAsync();\n * // \"68753A44-4D6F-1226-9C60-0050E4C00067\"\n * ```\n * @platform ios\n */\nexport async function getIosIdForVendorAsync() {\n if (!ExpoApplication.getIosIdForVendorAsync) {\n throw new UnavailabilityError('expo-application', 'getIosIdForVendorAsync');\n }\n return await ExpoApplication.getIosIdForVendorAsync();\n}\n// @needsAudit\n/**\n * Gets the iOS application release type.\n * @return A `Promise` which fulfills with an [`ApplicationReleaseType`](#applicationreleasetype).\n * @platform ios\n */\nexport async function getIosApplicationReleaseTypeAsync() {\n if (!ExpoApplication.getApplicationReleaseTypeAsync) {\n throw new UnavailabilityError('expo-application', 'getApplicationReleaseTypeAsync');\n }\n return await ExpoApplication.getApplicationReleaseTypeAsync();\n}\n// @needsAudit\n/**\n * Gets the current [Apple Push Notification (APN)](https://developer.apple.com/documentation/bundleresources/entitlements/aps-environment?language=objc)\n * service environment.\n * @return A `Promise` that fulfills with the string, either `'development'` or `'production'`,\n * based on the current APN environment, or `null` on the simulator as it does not support registering with APNs.\n * @platform ios\n */\nexport async function getIosPushNotificationServiceEnvironmentAsync() {\n if (!ExpoApplication.getPushNotificationServiceEnvironmentAsync) {\n throw new UnavailabilityError('expo-application', 'getPushNotificationServiceEnvironmentAsync');\n }\n return await ExpoApplication.getPushNotificationServiceEnvironmentAsync();\n}\n// @needsAudit\n/**\n * Gets the time the app was installed onto the device, not counting subsequent updates. If the app\n * is uninstalled and reinstalled, this method returns the time the app was reinstalled.\n * - On Android, this method uses [`PackageInfo.firstInstallTime`](https://developer.android.com/reference/android/content/pm/PackageInfo.html#firstInstallTime).\n * - On iOS, this method uses the [`NSFileCreationDate`](https://developer.apple.com/documentation/foundation/nsfilecreationdate?language=objc)\n * of the app's document root directory.\n * - On web, this method returns `null`.\n *\n * @return A `Promise` that fulfills with a `Date` object that specifies the time the app\n * was installed on the device.\n *\n * @example\n * ```ts\n * await Application.getInstallationTimeAsync();\n * // 2019-07-18T18:08:26.121Z\n * ```\n */\nexport async function getInstallationTimeAsync() {\n if (!ExpoApplication.getInstallationTimeAsync) {\n throw new UnavailabilityError('expo-application', 'getInstallationTimeAsync');\n }\n const installationTime = await ExpoApplication.getInstallationTimeAsync();\n return new Date(installationTime);\n}\n// @needsAudit\n/**\n * Gets the last time the app was updated from the Google Play Store.\n * @return A `Promise` that fulfills with a `Date` object that specifies the last time\n * the app was updated via the Google Play Store.\n *\n * @example\n * ```ts\n * await Application.getLastUpdateTimeAsync();\n * // 2019-07-18T21:20:16.887Z\n * ```\n * @platform android\n */\nexport async function getLastUpdateTimeAsync() {\n if (!ExpoApplication.getLastUpdateTimeAsync) {\n throw new UnavailabilityError('expo-application', 'getLastUpdateTimeAsync');\n }\n const lastUpdateTime = await ExpoApplication.getLastUpdateTimeAsync();\n return new Date(lastUpdateTime);\n}\nexport { ApplicationReleaseType };\n//# sourceMappingURL=Application.js.map","// @docsMissing\n/**\n * @platform ios\n */\nexport var ApplicationReleaseType;\n(function (ApplicationReleaseType) {\n ApplicationReleaseType[ApplicationReleaseType[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n ApplicationReleaseType[ApplicationReleaseType[\"SIMULATOR\"] = 1] = \"SIMULATOR\";\n ApplicationReleaseType[ApplicationReleaseType[\"ENTERPRISE\"] = 2] = \"ENTERPRISE\";\n ApplicationReleaseType[ApplicationReleaseType[\"DEVELOPMENT\"] = 3] = \"DEVELOPMENT\";\n ApplicationReleaseType[ApplicationReleaseType[\"AD_HOC\"] = 4] = \"AD_HOC\";\n ApplicationReleaseType[ApplicationReleaseType[\"APP_STORE\"] = 5] = \"APP_STORE\";\n})(ApplicationReleaseType || (ApplicationReleaseType = {}));\n//# sourceMappingURL=Application.types.js.map","export default {\n get applicationName() {\n return null;\n },\n get bundleId() {\n return null;\n },\n get nativeApplicationVersion() {\n return null;\n },\n get nativeBuildVersion() {\n return null;\n },\n get androidId() {\n return null;\n },\n async getInstallationTimeAsync() {\n return null;\n },\n};\n//# sourceMappingURL=ExpoApplication.web.js.map","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Meta Platforms, Inc. and 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 */\n\n'use client';\n\nimport invariant from 'fbjs/lib/invariant';\nimport EventEmitter from '../../vendor/react-native/vendor/emitter/EventEmitter';\nimport canUseDOM from '../../modules/canUseDom';\n\n// Android 4.4 browser\nvar isPrefixed = canUseDOM && !document.hasOwnProperty('hidden') && document.hasOwnProperty('webkitHidden');\nvar EVENT_TYPES = ['change', 'memoryWarning'];\nvar VISIBILITY_CHANGE_EVENT = isPrefixed ? 'webkitvisibilitychange' : 'visibilitychange';\nvar VISIBILITY_STATE_PROPERTY = isPrefixed ? 'webkitVisibilityState' : 'visibilityState';\nvar AppStates = {\n BACKGROUND: 'background',\n ACTIVE: 'active'\n};\nvar changeEmitter = null;\nexport default class AppState {\n static get currentState() {\n if (!AppState.isAvailable) {\n return AppStates.ACTIVE;\n }\n switch (document[VISIBILITY_STATE_PROPERTY]) {\n case 'hidden':\n case 'prerender':\n case 'unloaded':\n return AppStates.BACKGROUND;\n default:\n return AppStates.ACTIVE;\n }\n }\n static addEventListener(type, handler) {\n if (AppState.isAvailable) {\n invariant(EVENT_TYPES.indexOf(type) !== -1, 'Trying to subscribe to unknown event: \"%s\"', type);\n if (type === 'change') {\n if (!changeEmitter) {\n changeEmitter = new EventEmitter();\n document.addEventListener(VISIBILITY_CHANGE_EVENT, () => {\n if (changeEmitter) {\n changeEmitter.emit('change', AppState.currentState);\n }\n }, false);\n }\n return changeEmitter.addListener(type, handler);\n }\n }\n }\n}\nAppState.isAvailable = canUseDOM && !!document[VISIBILITY_STATE_PROPERTY];","const map = require('@bugsnag/core/lib/es-utils/map')\nconst reduce = require('@bugsnag/core/lib/es-utils/reduce')\nconst filter = require('@bugsnag/core/lib/es-utils/filter')\n\n/*\n * Leaves breadcrumbs when console log methods are called\n */\nexports.load = (client) => {\n const isDev = /^(local-)?dev(elopment)?$/.test(client._config.releaseStage)\n\n if (isDev || !client._isBreadcrumbTypeEnabled('log')) return\n\n map(CONSOLE_LOG_METHODS, method => {\n const original = console[method]\n console[method] = (...args) => {\n client.leaveBreadcrumb('Console output', reduce(args, (accum, arg, i) => {\n // do the best/simplest stringification of each argument\n let stringified = '[Unknown value]'\n // this may fail if the input is:\n // - an object whose [[Prototype]] is null (no toString)\n // - an object with a broken toString or @@toPrimitive implementation\n try { stringified = String(arg) } catch (e) {}\n // if it stringifies to [object Object] attempt to JSON stringify\n if (stringified === '[object Object]') {\n // catch stringify errors and fallback to [object Object]\n try { stringified = JSON.stringify(arg) } catch (e) {}\n }\n accum[`[${i}]`] = stringified\n return accum\n }, {\n severity: method.indexOf('group') === 0 ? 'log' : method\n }), 'log')\n original.apply(console, args)\n }\n console[method]._restore = () => { console[method] = original }\n })\n}\n\nif (process.env.NODE_ENV !== 'production') {\n exports.destroy = () => CONSOLE_LOG_METHODS.forEach(method => {\n if (typeof console[method]._restore === 'function') console[method]._restore()\n })\n}\n\nconst CONSOLE_LOG_METHODS = filter(['log', 'debug', 'info', 'warn', 'error'], method =>\n typeof console !== 'undefined' && typeof console[method] === 'function'\n)\n","const BREADCRUMB_TYPE = 'request'\n\nconst includes = require('@bugsnag/core/lib/es-utils/includes')\n\n/*\n * Leaves breadcrumbs when network requests occur\n */\nmodule.exports = (_ignoredUrls = [], win = window) => {\n let restoreFunctions = []\n const plugin = {\n load: client => {\n if (!client._isBreadcrumbTypeEnabled('request')) return\n\n const ignoredUrls = [\n client._config.endpoints.notify,\n client._config.endpoints.sessions\n ].concat(_ignoredUrls)\n\n monkeyPatchXMLHttpRequest()\n monkeyPatchFetch()\n\n // XMLHttpRequest monkey patch\n function monkeyPatchXMLHttpRequest () {\n if (!('addEventListener' in win.XMLHttpRequest.prototype)) return\n const nativeOpen = win.XMLHttpRequest.prototype.open\n\n // override native open()\n win.XMLHttpRequest.prototype.open = function open (method, url) {\n let requestSetupKey = false\n\n const error = () => handleXHRError(method, url)\n const load = () => handleXHRLoad(method, url, this.status)\n\n // if we have already setup listeners, it means open() was called twice, we need to remove\n // the listeners and recreate them\n if (requestSetupKey) {\n this.removeEventListener('load', load)\n this.removeEventListener('error', error)\n }\n\n // attach load event listener\n this.addEventListener('load', load)\n // attach error event listener\n this.addEventListener('error', error)\n\n requestSetupKey = true\n\n nativeOpen.apply(this, arguments)\n }\n\n if (process.env.NODE_ENV !== 'production') {\n restoreFunctions.push(() => {\n win.XMLHttpRequest.prototype.open = nativeOpen\n })\n }\n }\n\n function handleXHRLoad (method, url, status) {\n if (url === undefined) {\n client._logger.warn('The request URL is no longer present on this XMLHttpRequest. A breadcrumb cannot be left for this request.')\n return\n }\n\n // an XMLHttpRequest's URL can be an object as long as its 'toString'\n // returns a URL, e.g. a HTMLAnchorElement\n if (typeof url === 'string' && includes(ignoredUrls, url.replace(/\\?.*$/, ''))) {\n // don't leave a network breadcrumb from bugsnag notify calls\n return\n }\n const metadata = {\n status: status,\n request: `${method} ${url}`\n }\n if (status >= 400) {\n // contacted server but got an error response\n client.leaveBreadcrumb('XMLHttpRequest failed', metadata, BREADCRUMB_TYPE)\n } else {\n client.leaveBreadcrumb('XMLHttpRequest succeeded', metadata, BREADCRUMB_TYPE)\n }\n }\n\n function handleXHRError (method, url) {\n if (url === undefined) {\n client._logger.warn('The request URL is no longer present on this XMLHttpRequest. A breadcrumb cannot be left for this request.')\n return\n }\n\n if (typeof url === 'string' && includes(ignoredUrls, url.replace(/\\?.*$/, ''))) {\n // don't leave a network breadcrumb from bugsnag notify calls\n return\n }\n\n // failed to contact server\n client.leaveBreadcrumb('XMLHttpRequest error', {\n request: `${method} ${url}`\n }, BREADCRUMB_TYPE)\n }\n\n // window.fetch monkey patch\n function monkeyPatchFetch () {\n // only patch it if it exists and if it is not a polyfill (patching a polyfilled\n // fetch() results in duplicate breadcrumbs for the same request because the\n // implementation uses XMLHttpRequest which is also patched)\n if (!('fetch' in win) || win.fetch.polyfill) return\n\n const oldFetch = win.fetch\n win.fetch = function fetch () {\n const urlOrRequest = arguments[0]\n const options = arguments[1]\n\n let method\n let url = null\n\n if (urlOrRequest && typeof urlOrRequest === 'object') {\n url = urlOrRequest.url\n if (options && 'method' in options) {\n method = options.method\n } else if (urlOrRequest && 'method' in urlOrRequest) {\n method = urlOrRequest.method\n }\n } else {\n url = urlOrRequest\n if (options && 'method' in options) {\n method = options.method\n }\n }\n\n if (method === undefined) {\n method = 'GET'\n }\n\n return new Promise((resolve, reject) => {\n // pass through to native fetch\n oldFetch(...arguments)\n .then(response => {\n handleFetchSuccess(response, method, url)\n resolve(response)\n })\n .catch(error => {\n handleFetchError(method, url)\n reject(error)\n })\n })\n }\n\n if (process.env.NODE_ENV !== 'production') {\n restoreFunctions.push(() => {\n win.fetch = oldFetch\n })\n }\n }\n\n const handleFetchSuccess = (response, method, url) => {\n const metadata = {\n status: response.status,\n request: `${method} ${url}`\n }\n if (response.status >= 400) {\n // when the request comes back with a 4xx or 5xx status it does not reject the fetch promise,\n client.leaveBreadcrumb('fetch() failed', metadata, BREADCRUMB_TYPE)\n } else {\n client.leaveBreadcrumb('fetch() succeeded', metadata, BREADCRUMB_TYPE)\n }\n }\n\n const handleFetchError = (method, url) => {\n client.leaveBreadcrumb('fetch() error', { request: `${method} ${url}` }, BREADCRUMB_TYPE)\n }\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n plugin.destroy = () => {\n restoreFunctions.forEach(fn => fn())\n restoreFunctions = []\n }\n }\n\n return plugin\n}\n","const { AppState } = require('react-native')\n\nmodule.exports = {\n load: client => {\n if (!client._isBreadcrumbTypeEnabled('state')) return\n\n AppState.addEventListener('change', state => {\n client.leaveBreadcrumb('App state changed', { state }, 'state')\n })\n }\n}\n","const NetInfo = require('@react-native-community/netinfo')\n\nmodule.exports = {\n load: client => {\n if (!client._isBreadcrumbTypeEnabled('state')) return\n\n NetInfo.addEventListener(({ isConnected, isInternetReachable, type }) => {\n client.leaveBreadcrumb(\n 'Connectivity changed', { isConnected, isInternetReachable, type }, 'state'\n )\n })\n }\n}\n","const { Dimensions } = require('react-native')\n\nmodule.exports = {\n load: client => {\n if (!client._isBreadcrumbTypeEnabled('state')) return\n\n let lastOrientation\n\n const getCurrentOrientation = () => {\n const { height, width } = Dimensions.get('screen')\n if (height > width) {\n return 'portrait'\n } else if (height < width) {\n return 'landscape'\n } else {\n return undefined\n }\n }\n\n const updateOrientation = () => {\n const newOrientation = getCurrentOrientation()\n\n if (lastOrientation !== newOrientation) {\n client.leaveBreadcrumb(\n 'Orientation changed',\n { from: lastOrientation, to: newOrientation },\n 'state'\n )\n lastOrientation = newOrientation\n }\n }\n\n lastOrientation = getCurrentOrientation()\n Dimensions.addEventListener('change', updateOrientation)\n }\n}\n","const includes = require('@bugsnag/core/lib/es-utils/includes')\n\nmodule.exports = {\n load: client => { client._sessionDelegate = sessionDelegate }\n}\n\nconst sessionDelegate = {\n startSession: (client, session) => {\n const sessionClient = client\n sessionClient._session = session\n sessionClient._pausedSession = null\n\n // exit early if the current releaseStage is not enabled\n if (sessionClient._config.enabledReleaseStages !== null && !includes(sessionClient._config.enabledReleaseStages, sessionClient._config.releaseStage)) {\n sessionClient._logger.warn('Session not sent due to releaseStage/enabledReleaseStages configuration')\n return sessionClient\n }\n\n sessionClient._delivery.sendSession({\n notifier: sessionClient._notifier,\n device: session.device,\n app: session.app,\n sessions: [\n {\n id: session.id,\n startedAt: session.startedAt,\n user: session._user\n }\n ]\n })\n return sessionClient\n },\n resumeSession: (client) => {\n // Do nothing if there's already an active session\n if (client._session) {\n return client\n }\n\n // If we have a paused session then make it the active session\n if (client._pausedSession) {\n client._session = client._pausedSession\n client._pausedSession = null\n\n return client\n }\n\n // Otherwise start a new session\n return client.startSession()\n },\n pauseSession: (client) => {\n client._pausedSession = client._session\n client._session = null\n }\n}\n","export const initialNavigationUrl = window?.location?.href;\n","export const getIsE2E = () => (window as any).Cypress !== undefined;\n\nexport const useIsE2E = () => {\n return getIsE2E();\n};\n","import { getCurrentUser } from 'aws-amplify/auth';\n\nconst getAuthenticatedUser = async () => {\n const { username } = await getCurrentUser();\n\n // Note that session will no longer contain refreshToken and clockDrift\n return {\n username,\n };\n};\nimport { useState, useEffect } from 'react';\n\nexport type UserIsUserLoggedInReturnValue = {\n isUserLoggedIn: boolean | 'loading';\n recheckIsUserLoggedIn: () => void;\n};\n\nexport function getIsUserLoggedIn(): Promise {\n return getAuthenticatedUser()\n .then((user) => {\n return !!user;\n })\n .catch(() => {\n // if not authed, it can throw an unauthorized error\n return false;\n });\n}\n\nasync function sleep(ms: number) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\nexport async function waitForUserLogout(): Promise {\n let tryCount = 0;\n const maxTries = 200;\n const waitTime = 10;\n let isLoggedIn = true;\n do {\n isLoggedIn = await getIsUserLoggedIn();\n tryCount++;\n await sleep(waitTime);\n } while (tryCount < maxTries && isLoggedIn);\n}\n\nexport const useIsUserLoggedIn = (): UserIsUserLoggedInReturnValue => {\n const [isUserLoggedIn, setIsUserLoggedIn] = useState('loading');\n\n const recheckIsUserLoggedIn = () => {\n getIsUserLoggedIn()\n .then((isLoggedIn) => {\n setIsUserLoggedIn(isLoggedIn);\n })\n .catch((e) => {\n setIsUserLoggedIn(false);\n });\n };\n useEffect(() => {\n recheckIsUserLoggedIn();\n }, []);\n\n return {\n isUserLoggedIn,\n recheckIsUserLoggedIn,\n };\n};\n","export * from '@aws-amplify/auth';\n//# sourceMappingURL=index.mjs.map\n","export { signUp } from './providers/cognito/apis/signUp.mjs';\nexport { resetPassword } from './providers/cognito/apis/resetPassword.mjs';\nexport { confirmResetPassword } from './providers/cognito/apis/confirmResetPassword.mjs';\nexport { signIn } from './providers/cognito/apis/signIn.mjs';\nexport { resendSignUpCode } from './providers/cognito/apis/resendSignUpCode.mjs';\nexport { confirmSignUp } from './providers/cognito/apis/confirmSignUp.mjs';\nexport { confirmSignIn } from './providers/cognito/apis/confirmSignIn.mjs';\nexport { updateMFAPreference } from './providers/cognito/apis/updateMFAPreference.mjs';\nexport { fetchMFAPreference } from './providers/cognito/apis/fetchMFAPreference.mjs';\nexport { verifyTOTPSetup } from './providers/cognito/apis/verifyTOTPSetup.mjs';\nexport { updatePassword } from './providers/cognito/apis/updatePassword.mjs';\nexport { setUpTOTP } from './providers/cognito/apis/setUpTOTP.mjs';\nexport { updateUserAttributes } from './providers/cognito/apis/updateUserAttributes.mjs';\nexport { updateUserAttribute } from './providers/cognito/apis/updateUserAttribute.mjs';\nexport { getCurrentUser } from './providers/cognito/apis/getCurrentUser.mjs';\nexport { confirmUserAttribute } from './providers/cognito/apis/confirmUserAttribute.mjs';\nexport { signInWithRedirect } from './providers/cognito/apis/signInWithRedirect.mjs';\nexport { fetchUserAttributes } from './providers/cognito/apis/fetchUserAttributes.mjs';\nexport { signOut } from './providers/cognito/apis/signOut.mjs';\nexport { sendUserAttributeVerificationCode } from './providers/cognito/apis/sendUserAttributeVerificationCode.mjs';\nexport { deleteUserAttributes } from './providers/cognito/apis/deleteUserAttributes.mjs';\nexport { deleteUser } from './providers/cognito/apis/deleteUser.mjs';\nexport { rememberDevice } from './providers/cognito/apis/rememberDevice.mjs';\nexport { forgetDevice } from './providers/cognito/apis/forgetDevice.mjs';\nexport { fetchDevices } from './providers/cognito/apis/fetchDevices.mjs';\nexport { autoSignIn } from './providers/cognito/apis/autoSignIn.mjs';\nexport { decodeJWT, fetchAuthSession } from '@aws-amplify/core';\nimport './providers/cognito/credentialsProvider/IdentityIdStore.mjs';\nimport './providers/cognito/credentialsProvider/credentialsProvider.mjs';\nimport './providers/cognito/utils/refreshAuthTokens.mjs';\nimport '@aws-amplify/core/internals/utils';\nexport { AuthError } from './errors/AuthError.mjs';\nimport './providers/cognito/tokenProvider/errorHelpers.mjs';\nimport './providers/cognito/utils/types.mjs';\nimport './providers/cognito/tokenProvider/tokenProvider.mjs';\nexport { associateWebAuthnCredential } from './client/apis/associateWebAuthnCredential.mjs';\nexport { listWebAuthnCredentials } from './client/apis/listWebAuthnCredentials.mjs';\nexport { deleteWebAuthnCredential } from './client/apis/deleteWebAuthnCredential.mjs';\n//# sourceMappingURL=index.mjs.map\n","import { Amplify, fetchAuthSession } from '@aws-amplify/core';\nimport { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { assertAuthTokens } from '../../providers/cognito/utils/types.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../../providers/cognito/factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { getRegionFromUserPoolId } from '../../foundation/parsers/regionParsers.mjs';\nimport { getAuthUserAgentValue } from '../../utils/getAuthUserAgentValue.mjs';\nimport { registerPasskey } from '../utils/passkey/registerPasskey.mjs';\nimport '../utils/passkey/errors.mjs';\nimport { assertValidCredentialCreationOptions } from '../utils/passkey/types/shared.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../common/AuthErrorStrings.mjs';\nimport '../../errors/types/validation.mjs';\nimport '../../providers/cognito/types/errors.mjs';\nimport { createStartWebAuthnRegistrationClient } from '../../foundation/factories/serviceClients/cognitoIdentityProvider/createStartWebAuthnRegistrationClient.mjs';\nimport { createCompleteWebAuthnRegistrationClient } from '../../foundation/factories/serviceClients/cognitoIdentityProvider/createCompleteWebAuthnRegistrationClient.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Registers a new passkey for an authenticated user\n *\n * @returns Promise\n * @throws - {@link PasskeyError}:\n * - Thrown when intermediate state is invalid\n * @throws - {@link AuthError}:\n * - Thrown when user is unauthenticated\n * @throws - {@link StartWebAuthnRegistrationException}\n * - Thrown due to a service error retrieving WebAuthn registration options\n * @throws - {@link CompleteWebAuthnRegistrationException}\n * - Thrown due to a service error when verifying WebAuthn registration result\n */\nasync function associateWebAuthnCredential() {\n const authConfig = Amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { tokens } = await fetchAuthSession();\n assertAuthTokens(tokens);\n const startWebAuthnRegistration = createStartWebAuthnRegistrationClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { CredentialCreationOptions: credentialCreationOptions } = await startWebAuthnRegistration({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.StartWebAuthnRegistration),\n }, {\n AccessToken: tokens.accessToken.toString(),\n });\n assertValidCredentialCreationOptions(credentialCreationOptions);\n const cred = await registerPasskey(credentialCreationOptions);\n const completeWebAuthnRegistration = createCompleteWebAuthnRegistrationClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await completeWebAuthnRegistration({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.CompleteWebAuthnRegistration),\n }, {\n AccessToken: tokens.accessToken.toString(),\n Credential: cred,\n });\n}\n\nexport { associateWebAuthnCredential };\n//# sourceMappingURL=associateWebAuthnCredential.mjs.map\n","import { assertCredentialIsPkcWithAuthenticatorAttestationResponse } from './types/index.mjs';\nimport { deserializeJsonToPkcCreationOptions, serializePkcWithAttestationToJson } from './serde.mjs';\nimport { assertPasskeyError, PasskeyErrorCode, handlePasskeyRegistrationError } from './errors.mjs';\nimport { getIsPasskeySupported } from './getIsPasskeySupported.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Registers a new passkey for user\n * @param input - PasskeyCreateOptionsJson\n * @returns serialized PasskeyCreateResult\n */\nconst registerPasskey = async (input) => {\n try {\n const isPasskeySupported = getIsPasskeySupported();\n assertPasskeyError(isPasskeySupported, PasskeyErrorCode.PasskeyNotSupported);\n const passkeyCreationOptions = deserializeJsonToPkcCreationOptions(input);\n const credential = await navigator.credentials.create({\n publicKey: passkeyCreationOptions,\n });\n assertCredentialIsPkcWithAuthenticatorAttestationResponse(credential);\n return serializePkcWithAttestationToJson(credential);\n }\n catch (err) {\n throw handlePasskeyRegistrationError(err);\n }\n};\n\nexport { registerPasskey };\n//# sourceMappingURL=registerPasskey.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createStartWebAuthnRegistrationClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('StartWebAuthnRegistration'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createStartWebAuthnRegistrationClient };\n//# sourceMappingURL=createStartWebAuthnRegistrationClient.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createCompleteWebAuthnRegistrationClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('CompleteWebAuthnRegistration'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createCompleteWebAuthnRegistrationClient };\n//# sourceMappingURL=createCompleteWebAuthnRegistrationClient.mjs.map\n","import { Amplify } from '@aws-amplify/core';\nimport { listWebAuthnCredentials as listWebAuthnCredentials$1 } from '../../foundation/apis/listWebAuthnCredentials.mjs';\nimport '@aws-amplify/core/internals/utils';\nimport '../../providers/cognito/utils/types.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../common/AuthErrorStrings.mjs';\nimport '../../errors/types/validation.mjs';\nimport '../../providers/cognito/types/errors.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Lists registered credentials for an authenticated user\n *\n * @param {ListWebAuthnCredentialsInput} input The list input parameters including page size and next token.\n * @returns Promise\n * @throws - {@link AuthError}:\n * - Thrown when user is unauthenticated\n * @throws - {@link ListWebAuthnCredentialsException}\n * - Thrown due to a service error when listing WebAuthn credentials\n */\nasync function listWebAuthnCredentials(input) {\n return listWebAuthnCredentials$1(Amplify, input);\n}\n\nexport { listWebAuthnCredentials };\n//# sourceMappingURL=listWebAuthnCredentials.mjs.map\n","import { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { assertAuthTokens } from '../../providers/cognito/utils/types.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../../providers/cognito/factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { getRegionFromUserPoolId } from '../parsers/regionParsers.mjs';\nimport { getAuthUserAgentValue } from '../../utils/getAuthUserAgentValue.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../common/AuthErrorStrings.mjs';\nimport '../../errors/types/validation.mjs';\nimport '../../providers/cognito/types/errors.mjs';\nimport { createListWebAuthnCredentialsClient } from '../factories/serviceClients/cognitoIdentityProvider/createListWebAuthnCredentialsClient.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nasync function listWebAuthnCredentials(amplify, input) {\n const authConfig = amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { tokens } = await amplify.Auth.fetchAuthSession();\n assertAuthTokens(tokens);\n const listWebAuthnCredentialsResult = createListWebAuthnCredentialsClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n const { Credentials: commandCredentials = [], NextToken: nextToken } = await listWebAuthnCredentialsResult({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.ListWebAuthnCredentials),\n }, {\n AccessToken: tokens.accessToken.toString(),\n MaxResults: input?.pageSize,\n NextToken: input?.nextToken,\n });\n const credentials = commandCredentials.map(item => ({\n credentialId: item.CredentialId,\n friendlyCredentialName: item.FriendlyCredentialName,\n relyingPartyId: item.RelyingPartyId,\n authenticatorAttachment: item.AuthenticatorAttachment,\n authenticatorTransports: item.AuthenticatorTransports,\n createdAt: item.CreatedAt ? new Date(item.CreatedAt * 1000) : undefined,\n }));\n return {\n credentials,\n nextToken,\n };\n}\n\nexport { listWebAuthnCredentials };\n//# sourceMappingURL=listWebAuthnCredentials.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createListWebAuthnCredentialsClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('ListWebAuthnCredentials'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createListWebAuthnCredentialsClient };\n//# sourceMappingURL=createListWebAuthnCredentialsClient.mjs.map\n","import { Amplify } from '@aws-amplify/core';\nimport '@aws-amplify/core/internals/utils';\nimport '../../providers/cognito/utils/types.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '../../foundation/factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../../foundation/factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../common/AuthErrorStrings.mjs';\nimport '../../errors/types/validation.mjs';\nimport '../../providers/cognito/types/errors.mjs';\nimport { deleteWebAuthnCredential as deleteWebAuthnCredential$1 } from '../../foundation/apis/deleteWebAuthnCredential.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/**\n * Delete a registered credential for an authenticated user by credentialId\n * @param {DeleteWebAuthnCredentialInput} input The delete input parameters including the credentialId\n * @returns Promise\n * @throws - {@link AuthError}:\n * - Thrown when user is unauthenticated\n * @throws - {@link DeleteWebAuthnCredentialException}\n * - Thrown due to a service error when deleting a WebAuthn credential\n */\nasync function deleteWebAuthnCredential(input) {\n return deleteWebAuthnCredential$1(Amplify, input);\n}\n\nexport { deleteWebAuthnCredential };\n//# sourceMappingURL=deleteWebAuthnCredential.mjs.map\n","import { assertTokenProviderConfig, AuthAction } from '@aws-amplify/core/internals/utils';\nimport { assertAuthTokens } from '../../providers/cognito/utils/types.mjs';\nimport { createCognitoUserPoolEndpointResolver } from '../../providers/cognito/factories/createCognitoUserPoolEndpointResolver.mjs';\nimport { getRegionFromUserPoolId } from '../parsers/regionParsers.mjs';\nimport { getAuthUserAgentValue } from '../../utils/getAuthUserAgentValue.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils/composers';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '../factories/serviceClients/cognitoIdentityProvider/shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport '../factories/serviceClients/cognitoIdentityProvider/constants.mjs';\nimport '../../common/AuthErrorStrings.mjs';\nimport '../../errors/types/validation.mjs';\nimport '../../providers/cognito/types/errors.mjs';\nimport { createDeleteWebAuthnCredentialClient } from '../factories/serviceClients/cognitoIdentityProvider/createDeleteWebAuthnCredentialClient.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nasync function deleteWebAuthnCredential(amplify, input) {\n const authConfig = amplify.getConfig().Auth?.Cognito;\n assertTokenProviderConfig(authConfig);\n const { userPoolEndpoint, userPoolId } = authConfig;\n const { tokens } = await amplify.Auth.fetchAuthSession();\n assertAuthTokens(tokens);\n const deleteWebAuthnCredentialResult = createDeleteWebAuthnCredentialClient({\n endpointResolver: createCognitoUserPoolEndpointResolver({\n endpointOverride: userPoolEndpoint,\n }),\n });\n await deleteWebAuthnCredentialResult({\n region: getRegionFromUserPoolId(userPoolId),\n userAgentValue: getAuthUserAgentValue(AuthAction.DeleteWebAuthnCredential),\n }, {\n AccessToken: tokens.accessToken.toString(),\n CredentialId: input.credentialId,\n });\n}\n\nexport { deleteWebAuthnCredential };\n//# sourceMappingURL=deleteWebAuthnCredential.mjs.map\n","import { composeServiceApi } from '@aws-amplify/core/internals/aws-client-utils/composers';\nimport { cognitoUserPoolTransferHandler } from './shared/handler/cognitoUserPoolTransferHandler.mjs';\nimport { createUserPoolSerializer } from './shared/serde/createUserPoolSerializer.mjs';\nimport { createUserPoolDeserializer } from './shared/serde/createUserPoolDeserializer.mjs';\nimport '@aws-amplify/core/internals/aws-client-utils';\nimport '@aws-amplify/core/internals/utils';\nimport { DEFAULT_SERVICE_CLIENT_API_CONFIG } from './constants.mjs';\n\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst createDeleteWebAuthnCredentialClient = (config) => composeServiceApi(cognitoUserPoolTransferHandler, createUserPoolSerializer('DeleteWebAuthnCredential'), createUserPoolDeserializer(), {\n ...DEFAULT_SERVICE_CLIENT_API_CONFIG,\n ...config,\n});\n\nexport { createDeleteWebAuthnCredentialClient };\n//# sourceMappingURL=createDeleteWebAuthnCredentialClient.mjs.map\n","import React from 'react';\nimport { useEnforceLoginStatus } from '../../../hooks/useEnforceLoginStatus';\nimport useHideRootNavigationHeader from '../../../hooks/useHideRootNavigationHeader';\nimport DrawerNavigation from './DrawerNavigation';\nimport BottomTabNavigation from './BottomTabNavigation';\nimport { useIsMobileLayout } from '../../../hooks/useIsMobileLayout';\nimport EnforceUserRegistration from '../../shared/EnforceUserOnboarding';\nimport { Authenticator } from '@aws-amplify/ui-react-native';\nimport withOnlyMountOnFocus from '../../../utils/withOnlyMountOnFocus';\nimport { useConfigureAnalytics } from '../../../hooks/useConfigureAnalytics';\nimport { useRecordCapturedUrlUTMParameters } from '../../../hooks/useUrlUTMParameters';\nimport OrganizationInvitationGate from '../../shared/OrganizationInvitationGate';\nimport ErrorBoundary from '../../v2BaseComponents/ErrorBoundary';\nimport ReconcileProConsumerNavigation from '../../shared/ReconcileProConsumerNavigation';\nimport { useRegisterDevicePushToken } from '../../../hooks/useRegisterDevicePushToken';\nimport { useRegisterUserPlatform } from '../../../hooks/api/useRegisterUserPlatform';\n\nexport type TabNavigationOwnProps = {};\n\nexport type TabNavigationProps = TabNavigationOwnProps;\n\n/**\n * Navigation entry for a user that has logged in or signed up and has registered (entered required user data).\n */\nconst TabNavigation: React.FC = () => {\n // register the device push token for push notifications\n useRegisterDevicePushToken();\n\n useHideRootNavigationHeader();\n useEnforceLoginStatus({ shouldBeLoggedIn: true });\n // configure analytics now that we have a logged in user\n useConfigureAnalytics();\n // record any UTM parameters captured from the URL\n useRecordCapturedUrlUTMParameters();\n // register platform\n useRegisterUserPlatform();\n\n const isMobileLayout = useIsMobileLayout();\n\n const renderAppContent = () => {\n return isMobileLayout ? : ;\n };\n\n const renderWithReconciledNavigation = () => ;\n\n const renderWithOrganizationInvitationGate = () => {\n return ;\n };\n\n return (\n \n \n \n \n \n );\n};\n\n// TabNavigation.whyDidYouRender = true;\n\nexport default React.memo(withOnlyMountOnFocus(TabNavigation));\n","import { useEffect } from 'react';\nimport { useRootNavigation } from '../utils/appNavigationNames';\nimport { useIsUserLoggedIn } from './useIsUserLoggedIn';\n\nexport type UseEnforceLoginStatusArgs = {\n shouldBeLoggedIn: boolean;\n};\n\nexport type UseEnforceLoginStatusReturnValue = {\n /**\n * If login status is not expected, this will be true and the component should not render children\n */\n shouldBlockRender: boolean;\n};\n\nexport function useEnforceLoginStatus({\n shouldBeLoggedIn,\n}: UseEnforceLoginStatusArgs): UseEnforceLoginStatusReturnValue {\n const rootNavigation = useRootNavigation();\n const { isUserLoggedIn } = useIsUserLoggedIn();\n const shouldBlockRender = isUserLoggedIn !== shouldBeLoggedIn;\n\n useEffect(() => {\n // this is an invalid state, but makes ts happy. This case is handled below\n if (isUserLoggedIn === 'loading') return;\n\n if (shouldBeLoggedIn && !isUserLoggedIn) {\n rootNavigation.navigate('welcome');\n } else if (!shouldBeLoggedIn && isUserLoggedIn) {\n // @ts-expect-error TS2345\n rootNavigation.navigate('app');\n }\n }, [shouldBeLoggedIn, isUserLoggedIn, rootNavigation]);\n\n if (isUserLoggedIn === 'loading') {\n /**\n * Although the parent should not render children, if the user logs out and back in\n * react navigation may still have some screens mounted. Just prevent further rendering\n */\n return { shouldBlockRender: true };\n }\n\n return {\n shouldBlockRender: shouldBlockRender,\n };\n}\n","import { useEffect } from 'react';\nimport { useRootNavigation } from '../utils/appNavigationNames';\n\nexport default function useHideRootNavigationHeader(): void {\n const rootAppNavigation = useRootNavigation();\n useEffect(() => {\n rootAppNavigation.setOptions({\n headerShown: false,\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n}\n","import React, { useContext, useEffect } from 'react';\nimport { Animated, StyleSheet } from 'react-native';\nimport { ScrollView, View } from 'react-native';\nimport Stack from '../../../v2BaseComponents/Stack';\nimport { consumerAppDesktopTabConfig, professionalAppTabConfig } from '../tabConfig';\nimport appNavigationNames, {\n TabNavigationParamList,\n useActiveTabActiveScreen,\n useNestedNavigation,\n useTabDefaultScreenNavigation,\n useTabNavigation,\n useTabRouteActiveProfile,\n} from '../../../../utils/appNavigationNames';\nimport { DrawerElementProvider } from '../../../shared/MaybeSideNavLayout';\nimport { createNativeStackNavigator } from '@react-navigation/native-stack';\nimport { getIntl } from '../../../../utils/intl';\nimport { useRoute } from '@react-navigation/native';\nimport NavigationItem from './NavigationItem';\nimport ProfileNavigationItems, { ProfileNavigationItem } from './ProfileNavigationItems';\nimport { useSignOutAndResetApp } from '../../../../hooks/useSignOutAndResetApp';\nimport Icon from '../../../v2BaseComponents/Icon';\nimport { colors, zIndex } from '../../../../utils/theme';\nimport { getSpacing } from '../../../../utils/spacing';\nimport useMedicalProfiles from '../../../../hooks/api/useMedicalProfiles';\nimport { useGetIsUserProfile } from '../../../../hooks/useUserHasOwnMedicalProfile';\nimport { useAppType } from '../../../../hooks/useAppType';\nimport { ConsumerAppGuard } from '../../../shared/AppTypeGuards';\nimport Divider from '../../../v2BaseComponents/Divider';\nimport { hexToRgbA } from '../../../../utils/hexToRGBA';\nimport { SideDrawerCollapsedStateContext } from '../../../shared/SideDrawerCollapsedStateProvider';\nimport { useDrawerWidthAnimation } from './useDrawerWidthAnimation';\nimport { PRScrollView } from '../../../shared/Scroll';\n\nconst intl = getIntl('Drawer', {\n headerImageAlt: 'Header Primary Record Logo',\n support: 'Support',\n signOut: 'Sign Out',\n collapse: 'Collapse',\n});\n\nconst styles = StyleSheet.create({\n logo: {\n width: '100%',\n height: 24,\n },\n shadow: {\n boxShadow: '0px 3px 4.65px rgba(0, 0, 0, 0.27)',\n elevation: 6,\n } as any,\n});\n\nexport type DrawerNavigationOwnProps = {};\n\nexport type DrawerNavigationProps = DrawerNavigationOwnProps;\n\nconst StackNavigator = createNativeStackNavigator();\n\nconst Drawer = () => {\n const isProApp = useAppType() === 'professional';\n const { isCollapsed, setIsCollapsed } = useContext(SideDrawerCollapsedStateContext);\n const widthAnimation = useDrawerWidthAnimation(isCollapsed);\n const tabDefaultScreenNavigation = useTabDefaultScreenNavigation();\n const { nestedAccountNavigation } = useNestedNavigation();\n const tabNavigator = useTabNavigation();\n const route = useRoute();\n const activeTabAndScreen = useActiveTabActiveScreen();\n const tabRouteActiveProfile = useTabRouteActiveProfile();\n const { signOutAndResetApp, isResetting } = useSignOutAndResetApp();\n const appType = useAppType();\n const tabConfig = (appType === 'professional' ? professionalAppTabConfig : consumerAppDesktopTabConfig).filter(\n (_) => !_.omitFromSideNav,\n );\n const nonAccountTabs = tabConfig.filter((_) => _.name !== 'account');\n const accountTab = tabConfig.filter((_) => _.name === 'account')[0];\n const { isLoadingProfiles, medicalProfiles } = useMedicalProfiles();\n const getIsUserProfile = useGetIsUserProfile();\n\n const shouldBeActive = (tabName: keyof TabNavigationParamList) => {\n if (tabName === 'profiles' && route.name === 'profiles') {\n return !tabRouteActiveProfile.profileId;\n } else {\n return tabName === route.name;\n }\n };\n\n const userProfile = (medicalProfiles || []).find((profile) => getIsUserProfile(profile));\n\n return (\n \n \n \n \n \n \n \n {nonAccountTabs.map((tab) => {\n const isActive = shouldBeActive(tab.name);\n return (\n }\n onPress={() => {\n // if the tab is active, we want to navigate to the root, else navigate to where the tab was left off at\n tab.name === route.name\n ? tabDefaultScreenNavigation(tab.name)\n : tabNavigator.navigate(tab.name as any);\n }}\n testID={`navigation-tab-${tab.name}`}\n display={tab.display}\n isCollapsed={isCollapsed}\n />\n );\n })}\n \n {userProfile && !isLoadingProfiles ? (\n \n ) : null}\n \n \n \n {() => }\n \n \n \n \n \n }\n onPress={() => {\n // if the tab is active, we want to navigate to the root, else navigate to where the tab was left off at\n route.name === 'account'\n ? tabDefaultScreenNavigation(accountTab.name)\n : tabNavigator.navigate(accountTab.name as any);\n }}\n testID={`navigation-tab-${accountTab.name}`}\n display={accountTab.display}\n isCollapsed={isCollapsed}\n />\n }\n onPress={() => {\n nestedAccountNavigation('support', undefined);\n }}\n testID={`navigation-tab-help`}\n display={intl('support')}\n isCollapsed={isCollapsed}\n />\n }\n onPress={signOutAndResetApp}\n testID={`navigation-tab-signOut`}\n display={intl('signOut')}\n isCollapsed={isCollapsed}\n isDisabled={isResetting}\n />\n \n \n \n }\n onPress={() => setIsCollapsed(!isCollapsed)}\n testID={`navigation-tab-collapse`}\n display={intl('collapse')}\n isCollapsed={isCollapsed}\n />\n \n \n \n \n \n );\n};\n\nconst DrawerNavigation: React.FC = () => {\n const appType = useAppType();\n const tabConfig = appType === 'professional' ? professionalAppTabConfig : consumerAppDesktopTabConfig;\n return (\n }>\n \n \n {tabConfig.map((tab) => (\n \n ))}\n \n \n \n );\n};\n\nexport default React.memo(DrawerNavigation);\n","import appNavigationNames, { TabNavigationParamList } from '../../../utils/appNavigationNames';\nimport { getIntl } from '../../../utils/intl';\nimport AccountNavigation from '../AccountNavigation';\nimport ActivityNavigation from '../ActivityNavigation';\nimport NotesNavigation from '../NotesNavigation';\nimport ProfilesNavigation from '../ProfilesNavigation';\nimport { IconName } from '../../v2BaseComponents/Icon';\nimport ResourcesNavigation from '../ResourcesNavigation';\nimport OrganizationNavigation from '../OrganizationNavigation';\n\nconst intl = getIntl('MainAppNavigation-side-drawer', {\n activity: 'Activity',\n notes: 'My Notes',\n myAccount: 'My Account',\n profiles: 'Profiles',\n clients: 'Clients',\n resources: 'Resources',\n});\n\nconst bottomTabLabels = getIntl('MainAppNavigation-bottom-tab', {\n activity: 'Activity',\n notes: 'My Notes',\n myAccount: 'Account',\n profiles: 'Profiles',\n clients: 'Clients',\n resources: 'Resources',\n});\n\nexport type TabName = keyof TabNavigationParamList;\n\nexport type TabConfig = {\n name: TabName;\n display: string;\n component: () => React.JSX.Element;\n iconName: IconName;\n tabRootScreen: string;\n bottomTabLabel: string;\n omitFromSideNav?: boolean;\n};\n\nconst activityTabConfig: TabConfig = {\n name: appNavigationNames.tabs.activity,\n display: intl('activity'),\n component: ActivityNavigation as any,\n iconName: 'Activity',\n tabRootScreen: appNavigationNames.activity.root,\n bottomTabLabel: bottomTabLabels('activity'),\n};\n\nconst notesTabConfig: TabConfig = {\n name: appNavigationNames.tabs.notes,\n display: intl('notes'),\n component: NotesNavigation as any,\n iconName: 'Edit2',\n tabRootScreen: appNavigationNames.notes.root,\n bottomTabLabel: bottomTabLabels('notes'),\n};\n\nconst profilesTabConfig: TabConfig = {\n name: appNavigationNames.tabs.profiles,\n display: intl('profiles'),\n component: ProfilesNavigation as any,\n iconName: 'User',\n tabRootScreen: appNavigationNames.profiles.root,\n bottomTabLabel: bottomTabLabels('profiles'),\n};\n\nconst clientsTabConfig: TabConfig = {\n ...profilesTabConfig,\n name: appNavigationNames.tabs.clients,\n display: intl('clients'),\n iconName: 'Users',\n bottomTabLabel: bottomTabLabels('clients'),\n};\n\nconst accountTabConfig: TabConfig = {\n name: appNavigationNames.tabs.account,\n display: intl('myAccount'),\n component: AccountNavigation as any,\n iconName: 'Settings',\n tabRootScreen: appNavigationNames.account.root,\n bottomTabLabel: bottomTabLabels('myAccount'),\n};\n\nconst resourcesTabConfig: TabConfig = {\n name: appNavigationNames.tabs.resources,\n display: intl('resources'),\n component: ResourcesNavigation as any,\n iconName: 'Library',\n tabRootScreen: appNavigationNames.resources.root,\n bottomTabLabel: bottomTabLabels('resources'),\n};\n\nconst organizationTabConfig: TabConfig = {\n name: appNavigationNames.tabs.organization,\n display: 'Organization',\n component: OrganizationNavigation as any,\n iconName: 'OfficeBuilding',\n tabRootScreen: appNavigationNames.organization.root,\n bottomTabLabel: 'Organization',\n omitFromSideNav: true,\n};\n\nexport const consumerAppMobileTabConfig: TabConfig[] = [\n activityTabConfig,\n notesTabConfig,\n profilesTabConfig,\n accountTabConfig,\n];\n\nexport const consumerAppDesktopTabConfig: TabConfig[] = [\n profilesTabConfig,\n activityTabConfig,\n notesTabConfig,\n accountTabConfig,\n];\n\nexport const professionalAppTabConfig: TabConfig[] = [\n clientsTabConfig,\n resourcesTabConfig,\n organizationTabConfig,\n accountTabConfig,\n];\n","import React from 'react';\nimport appNavigationNames, { withActiveTab } from '../../utils/appNavigationNames';\nimport { createNativeStackNavigator } from '@react-navigation/native-stack';\nimport { getIntl } from '../../utils/intl';\nimport { screens } from '../screens/Tabs/Account';\nimport { MaybeDrawerLayout } from '../shared/MaybeSideNavLayout';\nimport { colors } from '../../utils/theme';\nimport { getHeader, mobileHeaderConfigs } from '../v2BaseComponents/Header';\nimport { useCapturedUrlUTMParameters } from '../../hooks/useUrlUTMParameters';\n\nconst intl = getIntl('accountNavigation', {\n accountInformation: 'Account Information',\n subscriptionPlans: 'Subscription Plans',\n support: 'Support',\n preferences: 'Preferences',\n about: 'About',\n termsOfService: 'Terms of Service',\n privacyPolicy: 'Privacy Policy',\n feedbackAndRoadmap: 'Feedback & Roadmap',\n root: 'My Account',\n accountDeletionConfirmation: 'Account Deletion Confirmation',\n redirect: 'Welcome Back',\n});\n\nconst Stack = createNativeStackNavigator();\n\nconst AccountNavigation = () => {\n const capturedUrlUTMParameters = useCapturedUrlUTMParameters();\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default withActiveTab(AccountNavigation, 'account');\n","import AccountInformationScreen from './AccountInformationScreen';\nimport SubscriptionScreen from './SubscriptionScreen';\nimport SupportScreen from './SupportScreen';\nimport AccountScreen from './AccountScreen';\nimport AccountDeletionConfirmationScreen from './AccountDeletionConfirmationScreen';\nimport PreferencesScreenContent from './PreferencesScreen';\nimport RedirectScreen from './RedirectScreen';\nimport wrapInTabContentContainer from '../../../AppNavigator/TabNavigation/wrapInTabContentContainer';\n\nconst screens = {\n AccountInformationScreen: wrapInTabContentContainer(AccountInformationScreen),\n SubscriptionScreen: wrapInTabContentContainer(SubscriptionScreen),\n SupportScreen: wrapInTabContentContainer(SupportScreen),\n AccountScreen: wrapInTabContentContainer(AccountScreen),\n AccountDeletionConfirmationScreen: wrapInTabContentContainer(AccountDeletionConfirmationScreen),\n PreferencesScreen: wrapInTabContentContainer(PreferencesScreenContent),\n RedirectScreen: wrapInTabContentContainer(RedirectScreen),\n};\n\nexport { screens };\n","import React from 'react';\nimport { AccountTabParamList } from '../../../../../utils/appNavigationNames';\nimport { RouteProp } from '@react-navigation/native';\nimport UserAccountInformationScreen from '../../../../shared/Account/UserAccountInformationScreen';\n\nexport type AccountInformationScreenOwnProps = {};\n\nexport type AccountScreenInformationProps = AccountInformationScreenOwnProps & {\n route: RouteProp;\n};\n\nconst AccountInformationScreen: React.FC = (props) => {\n return ;\n};\n\nexport default React.memo(AccountInformationScreen);\n","import React, { useState } from 'react';\nimport { useLoadedUser } from '../../../../hooks/api/useUser';\nimport { getIntl } from '../../../../utils/intl';\nimport addressToString from '../../../../utils/addressToString';\nimport UserInfoForm from './UserInfoForm';\nimport EnvironmentToggle from './EnvironmentToggle';\nimport { useAccountTabNavigation } from '../../../../utils/appNavigationNames';\nimport { useConfirmBackNavigationOnDirtyForm } from '../../FormExitValidation';\nimport Stack from '../../../v2BaseComponents/Stack';\nimport MainContentContainer from '../../../v2BaseComponents/MainContentContainer';\nimport { ActionButtonLayout } from '../../../v2BaseComponents/ActionButtonLayout';\nimport { getFallbackFromName, LoadableAvatar } from '../../../v2BaseComponents/Avatar';\nimport urls from '../../../../utils/urls';\nimport { APITypes } from '../../../../primary-record-types';\nimport LabelValueDisplay, { LabelValueItem } from '../../../v2BaseComponents/LabelValueDisplay';\nimport { AnimateLoadedContent } from '../../../v2BaseComponents/Loader';\nimport { useSignOutAndResetApp } from '../../../../hooks/useSignOutAndResetApp';\nimport { privacyPolicyUrl, termsOfServiceUrl } from '../../../../utils/constants';\nimport { useIsProApp } from '../../../../hooks/useAppType';\nimport { ClickableLinkText } from '../../../v2BaseComponents/Link';\nimport Text from '../../../v2BaseComponents/Text';\nimport useIsTestUser from '../../../../hooks/useIsTestUser';\nimport ToggleOrgPaidStatus from './ToggleOrgPaidStatus';\n\nexport type UserAccountInformationScreenOwnProps = {\n defaultToEdit?: boolean;\n};\n\nexport type AccountScreenInformationProps = UserAccountInformationScreenOwnProps & {};\n\nconst intl = getIntl('accountInformation', {\n email: 'Email',\n firstName: 'First Name',\n lastName: 'Last Name',\n dob: 'Date of Birth',\n preferredName: 'Preferred Name',\n phoneNumber: 'Phone Number',\n address: 'Address',\n edit: 'Edit',\n signOut: 'Sign Out',\n deleteAccount: 'Delete Account',\n termsOfService: 'Terms of Service',\n privacyPolicy: 'Privacy Policy',\n andSpacer: ' & ',\n tradeMarkDisclaimer: 'Primary Record® is a registered trademark of Primary Record Inc. All rights reserved.',\n});\n\nconst getUserLabelValues = (user: APITypes.userService.MeResponse): LabelValueItem[] => [\n {\n label: intl('email'),\n value: user.email,\n },\n {\n label: intl('firstName'),\n value: user.firstName,\n },\n {\n label: intl('lastName'),\n value: user.lastName,\n },\n\n {\n label: intl('preferredName'),\n value: user.preferredName,\n },\n {\n label: intl('dob'),\n value: user.dob,\n },\n {\n label: intl('phoneNumber'),\n value: user.phoneNumber,\n linkType: 'phone',\n },\n {\n label: intl('address'),\n value: addressToString({\n address1: user.streetAddress1,\n address2: user.streetAddress2,\n city: user.city,\n state: user.state,\n zipCode: user.zipCode,\n }),\n linkType: 'address',\n },\n];\n\nconst UserAccountInformationScreen: React.FC = (props) => {\n const accountTabNavigation = useAccountTabNavigation();\n useConfirmBackNavigationOnDirtyForm(accountTabNavigation);\n const [isEditing, setIsEditing] = useState(!!props.defaultToEdit);\n const navigator = useAccountTabNavigation();\n const { signOutAndResetApp, isResetting } = useSignOutAndResetApp();\n const { user, updateUser, isUpdatingUser } = useLoadedUser({\n onUpdateSuccess: () => setIsEditing(false),\n });\n const isProApp = useIsProApp();\n const isTestUser = useIsTestUser();\n\n if (isEditing) {\n return (\n \n {() => }\n \n );\n } else {\n return (\n {\n setIsEditing(true);\n },\n testID: 'edit-account-information-button',\n },\n {\n icon: 'LogOut',\n title: intl('signOut'),\n isDisabled: isResetting,\n onPress: signOutAndResetApp,\n testID: 'action-signOut',\n show: isProApp,\n },\n {\n icon: 'Trash2',\n title: intl('deleteAccount'),\n onPress: () => navigator.navigate('account-deletion-confirmation'),\n displayInMoreMenu: true,\n testID: 'navigate-to-delete-account-button',\n },\n ]}\n >\n \n \n \n \n \n \n \n {isTestUser ? : null}\n \n {isProApp ? (\n \n \n \n {intl('privacyPolicy')}\n \n {intl('andSpacer')}\n \n {intl('termsOfService')}\n \n \n {intl('tradeMarkDisclaimer')}\n \n ) : null}\n \n \n );\n }\n};\n\nexport default React.memo(UserAccountInformationScreen);\n","import { APITypes } from '../primary-record-types';\n\nexport type AddressToStringArgs = {\n address1?: string | null;\n address2?: string | null;\n city?: string | null;\n state?: string | null;\n zipCode?: string | null;\n};\n\nexport default function addressToString({ address1, address2, city, state, zipCode }: AddressToStringArgs): string {\n let addressString = address1?.trim();\n\n if (address2) {\n addressString += (addressString ? '\\n' : '') + address2;\n }\n\n // @ts-expect-error TS2322\n if (!city && !state && !zipCode) return addressString;\n\n addressString += (addressString ? '\\n' : '') + `${city ? `${city}, ` : ''} ${state || ''} ${zipCode || ''}`;\n\n // @ts-expect-error TS2322\n return addressString;\n}\n\nexport const oneUpEndpointAddressToString = (endpoint: APITypes.ehrIntegrationsService.OneUpHealthEndpoint) => {\n const addressArgs: AddressToStringArgs = {\n address1: (endpoint.locations?.[0]?.address?.line || []).join(' '),\n city: endpoint.locations?.[0]?.address?.city,\n state: endpoint.locations?.[0]?.address?.state,\n };\n\n return addressToString(addressArgs);\n};\n","import { Field } from 'formik';\nimport { APITypes } from '../../../../primary-record-types';\nimport React, { useState } from 'react';\nimport { getIntl } from '../../../../utils/intl';\nimport { required, zipCode } from '../../../../utils/validators';\nimport TempImagePicker, {\n TempAndPersistedAvatarState,\n avatarStateToAvatarChange,\n useTempAndExistingAvatarState,\n} from '../../../v2BaseComponents/ImagePicker/TempImagePicker';\nimport urls from '../../../../utils/urls';\nimport { AVATAR_UPLOAD_QUALITY } from '../../../../utils/constants';\nimport { handleFormikSubmit } from '../../../../utils/handleFormikSubmit';\nimport { CenteredFormRow, Form, SplitFormRow } from '../../../v2BaseComponents/Form';\nimport { ContentStack, FormStack } from '../../../v2BaseComponents/Stack';\nimport { FormikInputs } from '../../../v2BaseComponents/Inputs';\n\nconst intl = getIntl('accountInformation.userInfoForm', {\n accountInformation: 'Account Information',\n email: 'Email',\n firstName: 'First Name',\n lastName: 'Last Name',\n dob: 'Date of Birth',\n preferredName: 'Preferred Name',\n phoneNumber: 'Phone Number',\n streetAddress1: 'Street Address 1',\n streetAddress2: 'Street Address 2',\n city: 'City',\n state: 'State',\n zipCode: 'Zip Code',\n save: 'Save',\n avatarTitle: 'Account Photo',\n});\n\nexport type UserInfoFormOwnProps = {\n onUpdate: (values: APITypes.userService.UpdateUserBody) => void;\n user: APITypes.userService.User;\n isDisabled?: boolean;\n isSubmitting?: boolean;\n};\n\nexport type UserInfoFormProps = UserInfoFormOwnProps;\n\nconst UserInfoForm: React.FC = ({ onUpdate, user, isDisabled, isSubmitting }) => {\n // @ts-expect-error TS2345\n const [avatarState, onAvatarStateUpdate] = useState(null);\n const { tempImagePickerProps } = useTempAndExistingAvatarState({\n existingAvatarUrl: urls.api.users.avatar,\n avatarState,\n onAvatarStateUpdate,\n });\n return (\n {\n onUpdate({\n user: values,\n avatar: avatarStateToAvatarChange(avatarState),\n });\n handleFormikSubmit(values, helpers);\n }}\n >\n {() => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n )}\n \n );\n};\n\nexport default React.memo(UserInfoForm);\n","import deepmerge from 'deepmerge';\nimport isPlainObject from 'lodash-es/isPlainObject';\nimport cloneDeep from 'lodash-es/cloneDeep';\nimport { createContext, useContext, Children, useRef, useEffect, useState, useCallback, useMemo, useImperativeHandle, createElement, useLayoutEffect, forwardRef, Component } from 'react';\nimport isEqual from 'react-fast-compare';\nimport invariant from 'tiny-warning';\nimport clone from 'lodash-es/clone';\nimport toPath from 'lodash-es/toPath';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\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\n return target;\n}\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\n return self;\n}\n\nvar FormikContext = /*#__PURE__*/createContext(undefined);\nFormikContext.displayName = 'FormikContext';\nvar FormikProvider = FormikContext.Provider;\nvar FormikConsumer = FormikContext.Consumer;\nfunction useFormikContext() {\n var formik = useContext(FormikContext);\n !!!formik ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Formik context is undefined, please verify you are calling useFormikContext() as child of a component.\") : invariant(false) : void 0;\n return formik;\n}\n\n/** @private is the value an empty array? */\n\nvar isEmptyArray = function isEmptyArray(value) {\n return Array.isArray(value) && value.length === 0;\n};\n/** @private is the given object a Function? */\n\nvar isFunction = function isFunction(obj) {\n return typeof obj === 'function';\n};\n/** @private is the given object an Object? */\n\nvar isObject = function isObject(obj) {\n return obj !== null && typeof obj === 'object';\n};\n/** @private is the given object an integer? */\n\nvar isInteger = function isInteger(obj) {\n return String(Math.floor(Number(obj))) === obj;\n};\n/** @private is the given object a string? */\n\nvar isString = function isString(obj) {\n return Object.prototype.toString.call(obj) === '[object String]';\n};\n/** @private is the given object a NaN? */\n// eslint-disable-next-line no-self-compare\n\nvar isNaN$1 = function isNaN(obj) {\n return obj !== obj;\n};\n/** @private Does a React component have exactly 0 children? */\n\nvar isEmptyChildren = function isEmptyChildren(children) {\n return Children.count(children) === 0;\n};\n/** @private is the given object/value a promise? */\n\nvar isPromise = function isPromise(value) {\n return isObject(value) && isFunction(value.then);\n};\n/** @private is the given object/value a type of synthetic event? */\n\nvar isInputEvent = function isInputEvent(value) {\n return value && isObject(value) && isObject(value.target);\n};\n/**\r\n * Same as document.activeElement but wraps in a try-catch block. In IE it is\r\n * not safe to call document.activeElement if there is nothing focused.\r\n *\r\n * The activeElement will be null only if the document or document body is not\r\n * yet defined.\r\n *\r\n * @param {?Document} doc Defaults to current document.\r\n * @return {Element | null}\r\n * @see https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/dom/getActiveElement.js\r\n */\n\nfunction getActiveElement(doc) {\n doc = doc || (typeof document !== 'undefined' ? document : undefined);\n\n if (typeof doc === 'undefined') {\n return null;\n }\n\n try {\n return doc.activeElement || doc.body;\n } catch (e) {\n return doc.body;\n }\n}\n/**\r\n * Deeply get a value from an object via its path.\r\n */\n\nfunction getIn(obj, key, def, p) {\n if (p === void 0) {\n p = 0;\n }\n\n var path = toPath(key);\n\n while (obj && p < path.length) {\n obj = obj[path[p++]];\n } // check if path is not in the end\n\n\n if (p !== path.length && !obj) {\n return def;\n }\n\n return obj === undefined ? def : obj;\n}\n/**\r\n * Deeply set a value from in object via it's path. If the value at `path`\r\n * has changed, return a shallow copy of obj with `value` set at `path`.\r\n * If `value` has not changed, return the original `obj`.\r\n *\r\n * Existing objects / arrays along `path` are also shallow copied. Sibling\r\n * objects along path retain the same internal js reference. Since new\r\n * objects / arrays are only created along `path`, we can test if anything\r\n * changed in a nested structure by comparing the object's reference in\r\n * the old and new object, similar to how russian doll cache invalidation\r\n * works.\r\n *\r\n * In earlier versions of this function, which used cloneDeep, there were\r\n * issues whereby settings a nested value would mutate the parent\r\n * instead of creating a new object. `clone` avoids that bug making a\r\n * shallow copy of the objects along the update path\r\n * so no object is mutated in place.\r\n *\r\n * Before changing this function, please read through the following\r\n * discussions.\r\n *\r\n * @see https://github.com/developit/linkstate\r\n * @see https://github.com/jaredpalmer/formik/pull/123\r\n */\n\nfunction setIn(obj, path, value) {\n var res = clone(obj); // this keeps inheritance when obj is a class\n\n var resVal = res;\n var i = 0;\n var pathArray = toPath(path);\n\n for (; i < pathArray.length - 1; i++) {\n var currentPath = pathArray[i];\n var currentObj = getIn(obj, pathArray.slice(0, i + 1));\n\n if (currentObj && (isObject(currentObj) || Array.isArray(currentObj))) {\n resVal = resVal[currentPath] = clone(currentObj);\n } else {\n var nextPath = pathArray[i + 1];\n resVal = resVal[currentPath] = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};\n }\n } // Return original object if new value is the same as current\n\n\n if ((i === 0 ? obj : resVal)[pathArray[i]] === value) {\n return obj;\n }\n\n if (value === undefined) {\n delete resVal[pathArray[i]];\n } else {\n resVal[pathArray[i]] = value;\n } // If the path array has a single element, the loop did not run.\n // Deleting on `resVal` had no effect in this scenario, so we delete on the result instead.\n\n\n if (i === 0 && value === undefined) {\n delete res[pathArray[i]];\n }\n\n return res;\n}\n/**\r\n * Recursively a set the same value for all keys and arrays nested object, cloning\r\n * @param object\r\n * @param value\r\n * @param visited\r\n * @param response\r\n */\n\nfunction setNestedObjectValues(object, value, visited, response) {\n if (visited === void 0) {\n visited = new WeakMap();\n }\n\n if (response === void 0) {\n response = {};\n }\n\n for (var _i = 0, _Object$keys = Object.keys(object); _i < _Object$keys.length; _i++) {\n var k = _Object$keys[_i];\n var val = object[k];\n\n if (isObject(val)) {\n if (!visited.get(val)) {\n visited.set(val, true); // In order to keep array values consistent for both dot path and\n // bracket syntax, we need to check if this is an array so that\n // this will output { friends: [true] } and not { friends: { \"0\": true } }\n\n response[k] = Array.isArray(val) ? [] : {};\n setNestedObjectValues(val, value, visited, response[k]);\n }\n } else {\n response[k] = value;\n }\n }\n\n return response;\n}\n\nfunction formikReducer(state, msg) {\n switch (msg.type) {\n case 'SET_VALUES':\n return _extends({}, state, {\n values: msg.payload\n });\n\n case 'SET_TOUCHED':\n return _extends({}, state, {\n touched: msg.payload\n });\n\n case 'SET_ERRORS':\n if (isEqual(state.errors, msg.payload)) {\n return state;\n }\n\n return _extends({}, state, {\n errors: msg.payload\n });\n\n case 'SET_STATUS':\n return _extends({}, state, {\n status: msg.payload\n });\n\n case 'SET_ISSUBMITTING':\n return _extends({}, state, {\n isSubmitting: msg.payload\n });\n\n case 'SET_ISVALIDATING':\n return _extends({}, state, {\n isValidating: msg.payload\n });\n\n case 'SET_FIELD_VALUE':\n return _extends({}, state, {\n values: setIn(state.values, msg.payload.field, msg.payload.value)\n });\n\n case 'SET_FIELD_TOUCHED':\n return _extends({}, state, {\n touched: setIn(state.touched, msg.payload.field, msg.payload.value)\n });\n\n case 'SET_FIELD_ERROR':\n return _extends({}, state, {\n errors: setIn(state.errors, msg.payload.field, msg.payload.value)\n });\n\n case 'RESET_FORM':\n return _extends({}, state, msg.payload);\n\n case 'SET_FORMIK_STATE':\n return msg.payload(state);\n\n case 'SUBMIT_ATTEMPT':\n return _extends({}, state, {\n touched: setNestedObjectValues(state.values, true),\n isSubmitting: true,\n submitCount: state.submitCount + 1\n });\n\n case 'SUBMIT_FAILURE':\n return _extends({}, state, {\n isSubmitting: false\n });\n\n case 'SUBMIT_SUCCESS':\n return _extends({}, state, {\n isSubmitting: false\n });\n\n default:\n return state;\n }\n} // Initial empty states // objects\n\n\nvar emptyErrors = {};\nvar emptyTouched = {};\nfunction useFormik(_ref) {\n var _ref$validateOnChange = _ref.validateOnChange,\n validateOnChange = _ref$validateOnChange === void 0 ? true : _ref$validateOnChange,\n _ref$validateOnBlur = _ref.validateOnBlur,\n validateOnBlur = _ref$validateOnBlur === void 0 ? true : _ref$validateOnBlur,\n _ref$validateOnMount = _ref.validateOnMount,\n validateOnMount = _ref$validateOnMount === void 0 ? false : _ref$validateOnMount,\n isInitialValid = _ref.isInitialValid,\n _ref$enableReinitiali = _ref.enableReinitialize,\n enableReinitialize = _ref$enableReinitiali === void 0 ? false : _ref$enableReinitiali,\n onSubmit = _ref.onSubmit,\n rest = _objectWithoutPropertiesLoose(_ref, [\"validateOnChange\", \"validateOnBlur\", \"validateOnMount\", \"isInitialValid\", \"enableReinitialize\", \"onSubmit\"]);\n\n var props = _extends({\n validateOnChange: validateOnChange,\n validateOnBlur: validateOnBlur,\n validateOnMount: validateOnMount,\n onSubmit: onSubmit\n }, rest);\n\n var initialValues = useRef(props.initialValues);\n var initialErrors = useRef(props.initialErrors || emptyErrors);\n var initialTouched = useRef(props.initialTouched || emptyTouched);\n var initialStatus = useRef(props.initialStatus);\n var isMounted = useRef(false);\n var fieldRegistry = useRef({});\n\n if (process.env.NODE_ENV !== \"production\") {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useEffect(function () {\n !(typeof isInitialValid === 'undefined') ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'isInitialValid has been deprecated and will be removed in future versions of Formik. Please use initialErrors or validateOnMount instead.') : invariant(false) : void 0; // eslint-disable-next-line\n }, []);\n }\n\n useEffect(function () {\n isMounted.current = true;\n return function () {\n isMounted.current = false;\n };\n }, []);\n\n var _React$useState = useState(0),\n setIteration = _React$useState[1];\n\n var stateRef = useRef({\n values: cloneDeep(props.initialValues),\n errors: cloneDeep(props.initialErrors) || emptyErrors,\n touched: cloneDeep(props.initialTouched) || emptyTouched,\n status: cloneDeep(props.initialStatus),\n isSubmitting: false,\n isValidating: false,\n submitCount: 0\n });\n var state = stateRef.current;\n var dispatch = useCallback(function (action) {\n var prev = stateRef.current;\n stateRef.current = formikReducer(prev, action); // force rerender\n\n if (prev !== stateRef.current) setIteration(function (x) {\n return x + 1;\n });\n }, []);\n var runValidateHandler = useCallback(function (values, field) {\n return new Promise(function (resolve, reject) {\n var maybePromisedErrors = props.validate(values, field);\n\n if (maybePromisedErrors == null) {\n // use loose null check here on purpose\n resolve(emptyErrors);\n } else if (isPromise(maybePromisedErrors)) {\n maybePromisedErrors.then(function (errors) {\n resolve(errors || emptyErrors);\n }, function (actualException) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\"Warning: An unhandled error was caught during validation in \", actualException);\n }\n\n reject(actualException);\n });\n } else {\n resolve(maybePromisedErrors);\n }\n });\n }, [props.validate]);\n /**\r\n * Run validation against a Yup schema and optionally run a function if successful\r\n */\n\n var runValidationSchema = useCallback(function (values, field) {\n var validationSchema = props.validationSchema;\n var schema = isFunction(validationSchema) ? validationSchema(field) : validationSchema;\n var promise = field && schema.validateAt ? schema.validateAt(field, values) : validateYupSchema(values, schema);\n return new Promise(function (resolve, reject) {\n promise.then(function () {\n resolve(emptyErrors);\n }, function (err) {\n // Yup will throw a validation error if validation fails. We catch those and\n // resolve them into Formik errors. We can sniff if something is a Yup error\n // by checking error.name.\n // @see https://github.com/jquense/yup#validationerrorerrors-string--arraystring-value-any-path-string\n if (err.name === 'ValidationError') {\n resolve(yupToFormErrors(err));\n } else {\n // We throw any other errors\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\"Warning: An unhandled error was caught during validation in \", err);\n }\n\n reject(err);\n }\n });\n });\n }, [props.validationSchema]);\n var runSingleFieldLevelValidation = useCallback(function (field, value) {\n return new Promise(function (resolve) {\n return resolve(fieldRegistry.current[field].validate(value));\n });\n }, []);\n var runFieldLevelValidations = useCallback(function (values) {\n var fieldKeysWithValidation = Object.keys(fieldRegistry.current).filter(function (f) {\n return isFunction(fieldRegistry.current[f].validate);\n }); // Construct an array with all of the field validation functions\n\n var fieldValidations = fieldKeysWithValidation.length > 0 ? fieldKeysWithValidation.map(function (f) {\n return runSingleFieldLevelValidation(f, getIn(values, f));\n }) : [Promise.resolve('DO_NOT_DELETE_YOU_WILL_BE_FIRED')]; // use special case ;)\n\n return Promise.all(fieldValidations).then(function (fieldErrorsList) {\n return fieldErrorsList.reduce(function (prev, curr, index) {\n if (curr === 'DO_NOT_DELETE_YOU_WILL_BE_FIRED') {\n return prev;\n }\n\n if (curr) {\n prev = setIn(prev, fieldKeysWithValidation[index], curr);\n }\n\n return prev;\n }, {});\n });\n }, [runSingleFieldLevelValidation]); // Run all validations and return the result\n\n var runAllValidations = useCallback(function (values) {\n return Promise.all([runFieldLevelValidations(values), props.validationSchema ? runValidationSchema(values) : {}, props.validate ? runValidateHandler(values) : {}]).then(function (_ref2) {\n var fieldErrors = _ref2[0],\n schemaErrors = _ref2[1],\n validateErrors = _ref2[2];\n var combinedErrors = deepmerge.all([fieldErrors, schemaErrors, validateErrors], {\n arrayMerge: arrayMerge\n });\n return combinedErrors;\n });\n }, [props.validate, props.validationSchema, runFieldLevelValidations, runValidateHandler, runValidationSchema]); // Run all validations methods and update state accordingly\n\n var validateFormWithHighPriority = useEventCallback(function (values) {\n if (values === void 0) {\n values = state.values;\n }\n\n dispatch({\n type: 'SET_ISVALIDATING',\n payload: true\n });\n return runAllValidations(values).then(function (combinedErrors) {\n if (!!isMounted.current) {\n dispatch({\n type: 'SET_ISVALIDATING',\n payload: false\n });\n dispatch({\n type: 'SET_ERRORS',\n payload: combinedErrors\n });\n }\n\n return combinedErrors;\n });\n });\n useEffect(function () {\n if (validateOnMount && isMounted.current === true && isEqual(initialValues.current, props.initialValues)) {\n validateFormWithHighPriority(initialValues.current);\n }\n }, [validateOnMount, validateFormWithHighPriority]);\n var resetForm = useCallback(function (nextState) {\n var values = nextState && nextState.values ? nextState.values : initialValues.current;\n var errors = nextState && nextState.errors ? nextState.errors : initialErrors.current ? initialErrors.current : props.initialErrors || {};\n var touched = nextState && nextState.touched ? nextState.touched : initialTouched.current ? initialTouched.current : props.initialTouched || {};\n var status = nextState && nextState.status ? nextState.status : initialStatus.current ? initialStatus.current : props.initialStatus;\n initialValues.current = values;\n initialErrors.current = errors;\n initialTouched.current = touched;\n initialStatus.current = status;\n\n var dispatchFn = function dispatchFn() {\n dispatch({\n type: 'RESET_FORM',\n payload: {\n isSubmitting: !!nextState && !!nextState.isSubmitting,\n errors: errors,\n touched: touched,\n status: status,\n values: values,\n isValidating: !!nextState && !!nextState.isValidating,\n submitCount: !!nextState && !!nextState.submitCount && typeof nextState.submitCount === 'number' ? nextState.submitCount : 0\n }\n });\n };\n\n if (props.onReset) {\n var maybePromisedOnReset = props.onReset(state.values, imperativeMethods);\n\n if (isPromise(maybePromisedOnReset)) {\n maybePromisedOnReset.then(dispatchFn);\n } else {\n dispatchFn();\n }\n } else {\n dispatchFn();\n }\n }, [props.initialErrors, props.initialStatus, props.initialTouched, props.onReset]);\n useEffect(function () {\n if (isMounted.current === true && !isEqual(initialValues.current, props.initialValues)) {\n if (enableReinitialize) {\n initialValues.current = props.initialValues;\n resetForm();\n\n if (validateOnMount) {\n validateFormWithHighPriority(initialValues.current);\n }\n }\n }\n }, [enableReinitialize, props.initialValues, resetForm, validateOnMount, validateFormWithHighPriority]);\n useEffect(function () {\n if (enableReinitialize && isMounted.current === true && !isEqual(initialErrors.current, props.initialErrors)) {\n initialErrors.current = props.initialErrors || emptyErrors;\n dispatch({\n type: 'SET_ERRORS',\n payload: props.initialErrors || emptyErrors\n });\n }\n }, [enableReinitialize, props.initialErrors]);\n useEffect(function () {\n if (enableReinitialize && isMounted.current === true && !isEqual(initialTouched.current, props.initialTouched)) {\n initialTouched.current = props.initialTouched || emptyTouched;\n dispatch({\n type: 'SET_TOUCHED',\n payload: props.initialTouched || emptyTouched\n });\n }\n }, [enableReinitialize, props.initialTouched]);\n useEffect(function () {\n if (enableReinitialize && isMounted.current === true && !isEqual(initialStatus.current, props.initialStatus)) {\n initialStatus.current = props.initialStatus;\n dispatch({\n type: 'SET_STATUS',\n payload: props.initialStatus\n });\n }\n }, [enableReinitialize, props.initialStatus, props.initialTouched]);\n var validateField = useEventCallback(function (name) {\n // This will efficiently validate a single field by avoiding state\n // changes if the validation function is synchronous. It's different from\n // what is called when using validateForm.\n if (fieldRegistry.current[name] && isFunction(fieldRegistry.current[name].validate)) {\n var value = getIn(state.values, name);\n var maybePromise = fieldRegistry.current[name].validate(value);\n\n if (isPromise(maybePromise)) {\n // Only flip isValidating if the function is async.\n dispatch({\n type: 'SET_ISVALIDATING',\n payload: true\n });\n return maybePromise.then(function (x) {\n return x;\n }).then(function (error) {\n dispatch({\n type: 'SET_FIELD_ERROR',\n payload: {\n field: name,\n value: error\n }\n });\n dispatch({\n type: 'SET_ISVALIDATING',\n payload: false\n });\n });\n } else {\n dispatch({\n type: 'SET_FIELD_ERROR',\n payload: {\n field: name,\n value: maybePromise\n }\n });\n return Promise.resolve(maybePromise);\n }\n } else if (props.validationSchema) {\n dispatch({\n type: 'SET_ISVALIDATING',\n payload: true\n });\n return runValidationSchema(state.values, name).then(function (x) {\n return x;\n }).then(function (error) {\n dispatch({\n type: 'SET_FIELD_ERROR',\n payload: {\n field: name,\n value: getIn(error, name)\n }\n });\n dispatch({\n type: 'SET_ISVALIDATING',\n payload: false\n });\n });\n }\n\n return Promise.resolve();\n });\n var registerField = useCallback(function (name, _ref3) {\n var validate = _ref3.validate;\n fieldRegistry.current[name] = {\n validate: validate\n };\n }, []);\n var unregisterField = useCallback(function (name) {\n delete fieldRegistry.current[name];\n }, []);\n var setTouched = useEventCallback(function (touched, shouldValidate) {\n dispatch({\n type: 'SET_TOUCHED',\n payload: touched\n });\n var willValidate = shouldValidate === undefined ? validateOnBlur : shouldValidate;\n return willValidate ? validateFormWithHighPriority(state.values) : Promise.resolve();\n });\n var setErrors = useCallback(function (errors) {\n dispatch({\n type: 'SET_ERRORS',\n payload: errors\n });\n }, []);\n var setValues = useEventCallback(function (values, shouldValidate) {\n var resolvedValues = isFunction(values) ? values(state.values) : values;\n dispatch({\n type: 'SET_VALUES',\n payload: resolvedValues\n });\n var willValidate = shouldValidate === undefined ? validateOnChange : shouldValidate;\n return willValidate ? validateFormWithHighPriority(resolvedValues) : Promise.resolve();\n });\n var setFieldError = useCallback(function (field, value) {\n dispatch({\n type: 'SET_FIELD_ERROR',\n payload: {\n field: field,\n value: value\n }\n });\n }, []);\n var setFieldValue = useEventCallback(function (field, value, shouldValidate) {\n dispatch({\n type: 'SET_FIELD_VALUE',\n payload: {\n field: field,\n value: value\n }\n });\n var willValidate = shouldValidate === undefined ? validateOnChange : shouldValidate;\n return willValidate ? validateFormWithHighPriority(setIn(state.values, field, value)) : Promise.resolve();\n });\n var executeChange = useCallback(function (eventOrTextValue, maybePath) {\n // By default, assume that the first argument is a string. This allows us to use\n // handleChange with React Native and React Native Web's onChangeText prop which\n // provides just the value of the input.\n var field = maybePath;\n var val = eventOrTextValue;\n var parsed; // If the first argument is not a string though, it has to be a synthetic React Event (or a fake one),\n // so we handle like we would a normal HTML change event.\n\n if (!isString(eventOrTextValue)) {\n // If we can, persist the event\n // @see https://reactjs.org/docs/events.html#event-pooling\n if (eventOrTextValue.persist) {\n eventOrTextValue.persist();\n }\n\n var target = eventOrTextValue.target ? eventOrTextValue.target : eventOrTextValue.currentTarget;\n var type = target.type,\n name = target.name,\n id = target.id,\n value = target.value,\n checked = target.checked,\n outerHTML = target.outerHTML,\n options = target.options,\n multiple = target.multiple;\n field = maybePath ? maybePath : name ? name : id;\n\n if (!field && process.env.NODE_ENV !== \"production\") {\n warnAboutMissingIdentifier({\n htmlContent: outerHTML,\n documentationAnchorLink: 'handlechange-e-reactchangeeventany--void',\n handlerName: 'handleChange'\n });\n }\n\n val = /number|range/.test(type) ? (parsed = parseFloat(value), isNaN(parsed) ? '' : parsed) : /checkbox/.test(type) // checkboxes\n ? getValueForCheckbox(getIn(state.values, field), checked, value) : options && multiple // ;\n};\n\nexport default React.memo(TextArea);\n","import React from 'react';\nimport { NativeSyntheticEvent, TextInput, TextInputChangeEventData } from 'react-native';\nimport Text, { textVariantStyleMap } from '../Text';\nimport { colors } from '../../../utils/theme';\nimport Stack from '../Stack';\nimport { containerLayout } from './InputBase';\n\nexport type NoteTitleInputOwnProps = {\n placeholder: string;\n error?: string;\n value: string | null;\n onChange: (e: NativeSyntheticEvent) => void;\n onBlur?: () => void;\n onFocus?: () => void;\n isDisabled?: boolean;\n testID?: string;\n};\n\nexport type NoteTitleInputProps = NoteTitleInputOwnProps;\n\nconst NoteTitleInput: React.FC = (props) => {\n return (\n \n \n {props.error ? {props.error} : null}\n \n );\n};\n\nexport default React.memo(NoteTitleInput);\n","import React, { useContext, useEffect, useMemo } from 'react';\nimport {\n RichText,\n Toolbar,\n useEditorBridge,\n useEditorContent,\n DEFAULT_TOOLBAR_ITEMS,\n TenTapStartKit,\n CoreBridge,\n useBridgeState,\n Images,\n ToolbarItem,\n BridgeExtension,\n} from '@10play/tentap-editor';\nimport Text, { textVariantStyleMap } from '../../Text';\nimport Stack from '../../Stack';\nimport { useElementPosition } from '../../../../hooks/useElementPosition';\nimport { injectedFontFamilyCss } from './injectedFontFamilyCss';\nimport { Platform, Pressable, StyleProp, TextInput, TouchableWithoutFeedback, View } from 'react-native';\nimport { fontWeightToFontFamilyName } from '../../../../hooks/useLoadAssets';\nimport { innerTextInputStyles } from '../InputBase';\nimport PRScrollView from '../../../shared/Scroll/PRScrollView';\n\ntype IsEditingNoteContentContextValue = {\n isEditingNoteContent: boolean;\n setIsEditingNoteContent: (isFocused: boolean) => void;\n};\n\nexport const IsEditingNoteContentContext = React.createContext({\n isEditingNoteContent: false,\n setIsEditingNoteContent: () => {},\n});\nexport const IsEditingNoteContentProvider: React.FC<{\n children: (renderArgs: IsEditingNoteContentContextValue) => React.ReactNode;\n}> = ({ children }) => {\n const textInputRef = React.useRef(null);\n const [isEditingNoteContent, setIsEditingNoteContent] = React.useState(false);\n const contextValue = React.useMemo(\n () => ({\n isEditingNoteContent,\n setIsEditingNoteContent: (isEditing) => {\n if (!isEditingNoteContent && isEditing) {\n textInputRef.current?.focus();\n }\n setIsEditingNoteContent(isEditing);\n },\n }),\n [isEditingNoteContent, setIsEditingNoteContent],\n );\n\n return (\n \n <>\n \n {children(contextValue)}\n \n \n );\n};\n\nexport type NoteContentInputOwnProps = {\n placeholder: string;\n error?: string;\n value: string | null;\n onChange: (value: string) => void;\n onBlur?: () => void;\n onFocus?: () => void;\n isDisabled?: boolean;\n testID?: string;\n};\n\nexport type NoteContentInputProps = NoteContentInputOwnProps;\n\nfunction convertStyleToCSS(styleObject: StyleProp, keepFontFamily = false) {\n return Object.keys(styleObject)\n .filter((_) => _ !== 'fontFamily' || keepFontFamily)\n .reduce((css, key) => {\n const cssKey = key.replace(/([A-Z])/g, '-$1').toLowerCase(); // Convert camelCase to kebab-case\n const value = typeof styleObject[key] === 'number' ? `${styleObject[key]}px` : styleObject[key]; // Add px to numerical values\n return `${css}${cssKey}: ${value};\\n`;\n }, '');\n}\n\nconst addStyleToSheet = (htmlTag: string, style: StyleProp) => {\n const css = convertStyleToCSS(style);\n return `${htmlTag} { ${css} }`;\n};\n\nconst customFont = `\n${injectedFontFamilyCss}\n* {\n font-family: 'Overpass', sans-serif;\n}\n${addStyleToSheet('h1', textVariantStyleMap['h1'])}\n${addStyleToSheet('h2', textVariantStyleMap['h2'])}\n${addStyleToSheet('h3', textVariantStyleMap['h3'])}\n${addStyleToSheet('h4', textVariantStyleMap['h4'])}\n${addStyleToSheet('h5', textVariantStyleMap['h5'])}\n${addStyleToSheet('h6', textVariantStyleMap['h6'])}\n${addStyleToSheet('p', textVariantStyleMap['body-1'])}\n${addStyleToSheet('span', textVariantStyleMap['body-1'])}\n${addStyleToSheet('strong', {\n fontFamily: fontWeightToFontFamilyName.Overpass['semi-bold'],\n fontWeight: '600',\n})}\n`;\n\n// this is hacky, but seemingly the only way to filter out toolbar types\nlet displayItems: ToolbarItem[] = DEFAULT_TOOLBAR_ITEMS;\ntry {\n const disabledImages = [Images.checkList, Images.code];\n displayItems = DEFAULT_TOOLBAR_ITEMS.filter((item) => !disabledImages.includes((item as any)?.image?.()));\n} catch (e) {\n console.error('Error filtering out checkList from toolbar items');\n}\n\nconst NoteContentInput: React.FC = (props) => {\n const { isEditingNoteContent, setIsEditingNoteContent } = useContext(IsEditingNoteContentContext);\n\n const bridgeExtensions = useMemo(() => [...TenTapStartKit, CoreBridge.configureCSS(customFont)], []);\n\n const editor = useEditorBridge({\n // avoidIosKeyboard: true,\n initialContent: props.value || '',\n bridgeExtensions,\n theme: {\n toolbar: {\n linkBarTheme: {\n linkInput: innerTextInputStyles,\n addLinkContainer: {\n width: '100%',\n },\n },\n },\n },\n autofocus: isEditingNoteContent,\n });\n const hasBeenFocused = React.useRef(false);\n const bridgeState = useBridgeState(editor);\n const isFocusedFromBridgeState = bridgeState?.isFocused;\n\n /*\n If going from the input to a toolbar button, the editor will\n lose focus and then regain it quickly. Don't update the parent right away.\n First check if the editor is focused again after a short timeout.\n */\n useEffect(() => {\n if (isFocusedFromBridgeState) {\n props.onFocus?.();\n setIsEditingNoteContent(true);\n } else if (hasBeenFocused.current) {\n props.onBlur?.();\n }\n }, [isFocusedFromBridgeState]);\n\n const content = useEditorContent(editor);\n useEffect(() => {\n if (content !== undefined) {\n props.onChange(content?.toString() || '');\n }\n }, [content]);\n\n const { ref, position, onLayout } = useElementPosition({\n clearPositionOnDisable: true,\n });\n\n const renderToolbar = () => {\n if (!isEditingNoteContent) return null;\n\n if (Platform.OS === 'web') {\n return (\n \n

\n \n\n\n`.replace(/\\\\([`$])/g, '\\$1');\n//# sourceMappingURL=editorHtml.js.map","export * from './useKeyboard';\nexport * from './uniqueBy';\n//# sourceMappingURL=index.js.map","import React from 'react';\nimport { useEffect } from 'react';\nimport { Keyboard, Platform } from 'react-native';\nconst hideEvent = Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide';\nexport const useKeyboard = () => {\n const [isKeyboardUp, setIsKeyboardUp] = React.useState(false);\n const [keyboardHeight, setKeyboardHeight] = React.useState(0);\n useEffect(() => {\n const willShowSubscription = Keyboard.addListener('keyboardWillShow', () => {\n setIsKeyboardUp(true);\n });\n const didShowSubscription = Keyboard.addListener('keyboardDidShow', e => {\n setIsKeyboardUp(true);\n setKeyboardHeight(e.endCoordinates.height);\n });\n const hideSubscription = Keyboard.addListener(hideEvent, () => {\n setIsKeyboardUp(false);\n });\n return () => {\n willShowSubscription.remove();\n didShowSubscription.remove();\n hideSubscription.remove();\n };\n }, []);\n return {\n isKeyboardUp,\n keyboardHeight\n };\n};\n//# sourceMappingURL=useKeyboard.js.map","// Unique by, last wins\nexport function uniqueBy(items, keyOrFn) {\n const keyFn = typeof keyOrFn === 'function' ? keyOrFn : item => item[keyOrFn];\n const seen = new Map();\n items.forEach(item => {\n const key = keyFn(item);\n seen.set(key, item);\n });\n return Array.from(seen.values());\n}\n//# sourceMappingURL=uniqueBy.js.map","import { Platform } from 'react-native';\n/**\n * Creates a new style element and appends it to the head of the document.\n * If the style element already exists, it will update the content of the existing element.\n * @param css - array of css strings\n * @param styleSheetTag - a unique tag to identify the style element - if not provided, a new style element will be created\n * @returns a string of javascript that is ready to be injected into the rich text webview\n */\nexport const getStyleSheetCSS = (css, styleSheetTag) => {\n return `\n cssContent = \\`${css}\\`;\n head = document.head || document.getElementsByTagName('head')[0],\n styleElement = head.querySelector('style[data-tag=\"${styleSheetTag}\"]');\n \n if (!styleElement) {\n // If no such element exists, create a new