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GAAM,SACFA,IAAA,MAAAA,GAAA,OAAQ4hD,MAAAoE,GAAA,EAAO,IAQvBxnD,GAAgB","names":["f","require$$0","k","l","m","n","p","q","c","a","g","b","d","e","h","reactJsxRuntime_production_min","jsxRuntimeModule","Subscribable","listener","x","isServer","noop","functionalUpdate","updater","input","isValidTimeout","value","difference","array1","array2","replaceAt","array","index","copy","timeUntilStale","updatedAt","staleTime","parseQueryArgs","arg1","arg2","arg3","isQueryKey","parseMutationArgs","parseFilterArgs","parseMutationFilterArgs","matchQuery","filters","query","type","exact","fetchStatus","predicate","queryKey","stale","hashQueryKeyByOptions","partialMatchKey","isActive","matchMutation","mutation","fetching","mutationKey","hashQueryKey","options","_","val","isPlainObject","result","key","partialDeepEqual","replaceEqualDeep","isPlainArray","aSize","bItems","bSize","equalItems","i","shallowEqualObjects","o","hasObjectPrototype","ctor","prot","isError","sleep","timeout","resolve","scheduleMicrotask","callback","getAbortController","replaceData","prevData","data","FocusManager","onFocus","_this$cleanup","setup","_this$cleanup2","focused","focusManager","OnlineManager","onOnline","online","onlineManager","defaultRetryDelay","failureCount","canFetch","networkMode","CancelledError","isCancelledError","createRetryer","config","isRetryCancelled","isResolved","continueFn","promiseResolve","promiseReject","promise","outerResolve","outerReject","cancel","cancelOptions","reject","cancelRetry","continueRetry","shouldPause","pause","continueResolve","run","promiseOrValue","error","_config$retry","_config$retryDelay","retry","retryDelay","delay","shouldRetry","defaultLogger","createNotifyManager","queue","transactions","notifyFn","batchNotifyFn","batch","flush","schedule","batchCalls","args","originalQueue","fn","notifyManager","Removable","newCacheTime","Query","getDefaultState","newData","state","setStateOptions","_this$retryer","observer","_this$retryer2","_this$retryer3","fetchOptions","_this$options$behavio","_context$fetchOptions","_this$retryer4","abortController","queryFnContext","addSignalProperty","object","fetchFn","context","_context$fetchOptions2","onError","_this$cache$config$on","_this$cache$config","_this$cache$config$on2","_this$cache$config2","action","reducer","_action$meta","_action$dataUpdatedAt","hasData","initialDataUpdatedAt","QueryCache","client","_options$queryHash","queryHash","queryInMap","event","Mutation","executeMutation","_this$options$retry","restored","_this$mutationCache$c3","_this$mutationCache$c4","_this$options$onSucce","_this$options2","_this$options$onSettl","_this$options3","_this$mutationCache$c","_this$mutationCache$c2","_this$options$onMutat","_this$options","_this$mutationCache$c5","_this$mutationCache$c6","_this$options$onError","_this$options4","_this$options$onSettl2","_this$options5","MutationCache","pausedMutations","infiniteQueryBehavior","_context$fetchOptions3","_context$fetchOptions4","_context$state$data","_context$state$data2","refetchPage","fetchMore","pageParam","isFetchingNextPage","isFetchingPreviousPage","oldPages","oldPageParams","newPageParams","cancelled","_context$signal","_context$signal2","queryFn","buildNewPages","pages","param","page","previous","fetchPage","manual","queryFnResult","getNextPageParam","getPreviousPageParam","hasNextPage","nextPageParam","hasPreviousPage","previousPageParam","QueryClient","_this$unsubscribeFocu","_this$unsubscribeOnli","_this$queryCache$find","parsedOptions","cachedData","queryKeyOrFilters","defaultedOptions","_this$queryCache$find2","queryCache","refetchFilters","promises","_ref","_filters$refetchType","_options$cancelRefetc","firstMatchingDefaults","defaultLocale","localesData","lowercaseLocaleLookup","getDefaultLocale","setDefaultLocale","locale","getLocaleData","addLocaleData","localeData","resolveLocale","localeMatcher","resolveLocaleLookup","resolvedLocale","resolveLocaleForData","parts","_resolvedLocale","$","s","t0","n100","v0","n10","n1000000","i10","i100","f10","f100","i1000000","t","v","PluralRuleFunctions","getPluralRulesLocale","getLanguageFromLanguageTag","LANGUAGE_REG_EXP","languageTag","match","_classCallCheck","instance","Constructor","_defineProperties","target","props","descriptor","_createClass","protoProps","staticProps","PluralRules","locales","number","_typeof","obj","ownKeys","enumerableOnly","keys","symbols","sym","_objectSpread","source","_defineProperty","_slicedToArray","arr","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","minLen","_arrayLikeToArray","len","arr2","_i","_arr","_n","_d","_s","_e","err","UNITS","NUMERIC_VALUES","STYLE_VALUES","LOCALE_MATCHER_VALUES","RelativeTimeFormat","numeric","style","_parseFormatArgs","parseFormatArgs","_parseFormatArgs2","unit","_parseFormatArgs3","_parseFormatArgs4","rule","valueIndex","part","unitMessages","message","_message","pluralizedMessages","isNegative","quantifier","UNIT_ERROR","parseUnit","NUMBER_ERROR","parseNumber","isNegativeZero","Cache","cache","_len","_key","_keys","_len2","_key2","lastKey","_i2","_keys2","_createForOfIteratorHelperLoose","allowArrayLike","it","chooseLocale","isLocaleDataAvailable","_iterator","_step","intlDateTimeFormatSupported","isIntlAvailable","isStyleObject","isObject","OBJECT_CONSTRUCTOR","minute","hour","day","week","month","year","getSecondsInUnit","getStepDenominator","step","getRoundFunction","round","getDiffRatioToNextRoundedNumber","getStepMinTime","prevStep","timestamp","now","future","minTime","toUnit","fromUnit","_getMinTimeForUnit","_ref2","toUnitAmount","fromUnitAmount","getStep","steps","secondsPassed","units","getNextStep","filterStepsByUnits","_getStep","nextStep","getStepIndex","secondsPassedGranular","_ref3","formatAs","getTimeToNextUpdateForUnit","unitDenominator","preciseAmount","roundedAmount","getDiffToPreviousRoundedNumber","getDiffToNextRoundedNumber","YEAR","INFINITY","getTimeToNextUpdate","date","_getTimeToNextUpdateForUnit","timeToStepChange","getTimeToStepChange","timeToNextUpdate","getStepChangesAt","currentOrNextStep","stepChangesAt","round$1","approximate$1","approximate","approximateTime","getDate","formatters","monthAndDay","getMinTimeForUnit","yearMonthAndDay","maxFittingNow","minFittingNow","twitter","twitterMinute","mini","miniMinute","getStyleByName","roundMinute","miniNow","miniMinuteNow","twitterNow","twitterMinuteNow","twitterFirstMinute","TimeAgo","polyfill","RelativeTimeFormatPolyfill","isStyle","defaultStyle","getTimestamp","_this$getLabels","labels","labelsType","nowLabel","getNowLabel","custom","getTimeIntervalMeasurementUnits","_getStep2","formattedDate","_this","amount","valueForFormatting","formattingRules","_ref4","pastOrFuture","quantifierRules","_labelsType","defaultLocaleHasBeenSpecified","name","isMockedDate","allowedUnits","nowLabels","longLabels","variable","en","reportWebVitals","onPerfEntry","__vitePreload","getCLS","getFID","getFCP","getLCP","getTTFB","isObject_1","createBaseFor","fromRight","iteratee","keysFunc","iterable","length","_createBaseFor","baseFor","_baseFor","baseTimes","_baseTimes","freeGlobal","global","_freeGlobal","freeSelf","root","_root","Symbol","_Symbol","objectProto","hasOwnProperty","nativeObjectToString","symToStringTag","getRawTag","isOwn","tag","unmasked","_getRawTag","objectToString","_objectToString","require$$1","require$$2","nullTag","undefinedTag","baseGetTag","_baseGetTag","isObjectLike","isObjectLike_1","argsTag","baseIsArguments","_baseIsArguments","propertyIsEnumerable","isArguments","isArguments_1","isArray","isArray_1","stubFalse","stubFalse_1","freeExports","exports","freeModule","module","moduleExports","Buffer","nativeIsBuffer","isBuffer","MAX_SAFE_INTEGER","reIsUint","isIndex","_isIndex","isLength","isLength_1","arrayTag","boolTag","dateTag","errorTag","funcTag","mapTag","numberTag","objectTag","regexpTag","setTag","stringTag","weakMapTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","typedArrayTags","baseIsTypedArray","_baseIsTypedArray","baseUnary","func","_baseUnary","freeProcess","nodeUtil","types","nodeIsTypedArray","isTypedArray","isTypedArray_1","require$$3","require$$4","require$$5","arrayLikeKeys","inherited","isArr","isArg","isBuff","isType","skipIndexes","_arrayLikeKeys","isPrototype","Ctor","proto","_isPrototype","overArg","transform","arg","_overArg","nativeKeys","_nativeKeys","baseKeys","_baseKeys","asyncTag","genTag","proxyTag","isFunction","isFunction_1","isArrayLike","isArrayLike_1","keys_1","baseForOwn","_baseForOwn","listCacheClear","_listCacheClear","eq","other","eq_1","assocIndexOf","_assocIndexOf","arrayProto","splice","listCacheDelete","lastIndex","_listCacheDelete","listCacheGet","_listCacheGet","listCacheHas","_listCacheHas","listCacheSet","_listCacheSet","ListCache","entries","entry","_ListCache","stackClear","_stackClear","stackDelete","_stackDelete","stackGet","_stackGet","stackHas","_stackHas","coreJsData","_coreJsData","maskSrcKey","uid","isMasked","_isMasked","funcProto","funcToString","toSource","_toSource","reRegExpChar","reIsHostCtor","reIsNative","baseIsNative","pattern","_baseIsNative","getValue","_getValue","getNative","_getNative","Map","_Map","nativeCreate","_nativeCreate","hashClear","_hashClear","hashDelete","_hashDelete","HASH_UNDEFINED","hashGet","_hashGet","hashHas","_hashHas","hashSet","_hashSet","Hash","_Hash","mapCacheClear","_mapCacheClear","isKeyable","_isKeyable","getMapData","map","_getMapData","mapCacheDelete","_mapCacheDelete","mapCacheGet","_mapCacheGet","mapCacheHas","_mapCacheHas","mapCacheSet","size","_mapCacheSet","MapCache","_MapCache","LARGE_ARRAY_SIZE","stackSet","pairs","_stackSet","Stack","_Stack","setCacheAdd","_setCacheAdd","setCacheHas","_setCacheHas","SetCache","values","_SetCache","arraySome","_arraySome","cacheHas","_cacheHas","COMPARE_PARTIAL_FLAG","COMPARE_UNORDERED_FLAG","equalArrays","bitmask","customizer","equalFunc","stack","isPartial","arrLength","othLength","arrStacked","othStacked","seen","arrValue","othValue","compared","othIndex","_equalArrays","Uint8Array","_Uint8Array","mapToArray","_mapToArray","setToArray","set","_setToArray","symbolTag","symbolProto","symbolValueOf","equalByTag","convert","stacked","_equalByTag","arrayPush","offset","_arrayPush","baseGetAllKeys","symbolsFunc","_baseGetAllKeys","arrayFilter","resIndex","_arrayFilter","stubArray","stubArray_1","nativeGetSymbols","getSymbols","symbol","_getSymbols","getAllKeys","_getAllKeys","equalObjects","objProps","objLength","othProps","objStacked","skipCtor","objValue","objCtor","othCtor","_equalObjects","DataView","_DataView","Promise","_Promise","Set","_Set","WeakMap","_WeakMap","require$$6","promiseTag","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","getTag","ctorString","_getTag","require$$7","baseIsEqualDeep","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","_baseIsEqualDeep","baseIsEqual","_baseIsEqual","baseIsMatch","matchData","noCustomizer","srcValue","_baseIsMatch","isStrictComparable","_isStrictComparable","getMatchData","_getMatchData","matchesStrictComparable","_matchesStrictComparable","baseMatches","_baseMatches","isSymbol","isSymbol_1","reIsDeepProp","reIsPlainProp","isKey","_isKey","FUNC_ERROR_TEXT","memoize","resolver","memoized","memoize_1","MAX_MEMOIZE_SIZE","memoizeCapped","_memoizeCapped","rePropName","reEscapeChar","stringToPath","string","quote","subString","_stringToPath","arrayMap","_arrayMap","symbolToString","baseToString","_baseToString","toString","toString_1","castPath","_castPath","toKey","_toKey","baseGet","path","_baseGet","get","defaultValue","get_1","baseHasIn","_baseHasIn","hasPath","hasFunc","_hasPath","hasIn","hasIn_1","baseMatchesProperty","_baseMatchesProperty","identity","identity_1","baseProperty","_baseProperty","basePropertyDeep","_basePropertyDeep","property","property_1","baseIteratee","_baseIteratee","APP_ROUTES","axios","axiosService","response","_a","signOut","emptyProfilePlaceholder","isImageType","img","isImageFileType","baseClone","src","circulars","clones","clone","idx","errorToString","regExpToString","SYMBOL_REGEXP","printNumber","printSimpleValue","quoteStrings","typeOf","printValue","mixed","originalValue","isCast","msg","boolean","baseHas","_baseHas","has","has_1","isSchema","Condition","refs","is","then","otherwise","check","schema","branch","base","ref","toArray","_extends","strReg","ValidationError","params","errorOrErrors","field","once","cb","fired","runTests","endEarly","tests","errors","sort","count","nestedErrors","test","defineProperty","baseAssignValue","_baseAssignValue","mapValues","mapValues_1","maxSize","SPLIT_REGEX","DIGIT_REGEX","LEAD_DIGIT_REGEX","SPEC_CHAR_REGEX","CLEAN_QUOTES_REGEX","MAX_CACHE_SIZE","pathCache","setCache","getCache","propertyExpr","split","normalizePath","safe","segments","isQuoted","thisArg","forEach","iter","isBracket","shouldBeQuoted","str","hasLeadingNumber","hasSpecialChars","prefixes","create","Reference","prefix","getter","parent","_objectWithoutPropertiesLoose","excluded","sourceKeys","createValidation","validate","label","sync","rest","item","Ref","createError","overrides","nextParams","ctx","validOrError","trim","getIn","lastPart","lastPartDebug","_part","ReferenceSet","description","acc","next","newItems","removeItems","BaseSchema","_value","spec","cloneDeep","before","combined","mergedSpec","conditions","condition","resolvedSchema","formattedValue","formattedResult","rawValue","_options","from","strict","abortEarly","initialTests","finalTests","maybeCb","def","isStrict","isNullable","opts","isExclusive","deps","dep","enums","valids","resolved","invalids","strip","meta","list","method","parentPath","alias","Mixed","isAbsent","BooleanSchema","rEmail","rUrl","rUUID","isTrimmed","objStringTag","StringSchema","strValue","min","max","regex","excludeEmptyString","isNaN","NumberSchema","parsed","less","more","_method","avail","isoReg","parseIsoDate","numericKeys","minutesOffset","struct","invalidDate","isDate","DateSchema","isoParse","cast","limit","arrayReduce","accumulator","initAccum","_arrayReduce","basePropertyOf","_basePropertyOf","deburredLetters","deburrLetter","_deburrLetter","reLatin","rsComboMarksRange","reComboHalfMarksRange","rsComboSymbolsRange","rsComboRange","rsCombo","reComboMark","deburr","deburr_1","reAsciiWord","asciiWords","_asciiWords","reHasUnicodeWord","hasUnicodeWord","_hasUnicodeWord","rsAstralRange","rsDingbatRange","rsLowerRange","rsMathOpRange","rsNonCharRange","rsPunctuationRange","rsSpaceRange","rsUpperRange","rsVarRange","rsBreakRange","rsApos","rsBreak","rsDigits","rsDingbat","rsLower","rsMisc","rsFitz","rsModifier","rsNonAstral","rsRegional","rsSurrPair","rsUpper","rsZWJ","rsMiscLower","rsMiscUpper","rsOptContrLower","rsOptContrUpper","reOptMod","rsOptVar","rsOptJoin","rsOrdLower","rsOrdUpper","rsSeq","rsEmoji","reUnicodeWord","unicodeWords","_unicodeWords","words","guard","words_1","reApos","createCompounder","_createCompounder","snakeCase","word","snakeCase_1","baseSlice","start","end","_baseSlice","castSlice","_castSlice","reHasUnicode","hasUnicode","_hasUnicode","asciiToArray","_asciiToArray","rsAstral","rsSymbol","reUnicode","unicodeToArray","_unicodeToArray","stringToArray","_stringToArray","createCaseFirst","methodName","strSymbols","chr","trailing","_createCaseFirst","upperFirst","upperFirst_1","capitalize","capitalize_1","camelCase","camelCase_1","mapKeys","mapKeys_1","toposortModule","edges","toposort","uniqueNodes","nodes","cursor","sorted","visited","outgoingEdges","makeOutgoingEdges","nodesHash","makeNodesHash","edge","visit","node","predecessors","nodeRep","outgoing","child","res","sortFields","fields","excludedEdges","excludes","addNode","depPath","findIndex","ii","_err$path","sortByKeyOrder","unknown","known","defaultSort","ObjectSchema","_options$stripUnknown","intermediateValue","innerOptions","isChanged","prop","exists","fieldValue","inputValue","fieldSpec","recursive","nextFields","schemaOrRef","dft","additions","picked","to","fromGetter","newObj","noAllow","unknownKeys","allow","isUndefined","isNull","isBoolean","isBlob","isReactNative","isFile","initCfg","serialize","cfg","fd","pre","hasOwn","classNames","classes","argType","inner","twJoin","argument","resolvedValue","toValue","mix","CLASS_PART_SEPARATOR","createClassUtils","classMap","createClassMap","conflictingClassGroups","_config$conflictingCl","conflictingClassGroupModifiers","getClassGroupId","className","classParts","getGroupRecursive","getGroupIdForArbitraryProperty","getConflictingClassGroupIds","classGroupId","hasPostfixModifier","conflicts","classPartObject","currentClassPart","nextClassPartObject","classGroupFromNextClassPart","classRest","validator","arbitraryPropertyRegex","arbitraryPropertyClassName","theme","prefixedClassGroupEntries","getPrefixedClassGroupEntries","classGroup","processClassesRecursively","classDefinition","classPartObjectToEdit","getPart","isThemeGetter","currentClassPartObject","pathPart","classGroupEntries","prefixedClassGroup","_ref5","createLruCache","maxCacheSize","cacheSize","previousCache","update","IMPORTANT_MODIFIER","createSplitModifiers","separator","isSeparatorSingleCharacter","firstSeparatorCharacter","separatorLength","modifiers","bracketDepth","modifierStart","postfixModifierPosition","currentCharacter","baseClassNameWithImportantModifier","hasImportantModifier","baseClassName","maybePostfixModifierPosition","sortModifiers","sortedModifiers","unsortedModifiers","modifier","isArbitraryVariant","createConfigUtils","SPLIT_CLASSES_REGEX","mergeClassList","classList","configUtils","splitModifiers","classGroupsInConflict","originalClassName","_splitModifiers","variantModifier","modifierId","classId","group","createTailwindMerge","createConfig","cacheGet","cacheSet","functionToCall","initTailwindMerge","firstCreateConfig","restCreateConfig","previousConfig","createConfigCurrent","tailwindMerge","cachedResult","fromTheme","themeGetter","arbitraryValueRegex","fractionRegex","stringLengths","tshirtUnitRegex","lengthUnitRegex","shadowRegex","isNumber","isArbitraryLength","getIsArbitraryValue","isLengthOnly","isArbitrarySize","isNever","isArbitraryPosition","isArbitraryUrl","isUrl","isArbitraryNumber","isPercent","isInteger","isIntegerOnly","isArbitraryValue","isAny","isTshirtSize","isArbitraryShadow","isShadow","testValue","getDefaultConfig","colors","spacing","blur","brightness","borderColor","borderRadius","borderSpacing","borderWidth","contrast","grayscale","hueRotate","invert","gap","gradientColorStops","gradientColorStopPositions","inset","margin","opacity","padding","saturate","scale","sepia","skew","space","translate","getOverscroll","getOverflow","getSpacingWithAuto","getLengthWithEmpty","getNumberWithAutoAndArbitrary","getPositions","getLineStyles","getBlendModes","getAlign","getZeroAndEmpty","getBreaks","getNumber","getNumberAndArbitrary","twMerge","findChatAndConversationByConversationId","id","prev","chat","conversation","toFormData","getAuth","queryClient","isValidHttpUrl","url","getAvatarUrl","mapTestRules","cbs","yup.mixed","checkFileSize","fileSize","checkFileType","allowedTypes","compareTypes","file","allowedType","prepareMessages","items","register","updateCurrentChat","foundConversation","_b","messages","copiedConversation","conversations","_c","updateConversationMessages","orderIndex","chats","updatePaginatorInCurrentChat","checkIfRed","participant","messageIndex","isViewed","lastReadMessageIndex","checkIfMessageRead","participants","user","myParticipant","updateParticipantOfCurrentChat","updatedParticipant","cid","updateParticipant","getTypingTextIndicatorForUser","currentConversation","someOtherParticipants","names","found","isUnviewedNotification","thereIsUnviewedNotification","getStylesForReactSelectInputs","provided","styles","removeRepeatedSlashes","getMostImportantProfileNotification","notifications","curr","allowAddDebitCardOrBankAccount","account","checkIfIsLastPaginatedItem","pageKey","itemKey","lastPage","checkIfDevVersion","getSocialId","classnames","getDirection","isAdminChat","checkedInterlocutor","isMine","direction","getReferralLink","code","usernameOrId","checkIfReferralProgramIsStarted","program","checkIfReferralProgramIsExpired","isStarted","isExpired","getUserName","socialId","Action","PopStateEventType","createMemoryHistory","initialEntries","initialIndex","v5Compat","createMemoryLocation","clampIndex","getCurrentLocation","location","createLocation","warning$1","createPath","parsePath","nextLocation","delta","createBrowserHistory","createBrowserLocation","window","globalHistory","pathname","search","hash","createBrowserHref","getUrlBasedHistory","createHashHistory","createHashLocation","createHashHref","href","hashIndex","validateHashLocation","invariant","cond","createKey","getHistoryState","current","parsedPath","searchIndex","createClientSideURL","getLocation","createHref","validateLocation","handlePop","history","push","historyState","replace","ResultType","isIndexRoute","route","convertRoutesToDataRoutes","routes","allIds","treePath","matchRoutes","locationArg","basename","stripBasename","branches","flattenRoutes","rankRouteBranches","matches","matchRouteBranch","safelyDecodeURI","parentsMeta","flattenRoute","relativePath","joinPaths","routesMeta","computeScore","_route$path","exploded","explodeOptionalSegments","first","isOptional","required","restExploded","subpath","compareIndexes","paramRe","dynamicSegmentValue","indexRouteValue","emptySegmentValue","staticSegmentValue","splatPenalty","isSplat","initialScore","score","segment","matchedParams","matchedPathname","remainingPathname","matchPath","normalizePathname","generatePath","originalPath","warning","__","star","matcher","paramNames","compilePath","pathnameBase","captureGroups","memo","paramName","splatValue","safelyDecodeURIComponent","caseSensitive","regexpSource","startIndex","nextChar","resolvePath","fromPathname","toPathname","resolvePathname","normalizeSearch","normalizeHash","getInvalidPathError","char","dest","getPathContributingMatches","resolveTo","toArg","routePathnames","locationPathname","isPathRelative","isEmptyPath","routePathnameIndex","toSegments","hasExplicitTrailingSlash","hasCurrentTrailingSlash","paths","json","init","responseInit","headers","AbortedDeferredError","DeferredData","r","onAbort","subscriber","signal","aborted","unwrapTrackedPromise","isTrackedPromise","defer","redirect","ErrorResponse","status","statusText","internal","isRouteErrorResponse","validMutationMethodsArr","validMutationMethods","validRequestMethodsArr","validRequestMethods","redirectStatusCodes","redirectPreserveMethodStatusCodes","IDLE_NAVIGATION","IDLE_FETCHER","isBrowser","createRouter","dataRoutes","unlistenHistory","subscribers","savedScrollPositions","getScrollRestorationKey","getScrollPosition","initialScrollRestored","initialMatches","initialErrors","getInternalRouterError","getShortCircuitMatches","initialized","router","pendingAction","pendingPreventScrollReset","pendingNavigationController","isUninterruptedRevalidation","isRevalidationRequired","cancelledDeferredRoutes","cancelledFetcherLoads","fetchControllers","incrementingLoadId","pendingNavigationLoadId","fetchReloadIds","fetchRedirectIds","fetchLoadMatches","activeDeferreds","initialize","historyAction","startNavigation","dispose","deleteFetcher","subscribe","updateState","newState","completeNavigation","_state$navigation$for","isActionReload","newLoaderData","mergeLoaderData","getSavedScrollPosition","navigate","submission","normalizeNavigateOptions","isMutationMethod","preventScrollReset","revalidate","interruptActiveLoads","saveScrollPosition","loadingNavigation","notFoundMatches","cancelActiveDeferreds","isHashChangeOnly","request","createClientSideRequest","pendingActionData","pendingError","findNearestBoundary","actionOutput","handleAction","shortCircuited","loaderData","handleLoaders","navigation","actionMatch","getTargetMatch","callLoaderOrAction","isRedirectResult","startRedirectNavigation","isErrorResult","boundaryMatch","isDeferredResult","overrideNavigation","matchesToLoad","revalidatingFetchers","getMatchesToLoad","routeId","fetcher","revalidatingFetcher","results","loaderResults","fetcherResults","callLoadersAndMaybeResolveData","findRedirect","processLoaderData","deferredData","markFetchRedirectsDone","didAbortFetchLoads","abortStaleFetchLoads","getFetcher","fetch","abortFetcher","setFetcherError","handleFetcherAction","handleFetcherLoader","requestMatches","existingFetcher","fetchRequest","actionResult","loadingFetcher","revalidationRequest","loadId","loadFetcher","staleKey","_ref6","_ref7","doneFetcher","resolveDeferredData","_window","redirectLocation","newOrigin","redirectHistoryAction","formMethod","formAction","formEncType","formData","currentMatches","fetchersToLoad","_ref8","fetchMatches","resolveDeferredResults","_ref9","controller","markFetchersDone","doneKeys","landedId","yeetedKeys","cancelledRouteIds","dfd","enableScrollRestoration","positions","getPosition","getKey","y","userMatches","createUseMatchesMatch","isSubmissionNavigation","isFetcher","isValidMethod","stripHashFromPath","searchParams","convertFormDataToSearchParams","hasNakedIndexQuery","getLoaderMatchesUntilBoundary","boundaryId","boundaryMatches","navigationMatches","isNewLoader","shouldRevalidateLoader","_ref10","currentLoaderData","currentMatch","isNew","isMissingData","isNewRouteInstance","currentPath","currentLocation","currentUrl","currentParams","nextUrl","defaultShouldRevalidate","routeChoice","isStaticRequest","isRouteRequest","requestContext","resultType","abortPromise","onReject","handler","isResponse","activeMatches","resolvedLocation","contentType","processRouteLoaderData","statusCode","foundError","loaderHeaders","mergedLoaderData","_temp3","errorMessage","isRevalidatingLoader","unwrap","pathMatches","isPolyfill","useState","useEffect","useLayoutEffect","useDebugValue","React","useSyncExternalStore$2","getSnapshot","getServerSnapshot","inst","forceUpdate","checkIfSnapshotChanged","latestGetSnapshot","prevValue","nextValue","useSyncExternalStore$1","canUseDOM","isServerEnvironment","shim","useSyncExternalStore","DataStaticRouterContext","React.createContext","DataRouterContext","DataRouterStateContext","AwaitContext","NavigationContext","LocationContext","RouteContext","RouteErrorContext","useHref","_temp","relative","useInRouterContext","navigator","React.useContext","useResolvedPath","joinedPathname","useLocation","useNavigationType","useMatch","React.useMemo","useNavigate","routePathnamesJson","UNSAFE_getPathContributingMatches","activeRef","React.useRef","React.useEffect","React.useCallback","OutletContext","useOutletContext","useOutlet","outlet","React.createElement","useParams","routeMatch","_temp2","useRoutes","dataRouterStateContext","parentMatches","parentParams","parentPathnameBase","locationFromContext","_parsedLocationArg$pa","parsedLocationArg","renderedMatches","_renderMatches","DefaultErrorElement","useRouteError","lightgrey","preStyles","codeStyles","React.Fragment","RenderErrorBoundary","React.Component","errorInfo","RenderedRoute","routeContext","children","dataStaticRouterContext","dataRouterState","errorIndex","errorElement","getChildren","DataRouterHook","DataRouterStateHook","useDataRouterContext","hookName","useDataRouterState","useNavigation","useRevalidator","dataRouterContext","useMatches","useLoaderData","thisRoute","useRouteLoaderData","useActionData","_state$errors","useAsyncValue","useAsyncError","RouterProvider","fallbackElement","Router","Routes","MemoryRouter","historyRef","setState","React.useState","React.useLayoutEffect","Navigate","Outlet","Route","_props","basenameProp","locationProp","navigationType","staticProp","navigationContext","trailingPathname","createRoutesFromChildren","Await","AwaitErrorBoundary","ResolveAwait","AwaitRenderStatus","neverSettledPromise","renderError","React.Children","element","React.isValidElement","renderMatches","enhanceManualRouteObjects","routeClone","createMemoryRouter","ReactRouter6Adapter","useContext","UNSAFE_NavigationContext","location2","ReactPropTypesSecret","ReactPropTypesSecret_1","emptyFunction","emptyFunctionWithReset","factoryWithThrowingShims","propName","componentName","propFullName","secret","getShim","ReactPropTypes","propTypesModule","dist","Offline_1","defineProperties","_react","_propTypes","_propTypes2","_interopRequireDefault","_toConsumableArray","_possibleConstructorReturn","self","call","_inherits","subClass","superClass","inBrowser","unsupportedUserAgentsPattern","ping","isOnline","isOffline","xhr","propTypes","defaultProps","defaultPollingConfig","Base","_Component","wrapperType","_this2","_getPollingConfig","interval","_getPollingConfig2","Online","_Base","Offline","_Base2","Detector","_Base3","registerSW","immediate","onNeedRefresh","onOfflineReady","onRegistered","onRegisteredSW","onRegisterError","wb","registerPromise","sendSkipWaitingMessage","updateServiceWorker","_reloadPage","Workbox","onNeedRefreshCalled","showSkipWaitingPrompt","useRegisterSW","needRefresh","setNeedRefresh","offlineReady","setOfflineReady","SvgInformationMark","title","titleId","ForwardRef","forwardRef","SvgClose","SvgCloudDisabled","lib","deserialize_1","deserialize","replacer","deserializeElement","_options$components","components","reviver","el","_reviver","ProfileNotification","onClose","showCloseButton","toRender","isValid","deserialized","jsx","jsxs","InformationMark","CloudDisabled","Close","SvgSpinner","Loader","SpinnerIcon","Button","mode","loading","innerRef","spinnerType","buildDate","onRegisteredSw","swUrl","ReloadPrompt","close","showMessage","Fragment","_setPrototypeOf","_inheritsLoose","setPrototypeOf","changedArray","initialState","ErrorBoundary","_React$Component","_args","_this$props","_proto","info","_this$props$onError","_this$props2","prevProps","prevState","resetKeys","_this$props$onResetKe","_this$props3","_this$props4","fallbackRender","FallbackComponent","fallback","SuspenseWrp","fb","Suspense","ErrorFallback","eventId","button","ReactErrorFallback","resetErrorBoundary","lazy","factory","React.lazy","importErrorHandler","timeStr","time","App","QueryClientProvider","BrowserRouter","RecoilRoot","StripeContext","StripeContextProvider","isLoading","setIsLoading","setContext","useMemo","SentryErrorBoundary","SErrorBoundary","Render","QueryParamProvider","hotjar","browserTracingIntegration","replayIntegration","firebaseConfig","initializeApp","ReactDOM"],"sources":["../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../node_modules/react/jsx-runtime.js","../../node_modules/react-dom/client.js","../../node_modules/@tanstack/query-core/build/lib/subscribable.mjs","../../node_modules/@tanstack/query-core/build/lib/utils.mjs","../../node_modules/@tanstack/query-core/build/lib/focusManager.mjs","../../node_modules/@tanstack/query-core/build/lib/onlineManager.mjs","../../node_modules/@tanstack/query-core/build/lib/retryer.mjs","../../node_modules/@tanstack/query-core/build/lib/logger.mjs","../../node_modules/@tanstack/query-core/build/lib/notifyManager.mjs","../../node_modules/@tanstack/query-core/build/lib/removable.mjs","../../node_modules/@tanstack/query-core/build/lib/query.mjs","../../node_modules/@tanstack/query-core/build/lib/queryCache.mjs","../../node_modules/@tanstack/query-core/build/lib/mutation.mjs","../../node_modules/@tanstack/query-core/build/lib/mutationCache.mjs","../../node_modules/@tanstack/query-core/build/lib/infiniteQueryBehavior.mjs","../../node_modules/@tanstack/query-core/build/lib/queryClient.mjs","../../node_modules/relative-time-format/modules/LocaleDataStore.js","../../node_modules/relative-time-format/modules/resolveLocale.js","../../node_modules/relative-time-format/modules/PluralRuleFunctions.js","../../node_modules/relative-time-format/modules/getPluralRulesLocale.js","../../node_modules/relative-time-format/modules/PluralRules.js","../../node_modules/relative-time-format/modules/RelativeTimeFormat.js","../../node_modules/javascript-time-ago/modules/cache.js","../../node_modules/javascript-time-ago/modules/locale.js","../../node_modules/javascript-time-ago/modules/isStyleObject.js","../../node_modules/javascript-time-ago/modules/steps/units.js","../../node_modules/javascript-time-ago/modules/steps/getStepDenominator.js","../../node_modules/javascript-time-ago/modules/round.js","../../node_modules/javascript-time-ago/modules/steps/getStepMinTime.js","../../node_modules/javascript-time-ago/modules/steps/getStep.js","../../node_modules/javascript-time-ago/modules/steps/getTimeToNextUpdateForUnit.js","../../node_modules/javascript-time-ago/modules/steps/getTimeToNextUpdate.js","../../node_modules/javascript-time-ago/modules/LocaleDataStore.js","../../node_modules/javascript-time-ago/modules/steps/round.js","../../node_modules/javascript-time-ago/modules/style/round.js","../../node_modules/javascript-time-ago/modules/style/roundMinute.js","../../node_modules/javascript-time-ago/modules/steps/approximate.js","../../node_modules/javascript-time-ago/modules/style/approximate.js","../../node_modules/javascript-time-ago/modules/style/approximateTime.js","../../node_modules/javascript-time-ago/modules/steps/helpers.js","../../node_modules/javascript-time-ago/modules/style/twitter.js","../../node_modules/javascript-time-ago/modules/style/twitterNow.js","../../node_modules/javascript-time-ago/modules/style/twitterMinute.js","../../node_modules/javascript-time-ago/modules/style/twitterMinuteNow.js","../../node_modules/javascript-time-ago/modules/style/twitterFirstMinute.js","../../node_modules/javascript-time-ago/modules/style/mini.js","../../node_modules/javascript-time-ago/modules/style/miniNow.js","../../node_modules/javascript-time-ago/modules/style/miniMinute.js","../../node_modules/javascript-time-ago/modules/style/miniMinuteNow.js","../../node_modules/javascript-time-ago/modules/style/getStyleByName.js","../../node_modules/javascript-time-ago/modules/TimeAgo.js","../../node_modules/javascript-time-ago/locale/en.json.js","../../src/reportWebVitals.ts","../../node_modules/lodash/isObject.js","../../node_modules/lodash/_createBaseFor.js","../../node_modules/lodash/_baseFor.js","../../node_modules/lodash/_baseTimes.js","../../node_modules/lodash/_freeGlobal.js","../../node_modules/lodash/_root.js","../../node_modules/lodash/_Symbol.js","../../node_modules/lodash/_getRawTag.js","../../node_modules/lodash/_objectToString.js","../../node_modules/lodash/_baseGetTag.js","../../node_modules/lodash/isObjectLike.js","../../node_modules/lodash/_baseIsArguments.js","../../node_modules/lodash/isArguments.js","../../node_modules/lodash/isArray.js","../../node_modules/lodash/stubFalse.js","../../node_modules/lodash/isBuffer.js","../../node_modules/lodash/_isIndex.js","../../node_modules/lodash/isLength.js","../../node_modules/lodash/_baseIsTypedArray.js","../../node_modules/lodash/_baseUnary.js","../../node_modules/lodash/_nodeUtil.js","../../node_modules/lodash/isTypedArray.js","../../node_modules/lodash/_arrayLikeKeys.js","../../node_modules/lodash/_isPrototype.js","../../node_modules/lodash/_overArg.js","../../node_modules/lodash/_nativeKeys.js","../../node_modules/lodash/_baseKeys.js","../../node_modules/lodash/isFunction.js","../../node_modules/lodash/isArrayLike.js","../../node_modules/lodash/keys.js","../../node_modules/lodash/_baseForOwn.js","../../node_modules/lodash/_listCacheClear.js","../../node_modules/lodash/eq.js","../../node_modules/lodash/_assocIndexOf.js","../../node_modules/lodash/_listCacheDelete.js","../../node_modules/lodash/_listCacheGet.js","../../node_modules/lodash/_listCacheHas.js","../../node_modules/lodash/_listCacheSet.js","../../node_modules/lodash/_ListCache.js","../../node_modules/lodash/_stackClear.js","../../node_modules/lodash/_stackDelete.js","../../node_modules/lodash/_stackGet.js","../../node_modules/lodash/_stackHas.js","../../node_modules/lodash/_coreJsData.js","../../node_modules/lodash/_isMasked.js","../../node_modules/lodash/_toSource.js","../../node_modules/lodash/_baseIsNative.js","../../node_modules/lodash/_getValue.js","../../node_modules/lodash/_getNative.js","../../node_modules/lodash/_Map.js","../../node_modules/lodash/_nativeCreate.js","../../node_modules/lodash/_hashClear.js","../../node_modules/lodash/_hashDelete.js","../../node_modules/lodash/_hashGet.js","../../node_modules/lodash/_hashHas.js","../../node_modules/lodash/_hashSet.js","../../node_modules/lodash/_Hash.js","../../node_modules/lodash/_mapCacheClear.js","../../node_modules/lodash/_isKeyable.js","../../node_modules/lodash/_getMapData.js","../../node_modules/lodash/_mapCacheDelete.js","../../node_modules/lodash/_mapCacheGet.js","../../node_modules/lodash/_mapCacheHas.js","../../node_modules/lodash/_mapCacheSet.js","../../node_modules/lodash/_MapCache.js","../../node_modules/lodash/_stackSet.js","../../node_modules/lodash/_Stack.js","../../node_modules/lodash/_setCacheAdd.js","../../node_modules/lodash/_setCacheHas.js","../../node_modules/lodash/_SetCache.js","../../node_modules/lodash/_arraySome.js","../../node_modules/lodash/_cacheHas.js","../../node_modules/lodash/_equalArrays.js","../../node_modules/lodash/_Uint8Array.js","../../node_modules/lodash/_mapToArray.js","../../node_modules/lodash/_setToArray.js","../../node_modules/lodash/_equalByTag.js","../../node_modules/lodash/_arrayPush.js","../../node_modules/lodash/_baseGetAllKeys.js","../../node_modules/lodash/_arrayFilter.js","../../node_modules/lodash/stubArray.js","../../node_modules/lodash/_getSymbols.js","../../node_modules/lodash/_getAllKeys.js","../../node_modules/lodash/_equalObjects.js","../../node_modules/lodash/_DataView.js","../../node_modules/lodash/_Promise.js","../../node_modules/lodash/_Set.js","../../node_modules/lodash/_WeakMap.js","../../node_modules/lodash/_getTag.js","../../node_modules/lodash/_baseIsEqualDeep.js","../../node_modules/lodash/_baseIsEqual.js","../../node_modules/lodash/_baseIsMatch.js","../../node_modules/lodash/_isStrictComparable.js","../../node_modules/lodash/_getMatchData.js","../../node_modules/lodash/_matchesStrictComparable.js","../../node_modules/lodash/_baseMatches.js","../../node_modules/lodash/isSymbol.js","../../node_modules/lodash/_isKey.js","../../node_modules/lodash/memoize.js","../../node_modules/lodash/_memoizeCapped.js","../../node_modules/lodash/_stringToPath.js","../../node_modules/lodash/_arrayMap.js","../../node_modules/lodash/_baseToString.js","../../node_modules/lodash/toString.js","../../node_modules/lodash/_castPath.js","../../node_modules/lodash/_toKey.js","../../node_modules/lodash/_baseGet.js","../../node_modules/lodash/get.js","../../node_modules/lodash/_baseHasIn.js","../../node_modules/lodash/_hasPath.js","../../node_modules/lodash/hasIn.js","../../node_modules/lodash/_baseMatchesProperty.js","../../node_modules/lodash/identity.js","../../node_modules/lodash/_baseProperty.js","../../node_modules/lodash/_basePropertyDeep.js","../../node_modules/lodash/property.js","../../node_modules/lodash/_baseIteratee.js","../../src/const/router.ts","../../src/services/axios.ts","../../src/assets/img/empty-profile-placeholder.svg?default","../../src/types/guard.ts","../../node_modules/nanoclone/src/index.js","../../node_modules/yup/es/util/printValue.js","../../node_modules/yup/es/locale.js","../../node_modules/lodash/_baseHas.js","../../node_modules/lodash/has.js","../../node_modules/yup/es/util/isSchema.js","../../node_modules/yup/es/Condition.js","../../node_modules/yup/es/util/toArray.js","../../node_modules/yup/es/ValidationError.js","../../node_modules/yup/es/util/runTests.js","../../node_modules/lodash/_defineProperty.js","../../node_modules/lodash/_baseAssignValue.js","../../node_modules/lodash/mapValues.js","../../node_modules/property-expr/index.js","../../node_modules/yup/es/Reference.js","../../node_modules/yup/es/util/createValidation.js","../../node_modules/yup/es/util/reach.js","../../node_modules/yup/es/util/ReferenceSet.js","../../node_modules/yup/es/schema.js","../../node_modules/yup/es/mixed.js","../../node_modules/yup/es/util/isAbsent.js","../../node_modules/yup/es/boolean.js","../../node_modules/yup/es/string.js","../../node_modules/yup/es/number.js","../../node_modules/yup/es/util/isodate.js","../../node_modules/yup/es/date.js","../../node_modules/lodash/_arrayReduce.js","../../node_modules/lodash/_basePropertyOf.js","../../node_modules/lodash/_deburrLetter.js","../../node_modules/lodash/deburr.js","../../node_modules/lodash/_asciiWords.js","../../node_modules/lodash/_hasUnicodeWord.js","../../node_modules/lodash/_unicodeWords.js","../../node_modules/lodash/words.js","../../node_modules/lodash/_createCompounder.js","../../node_modules/lodash/snakeCase.js","../../node_modules/lodash/_baseSlice.js","../../node_modules/lodash/_castSlice.js","../../node_modules/lodash/_hasUnicode.js","../../node_modules/lodash/_asciiToArray.js","../../node_modules/lodash/_unicodeToArray.js","../../node_modules/lodash/_stringToArray.js","../../node_modules/lodash/_createCaseFirst.js","../../node_modules/lodash/upperFirst.js","../../node_modules/lodash/capitalize.js","../../node_modules/lodash/camelCase.js","../../node_modules/lodash/mapKeys.js","../../node_modules/toposort/index.js","../../node_modules/yup/es/util/sortFields.js","../../node_modules/yup/es/util/sortByKeyOrder.js","../../node_modules/yup/es/object.js","../../node_modules/object-to-formdata/src/index.js","../../node_modules/classnames/index.js","../../node_modules/tailwind-merge/dist/lib/tw-join.mjs","../../node_modules/tailwind-merge/dist/lib/class-utils.mjs","../../node_modules/tailwind-merge/dist/lib/lru-cache.mjs","../../node_modules/tailwind-merge/dist/lib/modifier-utils.mjs","../../node_modules/tailwind-merge/dist/lib/config-utils.mjs","../../node_modules/tailwind-merge/dist/lib/merge-classlist.mjs","../../node_modules/tailwind-merge/dist/lib/create-tailwind-merge.mjs","../../node_modules/tailwind-merge/dist/lib/from-theme.mjs","../../node_modules/tailwind-merge/dist/lib/validators.mjs","../../node_modules/tailwind-merge/dist/lib/default-config.mjs","../../node_modules/tailwind-merge/dist/lib/tw-merge.mjs","../../src/utils/common.ts","../../node_modules/@remix-run/router/dist/router.js","../../node_modules/react-router/dist/index.js","../../node_modules/use-query-params/adapters/react-router-6/index.js","../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../node_modules/prop-types/factoryWithThrowingShims.js","../../node_modules/prop-types/index.js","../../node_modules/react-detect-offline/dist/index.js","../../../@vite-plugin-pwa/virtual:pwa-register/react","../../src/assets/img/information-mark.svg","../../src/assets/img/close.svg","../../src/assets/img/cloud-disabled.svg","../../node_modules/react-serialize/lib/index.js","../../src/components/ProfileNotification/ProfileNotification.tsx","../../src/assets/img/spinner.svg","../../src/components/Loader/Loader.tsx","../../src/components/Button/Button.tsx","../../src/layouts/MainLayout/ReloadPrompt.tsx","../../node_modules/react-error-boundary/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../../node_modules/react-error-boundary/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../../node_modules/react-error-boundary/dist/react-error-boundary.esm.js","../../src/components/SuspenceWrp.tsx","../../src/components/ErrorFallback.tsx","../../src/utils/react-lazy-with-reload.ts","../../src/LazyComponents.tsx","../../src/context/StripeContext.tsx","../../src/MainComponents.tsx","../../src/index.tsx"],"sourcesContent":["/**\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","'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","'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","class Subscribable {\n constructor() {\n this.listeners = [];\n this.subscribe = this.subscribe.bind(this);\n }\n\n subscribe(listener) {\n this.listeners.push(listener);\n this.onSubscribe();\n return () => {\n this.listeners = this.listeners.filter(x => x !== listener);\n this.onUnsubscribe();\n };\n }\n\n hasListeners() {\n return this.listeners.length > 0;\n }\n\n onSubscribe() {// Do nothing\n }\n\n onUnsubscribe() {// Do nothing\n }\n\n}\n\nexport { Subscribable };\n//# sourceMappingURL=subscribable.mjs.map\n","// TYPES\n// UTILS\nconst isServer = typeof window === 'undefined' || 'Deno' in window;\nfunction noop() {\n return undefined;\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 difference(array1, array2) {\n return array1.filter(x => array2.indexOf(x) === -1);\n}\nfunction replaceAt(array, index, value) {\n const copy = array.slice(0);\n copy[index] = value;\n return copy;\n}\nfunction timeUntilStale(updatedAt, staleTime) {\n return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);\n}\nfunction parseQueryArgs(arg1, arg2, arg3) {\n if (!isQueryKey(arg1)) {\n return arg1;\n }\n\n if (typeof arg2 === 'function') {\n return { ...arg3,\n queryKey: arg1,\n queryFn: arg2\n };\n }\n\n return { ...arg2,\n queryKey: arg1\n };\n}\nfunction parseMutationArgs(arg1, arg2, arg3) {\n if (isQueryKey(arg1)) {\n if (typeof arg2 === 'function') {\n return { ...arg3,\n mutationKey: arg1,\n mutationFn: arg2\n };\n }\n\n return { ...arg2,\n mutationKey: arg1\n };\n }\n\n if (typeof arg1 === 'function') {\n return { ...arg2,\n mutationFn: arg1\n };\n }\n\n return { ...arg1\n };\n}\nfunction parseFilterArgs(arg1, arg2, arg3) {\n return isQueryKey(arg1) ? [{ ...arg2,\n queryKey: arg1\n }, arg3] : [arg1 || {}, arg2];\n}\nfunction parseMutationFilterArgs(arg1, arg2, arg3) {\n return isQueryKey(arg1) ? [{ ...arg2,\n mutationKey: arg1\n }, arg3] : [arg1 || {}, arg2];\n}\nfunction matchQuery(filters, query) {\n const {\n type = 'all',\n exact,\n fetchStatus,\n predicate,\n queryKey,\n stale\n } = filters;\n\n if (isQueryKey(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\n if (type !== 'all') {\n const isActive = query.isActive();\n\n if (type === 'active' && !isActive) {\n return false;\n }\n\n if (type === 'inactive' && isActive) {\n return false;\n }\n }\n\n if (typeof stale === 'boolean' && query.isStale() !== stale) {\n return false;\n }\n\n if (typeof fetchStatus !== 'undefined' && fetchStatus !== query.state.fetchStatus) {\n return false;\n }\n\n if (predicate && !predicate(query)) {\n return false;\n }\n\n return true;\n}\nfunction matchMutation(filters, mutation) {\n const {\n exact,\n fetching,\n predicate,\n mutationKey\n } = filters;\n\n if (isQueryKey(mutationKey)) {\n if (!mutation.options.mutationKey) {\n return false;\n }\n\n if (exact) {\n if (hashQueryKey(mutation.options.mutationKey) !== hashQueryKey(mutationKey)) {\n return false;\n }\n } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {\n return false;\n }\n }\n\n if (typeof fetching === 'boolean' && mutation.state.status === 'loading' !== fetching) {\n return false;\n }\n\n if (predicate && !predicate(mutation)) {\n return false;\n }\n\n return true;\n}\nfunction hashQueryKeyByOptions(queryKey, options) {\n const hashFn = (options == null ? void 0 : options.queryKeyHashFn) || hashQueryKey;\n return hashFn(queryKey);\n}\n/**\n * Default query keys hash function.\n * Hashes the value into a stable hash.\n */\n\nfunction hashQueryKey(queryKey) {\n return JSON.stringify(queryKey, (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => {\n result[key] = val[key];\n return result;\n }, {}) : val);\n}\n/**\n * Checks if key `b` partially matches with key `a`.\n */\n\nfunction partialMatchKey(a, b) {\n return partialDeepEqual(a, b);\n}\n/**\n * Checks if `b` partially matches with `a`.\n */\n\nfunction partialDeepEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (typeof a !== typeof b) {\n return false;\n }\n\n if (a && b && typeof a === 'object' && typeof b === 'object') {\n return !Object.keys(b).some(key => !partialDeepEqual(a[key], b[key]));\n }\n\n return false;\n}\n/**\n * This function returns `a` if `b` is deeply equal.\n * If not, it will replace any deeply equal children of `b` with those of `a`.\n * This can be used for structural sharing between JSON values for example.\n */\n\nfunction replaceEqualDeep(a, b) {\n if (a === b) {\n return a;\n }\n\n const array = isPlainArray(a) && isPlainArray(b);\n\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\n for (let i = 0; i < bSize; i++) {\n const key = array ? i : bItems[i];\n copy[key] = replaceEqualDeep(a[key], b[key]);\n\n if (copy[key] === a[key]) {\n equalItems++;\n }\n }\n\n return aSize === bSize && equalItems === aSize ? a : copy;\n }\n\n return b;\n}\n/**\n * Shallow compare objects. Only works with objects that always have the same properties.\n */\n\nfunction shallowEqualObjects(a, b) {\n if (a && !b || b && !a) {\n return false;\n }\n\n for (const key in a) {\n if (a[key] !== b[key]) {\n return false;\n }\n }\n\n return true;\n}\nfunction isPlainArray(value) {\n return Array.isArray(value) && value.length === Object.keys(value).length;\n} // Copied from: https://github.com/jonschlinkert/is-plain-object\n\nfunction isPlainObject(o) {\n if (!hasObjectPrototype(o)) {\n return false;\n } // If has modified constructor\n\n\n const ctor = o.constructor;\n\n if (typeof ctor === 'undefined') {\n return true;\n } // If has modified prototype\n\n\n const prot = ctor.prototype;\n\n if (!hasObjectPrototype(prot)) {\n return false;\n } // If constructor does not have an Object-specific method\n\n\n if (!prot.hasOwnProperty('isPrototypeOf')) {\n return false;\n } // Most likely a plain Object\n\n\n return true;\n}\n\nfunction hasObjectPrototype(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nfunction isQueryKey(value) {\n return Array.isArray(value);\n}\nfunction isError(value) {\n return value instanceof Error;\n}\nfunction sleep(timeout) {\n return new Promise(resolve => {\n setTimeout(resolve, timeout);\n });\n}\n/**\n * Schedules a microtask.\n * This can be useful to schedule state updates after rendering.\n */\n\nfunction scheduleMicrotask(callback) {\n sleep(0).then(callback);\n}\nfunction getAbortController() {\n if (typeof AbortController === 'function') {\n return new AbortController();\n }\n\n return;\n}\nfunction replaceData(prevData, data, options) {\n // Use prev data if an isDataEqual function is defined and returns `true`\n if (options.isDataEqual != null && options.isDataEqual(prevData, data)) {\n return prevData;\n } else if (typeof options.structuralSharing === 'function') {\n return options.structuralSharing(prevData, data);\n } else if (options.structuralSharing !== false) {\n // Structurally share data between prev and new data if needed\n return replaceEqualDeep(prevData, data);\n }\n\n return data;\n}\n\nexport { difference, functionalUpdate, getAbortController, hashQueryKey, hashQueryKeyByOptions, isError, isPlainArray, isPlainObject, isQueryKey, isServer, isValidTimeout, matchMutation, matchQuery, noop, parseFilterArgs, parseMutationArgs, parseMutationFilterArgs, parseQueryArgs, partialDeepEqual, partialMatchKey, replaceAt, replaceData, replaceEqualDeep, scheduleMicrotask, shallowEqualObjects, sleep, timeUntilStale };\n//# sourceMappingURL=utils.mjs.map\n","import { Subscribable } from './subscribable.mjs';\nimport { isServer } from './utils.mjs';\n\nclass FocusManager extends Subscribable {\n constructor() {\n super();\n\n this.setup = onFocus => {\n // addEventListener does not exist in React Native, but window does\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!isServer && window.addEventListener) {\n const listener = () => onFocus(); // Listen to visibillitychange and focus\n\n\n window.addEventListener('visibilitychange', listener, false);\n window.addEventListener('focus', listener, false);\n return () => {\n // Be sure to unsubscribe if a new handler is set\n window.removeEventListener('visibilitychange', listener);\n window.removeEventListener('focus', listener);\n };\n }\n\n return;\n };\n }\n\n onSubscribe() {\n if (!this.cleanup) {\n this.setEventListener(this.setup);\n }\n }\n\n onUnsubscribe() {\n if (!this.hasListeners()) {\n var _this$cleanup;\n\n (_this$cleanup = this.cleanup) == null ? void 0 : _this$cleanup.call(this);\n this.cleanup = undefined;\n }\n }\n\n setEventListener(setup) {\n var _this$cleanup2;\n\n this.setup = setup;\n (_this$cleanup2 = this.cleanup) == null ? void 0 : _this$cleanup2.call(this);\n this.cleanup = setup(focused => {\n if (typeof focused === 'boolean') {\n this.setFocused(focused);\n } else {\n this.onFocus();\n }\n });\n }\n\n setFocused(focused) {\n this.focused = focused;\n\n if (focused) {\n this.onFocus();\n }\n }\n\n onFocus() {\n this.listeners.forEach(listener => {\n listener();\n });\n }\n\n isFocused() {\n if (typeof this.focused === 'boolean') {\n return this.focused;\n } // document global can be unavailable in react native\n\n\n if (typeof document === 'undefined') {\n return true;\n }\n\n return [undefined, 'visible', 'prerender'].includes(document.visibilityState);\n }\n\n}\nconst focusManager = new FocusManager();\n\nexport { FocusManager, focusManager };\n//# sourceMappingURL=focusManager.mjs.map\n","import { Subscribable } from './subscribable.mjs';\nimport { isServer } from './utils.mjs';\n\nclass OnlineManager extends Subscribable {\n constructor() {\n super();\n\n this.setup = onOnline => {\n // addEventListener does not exist in React Native, but window does\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!isServer && window.addEventListener) {\n const listener = () => onOnline(); // Listen to online\n\n\n window.addEventListener('online', listener, false);\n window.addEventListener('offline', listener, false);\n return () => {\n // Be sure to unsubscribe if a new handler is set\n window.removeEventListener('online', listener);\n window.removeEventListener('offline', listener);\n };\n }\n\n return;\n };\n }\n\n onSubscribe() {\n if (!this.cleanup) {\n this.setEventListener(this.setup);\n }\n }\n\n onUnsubscribe() {\n if (!this.hasListeners()) {\n var _this$cleanup;\n\n (_this$cleanup = this.cleanup) == null ? void 0 : _this$cleanup.call(this);\n this.cleanup = undefined;\n }\n }\n\n setEventListener(setup) {\n var _this$cleanup2;\n\n this.setup = setup;\n (_this$cleanup2 = this.cleanup) == null ? void 0 : _this$cleanup2.call(this);\n this.cleanup = setup(online => {\n if (typeof online === 'boolean') {\n this.setOnline(online);\n } else {\n this.onOnline();\n }\n });\n }\n\n setOnline(online) {\n this.online = online;\n\n if (online) {\n this.onOnline();\n }\n }\n\n onOnline() {\n this.listeners.forEach(listener => {\n listener();\n });\n }\n\n isOnline() {\n if (typeof this.online === 'boolean') {\n return this.online;\n }\n\n if (typeof navigator === 'undefined' || typeof navigator.onLine === 'undefined') {\n return true;\n }\n\n return navigator.onLine;\n }\n\n}\nconst onlineManager = new OnlineManager();\n\nexport { OnlineManager, onlineManager };\n//# sourceMappingURL=onlineManager.mjs.map\n","import { focusManager } from './focusManager.mjs';\nimport { onlineManager } from './onlineManager.mjs';\nimport { sleep } from './utils.mjs';\n\nfunction defaultRetryDelay(failureCount) {\n return Math.min(1000 * 2 ** failureCount, 30000);\n}\n\nfunction canFetch(networkMode) {\n return (networkMode != null ? networkMode : 'online') === 'online' ? onlineManager.isOnline() : true;\n}\nclass CancelledError {\n constructor(options) {\n this.revert = options == null ? void 0 : options.revert;\n this.silent = options == null ? void 0 : options.silent;\n }\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\n const cancel = cancelOptions => {\n if (!isResolved) {\n reject(new CancelledError(cancelOptions));\n config.abort == null ? void 0 : config.abort();\n }\n };\n\n const cancelRetry = () => {\n isRetryCancelled = true;\n };\n\n const continueRetry = () => {\n isRetryCancelled = false;\n };\n\n const shouldPause = () => !focusManager.isFocused() || config.networkMode !== 'always' && !onlineManager.isOnline();\n\n const resolve = value => {\n if (!isResolved) {\n isResolved = true;\n config.onSuccess == null ? void 0 : config.onSuccess(value);\n continueFn == null ? void 0 : continueFn();\n promiseResolve(value);\n }\n };\n\n const reject = value => {\n if (!isResolved) {\n isResolved = true;\n config.onError == null ? void 0 : config.onError(value);\n continueFn == null ? void 0 : continueFn();\n promiseReject(value);\n }\n };\n\n const pause = () => {\n return new Promise(continueResolve => {\n continueFn = value => {\n if (isResolved || !shouldPause()) {\n return continueResolve(value);\n }\n };\n\n config.onPause == null ? void 0 : config.onPause();\n }).then(() => {\n continueFn = undefined;\n\n if (!isResolved) {\n config.onContinue == null ? void 0 : config.onContinue();\n }\n });\n }; // Create loop function\n\n\n const run = () => {\n // Do nothing if already resolved\n if (isResolved) {\n return;\n }\n\n let promiseOrValue; // Execute query\n\n try {\n promiseOrValue = config.fn();\n } catch (error) {\n promiseOrValue = Promise.reject(error);\n }\n\n Promise.resolve(promiseOrValue).then(resolve).catch(error => {\n var _config$retry, _config$retryDelay;\n\n // Stop if the fetch is already resolved\n if (isResolved) {\n return;\n } // Do we need to retry the request?\n\n\n const retry = (_config$retry = config.retry) != null ? _config$retry : 3;\n const retryDelay = (_config$retryDelay = config.retryDelay) != null ? _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\n if (isRetryCancelled || !shouldRetry) {\n // We are done if the query does not need to be retried\n reject(error);\n return;\n }\n\n failureCount++; // Notify on fail\n\n config.onFail == null ? void 0 : config.onFail(failureCount, error); // Delay\n\n sleep(delay) // Pause if the document is not visible or when the device is offline\n .then(() => {\n if (shouldPause()) {\n return pause();\n }\n\n return;\n }).then(() => {\n if (isRetryCancelled) {\n reject(error);\n } else {\n run();\n }\n });\n });\n }; // Start loop\n\n\n if (canFetch(config.networkMode)) {\n run();\n } else {\n pause().then(run);\n }\n\n return {\n promise,\n cancel,\n continue: () => {\n continueFn == null ? void 0 : continueFn();\n },\n cancelRetry,\n continueRetry\n };\n}\n\nexport { CancelledError, canFetch, createRetryer, isCancelledError };\n//# sourceMappingURL=retryer.mjs.map\n","const defaultLogger = console;\n\nexport { defaultLogger };\n//# sourceMappingURL=logger.mjs.map\n","import { scheduleMicrotask } from './utils.mjs';\n\nfunction createNotifyManager() {\n let queue = [];\n let transactions = 0;\n\n let notifyFn = callback => {\n callback();\n };\n\n let batchNotifyFn = callback => {\n callback();\n };\n\n const batch = callback => {\n let result;\n transactions++;\n\n try {\n result = callback();\n } finally {\n transactions--;\n\n if (!transactions) {\n flush();\n }\n }\n\n return result;\n };\n\n const schedule = callback => {\n if (transactions) {\n queue.push(callback);\n } else {\n scheduleMicrotask(() => {\n notifyFn(callback);\n });\n }\n };\n /**\n * All calls to the wrapped function will be batched.\n */\n\n\n const batchCalls = callback => {\n return (...args) => {\n schedule(() => {\n callback(...args);\n });\n };\n };\n\n const flush = () => {\n const originalQueue = queue;\n queue = [];\n\n if (originalQueue.length) {\n scheduleMicrotask(() => {\n batchNotifyFn(() => {\n originalQueue.forEach(callback => {\n notifyFn(callback);\n });\n });\n });\n }\n };\n /**\n * Use this method to set a custom notify function.\n * This can be used to for example wrap notifications with `React.act` while running tests.\n */\n\n\n const setNotifyFunction = fn => {\n notifyFn = fn;\n };\n /**\n * Use this method to set a custom function to batch notifications together into a single tick.\n * By default React Query will use the batch function provided by ReactDOM or React Native.\n */\n\n\n const setBatchNotifyFunction = fn => {\n batchNotifyFn = fn;\n };\n\n return {\n batch,\n batchCalls,\n schedule,\n setNotifyFunction,\n setBatchNotifyFunction\n };\n} // SINGLETON\n\nconst notifyManager = createNotifyManager();\n\nexport { createNotifyManager, notifyManager };\n//# sourceMappingURL=notifyManager.mjs.map\n","import { isValidTimeout, isServer } from './utils.mjs';\n\nclass Removable {\n destroy() {\n this.clearGcTimeout();\n }\n\n scheduleGc() {\n this.clearGcTimeout();\n\n if (isValidTimeout(this.cacheTime)) {\n this.gcTimeout = setTimeout(() => {\n this.optionalRemove();\n }, this.cacheTime);\n }\n }\n\n updateCacheTime(newCacheTime) {\n // Default to 5 minutes (Infinity for server-side) if no cache time is set\n this.cacheTime = Math.max(this.cacheTime || 0, newCacheTime != null ? newCacheTime : isServer ? Infinity : 5 * 60 * 1000);\n }\n\n clearGcTimeout() {\n if (this.gcTimeout) {\n clearTimeout(this.gcTimeout);\n this.gcTimeout = undefined;\n }\n }\n\n}\n\nexport { Removable };\n//# sourceMappingURL=removable.mjs.map\n","import { replaceData, noop, timeUntilStale, getAbortController } from './utils.mjs';\nimport { defaultLogger } from './logger.mjs';\nimport { notifyManager } from './notifyManager.mjs';\nimport { createRetryer, isCancelledError, canFetch } from './retryer.mjs';\nimport { Removable } from './removable.mjs';\n\n// CLASS\nclass Query extends Removable {\n constructor(config) {\n super();\n this.abortSignalConsumed = false;\n this.defaultOptions = config.defaultOptions;\n this.setOptions(config.options);\n this.observers = [];\n this.cache = config.cache;\n this.logger = config.logger || defaultLogger;\n this.queryKey = config.queryKey;\n this.queryHash = config.queryHash;\n this.initialState = config.state || getDefaultState(this.options);\n this.state = this.initialState;\n }\n\n get meta() {\n return this.options.meta;\n }\n\n setOptions(options) {\n this.options = { ...this.defaultOptions,\n ...options\n };\n this.updateCacheTime(this.options.cacheTime);\n }\n\n optionalRemove() {\n if (!this.observers.length && this.state.fetchStatus === 'idle') {\n this.cache.remove(this);\n }\n }\n\n setData(newData, options) {\n const data = replaceData(this.state.data, newData, this.options); // Set data and mark it as cached\n\n this.dispatch({\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\n setState(state, setStateOptions) {\n this.dispatch({\n type: 'setState',\n state,\n setStateOptions\n });\n }\n\n cancel(options) {\n var _this$retryer;\n\n const promise = this.promise;\n (_this$retryer = this.retryer) == null ? void 0 : _this$retryer.cancel(options);\n return promise ? promise.then(noop).catch(noop) : Promise.resolve();\n }\n\n destroy() {\n super.destroy();\n this.cancel({\n silent: true\n });\n }\n\n reset() {\n this.destroy();\n this.setState(this.initialState);\n }\n\n isActive() {\n return this.observers.some(observer => observer.options.enabled !== false);\n }\n\n isDisabled() {\n return this.getObserversCount() > 0 && !this.isActive();\n }\n\n isStale() {\n return this.state.isInvalidated || !this.state.dataUpdatedAt || this.observers.some(observer => observer.getCurrentResult().isStale);\n }\n\n isStaleByTime(staleTime = 0) {\n return this.state.isInvalidated || !this.state.dataUpdatedAt || !timeUntilStale(this.state.dataUpdatedAt, staleTime);\n }\n\n onFocus() {\n var _this$retryer2;\n\n const observer = this.observers.find(x => x.shouldFetchOnWindowFocus());\n\n if (observer) {\n observer.refetch({\n cancelRefetch: false\n });\n } // Continue fetch if currently paused\n\n\n (_this$retryer2 = this.retryer) == null ? void 0 : _this$retryer2.continue();\n }\n\n onOnline() {\n var _this$retryer3;\n\n const observer = this.observers.find(x => x.shouldFetchOnReconnect());\n\n if (observer) {\n observer.refetch({\n cancelRefetch: false\n });\n } // Continue fetch if currently paused\n\n\n (_this$retryer3 = this.retryer) == null ? void 0 : _this$retryer3.continue();\n }\n\n addObserver(observer) {\n if (this.observers.indexOf(observer) === -1) {\n this.observers.push(observer); // Stop the query from being garbage collected\n\n this.clearGcTimeout();\n this.cache.notify({\n type: 'observerAdded',\n query: this,\n observer\n });\n }\n }\n\n removeObserver(observer) {\n if (this.observers.indexOf(observer) !== -1) {\n this.observers = this.observers.filter(x => x !== observer);\n\n if (!this.observers.length) {\n // If the transport layer does not support cancellation\n // we'll let the query continue so the result can be cached\n if (this.retryer) {\n if (this.abortSignalConsumed) {\n this.retryer.cancel({\n revert: true\n });\n } else {\n this.retryer.cancelRetry();\n }\n }\n\n this.scheduleGc();\n }\n\n this.cache.notify({\n type: 'observerRemoved',\n query: this,\n observer\n });\n }\n }\n\n getObserversCount() {\n return this.observers.length;\n }\n\n invalidate() {\n if (!this.state.isInvalidated) {\n this.dispatch({\n type: 'invalidate'\n });\n }\n }\n\n fetch(options, fetchOptions) {\n var _this$options$behavio, _context$fetchOptions;\n\n if (this.state.fetchStatus !== 'idle') {\n if (this.state.dataUpdatedAt && fetchOptions != null && fetchOptions.cancelRefetch) {\n // Silently cancel current fetch if the user wants to cancel refetches\n this.cancel({\n silent: true\n });\n } else if (this.promise) {\n var _this$retryer4;\n\n // make sure that retries that were potentially cancelled due to unmounts can continue\n (_this$retryer4 = this.retryer) == null ? void 0 : _this$retryer4.continueRetry(); // Return current promise if we are already fetching\n\n return this.promise;\n }\n } // Update config if passed, otherwise the config from the last execution is used\n\n\n if (options) {\n this.setOptions(options);\n } // Use the options from the first observer with a query function if no function is found.\n // This can happen when the query is hydrated or created with setQueryData.\n\n\n if (!this.options.queryFn) {\n const observer = this.observers.find(x => x.options.queryFn);\n\n if (observer) {\n this.setOptions(observer.options);\n }\n }\n\n if (!Array.isArray(this.options.queryKey)) {\n if (process.env.NODE_ENV !== 'production') {\n this.logger.error(\"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 = getAbortController(); // Create query function context\n\n const queryFnContext = {\n queryKey: this.queryKey,\n pageParam: undefined,\n meta: this.meta\n }; // Adds an enumerable signal property to the object that\n // which sets abortSignalConsumed to true when the signal\n // is read.\n\n const addSignalProperty = object => {\n Object.defineProperty(object, 'signal', {\n enumerable: true,\n get: () => {\n if (abortController) {\n this.abortSignalConsumed = true;\n return abortController.signal;\n }\n\n return undefined;\n }\n });\n };\n\n addSignalProperty(queryFnContext); // Create fetch function\n\n const fetchFn = () => {\n if (!this.options.queryFn) {\n return Promise.reject('Missing queryFn');\n }\n\n this.abortSignalConsumed = false;\n return this.options.queryFn(queryFnContext);\n }; // Trigger behavior hook\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 (_this$options$behavio = this.options.behavior) == null ? void 0 : _this$options$behavio.onFetch(context); // Store state in case the current fetch needs to be reverted\n\n this.revertState = this.state; // Set to fetching state if not already in it\n\n if (this.state.fetchStatus === 'idle' || this.state.fetchMeta !== ((_context$fetchOptions = context.fetchOptions) == null ? void 0 : _context$fetchOptions.meta)) {\n var _context$fetchOptions2;\n\n this.dispatch({\n type: 'fetch',\n meta: (_context$fetchOptions2 = context.fetchOptions) == null ? void 0 : _context$fetchOptions2.meta\n });\n }\n\n const onError = error => {\n // Optimistically update state if needed\n if (!(isCancelledError(error) && error.silent)) {\n this.dispatch({\n type: 'error',\n error: error\n });\n }\n\n if (!isCancelledError(error)) {\n var _this$cache$config$on, _this$cache$config;\n\n // Notify cache callback\n (_this$cache$config$on = (_this$cache$config = this.cache.config).onError) == null ? void 0 : _this$cache$config$on.call(_this$cache$config, error, this);\n\n if (process.env.NODE_ENV !== 'production') {\n this.logger.error(error);\n }\n }\n\n if (!this.isFetchingOptimistic) {\n // Schedule query gc after fetching\n this.scheduleGc();\n }\n\n this.isFetchingOptimistic = false;\n }; // Try to fetch the data\n\n\n this.retryer = createRetryer({\n fn: context.fetchFn,\n abort: abortController == null ? void 0 : abortController.abort.bind(abortController),\n onSuccess: data => {\n var _this$cache$config$on2, _this$cache$config2;\n\n if (typeof data === 'undefined') {\n if (process.env.NODE_ENV !== 'production') {\n this.logger.error(\"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('undefined'));\n return;\n }\n\n this.setData(data); // Notify cache callback\n\n (_this$cache$config$on2 = (_this$cache$config2 = this.cache.config).onSuccess) == null ? void 0 : _this$cache$config$on2.call(_this$cache$config2, data, this);\n\n if (!this.isFetchingOptimistic) {\n // Schedule query gc after fetching\n this.scheduleGc();\n }\n\n this.isFetchingOptimistic = false;\n },\n onError,\n onFail: (failureCount, error) => {\n this.dispatch({\n type: 'failed',\n failureCount,\n error\n });\n },\n onPause: () => {\n this.dispatch({\n type: 'pause'\n });\n },\n onContinue: () => {\n this.dispatch({\n type: 'continue'\n });\n },\n retry: context.options.retry,\n retryDelay: context.options.retryDelay,\n networkMode: context.options.networkMode\n });\n this.promise = this.retryer.promise;\n return this.promise;\n }\n\n dispatch(action) {\n const reducer = state => {\n var _action$meta, _action$dataUpdatedAt;\n\n switch (action.type) {\n case 'failed':\n return { ...state,\n fetchFailureCount: action.failureCount,\n fetchFailureReason: action.error\n };\n\n case 'pause':\n return { ...state,\n fetchStatus: 'paused'\n };\n\n case 'continue':\n return { ...state,\n fetchStatus: 'fetching'\n };\n\n case 'fetch':\n return { ...state,\n fetchFailureCount: 0,\n fetchFailureReason: null,\n fetchMeta: (_action$meta = action.meta) != null ? _action$meta : null,\n fetchStatus: canFetch(this.options.networkMode) ? 'fetching' : 'paused',\n ...(!state.dataUpdatedAt && {\n error: null,\n status: 'loading'\n })\n };\n\n case 'success':\n return { ...state,\n data: action.data,\n dataUpdateCount: state.dataUpdateCount + 1,\n dataUpdatedAt: (_action$dataUpdatedAt = action.dataUpdatedAt) != null ? _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\n case 'error':\n const error = action.error;\n\n if (isCancelledError(error) && error.revert && this.revertState) {\n return { ...this.revertState\n };\n }\n\n return { ...state,\n error: 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\n case 'invalidate':\n return { ...state,\n isInvalidated: true\n };\n\n case 'setState':\n return { ...state,\n ...action.state\n };\n }\n };\n\n this.state = reducer(this.state);\n notifyManager.batch(() => {\n this.observers.forEach(observer => {\n observer.onQueryUpdate(action);\n });\n this.cache.notify({\n query: this,\n type: 'updated',\n action\n });\n });\n }\n\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 != null ? 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' : 'loading',\n fetchStatus: 'idle'\n };\n}\n\nexport { Query };\n//# sourceMappingURL=query.mjs.map\n","import { hashQueryKeyByOptions, parseFilterArgs, matchQuery } from './utils.mjs';\nimport { Query } from './query.mjs';\nimport { notifyManager } from './notifyManager.mjs';\nimport { Subscribable } from './subscribable.mjs';\n\n// CLASS\nclass QueryCache extends Subscribable {\n constructor(config) {\n super();\n this.config = config || {};\n this.queries = [];\n this.queriesMap = {};\n }\n\n build(client, options, state) {\n var _options$queryHash;\n\n const queryKey = options.queryKey;\n const queryHash = (_options$queryHash = options.queryHash) != null ? _options$queryHash : hashQueryKeyByOptions(queryKey, options);\n let query = this.get(queryHash);\n\n if (!query) {\n query = new Query({\n cache: this,\n logger: client.getLogger(),\n queryKey,\n queryHash,\n options: client.defaultQueryOptions(options),\n state,\n defaultOptions: client.getQueryDefaults(queryKey)\n });\n this.add(query);\n }\n\n return query;\n }\n\n add(query) {\n if (!this.queriesMap[query.queryHash]) {\n this.queriesMap[query.queryHash] = query;\n this.queries.push(query);\n this.notify({\n type: 'added',\n query\n });\n }\n }\n\n remove(query) {\n const queryInMap = this.queriesMap[query.queryHash];\n\n if (queryInMap) {\n query.destroy();\n this.queries = this.queries.filter(x => x !== query);\n\n if (queryInMap === query) {\n delete this.queriesMap[query.queryHash];\n }\n\n this.notify({\n type: 'removed',\n query\n });\n }\n }\n\n clear() {\n notifyManager.batch(() => {\n this.queries.forEach(query => {\n this.remove(query);\n });\n });\n }\n\n get(queryHash) {\n return this.queriesMap[queryHash];\n }\n\n getAll() {\n return this.queries;\n }\n\n find(arg1, arg2) {\n const [filters] = parseFilterArgs(arg1, arg2);\n\n if (typeof filters.exact === 'undefined') {\n filters.exact = true;\n }\n\n return this.queries.find(query => matchQuery(filters, query));\n }\n\n findAll(arg1, arg2) {\n const [filters] = parseFilterArgs(arg1, arg2);\n return Object.keys(filters).length > 0 ? this.queries.filter(query => matchQuery(filters, query)) : this.queries;\n }\n\n notify(event) {\n notifyManager.batch(() => {\n this.listeners.forEach(listener => {\n listener(event);\n });\n });\n }\n\n onFocus() {\n notifyManager.batch(() => {\n this.queries.forEach(query => {\n query.onFocus();\n });\n });\n }\n\n onOnline() {\n notifyManager.batch(() => {\n this.queries.forEach(query => {\n query.onOnline();\n });\n });\n }\n\n}\n\nexport { QueryCache };\n//# sourceMappingURL=queryCache.mjs.map\n","import { defaultLogger } from './logger.mjs';\nimport { notifyManager } from './notifyManager.mjs';\nimport { Removable } from './removable.mjs';\nimport { createRetryer, canFetch } from './retryer.mjs';\n\n// CLASS\nclass Mutation extends Removable {\n constructor(config) {\n super();\n this.options = { ...config.defaultOptions,\n ...config.options\n };\n this.mutationId = config.mutationId;\n this.mutationCache = config.mutationCache;\n this.logger = config.logger || defaultLogger;\n this.observers = [];\n this.state = config.state || getDefaultState();\n this.updateCacheTime(this.options.cacheTime);\n this.scheduleGc();\n }\n\n get meta() {\n return this.options.meta;\n }\n\n setState(state) {\n this.dispatch({\n type: 'setState',\n state\n });\n }\n\n addObserver(observer) {\n if (this.observers.indexOf(observer) === -1) {\n this.observers.push(observer); // Stop the mutation from being garbage collected\n\n this.clearGcTimeout();\n this.mutationCache.notify({\n type: 'observerAdded',\n mutation: this,\n observer\n });\n }\n }\n\n removeObserver(observer) {\n this.observers = this.observers.filter(x => x !== observer);\n this.scheduleGc();\n this.mutationCache.notify({\n type: 'observerRemoved',\n mutation: this,\n observer\n });\n }\n\n optionalRemove() {\n if (!this.observers.length) {\n if (this.state.status === 'loading') {\n this.scheduleGc();\n } else {\n this.mutationCache.remove(this);\n }\n }\n }\n\n continue() {\n if (this.retryer) {\n this.retryer.continue();\n return this.retryer.promise;\n }\n\n return this.execute();\n }\n\n async execute() {\n const executeMutation = () => {\n var _this$options$retry;\n\n this.retryer = createRetryer({\n fn: () => {\n if (!this.options.mutationFn) {\n return Promise.reject('No mutationFn found');\n }\n\n return this.options.mutationFn(this.state.variables);\n },\n onFail: (failureCount, error) => {\n this.dispatch({\n type: 'failed',\n failureCount,\n error\n });\n },\n onPause: () => {\n this.dispatch({\n type: 'pause'\n });\n },\n onContinue: () => {\n this.dispatch({\n type: 'continue'\n });\n },\n retry: (_this$options$retry = this.options.retry) != null ? _this$options$retry : 0,\n retryDelay: this.options.retryDelay,\n networkMode: this.options.networkMode\n });\n return this.retryer.promise;\n };\n\n const restored = this.state.status === 'loading';\n\n try {\n var _this$mutationCache$c3, _this$mutationCache$c4, _this$options$onSucce, _this$options2, _this$options$onSettl, _this$options3;\n\n if (!restored) {\n var _this$mutationCache$c, _this$mutationCache$c2, _this$options$onMutat, _this$options;\n\n this.dispatch({\n type: 'loading',\n variables: this.options.variables\n }); // Notify cache callback\n\n await ((_this$mutationCache$c = (_this$mutationCache$c2 = this.mutationCache.config).onMutate) == null ? void 0 : _this$mutationCache$c.call(_this$mutationCache$c2, this.state.variables, this));\n const context = await ((_this$options$onMutat = (_this$options = this.options).onMutate) == null ? void 0 : _this$options$onMutat.call(_this$options, this.state.variables));\n\n if (context !== this.state.context) {\n this.dispatch({\n type: 'loading',\n context,\n variables: this.state.variables\n });\n }\n }\n\n const data = await executeMutation(); // Notify cache callback\n\n await ((_this$mutationCache$c3 = (_this$mutationCache$c4 = this.mutationCache.config).onSuccess) == null ? void 0 : _this$mutationCache$c3.call(_this$mutationCache$c4, data, this.state.variables, this.state.context, this));\n await ((_this$options$onSucce = (_this$options2 = this.options).onSuccess) == null ? void 0 : _this$options$onSucce.call(_this$options2, data, this.state.variables, this.state.context));\n await ((_this$options$onSettl = (_this$options3 = this.options).onSettled) == null ? void 0 : _this$options$onSettl.call(_this$options3, data, null, this.state.variables, this.state.context));\n this.dispatch({\n type: 'success',\n data\n });\n return data;\n } catch (error) {\n try {\n var _this$mutationCache$c5, _this$mutationCache$c6, _this$options$onError, _this$options4, _this$options$onSettl2, _this$options5;\n\n // Notify cache callback\n await ((_this$mutationCache$c5 = (_this$mutationCache$c6 = this.mutationCache.config).onError) == null ? void 0 : _this$mutationCache$c5.call(_this$mutationCache$c6, error, this.state.variables, this.state.context, this));\n\n if (process.env.NODE_ENV !== 'production') {\n this.logger.error(error);\n }\n\n await ((_this$options$onError = (_this$options4 = this.options).onError) == null ? void 0 : _this$options$onError.call(_this$options4, error, this.state.variables, this.state.context));\n await ((_this$options$onSettl2 = (_this$options5 = this.options).onSettled) == null ? void 0 : _this$options$onSettl2.call(_this$options5, undefined, error, this.state.variables, this.state.context));\n throw error;\n } finally {\n this.dispatch({\n type: 'error',\n error: error\n });\n }\n }\n }\n\n dispatch(action) {\n const reducer = state => {\n switch (action.type) {\n case 'failed':\n return { ...state,\n failureCount: action.failureCount,\n failureReason: action.error\n };\n\n case 'pause':\n return { ...state,\n isPaused: true\n };\n\n case 'continue':\n return { ...state,\n isPaused: false\n };\n\n case 'loading':\n return { ...state,\n context: action.context,\n data: undefined,\n failureCount: 0,\n failureReason: null,\n error: null,\n isPaused: !canFetch(this.options.networkMode),\n status: 'loading',\n variables: action.variables\n };\n\n case 'success':\n return { ...state,\n data: action.data,\n failureCount: 0,\n failureReason: null,\n error: null,\n status: 'success',\n isPaused: false\n };\n\n case 'error':\n return { ...state,\n data: undefined,\n error: action.error,\n failureCount: state.failureCount + 1,\n failureReason: action.error,\n isPaused: false,\n status: 'error'\n };\n\n case 'setState':\n return { ...state,\n ...action.state\n };\n }\n };\n\n this.state = reducer(this.state);\n notifyManager.batch(() => {\n this.observers.forEach(observer => {\n observer.onMutationUpdate(action);\n });\n this.mutationCache.notify({\n mutation: this,\n type: 'updated',\n action\n });\n });\n }\n\n}\nfunction getDefaultState() {\n return {\n context: undefined,\n data: undefined,\n error: null,\n failureCount: 0,\n failureReason: null,\n isPaused: false,\n status: 'idle',\n variables: undefined\n };\n}\n\nexport { Mutation, getDefaultState };\n//# sourceMappingURL=mutation.mjs.map\n","import { notifyManager } from './notifyManager.mjs';\nimport { Mutation } from './mutation.mjs';\nimport { matchMutation, noop } from './utils.mjs';\nimport { Subscribable } from './subscribable.mjs';\n\n// CLASS\nclass MutationCache extends Subscribable {\n constructor(config) {\n super();\n this.config = config || {};\n this.mutations = [];\n this.mutationId = 0;\n }\n\n build(client, options, state) {\n const mutation = new Mutation({\n mutationCache: this,\n logger: client.getLogger(),\n mutationId: ++this.mutationId,\n options: client.defaultMutationOptions(options),\n state,\n defaultOptions: options.mutationKey ? client.getMutationDefaults(options.mutationKey) : undefined\n });\n this.add(mutation);\n return mutation;\n }\n\n add(mutation) {\n this.mutations.push(mutation);\n this.notify({\n type: 'added',\n mutation\n });\n }\n\n remove(mutation) {\n this.mutations = this.mutations.filter(x => x !== mutation);\n this.notify({\n type: 'removed',\n mutation\n });\n }\n\n clear() {\n notifyManager.batch(() => {\n this.mutations.forEach(mutation => {\n this.remove(mutation);\n });\n });\n }\n\n getAll() {\n return this.mutations;\n }\n\n find(filters) {\n if (typeof filters.exact === 'undefined') {\n filters.exact = true;\n }\n\n return this.mutations.find(mutation => matchMutation(filters, mutation));\n }\n\n findAll(filters) {\n return this.mutations.filter(mutation => matchMutation(filters, mutation));\n }\n\n notify(event) {\n notifyManager.batch(() => {\n this.listeners.forEach(listener => {\n listener(event);\n });\n });\n }\n\n resumePausedMutations() {\n const pausedMutations = this.mutations.filter(x => x.state.isPaused);\n return notifyManager.batch(() => pausedMutations.reduce((promise, mutation) => promise.then(() => mutation.continue().catch(noop)), Promise.resolve()));\n }\n\n}\n\nexport { MutationCache };\n//# sourceMappingURL=mutationCache.mjs.map\n","function infiniteQueryBehavior() {\n return {\n onFetch: context => {\n context.fetchFn = () => {\n var _context$fetchOptions, _context$fetchOptions2, _context$fetchOptions3, _context$fetchOptions4, _context$state$data, _context$state$data2;\n\n const refetchPage = (_context$fetchOptions = context.fetchOptions) == null ? void 0 : (_context$fetchOptions2 = _context$fetchOptions.meta) == null ? void 0 : _context$fetchOptions2.refetchPage;\n const fetchMore = (_context$fetchOptions3 = context.fetchOptions) == null ? void 0 : (_context$fetchOptions4 = _context$fetchOptions3.meta) == null ? void 0 : _context$fetchOptions4.fetchMore;\n const pageParam = fetchMore == null ? void 0 : fetchMore.pageParam;\n const isFetchingNextPage = (fetchMore == null ? void 0 : fetchMore.direction) === 'forward';\n const isFetchingPreviousPage = (fetchMore == null ? void 0 : fetchMore.direction) === 'backward';\n const oldPages = ((_context$state$data = context.state.data) == null ? void 0 : _context$state$data.pages) || [];\n const oldPageParams = ((_context$state$data2 = context.state.data) == null ? void 0 : _context$state$data2.pageParams) || [];\n let newPageParams = oldPageParams;\n let cancelled = false;\n\n const addSignalProperty = object => {\n Object.defineProperty(object, 'signal', {\n enumerable: true,\n get: () => {\n var _context$signal;\n\n if ((_context$signal = context.signal) != null && _context$signal.aborted) {\n cancelled = true;\n } else {\n var _context$signal2;\n\n (_context$signal2 = context.signal) == null ? void 0 : _context$signal2.addEventListener('abort', () => {\n cancelled = true;\n });\n }\n\n return context.signal;\n }\n });\n }; // Get query function\n\n\n const queryFn = context.options.queryFn || (() => Promise.reject('Missing queryFn'));\n\n const buildNewPages = (pages, param, page, previous) => {\n newPageParams = previous ? [param, ...newPageParams] : [...newPageParams, param];\n return previous ? [page, ...pages] : [...pages, page];\n }; // Create function to fetch a page\n\n\n const fetchPage = (pages, manual, param, previous) => {\n if (cancelled) {\n return Promise.reject('Cancelled');\n }\n\n if (typeof param === 'undefined' && !manual && pages.length) {\n return Promise.resolve(pages);\n }\n\n const queryFnContext = {\n queryKey: context.queryKey,\n pageParam: param,\n meta: context.options.meta\n };\n addSignalProperty(queryFnContext);\n const queryFnResult = queryFn(queryFnContext);\n const promise = Promise.resolve(queryFnResult).then(page => buildNewPages(pages, param, page, previous));\n return promise;\n };\n\n let promise; // Fetch first page?\n\n if (!oldPages.length) {\n promise = fetchPage([]);\n } // Fetch next page?\n else if (isFetchingNextPage) {\n const manual = typeof pageParam !== 'undefined';\n const param = manual ? pageParam : getNextPageParam(context.options, oldPages);\n promise = fetchPage(oldPages, manual, param);\n } // Fetch previous page?\n else if (isFetchingPreviousPage) {\n const manual = typeof pageParam !== 'undefined';\n const param = manual ? pageParam : getPreviousPageParam(context.options, oldPages);\n promise = fetchPage(oldPages, manual, param, true);\n } // Refetch pages\n else {\n newPageParams = [];\n const manual = typeof context.options.getNextPageParam === 'undefined';\n const shouldFetchFirstPage = refetchPage && oldPages[0] ? refetchPage(oldPages[0], 0, oldPages) : true; // Fetch first page\n\n promise = shouldFetchFirstPage ? fetchPage([], manual, oldPageParams[0]) : Promise.resolve(buildNewPages([], oldPageParams[0], oldPages[0])); // Fetch remaining pages\n\n for (let i = 1; i < oldPages.length; i++) {\n promise = promise.then(pages => {\n const shouldFetchNextPage = refetchPage && oldPages[i] ? refetchPage(oldPages[i], i, oldPages) : true;\n\n if (shouldFetchNextPage) {\n const param = manual ? oldPageParams[i] : getNextPageParam(context.options, pages);\n return fetchPage(pages, manual, param);\n }\n\n return Promise.resolve(buildNewPages(pages, oldPageParams[i], oldPages[i]));\n });\n }\n }\n\n const finalPromise = promise.then(pages => ({\n pages,\n pageParams: newPageParams\n }));\n return finalPromise;\n };\n }\n };\n}\nfunction getNextPageParam(options, pages) {\n return options.getNextPageParam == null ? void 0 : options.getNextPageParam(pages[pages.length - 1], pages);\n}\nfunction getPreviousPageParam(options, pages) {\n return options.getPreviousPageParam == null ? void 0 : options.getPreviousPageParam(pages[0], pages);\n}\n/**\n * Checks if there is a next page.\n * Returns `undefined` if it cannot be determined.\n */\n\nfunction hasNextPage(options, pages) {\n if (options.getNextPageParam && Array.isArray(pages)) {\n const nextPageParam = getNextPageParam(options, pages);\n return typeof nextPageParam !== 'undefined' && nextPageParam !== null && nextPageParam !== false;\n }\n\n return;\n}\n/**\n * Checks if there is a previous page.\n * Returns `undefined` if it cannot be determined.\n */\n\nfunction hasPreviousPage(options, pages) {\n if (options.getPreviousPageParam && Array.isArray(pages)) {\n const previousPageParam = getPreviousPageParam(options, pages);\n return typeof previousPageParam !== 'undefined' && previousPageParam !== null && previousPageParam !== false;\n }\n\n return;\n}\n\nexport { getNextPageParam, getPreviousPageParam, hasNextPage, hasPreviousPage, infiniteQueryBehavior };\n//# sourceMappingURL=infiniteQueryBehavior.mjs.map\n","import { parseFilterArgs, parseQueryArgs, functionalUpdate, noop, hashQueryKey, partialMatchKey, hashQueryKeyByOptions } from './utils.mjs';\nimport { QueryCache } from './queryCache.mjs';\nimport { MutationCache } from './mutationCache.mjs';\nimport { focusManager } from './focusManager.mjs';\nimport { onlineManager } from './onlineManager.mjs';\nimport { notifyManager } from './notifyManager.mjs';\nimport { infiniteQueryBehavior } from './infiniteQueryBehavior.mjs';\nimport { defaultLogger } from './logger.mjs';\n\n// CLASS\nclass QueryClient {\n constructor(config = {}) {\n this.queryCache = config.queryCache || new QueryCache();\n this.mutationCache = config.mutationCache || new MutationCache();\n this.logger = config.logger || defaultLogger;\n this.defaultOptions = config.defaultOptions || {};\n this.queryDefaults = [];\n this.mutationDefaults = [];\n\n if (process.env.NODE_ENV !== 'production' && config.logger) {\n this.logger.error(\"Passing a custom logger has been deprecated and will be removed in the next major version.\");\n }\n }\n\n mount() {\n this.unsubscribeFocus = focusManager.subscribe(() => {\n if (focusManager.isFocused()) {\n this.resumePausedMutations();\n this.queryCache.onFocus();\n }\n });\n this.unsubscribeOnline = onlineManager.subscribe(() => {\n if (onlineManager.isOnline()) {\n this.resumePausedMutations();\n this.queryCache.onOnline();\n }\n });\n }\n\n unmount() {\n var _this$unsubscribeFocu, _this$unsubscribeOnli;\n\n (_this$unsubscribeFocu = this.unsubscribeFocus) == null ? void 0 : _this$unsubscribeFocu.call(this);\n (_this$unsubscribeOnli = this.unsubscribeOnline) == null ? void 0 : _this$unsubscribeOnli.call(this);\n }\n\n isFetching(arg1, arg2) {\n const [filters] = parseFilterArgs(arg1, arg2);\n filters.fetchStatus = 'fetching';\n return this.queryCache.findAll(filters).length;\n }\n\n isMutating(filters) {\n return this.mutationCache.findAll({ ...filters,\n fetching: true\n }).length;\n }\n\n getQueryData(queryKey, filters) {\n var _this$queryCache$find;\n\n return (_this$queryCache$find = this.queryCache.find(queryKey, filters)) == null ? void 0 : _this$queryCache$find.state.data;\n }\n\n ensureQueryData(arg1, arg2, arg3) {\n const parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n const cachedData = this.getQueryData(parsedOptions.queryKey);\n return cachedData ? Promise.resolve(cachedData) : this.fetchQuery(parsedOptions);\n }\n\n getQueriesData(queryKeyOrFilters) {\n return this.getQueryCache().findAll(queryKeyOrFilters).map(({\n queryKey,\n state\n }) => {\n const data = state.data;\n return [queryKey, data];\n });\n }\n\n setQueryData(queryKey, updater, options) {\n const query = this.queryCache.find(queryKey);\n const prevData = query == null ? void 0 : query.state.data;\n const data = functionalUpdate(updater, prevData);\n\n if (typeof data === 'undefined') {\n return undefined;\n }\n\n const parsedOptions = parseQueryArgs(queryKey);\n const defaultedOptions = this.defaultQueryOptions(parsedOptions);\n return this.queryCache.build(this, defaultedOptions).setData(data, { ...options,\n manual: true\n });\n }\n\n setQueriesData(queryKeyOrFilters, updater, options) {\n return notifyManager.batch(() => this.getQueryCache().findAll(queryKeyOrFilters).map(({\n queryKey\n }) => [queryKey, this.setQueryData(queryKey, updater, options)]));\n }\n\n getQueryState(queryKey, filters) {\n var _this$queryCache$find2;\n\n return (_this$queryCache$find2 = this.queryCache.find(queryKey, filters)) == null ? void 0 : _this$queryCache$find2.state;\n }\n\n removeQueries(arg1, arg2) {\n const [filters] = parseFilterArgs(arg1, arg2);\n const queryCache = this.queryCache;\n notifyManager.batch(() => {\n queryCache.findAll(filters).forEach(query => {\n queryCache.remove(query);\n });\n });\n }\n\n resetQueries(arg1, arg2, arg3) {\n const [filters, options] = parseFilterArgs(arg1, arg2, arg3);\n const queryCache = 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\n cancelQueries(arg1, arg2, arg3) {\n const [filters, cancelOptions = {}] = parseFilterArgs(arg1, arg2, arg3);\n\n if (typeof cancelOptions.revert === 'undefined') {\n cancelOptions.revert = true;\n }\n\n const promises = notifyManager.batch(() => this.queryCache.findAll(filters).map(query => query.cancel(cancelOptions)));\n return Promise.all(promises).then(noop).catch(noop);\n }\n\n invalidateQueries(arg1, arg2, arg3) {\n const [filters, options] = parseFilterArgs(arg1, arg2, arg3);\n return notifyManager.batch(() => {\n var _ref, _filters$refetchType;\n\n this.queryCache.findAll(filters).forEach(query => {\n query.invalidate();\n });\n\n if (filters.refetchType === 'none') {\n return Promise.resolve();\n }\n\n const refetchFilters = { ...filters,\n type: (_ref = (_filters$refetchType = filters.refetchType) != null ? _filters$refetchType : filters.type) != null ? _ref : 'active'\n };\n return this.refetchQueries(refetchFilters, options);\n });\n }\n\n refetchQueries(arg1, arg2, arg3) {\n const [filters, options] = parseFilterArgs(arg1, arg2, arg3);\n const promises = notifyManager.batch(() => this.queryCache.findAll(filters).filter(query => !query.isDisabled()).map(query => {\n var _options$cancelRefetc;\n\n return query.fetch(undefined, { ...options,\n cancelRefetch: (_options$cancelRefetc = options == null ? void 0 : options.cancelRefetch) != null ? _options$cancelRefetc : true,\n meta: {\n refetchPage: filters.refetchPage\n }\n });\n }));\n let promise = Promise.all(promises).then(noop);\n\n if (!(options != null && options.throwOnError)) {\n promise = promise.catch(noop);\n }\n\n return promise;\n }\n\n fetchQuery(arg1, arg2, arg3) {\n const parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n const defaultedOptions = this.defaultQueryOptions(parsedOptions); // https://github.com/tannerlinsley/react-query/issues/652\n\n if (typeof defaultedOptions.retry === 'undefined') {\n defaultedOptions.retry = false;\n }\n\n const query = this.queryCache.build(this, defaultedOptions);\n return query.isStaleByTime(defaultedOptions.staleTime) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);\n }\n\n prefetchQuery(arg1, arg2, arg3) {\n return this.fetchQuery(arg1, arg2, arg3).then(noop).catch(noop);\n }\n\n fetchInfiniteQuery(arg1, arg2, arg3) {\n const parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n parsedOptions.behavior = infiniteQueryBehavior();\n return this.fetchQuery(parsedOptions);\n }\n\n prefetchInfiniteQuery(arg1, arg2, arg3) {\n return this.fetchInfiniteQuery(arg1, arg2, arg3).then(noop).catch(noop);\n }\n\n resumePausedMutations() {\n return this.mutationCache.resumePausedMutations();\n }\n\n getQueryCache() {\n return this.queryCache;\n }\n\n getMutationCache() {\n return this.mutationCache;\n }\n\n getLogger() {\n return this.logger;\n }\n\n getDefaultOptions() {\n return this.defaultOptions;\n }\n\n setDefaultOptions(options) {\n this.defaultOptions = options;\n }\n\n setQueryDefaults(queryKey, options) {\n const result = this.queryDefaults.find(x => hashQueryKey(queryKey) === hashQueryKey(x.queryKey));\n\n if (result) {\n result.defaultOptions = options;\n } else {\n this.queryDefaults.push({\n queryKey,\n defaultOptions: options\n });\n }\n }\n\n getQueryDefaults(queryKey) {\n if (!queryKey) {\n return undefined;\n } // Get the first matching defaults\n\n\n const firstMatchingDefaults = this.queryDefaults.find(x => partialMatchKey(queryKey, x.queryKey)); // Additional checks and error in dev mode\n\n if (process.env.NODE_ENV !== 'production') {\n // Retrieve all matching defaults for the given key\n const matchingDefaults = this.queryDefaults.filter(x => partialMatchKey(queryKey, x.queryKey)); // It is ok not having defaults, but it is error prone to have more than 1 default for a given key\n\n if (matchingDefaults.length > 1) {\n this.logger.error(\"[QueryClient] Several query defaults match with key '\" + JSON.stringify(queryKey) + \"'. The first matching query defaults are used. Please check how query defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydefaults.\");\n }\n }\n\n return firstMatchingDefaults == null ? void 0 : firstMatchingDefaults.defaultOptions;\n }\n\n setMutationDefaults(mutationKey, options) {\n const result = this.mutationDefaults.find(x => hashQueryKey(mutationKey) === hashQueryKey(x.mutationKey));\n\n if (result) {\n result.defaultOptions = options;\n } else {\n this.mutationDefaults.push({\n mutationKey,\n defaultOptions: options\n });\n }\n }\n\n getMutationDefaults(mutationKey) {\n if (!mutationKey) {\n return undefined;\n } // Get the first matching defaults\n\n\n const firstMatchingDefaults = this.mutationDefaults.find(x => partialMatchKey(mutationKey, x.mutationKey)); // Additional checks and error in dev mode\n\n if (process.env.NODE_ENV !== 'production') {\n // Retrieve all matching defaults for the given key\n const matchingDefaults = this.mutationDefaults.filter(x => partialMatchKey(mutationKey, x.mutationKey)); // It is ok not having defaults, but it is error prone to have more than 1 default for a given key\n\n if (matchingDefaults.length > 1) {\n this.logger.error(\"[QueryClient] Several mutation defaults match with key '\" + JSON.stringify(mutationKey) + \"'. The first matching mutation defaults are used. Please check how mutation defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetmutationdefaults.\");\n }\n }\n\n return firstMatchingDefaults == null ? void 0 : firstMatchingDefaults.defaultOptions;\n }\n\n defaultQueryOptions(options) {\n if (options != null && options._defaulted) {\n return options;\n }\n\n const defaultedOptions = { ...this.defaultOptions.queries,\n ...this.getQueryDefaults(options == null ? void 0 : options.queryKey),\n ...options,\n _defaulted: true\n };\n\n if (!defaultedOptions.queryHash && defaultedOptions.queryKey) {\n defaultedOptions.queryHash = hashQueryKeyByOptions(defaultedOptions.queryKey, defaultedOptions);\n } // dependent default values\n\n\n if (typeof defaultedOptions.refetchOnReconnect === 'undefined') {\n defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== 'always';\n }\n\n if (typeof defaultedOptions.useErrorBoundary === 'undefined') {\n defaultedOptions.useErrorBoundary = !!defaultedOptions.suspense;\n }\n\n return defaultedOptions;\n }\n\n defaultMutationOptions(options) {\n if (options != null && options._defaulted) {\n return options;\n }\n\n return { ...this.defaultOptions.mutations,\n ...this.getMutationDefaults(options == null ? void 0 : options.mutationKey),\n ...options,\n _defaulted: true\n };\n }\n\n clear() {\n this.queryCache.clear();\n this.mutationCache.clear();\n }\n\n}\n\nexport { QueryClient };\n//# sourceMappingURL=queryClient.mjs.map\n","// Fallback locale.\n// (when not a single one of the supplied \"preferred\" locales is available)\nvar defaultLocale = 'en'; // For all locales added\n// their relative time formatter messages will be stored here.\n\nvar localesData = {}; // According to the spec BCP 47 language tags are case-insensitive.\n// https://tools.ietf.org/html/rfc5646\n\nvar lowercaseLocaleLookup = {};\nexport function getDefaultLocale() {\n return defaultLocale;\n}\nexport function setDefaultLocale(locale) {\n defaultLocale = locale;\n}\n/**\r\n * Gets locale data previously added by `addLocaleData()`.\r\n * @return {object} [localeData]\r\n */\n\nexport function getLocaleData(locale) {\n return localesData[locale];\n}\n/**\r\n * Adds locale data.\r\n * Is called by `RelativeTimeFormat.addLocale(...)`.\r\n * @param {object} localeData\r\n */\n\nexport function addLocaleData(localeData) {\n if (!localeData) {\n throw new Error('No locale data passed');\n } // This locale data is stored in a global variable\n // and later used when calling `.format(time)`.\n\n\n localesData[localeData.locale] = localeData;\n lowercaseLocaleLookup[localeData.locale.toLowerCase()] = localeData.locale;\n}\n/**\r\n * Returns a locale for which locale data has been added\r\n * via `RelativeTimeFormat.addLocale(...)`.\r\n * @param {string} locale\r\n * @return {string} [locale]\r\n */\n\nexport function resolveLocale(locale) {\n if (localesData[locale]) {\n return locale;\n }\n\n if (lowercaseLocaleLookup[locale.toLowerCase()]) {\n return lowercaseLocaleLookup[locale.toLowerCase()];\n }\n}\n//# sourceMappingURL=LocaleDataStore.js.map","import { resolveLocale as resolveLocaleForData } from './LocaleDataStore.js';\n/**\r\n * Resolves a locale to a supported one (if any).\r\n * @param {string} locale\r\n * @param {Object} [options] - An object that may have the following property:\r\n * @param {string} [options.localeMatcher=\"lookup\"] - The locale matching algorithm to use. Possible values are \"lookup\" and \"best fit\". Currently only \"lookup\" is supported.\r\n * @return {string} [locale]\r\n * @example\r\n * // Returns \"sr\"\r\n * resolveLocale(\"sr-Cyrl-BA\")\r\n * // Returns `undefined`\r\n * resolveLocale(\"xx-Latn\")\r\n */\n\nexport default function resolveLocale(locale) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var localeMatcher = options.localeMatcher || 'lookup';\n\n switch (localeMatcher) {\n case 'lookup':\n return resolveLocaleLookup(locale);\n // \"best fit\" locale matching is not supported.\n // https://github.com/catamphetamine/relative-time-format/issues/2\n\n case 'best fit':\n // return resolveLocaleBestFit(locale)\n return resolveLocaleLookup(locale);\n\n default:\n throw new RangeError(\"Invalid \\\"localeMatcher\\\" option: \".concat(localeMatcher));\n }\n}\n/**\r\n * Resolves a locale to a supported one (if any).\r\n * Starts from the most specific locale and gradually\r\n * falls back to less specific ones.\r\n * This is a basic implementation of the \"lookup\" algorithm.\r\n * https://tools.ietf.org/html/rfc4647#section-3.4\r\n * @param {string} locale\r\n * @return {string} [locale]\r\n * @example\r\n * // Returns \"sr\"\r\n * resolveLocaleLookup(\"sr-Cyrl-BA\")\r\n * // Returns `undefined`\r\n * resolveLocaleLookup(\"xx-Latn\")\r\n */\n\nexport function resolveLocaleLookup(locale) {\n var resolvedLocale = resolveLocaleForData(locale);\n\n if (resolvedLocale) {\n return resolvedLocale;\n } // `sr-Cyrl-BA` -> `sr-Cyrl` -> `sr`.\n\n\n var parts = locale.split('-');\n\n while (locale.length > 1) {\n parts.pop();\n locale = parts.join('-');\n\n var _resolvedLocale = resolveLocaleForData(locale);\n\n if (_resolvedLocale) {\n return _resolvedLocale;\n }\n }\n}\n//# sourceMappingURL=resolveLocale.js.map","// (this file was autogenerated by `generate-locales`)\n// \"plural rules\" functions are not stored in locale JSON files because they're not strings.\n// This file isn't big — it's about 5 kilobytes in size (minified).\n// Alternatively, the pluralization rules for each locale could be stored\n// in their JSON files in a non-parsed form and later parsed via `make-plural` library.\n// But `make-plural` library itself is relatively big in size:\n// `make-plural.min.js` is about 6 kilobytes (https://unpkg.com/make-plural/).\n// So, it's more practical to bypass runtime `make-plural` pluralization rules compilation\n// and just include the already compiled pluarlization rules for all locales in the library code.\nvar $ = {\n af: function af(n) {\n return n == 1 ? 'one' : 'other';\n },\n am: function am(n) {\n return n >= 0 && n <= 1 ? 'one' : 'other';\n },\n ar: function ar(n) {\n var s = String(n).split('.'),\n t0 = Number(s[0]) == n,\n n100 = t0 && s[0].slice(-2);\n return n == 0 ? 'zero' : n == 1 ? 'one' : n == 2 ? 'two' : n100 >= 3 && n100 <= 10 ? 'few' : n100 >= 11 && n100 <= 99 ? 'many' : 'other';\n },\n ast: function ast(n) {\n var s = String(n).split('.'),\n v0 = !s[1];\n return n == 1 && v0 ? 'one' : 'other';\n },\n be: function be(n) {\n var s = String(n).split('.'),\n t0 = Number(s[0]) == n,\n n10 = t0 && s[0].slice(-1),\n n100 = t0 && s[0].slice(-2);\n return n10 == 1 && n100 != 11 ? 'one' : n10 >= 2 && n10 <= 4 && (n100 < 12 || n100 > 14) ? 'few' : t0 && n10 == 0 || n10 >= 5 && n10 <= 9 || n100 >= 11 && n100 <= 14 ? 'many' : 'other';\n },\n br: function br(n) {\n var s = String(n).split('.'),\n t0 = Number(s[0]) == n,\n n10 = t0 && s[0].slice(-1),\n n100 = t0 && s[0].slice(-2),\n n1000000 = t0 && s[0].slice(-6);\n return n10 == 1 && n100 != 11 && n100 != 71 && n100 != 91 ? 'one' : n10 == 2 && n100 != 12 && n100 != 72 && n100 != 92 ? 'two' : (n10 == 3 || n10 == 4 || n10 == 9) && (n100 < 10 || n100 > 19) && (n100 < 70 || n100 > 79) && (n100 < 90 || n100 > 99) ? 'few' : n != 0 && t0 && n1000000 == 0 ? 'many' : 'other';\n },\n bs: function bs(n) {\n var s = String(n).split('.'),\n i = s[0],\n f = s[1] || '',\n v0 = !s[1],\n i10 = i.slice(-1),\n i100 = i.slice(-2),\n f10 = f.slice(-1),\n f100 = f.slice(-2);\n return v0 && i10 == 1 && i100 != 11 || f10 == 1 && f100 != 11 ? 'one' : v0 && i10 >= 2 && i10 <= 4 && (i100 < 12 || i100 > 14) || f10 >= 2 && f10 <= 4 && (f100 < 12 || f100 > 14) ? 'few' : 'other';\n },\n ca: function ca(n) {\n var s = String(n).split('.'),\n i = s[0],\n v0 = !s[1],\n i1000000 = i.slice(-6);\n return n == 1 && v0 ? 'one' : i != 0 && i1000000 == 0 && v0 ? 'many' : 'other';\n },\n ceb: function ceb(n) {\n var s = String(n).split('.'),\n i = s[0],\n f = s[1] || '',\n v0 = !s[1],\n i10 = i.slice(-1),\n f10 = f.slice(-1);\n return v0 && (i == 1 || i == 2 || i == 3) || v0 && i10 != 4 && i10 != 6 && i10 != 9 || !v0 && f10 != 4 && f10 != 6 && f10 != 9 ? 'one' : 'other';\n },\n cs: function cs(n) {\n var s = String(n).split('.'),\n i = s[0],\n v0 = !s[1];\n return n == 1 && v0 ? 'one' : i >= 2 && i <= 4 && v0 ? 'few' : !v0 ? 'many' : 'other';\n },\n cy: function cy(n) {\n return n == 0 ? 'zero' : n == 1 ? 'one' : n == 2 ? 'two' : n == 3 ? 'few' : n == 6 ? 'many' : 'other';\n },\n da: function da(n) {\n var s = String(n).split('.'),\n i = s[0],\n t0 = Number(s[0]) == n;\n return n == 1 || !t0 && (i == 0 || i == 1) ? 'one' : 'other';\n },\n dsb: function dsb(n) {\n var s = String(n).split('.'),\n i = s[0],\n f = s[1] || '',\n v0 = !s[1],\n i100 = i.slice(-2),\n f100 = f.slice(-2);\n return v0 && i100 == 1 || f100 == 1 ? 'one' : v0 && i100 == 2 || f100 == 2 ? 'two' : v0 && (i100 == 3 || i100 == 4) || f100 == 3 || f100 == 4 ? 'few' : 'other';\n },\n dz: function dz(n) {\n return 'other';\n },\n es: function es(n) {\n var s = String(n).split('.'),\n i = s[0],\n v0 = !s[1],\n i1000000 = i.slice(-6);\n return n == 1 ? 'one' : i != 0 && i1000000 == 0 && v0 ? 'many' : 'other';\n },\n ff: function ff(n) {\n return n >= 0 && n < 2 ? 'one' : 'other';\n },\n fr: function fr(n) {\n var s = String(n).split('.'),\n i = s[0],\n v0 = !s[1],\n i1000000 = i.slice(-6);\n return n >= 0 && n < 2 ? 'one' : i != 0 && i1000000 == 0 && v0 ? 'many' : 'other';\n },\n ga: function ga(n) {\n var s = String(n).split('.'),\n t0 = Number(s[0]) == n;\n return n == 1 ? 'one' : n == 2 ? 'two' : t0 && n >= 3 && n <= 6 ? 'few' : t0 && n >= 7 && n <= 10 ? 'many' : 'other';\n },\n gd: function gd(n) {\n var s = String(n).split('.'),\n t0 = Number(s[0]) == n;\n return n == 1 || n == 11 ? 'one' : n == 2 || n == 12 ? 'two' : t0 && n >= 3 && n <= 10 || t0 && n >= 13 && n <= 19 ? 'few' : 'other';\n },\n he: function he(n) {\n var s = String(n).split('.'),\n i = s[0],\n v0 = !s[1];\n return i == 1 && v0 || i == 0 && !v0 ? 'one' : i == 2 && v0 ? 'two' : 'other';\n },\n is: function is(n) {\n var s = String(n).split('.'),\n i = s[0],\n t = (s[1] || '').replace(/0+$/, ''),\n t0 = Number(s[0]) == n,\n i10 = i.slice(-1),\n i100 = i.slice(-2);\n return t0 && i10 == 1 && i100 != 11 || t % 10 == 1 && t % 100 != 11 ? 'one' : 'other';\n },\n ksh: function ksh(n) {\n return n == 0 ? 'zero' : n == 1 ? 'one' : 'other';\n },\n lt: function lt(n) {\n var s = String(n).split('.'),\n f = s[1] || '',\n t0 = Number(s[0]) == n,\n n10 = t0 && s[0].slice(-1),\n n100 = t0 && s[0].slice(-2);\n return n10 == 1 && (n100 < 11 || n100 > 19) ? 'one' : n10 >= 2 && n10 <= 9 && (n100 < 11 || n100 > 19) ? 'few' : f != 0 ? 'many' : 'other';\n },\n lv: function lv(n) {\n var s = String(n).split('.'),\n f = s[1] || '',\n v = f.length,\n t0 = Number(s[0]) == n,\n n10 = t0 && s[0].slice(-1),\n n100 = t0 && s[0].slice(-2),\n f100 = f.slice(-2),\n f10 = f.slice(-1);\n return t0 && n10 == 0 || n100 >= 11 && n100 <= 19 || v == 2 && f100 >= 11 && f100 <= 19 ? 'zero' : n10 == 1 && n100 != 11 || v == 2 && f10 == 1 && f100 != 11 || v != 2 && f10 == 1 ? 'one' : 'other';\n },\n mk: function mk(n) {\n var s = String(n).split('.'),\n i = s[0],\n f = s[1] || '',\n v0 = !s[1],\n i10 = i.slice(-1),\n i100 = i.slice(-2),\n f10 = f.slice(-1),\n f100 = f.slice(-2);\n return v0 && i10 == 1 && i100 != 11 || f10 == 1 && f100 != 11 ? 'one' : 'other';\n },\n mt: function mt(n) {\n var s = String(n).split('.'),\n t0 = Number(s[0]) == n,\n n100 = t0 && s[0].slice(-2);\n return n == 1 ? 'one' : n == 2 ? 'two' : n == 0 || n100 >= 3 && n100 <= 10 ? 'few' : n100 >= 11 && n100 <= 19 ? 'many' : 'other';\n },\n pa: function pa(n) {\n return n == 0 || n == 1 ? 'one' : 'other';\n },\n pl: function pl(n) {\n var s = String(n).split('.'),\n i = s[0],\n v0 = !s[1],\n i10 = i.slice(-1),\n i100 = i.slice(-2);\n return n == 1 && v0 ? 'one' : v0 && i10 >= 2 && i10 <= 4 && (i100 < 12 || i100 > 14) ? 'few' : v0 && i != 1 && (i10 == 0 || i10 == 1) || v0 && i10 >= 5 && i10 <= 9 || v0 && i100 >= 12 && i100 <= 14 ? 'many' : 'other';\n },\n pt: function pt(n) {\n var s = String(n).split('.'),\n i = s[0],\n v0 = !s[1],\n i1000000 = i.slice(-6);\n return i == 0 || i == 1 ? 'one' : i != 0 && i1000000 == 0 && v0 ? 'many' : 'other';\n },\n ro: function ro(n) {\n var s = String(n).split('.'),\n v0 = !s[1],\n t0 = Number(s[0]) == n,\n n100 = t0 && s[0].slice(-2);\n return n == 1 && v0 ? 'one' : !v0 || n == 0 || n != 1 && n100 >= 1 && n100 <= 19 ? 'few' : 'other';\n },\n ru: function ru(n) {\n var s = String(n).split('.'),\n i = s[0],\n v0 = !s[1],\n i10 = i.slice(-1),\n i100 = i.slice(-2);\n return v0 && i10 == 1 && i100 != 11 ? 'one' : v0 && i10 >= 2 && i10 <= 4 && (i100 < 12 || i100 > 14) ? 'few' : v0 && i10 == 0 || v0 && i10 >= 5 && i10 <= 9 || v0 && i100 >= 11 && i100 <= 14 ? 'many' : 'other';\n },\n se: function se(n) {\n return n == 1 ? 'one' : n == 2 ? 'two' : 'other';\n },\n si: function si(n) {\n var s = String(n).split('.'),\n i = s[0],\n f = s[1] || '';\n return n == 0 || n == 1 || i == 0 && f == 1 ? 'one' : 'other';\n },\n sl: function sl(n) {\n var s = String(n).split('.'),\n i = s[0],\n v0 = !s[1],\n i100 = i.slice(-2);\n return v0 && i100 == 1 ? 'one' : v0 && i100 == 2 ? 'two' : v0 && (i100 == 3 || i100 == 4) || !v0 ? 'few' : 'other';\n }\n};\n$.as = $.am;\n$.az = $.af;\n$.bg = $.af;\n$.bn = $.am;\n$.brx = $.af;\n$.ce = $.af;\n$.chr = $.af;\n$.de = $.ast;\n$.ee = $.af;\n$.el = $.af;\n$.en = $.ast;\n$.et = $.ast;\n$.eu = $.af;\n$.fa = $.am;\n$.fi = $.ast;\n$.fil = $.ceb;\n$.fo = $.af;\n$.fur = $.af;\n$.fy = $.ast;\n$.gl = $.ast;\n$.gu = $.am;\n$.ha = $.af;\n$.hi = $.am;\n$.hr = $.bs;\n$.hsb = $.dsb;\n$.hu = $.af;\n$.hy = $.ff;\n$.ia = $.ast;\n$.id = $.dz;\n$.ig = $.dz;\n$.it = $.ca;\n$.ja = $.dz;\n$.jgo = $.af;\n$.jv = $.dz;\n$.ka = $.af;\n$.kea = $.dz;\n$.kk = $.af;\n$.kl = $.af;\n$.km = $.dz;\n$.kn = $.am;\n$.ko = $.dz;\n$.ks = $.af;\n$.ku = $.af;\n$.ky = $.af;\n$.lb = $.af;\n$.lkt = $.dz;\n$.lo = $.dz;\n$.ml = $.af;\n$.mn = $.af;\n$.mr = $.af;\n$.ms = $.dz;\n$.my = $.dz;\n$.nb = $.af;\n$.ne = $.af;\n$.nl = $.ast;\n$.nn = $.af;\n$.no = $.af;\n$.or = $.af;\n$.pcm = $.am;\n$.ps = $.af;\n$.rm = $.af;\n$.sah = $.dz;\n$.sc = $.ast;\n$.sd = $.af;\n$.sk = $.cs;\n$.so = $.af;\n$.sq = $.af;\n$.sr = $.bs;\n$.su = $.dz;\n$.sv = $.ast;\n$.sw = $.ast;\n$.ta = $.af;\n$.te = $.af;\n$.th = $.dz;\n$.ti = $.pa;\n$.tk = $.af;\n$.to = $.dz;\n$.tr = $.af;\n$.ug = $.af;\n$.uk = $.ru;\n$.ur = $.ast;\n$.uz = $.af;\n$.vi = $.dz;\n$.wae = $.af;\n$.wo = $.dz;\n$.xh = $.af;\n$.yi = $.ast;\n$.yo = $.dz;\n$.yue = $.dz;\n$.zh = $.dz;\n$.zu = $.am;\nexport default $;\n//# sourceMappingURL=PluralRuleFunctions.js.map","/**\r\n * Returns a `locale` for which a function exists in `./PluralRuleFunctions.js`.\r\n * @param {string} locale\r\n * @return {string}\r\n * @example\r\n * getPluralRulesLocale(\"ru-RU-Cyrl\") // Returns \"ru\".\r\n */\nexport default function getPluralRulesLocale(locale) {\n // \"pt\" language is the only one having different pluralization rules\n // for the one (\"pt\") (Portuguese) locale and the other (\"pt-PT\") (European Portuguese).\n // http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html\n // (see the entries for \"pt\" and \"pt_PT\" there)\n if (locale === 'pt-PT') {\n return locale;\n }\n\n return getLanguageFromLanguageTag(locale);\n}\n/**\r\n * Extracts language from an IETF BCP 47 language tag.\r\n * @param {string} languageTag - IETF BCP 47 language tag.\r\n * @return {string}\r\n * @example\r\n * // Returns \"he\"\r\n * getLanguageFromLanguageTag(\"he-IL-u-ca-hebrew-tz-jeruslm\")\r\n * // Returns \"ar\"\r\n * getLanguageFromLanguageTag(\"ar-u-nu-latn\")\r\n */\n\nvar LANGUAGE_REG_EXP = /^([a-z0-9]+)/i;\n\nfunction getLanguageFromLanguageTag(languageTag) {\n var match = languageTag.match(LANGUAGE_REG_EXP);\n\n if (!match) {\n throw new TypeError(\"Invalid locale: \".concat(languageTag));\n }\n\n return match[1];\n}\n//# sourceMappingURL=getPluralRulesLocale.js.map","function _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); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n// Importing `PluralRule` polyfill from a separate package\n// results in a bundle that is larger by 1kB for some reason.\n// export { default as default } from 'intl-plural-rules-polyfill/cardinal'\nimport PluralRuleFunctions from \"./PluralRuleFunctions.js\";\nimport getPluralRulesLocale from \"./getPluralRulesLocale.js\";\n/**\r\n * `Intl.PluralRules` polyfill.\r\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/PluralRules\r\n */\n\nvar PluralRules = /*#__PURE__*/function () {\n function PluralRules(locale, options) {\n _classCallCheck(this, PluralRules);\n\n var locales = PluralRules.supportedLocalesOf(locale);\n\n if (locales.length === 0) {\n throw new RangeError(\"Unsupported locale: \" + locale);\n }\n\n if (options && options.type !== \"cardinal\") {\n throw new RangeError(\"Only \\\"cardinal\\\" \\\"type\\\" is supported\");\n }\n\n this.$ = PluralRuleFunctions[getPluralRulesLocale(locales[0])];\n }\n\n _createClass(PluralRules, [{\n key: \"select\",\n value: function select(number) {\n return this.$(number);\n }\n }], [{\n key: \"supportedLocalesOf\",\n value: function supportedLocalesOf(locales) {\n if (typeof locales === \"string\") {\n locales = [locales];\n }\n\n return locales.filter(function (locale) {\n return PluralRuleFunctions[getPluralRulesLocale(locale)];\n });\n }\n }]);\n\n return PluralRules;\n}();\n\nexport { PluralRules as default };\n//# sourceMappingURL=PluralRules.js.map","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); 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 = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : 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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _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(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\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 _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\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); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport { getDefaultLocale, setDefaultLocale, getLocaleData, addLocaleData } from './LocaleDataStore.js';\nimport resolveLocale from './resolveLocale.js';\nimport PluralRules from './PluralRules.js'; // Importing `PluralRule` polyfill from a separate package\n// results in a bundle that is larger by 1kB for some reason.\n// import PluralRules from 'intl-plural-rules-polyfill/cardinal'\n// Valid time units.\n\nexport var UNITS = [\"second\", \"minute\", \"hour\", \"day\", \"week\", \"month\", \"quarter\", \"year\"]; // Valid values for the `numeric` option.\n\nvar NUMERIC_VALUES = [\"auto\", \"always\"]; // Valid values for the `style` option.\n\nvar STYLE_VALUES = [\"long\", \"short\", \"narrow\"]; // Valid values for the `localeMatcher` option.\n\nvar LOCALE_MATCHER_VALUES = [\"lookup\", \"best fit\"];\n/**\r\n * Polyfill for `Intl.RelativeTimeFormat` proposal.\r\n * https://github.com/tc39/proposal-intl-relative-time\r\n * https://github.com/tc39/proposal-intl-relative-time/issues/55\r\n */\n\nvar RelativeTimeFormat = /*#__PURE__*/function () {\n /**\r\n * @param {(string|string[])} [locales] - Preferred locales (or locale).\r\n * @param {Object} [options] - Formatting options.\r\n * @param {string} [options.style=\"long\"] - One of: \"long\", \"short\", \"narrow\".\r\n * @param {string} [options.numeric=\"always\"] - (Version >= 2) One of: \"always\", \"auto\".\r\n * @param {string} [options.localeMatcher=\"lookup\"] - One of: \"lookup\", \"best fit\". Currently only \"lookup\" is supported.\r\n */\n function RelativeTimeFormat() {\n var locales = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, RelativeTimeFormat);\n\n var numeric = options.numeric,\n style = options.style,\n localeMatcher = options.localeMatcher;\n this.numeric = \"always\";\n this.style = \"long\";\n this.localeMatcher = \"lookup\"; // Set `numeric` option.\n\n if (numeric !== undefined) {\n if (NUMERIC_VALUES.indexOf(numeric) < 0) {\n throw new RangeError(\"Invalid \\\"numeric\\\" option: \".concat(numeric));\n }\n\n this.numeric = numeric;\n } // Set `style` option.\n\n\n if (style !== undefined) {\n if (STYLE_VALUES.indexOf(style) < 0) {\n throw new RangeError(\"Invalid \\\"style\\\" option: \".concat(style));\n }\n\n this.style = style;\n } // Set `localeMatcher` option.\n\n\n if (localeMatcher !== undefined) {\n if (LOCALE_MATCHER_VALUES.indexOf(localeMatcher) < 0) {\n throw new RangeError(\"Invalid \\\"localeMatcher\\\" option: \".concat(localeMatcher));\n }\n\n this.localeMatcher = localeMatcher;\n } // Set `locale`.\n // Convert `locales` to an array.\n\n\n if (typeof locales === 'string') {\n locales = [locales];\n } // Add default locale.\n\n\n locales.push(getDefaultLocale()); // Choose the most appropriate locale.\n\n this.locale = RelativeTimeFormat.supportedLocalesOf(locales, {\n localeMatcher: this.localeMatcher\n })[0];\n\n if (!this.locale) {\n throw new Error(\"No supported locale was found\");\n } // Construct an `Intl.PluralRules` instance (polyfill).\n\n\n if (PluralRules.supportedLocalesOf(this.locale).length > 0) {\n this.pluralRules = new PluralRules(this.locale);\n } else {\n console.warn(\"\\\"\".concat(this.locale, \"\\\" locale is not supported\"));\n } // Use `Intl.NumberFormat` for formatting numbers (when available).\n\n\n if (typeof Intl !== 'undefined' && Intl.NumberFormat) {\n this.numberFormat = new Intl.NumberFormat(this.locale);\n this.numberingSystem = this.numberFormat.resolvedOptions().numberingSystem;\n } else {\n this.numberingSystem = 'latn';\n }\n\n this.locale = resolveLocale(this.locale, {\n localeMatcher: this.localeMatcher\n });\n }\n /**\r\n * Formats time `number` in `units` (either in past or in future).\r\n * @param {number} number - Time interval value.\r\n * @param {string} unit - Time interval measurement unit.\r\n * @return {string}\r\n * @throws {RangeError} If unit is not one of \"second\", \"minute\", \"hour\", \"day\", \"week\", \"month\", \"quarter\".\r\n * @example\r\n * // Returns \"2 days ago\"\r\n * rtf.format(-2, \"day\")\r\n * // Returns \"in 5 minutes\"\r\n * rtf.format(5, \"minute\")\r\n */\n\n\n _createClass(RelativeTimeFormat, [{\n key: \"format\",\n value: function format() {\n var _parseFormatArgs = parseFormatArgs(arguments),\n _parseFormatArgs2 = _slicedToArray(_parseFormatArgs, 2),\n number = _parseFormatArgs2[0],\n unit = _parseFormatArgs2[1];\n\n return this.getRule(number, unit).replace('{0}', this.formatNumber(Math.abs(number)));\n }\n /**\r\n * Formats time `number` in `units` (either in past or in future).\r\n * @param {number} number - Time interval value.\r\n * @param {string} unit - Time interval measurement unit.\r\n * @return {Object[]} The parts (`{ type, value, unit? }`).\r\n * @throws {RangeError} If unit is not one of \"second\", \"minute\", \"hour\", \"day\", \"week\", \"month\", \"quarter\".\r\n * @example\r\n * // Version 1 (deprecated).\r\n * // Returns [\r\n * // { type: \"literal\", value: \"in \" },\r\n * // { type: \"day\", value: \"100\" },\r\n * // { type: \"literal\", value: \" days\" }\r\n * // ]\r\n * rtf.formatToParts(100, \"day\")\r\n * //\r\n * // Version 2.\r\n * // Returns [\r\n * // { type: \"literal\", value: \"in \" },\r\n * // { type: \"integer\", value: \"100\", unit: \"day\" },\r\n * // { type: \"literal\", value: \" days\" }\r\n * // ]\r\n * rtf.formatToParts(100, \"day\")\r\n */\n\n }, {\n key: \"formatToParts\",\n value: function formatToParts() {\n var _parseFormatArgs3 = parseFormatArgs(arguments),\n _parseFormatArgs4 = _slicedToArray(_parseFormatArgs3, 2),\n number = _parseFormatArgs4[0],\n unit = _parseFormatArgs4[1];\n\n var rule = this.getRule(number, unit);\n var valueIndex = rule.indexOf(\"{0}\"); // \"yesterday\"/\"today\"/\"tomorrow\".\n\n if (valueIndex < 0) {\n return [{\n type: \"literal\",\n value: rule\n }];\n }\n\n var parts = [];\n\n if (valueIndex > 0) {\n parts.push({\n type: \"literal\",\n value: rule.slice(0, valueIndex)\n });\n }\n\n parts = parts.concat(this.formatNumberToParts(Math.abs(number)).map(function (part) {\n return _objectSpread(_objectSpread({}, part), {}, {\n unit: unit\n });\n }));\n\n if (valueIndex + \"{0}\".length < rule.length - 1) {\n parts.push({\n type: \"literal\",\n value: rule.slice(valueIndex + \"{0}\".length)\n });\n }\n\n return parts;\n }\n /**\r\n * Returns formatting rule for `value` in `units` (either in past or in future).\r\n * @param {number} value - Time interval value.\r\n * @param {string} unit - Time interval measurement unit.\r\n * @return {string}\r\n * @throws {RangeError} If unit is not one of \"second\", \"minute\", \"hour\", \"day\", \"week\", \"month\", \"quarter\".\r\n * @example\r\n * // Returns \"{0} days ago\"\r\n * getRule(-2, \"day\")\r\n */\n\n }, {\n key: \"getRule\",\n value: function getRule(value, unit) {\n // Get locale-specific time interval formatting rules\n // of a given `style` for the given value of measurement `unit`.\n //\n // E.g.:\n //\n // ```json\n // {\n // \"past\": {\n // \"one\": \"a second ago\",\n // \"other\": \"{0} seconds ago\"\n // },\n // \"future\": {\n // \"one\": \"in a second\",\n // \"other\": \"in {0} seconds\"\n // }\n // }\n // ```\n //\n var unitMessages = getLocaleData(this.locale)[this.style][unit]; // Bundle size optimization technique for styles like\n // \"tiny\" in `javascript-time-ago`: \"1m\", \"2h\", \"3d\"...\n\n if (typeof unitMessages === 'string') {\n return unitMessages;\n } // Special case for \"yesterday\"/\"today\"/\"tomorrow\".\n\n\n if (this.numeric === \"auto\") {\n // \"yesterday\", \"the day before yesterday\", etc.\n if (value === -2 || value === -1) {\n var message = unitMessages[\"previous\".concat(value === -1 ? '' : '-' + Math.abs(value))];\n\n if (message) {\n return message;\n }\n } // \"tomorrow\", \"the day after tomorrow\", etc.\n else if (value === 1 || value === 2) {\n var _message = unitMessages[\"next\".concat(value === 1 ? '' : '-' + Math.abs(value))];\n\n if (_message) {\n return _message;\n }\n } // \"today\"\n else if (value === 0) {\n if (unitMessages.current) {\n return unitMessages.current;\n }\n }\n } // Choose either \"past\" or \"future\" based on time `value` sign.\n // If there's only \"other\" then it's being collapsed.\n // (the resulting bundle size optimization technique)\n\n\n var pluralizedMessages = unitMessages[isNegative(value) ? \"past\" : \"future\"]; // Bundle size optimization technique for styles like \"narrow\"\n // having messages like \"in {0} d.\" or \"{0} d. ago\".\n\n if (typeof pluralizedMessages === \"string\") {\n return pluralizedMessages;\n } // Quantify `value`.\n // There seems to be no such locale in CLDR\n // for which \"plural rules\" function is missing.\n\n\n var quantifier = this.pluralRules && this.pluralRules.select(Math.abs(value)) || 'other'; // \"other\" rule is supposed to be always present.\n // If only \"other\" rule is present then \"rules\" is not an object and is a string.\n\n return pluralizedMessages[quantifier] || pluralizedMessages.other;\n }\n /**\r\n * Formats a number into a string.\r\n * Uses `Intl.NumberFormat` when available.\r\n * @param {number} number\r\n * @return {string}\r\n */\n\n }, {\n key: \"formatNumber\",\n value: function formatNumber(number) {\n return this.numberFormat ? this.numberFormat.format(number) : String(number);\n }\n /**\r\n * Formats a number into a list of parts.\r\n * Uses `Intl.NumberFormat` when available.\r\n * @param {number} number\r\n * @return {object[]}\r\n */\n\n }, {\n key: \"formatNumberToParts\",\n value: function formatNumberToParts(number) {\n // `Intl.NumberFormat.formatToParts()` is not present, for example,\n // in Node.js 8.x while `Intl.NumberFormat` itself is present.\n return this.numberFormat && this.numberFormat.formatToParts ? this.numberFormat.formatToParts(number) : [{\n type: \"integer\",\n value: this.formatNumber(number)\n }];\n }\n /**\r\n * Returns a new object with properties reflecting the locale and date and time formatting options computed during initialization of this DateTimeFormat object.\r\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/resolvedOptions\r\n * @return {Object}\r\n */\n\n }, {\n key: \"resolvedOptions\",\n value: function resolvedOptions() {\n return {\n locale: this.locale,\n style: this.style,\n numeric: this.numeric,\n numberingSystem: this.numberingSystem\n };\n }\n }]);\n\n return RelativeTimeFormat;\n}();\n/**\r\n * Returns an array containing those of the provided locales\r\n * that are supported in collation without having to fall back\r\n * to the runtime's default locale.\r\n * @param {(string|string[])} locale - A string with a BCP 47 language tag, or an array of such strings. For the general form of the locales argument, see the Intl page.\r\n * @param {Object} [options] - An object that may have the following property:\r\n * @param {string} [options.localeMatcher=\"lookup\"] - The locale matching algorithm to use. Possible values are \"lookup\" and \"best fit\". Currently only \"lookup\" is supported.\r\n * @return {string[]} An array of strings representing a subset of the given locale tags that are supported in collation without having to fall back to the runtime's default locale.\r\n * @example\r\n * var locales = ['ban', 'id-u-co-pinyin', 'es-PY']\r\n * var options = { localeMatcher: 'lookup' }\r\n * // Returns [\"id\", \"es-PY\"]\r\n * Intl.RelativeTimeFormat.supportedLocalesOf(locales, options)\r\n */\n\n\nexport { RelativeTimeFormat as default };\n\nRelativeTimeFormat.supportedLocalesOf = function (locales) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // Convert `locales` to an array.\n if (typeof locales === 'string') {\n locales = [locales];\n } else if (!Array.isArray(locales)) {\n throw new TypeError('Invalid \"locales\" argument');\n }\n\n return locales.filter(function (locale) {\n return resolveLocale(locale, options);\n });\n};\n/**\r\n * Adds locale data for a specific locale.\r\n * @param {Object} localeData\r\n */\n\n\nRelativeTimeFormat.addLocale = addLocaleData;\n/**\r\n * Sets default locale.\r\n * @param {string} locale\r\n */\n\nRelativeTimeFormat.setDefaultLocale = setDefaultLocale;\n/**\r\n * Gets default locale.\r\n * @return {string} locale\r\n */\n\nRelativeTimeFormat.getDefaultLocale = getDefaultLocale;\n/**\r\n * Export `Intl.PluralRules` just in case it's used somewhere else.\r\n */\n\nRelativeTimeFormat.PluralRules = PluralRules; // The specification allows units to be in plural form.\n// Convert plural to singular.\n// Example: \"seconds\" -> \"second\".\n\nvar UNIT_ERROR = 'Invalid \"unit\" argument';\n\nfunction parseUnit(unit) {\n if (_typeof(unit) === 'symbol') {\n throw new TypeError(UNIT_ERROR);\n }\n\n if (typeof unit !== 'string') {\n throw new RangeError(\"\".concat(UNIT_ERROR, \": \").concat(unit));\n }\n\n if (unit[unit.length - 1] === 's') {\n unit = unit.slice(0, unit.length - 1);\n }\n\n if (UNITS.indexOf(unit) < 0) {\n throw new RangeError(\"\".concat(UNIT_ERROR, \": \").concat(unit));\n }\n\n return unit;\n} // Converts `value` to a `Number`.\n// The specification allows value to be a non-number.\n// For example, \"-0\" is supposed to be treated as `-0`.\n// Also checks if `value` is a finite number.\n\n\nvar NUMBER_ERROR = 'Invalid \"number\" argument';\n\nfunction parseNumber(value) {\n value = Number(value);\n\n if (Number.isFinite) {\n if (!Number.isFinite(value)) {\n throw new RangeError(\"\".concat(NUMBER_ERROR, \": \").concat(value));\n }\n }\n\n return value;\n}\n/**\r\n * Tells `0` from `-0`.\r\n * https://stackoverflow.com/questions/7223359/are-0-and-0-the-same\r\n * @param {number} number\r\n * @return {Boolean}\r\n * @example\r\n * isNegativeZero(0); // false\r\n * isNegativeZero(-0); // true\r\n */\n\n\nfunction isNegativeZero(number) {\n return 1 / number === -Infinity;\n}\n\nfunction isNegative(number) {\n return number < 0 || number === 0 && isNegativeZero(number);\n}\n\nfunction parseFormatArgs(args) {\n if (args.length < 2) {\n throw new TypeError(\"\\\"unit\\\" argument is required\");\n }\n\n return [parseNumber(args[0]), parseUnit(args[1])];\n}\n//# sourceMappingURL=RelativeTimeFormat.js.map","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(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); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n/**\r\n * A basic in-memory cache.\r\n *\r\n * import Cache from 'javascript-time-ago/Cache'\r\n * const cache = new Cache()\r\n * const object = cache.get('key1', 'key2', ...) || cache.put('key1', 'key2', ..., createObject())\r\n */\nvar Cache = /*#__PURE__*/function () {\n function Cache() {\n _classCallCheck(this, Cache);\n\n this.cache = {};\n }\n\n _createClass(Cache, [{\n key: \"get\",\n value: function get() {\n var cache = this.cache;\n\n for (var _len = arguments.length, keys = new Array(_len), _key = 0; _key < _len; _key++) {\n keys[_key] = arguments[_key];\n }\n\n for (var _i = 0, _keys = keys; _i < _keys.length; _i++) {\n var key = _keys[_i];\n\n if (_typeof(cache) !== 'object') {\n return;\n }\n\n cache = cache[key];\n }\n\n return cache;\n }\n }, {\n key: \"put\",\n value: function put() {\n for (var _len2 = arguments.length, keys = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n keys[_key2] = arguments[_key2];\n }\n\n var value = keys.pop();\n var lastKey = keys.pop();\n var cache = this.cache;\n\n for (var _i2 = 0, _keys2 = keys; _i2 < _keys2.length; _i2++) {\n var key = _keys2[_i2];\n\n if (_typeof(cache[key]) !== 'object') {\n cache[key] = {};\n }\n\n cache = cache[key];\n }\n\n return cache[lastKey] = value;\n }\n }]);\n\n return Cache;\n}();\n\nexport { Cache as default };\n//# sourceMappingURL=cache.js.map","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } 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\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(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\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\n/**\r\n * Chooses the most appropriate locale\r\n * (one of the registered ones)\r\n * based on the list of preferred `locales` supplied by the user.\r\n *\r\n * @param {string[]} locales - the list of preferable locales (in [IETF format](https://en.wikipedia.org/wiki/IETF_language_tag)).\r\n * @param {Function} isLocaleDataAvailable - tests if a locale is available.\r\n *\r\n * @returns {string} The most suitable locale.\r\n *\r\n * @example\r\n * // Returns 'en'\r\n * chooseLocale(['en-US'], undefined, (locale) => locale === 'ru' || locale === 'en')\r\n */\nexport default function chooseLocale(locales, isLocaleDataAvailable) {\n // This is not an intelligent algorithm,\n // but it will do for this library's case.\n // `sr-Cyrl-BA` -> `sr-Cyrl` -> `sr`.\n for (var _iterator = _createForOfIteratorHelperLoose(locales), _step; !(_step = _iterator()).done;) {\n var locale = _step.value;\n\n if (isLocaleDataAvailable(locale)) {\n return locale;\n }\n\n var parts = locale.split('-');\n\n while (parts.length > 1) {\n parts.pop();\n locale = parts.join('-');\n\n if (isLocaleDataAvailable(locale)) {\n return locale;\n }\n }\n }\n\n throw new Error(\"No locale data has been registered for any of the locales: \".concat(locales.join(', ')));\n}\n/**\r\n * Whether can use `Intl.DateTimeFormat` for these `locales`.\r\n * Returns the first suitable one.\r\n * @param {(string|string[])} locales\r\n * @return {?string} The first locale that can be used.\r\n */\n\nexport function intlDateTimeFormatSupportedLocale(locales) {\n /* istanbul ignore else */\n if (intlDateTimeFormatSupported()) {\n return Intl.DateTimeFormat.supportedLocalesOf(locales)[0];\n }\n}\n/**\r\n * Whether can use `Intl.DateTimeFormat`.\r\n * @return {boolean}\r\n */\n\nexport function intlDateTimeFormatSupported() {\n // Babel transforms `typeof` into some \"branches\"\n // so istanbul will show this as \"branch not covered\".\n\n /* istanbul ignore next */\n var isIntlAvailable = (typeof Intl === \"undefined\" ? \"undefined\" : _typeof(Intl)) === 'object';\n return isIntlAvailable && typeof Intl.DateTimeFormat === 'function';\n}\n//# sourceMappingURL=locale.js.map","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nexport default function isStyleObject(object) {\n return isObject(object) && (Array.isArray(object.steps) || // `gradation` property is deprecated: it has been renamed to `steps`.\n Array.isArray(object.gradation) || // `flavour` property is deprecated: it has been renamed to `labels`.\n Array.isArray(object.flavour) || typeof object.flavour === 'string' || Array.isArray(object.labels) || typeof object.labels === 'string' || // `units` property is deprecated.\n Array.isArray(object.units) || // `custom` property is deprecated.\n typeof object.custom === 'function');\n}\nvar OBJECT_CONSTRUCTOR = {}.constructor;\n\nfunction isObject(object) {\n return _typeof(object) !== undefined && object !== null && object.constructor === OBJECT_CONSTRUCTOR;\n}\n//# sourceMappingURL=isStyleObject.js.map","export var minute = 60; // in seconds\n\nexport var hour = 60 * minute; // in seconds\n\nexport var day = 24 * hour; // in seconds\n\nexport var week = 7 * day; // in seconds\n// https://www.quora.com/What-is-the-average-number-of-days-in-a-month\n\nexport var month = 30.44 * day; // in seconds\n// \"400 years have 146097 days (taking into account leap year rules)\"\n\nexport var year = 146097 / 400 * day; // in seconds\n\nexport function getSecondsInUnit(unit) {\n switch (unit) {\n case 'second':\n return 1;\n\n case 'minute':\n return minute;\n\n case 'hour':\n return hour;\n\n case 'day':\n return day;\n\n case 'week':\n return week;\n\n case 'month':\n return month;\n\n case 'year':\n return year;\n }\n} // export function getPreviousUnitFor(unit) {\n// \tswitch (unit) {\n// \t\tcase 'second':\n// \t\t\treturn 'now'\n// \t\tcase 'minute':\n// \t\t\treturn 'second'\n// \t\tcase 'hour':\n// \t\t\treturn 'minute'\n// \t\tcase 'day':\n// \t\t\treturn 'hour'\n// \t\tcase 'week':\n// \t\t\treturn 'day'\n// \t\tcase 'month':\n// \t\t\treturn 'week'\n// \t\tcase 'year':\n// \t\t\treturn 'month'\n// \t}\n// }\n//# sourceMappingURL=units.js.map","import { getSecondsInUnit } from './units.js';\nexport default function getStepDenominator(step) {\n // `factor` is a legacy property.\n if (step.factor !== undefined) {\n return step.factor;\n } // \"unit\" is now called \"formatAs\".\n\n\n return getSecondsInUnit(step.unit || step.formatAs) || 1;\n}\n//# sourceMappingURL=getStepDenominator.js.map","export function getRoundFunction(round) {\n switch (round) {\n case 'floor':\n return Math.floor;\n\n default:\n return Math.round;\n }\n} // For non-negative numbers.\n\nexport function getDiffRatioToNextRoundedNumber(round) {\n switch (round) {\n case 'floor':\n // Math.floor(x) = x\n // Math.floor(x + 1) = x + 1\n return 1;\n\n default:\n // Math.round(x) = x\n // Math.round(x + 0.5) = x + 1\n return 0.5;\n }\n}\n//# sourceMappingURL=round.js.map","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nimport { getSecondsInUnit } from './units.js';\nimport { getDiffRatioToNextRoundedNumber } from '../round.js';\nexport default function getStepMinTime(step, _ref) {\n var prevStep = _ref.prevStep,\n timestamp = _ref.timestamp,\n now = _ref.now,\n future = _ref.future,\n round = _ref.round;\n var minTime; // \"threshold_for_xxx\" is a legacy property.\n\n if (prevStep) {\n if (prevStep.id || prevStep.unit) {\n minTime = step[\"threshold_for_\".concat(prevStep.id || prevStep.unit)];\n }\n }\n\n if (minTime === undefined) {\n // \"threshold\" is a legacy property.\n if (step.threshold !== undefined) {\n // \"threshold\" is a legacy name for \"minTime\".\n minTime = step.threshold; // \"threshold\" function is deprecated.\n\n if (typeof minTime === 'function') {\n minTime = minTime(now, future);\n }\n }\n }\n\n if (minTime === undefined) {\n minTime = step.minTime;\n } // A deprecated way of specifying a different threshold\n // depending on the previous step's unit.\n\n\n if (_typeof(minTime) === 'object') {\n if (prevStep && prevStep.id && minTime[prevStep.id] !== undefined) {\n minTime = minTime[prevStep.id];\n } else {\n minTime = minTime[\"default\"];\n }\n }\n\n if (typeof minTime === 'function') {\n minTime = minTime(timestamp, {\n future: future,\n getMinTimeForUnit: function getMinTimeForUnit(toUnit, fromUnit) {\n return _getMinTimeForUnit(toUnit, fromUnit || prevStep && prevStep.formatAs, {\n round: round\n });\n }\n });\n } // Evaluate the `test()` function.\n // `test()` function is deprecated.\n\n\n if (minTime === undefined) {\n if (step.test) {\n if (step.test(timestamp, {\n now: now,\n future: future\n })) {\n // `0` threshold always passes.\n minTime = 0;\n } else {\n // `MAX_SAFE_INTEGER` threshold won't ever pass in real life.\n minTime = 9007199254740991; // Number.MAX_SAFE_INTEGER\n }\n }\n }\n\n if (minTime === undefined) {\n if (prevStep) {\n if (step.formatAs && prevStep.formatAs) {\n minTime = _getMinTimeForUnit(step.formatAs, prevStep.formatAs, {\n round: round\n });\n }\n } else {\n // The first step's `minTime` is `0` by default.\n minTime = 0;\n }\n } // Warn if no `minTime` was defined or could be deduced.\n\n\n if (minTime === undefined) {\n console.warn('[javascript-time-ago] A step should specify `minTime`:\\n' + JSON.stringify(step, null, 2));\n }\n\n return minTime;\n}\n\nfunction _getMinTimeForUnit(toUnit, fromUnit, _ref2) {\n var round = _ref2.round;\n var toUnitAmount = getSecondsInUnit(toUnit); // if (!fromUnit) {\n // \treturn toUnitAmount;\n // }\n // if (!fromUnit) {\n // \tfromUnit = getPreviousUnitFor(toUnit)\n // }\n\n var fromUnitAmount;\n\n if (fromUnit === 'now') {\n fromUnitAmount = getSecondsInUnit(toUnit);\n } else {\n fromUnitAmount = getSecondsInUnit(fromUnit);\n }\n\n if (toUnitAmount !== undefined && fromUnitAmount !== undefined) {\n return toUnitAmount - fromUnitAmount * (1 - getDiffRatioToNextRoundedNumber(round));\n }\n}\n//# sourceMappingURL=getStepMinTime.js.map","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); 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 = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : 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 getStepDenominator from './getStepDenominator.js';\nimport getStepMinTime from './getStepMinTime.js';\nimport { getRoundFunction } from '../round.js';\n/**\r\n * Finds an appropriate `step` of `steps` for the time interval (in seconds).\r\n *\r\n * @param {Object[]} steps - Time formatting steps.\r\n *\r\n * @param {number} secondsPassed - Time interval (in seconds).\r\n * `< 0` for past dates and `> 0` for future dates.\r\n *\r\n * @param {number} options.now - Current timestamp.\r\n *\r\n * @param {boolean} [options.future] - Whether the date should be formatted as a future one\r\n * instead of a past one.\r\n *\r\n * @param {string} [options.round] - (undocumented) Rounding mechanism.\r\n *\r\n * @param {string[]} [options.units] - A list of allowed time units.\r\n * (Example: ['second', 'minute', 'hour', …])\r\n *\r\n * @param {boolean} [options.getNextStep] - Pass true to return `[step, nextStep]` instead of just `step`.\r\n *\r\n * @return {Object|Object[]} [step] — Either a `step` or `[prevStep, step, nextStep]`.\r\n */\n\nexport default function getStep(steps, secondsPassed, _ref) {\n var now = _ref.now,\n future = _ref.future,\n round = _ref.round,\n units = _ref.units,\n getNextStep = _ref.getNextStep;\n // Ignore steps having not-supported time units in `formatAs`.\n steps = filterStepsByUnits(steps, units);\n\n var step = _getStep(steps, secondsPassed, {\n now: now,\n future: future,\n round: round\n });\n\n if (getNextStep) {\n if (step) {\n var prevStep = steps[steps.indexOf(step) - 1];\n var nextStep = steps[steps.indexOf(step) + 1];\n return [prevStep, step, nextStep];\n }\n\n return [undefined, undefined, steps[0]];\n }\n\n return step;\n}\n\nfunction _getStep(steps, secondsPassed, _ref2) {\n var now = _ref2.now,\n future = _ref2.future,\n round = _ref2.round;\n\n // If no steps fit the conditions then return nothing.\n if (steps.length === 0) {\n return;\n } // Find the most appropriate step.\n\n\n var i = getStepIndex(steps, secondsPassed, {\n now: now,\n future: future || secondsPassed < 0,\n round: round\n }); // If no step is applicable the return nothing.\n\n if (i === -1) {\n return;\n }\n\n var step = steps[i]; // Apply granularity to the time amount\n // (and fall back to the previous step\n // if the first level of granularity\n // isn't met by this amount)\n\n if (step.granularity) {\n // Recalculate the amount of seconds passed based on `granularity`.\n var secondsPassedGranular = getRoundFunction(round)(Math.abs(secondsPassed) / getStepDenominator(step) / step.granularity) * step.granularity; // If the granularity for this step is too high,\n // then fall back to the previous step.\n // (if there is any previous step)\n\n if (secondsPassedGranular === 0 && i > 0) {\n return steps[i - 1];\n }\n }\n\n return step;\n}\n/**\r\n * Iterates through steps until it finds the maximum one satisfying the `minTime` threshold.\r\n * @param {Object} steps - Steps.\r\n * @param {number} secondsPassed - How much seconds have passed since the date till `now`.\r\n * @param {number} options.now - Current timestamp.\r\n * @param {boolean} options.future - Whether the time interval should be formatted as a future one.\r\n * @param {number} [i] - Gradation step currently being tested.\r\n * @return {number} Gradation step index.\r\n */\n\n\nfunction getStepIndex(steps, secondsPassed, options) {\n var i = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var minTime = getStepMinTime(steps[i], _objectSpread({\n prevStep: steps[i - 1],\n timestamp: options.now - secondsPassed * 1000\n }, options)); // If `minTime` isn't defined or deduceable for this step, then stop.\n\n if (minTime === undefined) {\n return i - 1;\n } // If the `minTime` threshold for moving from previous step\n // to this step is too high then return the previous step.\n\n\n if (Math.abs(secondsPassed) < minTime) {\n return i - 1;\n } // If it's the last step then return it.\n\n\n if (i === steps.length - 1) {\n return i;\n } // Move to the next step.\n\n\n return getStepIndex(steps, secondsPassed, options, i + 1);\n}\n/**\r\n * Leaves only allowed steps.\r\n * @param {Object[]} steps\r\n * @param {string[]} units - Allowed time units.\r\n * @return {Object[]}\r\n */\n\n\nfunction filterStepsByUnits(steps, units) {\n return steps.filter(function (_ref3) {\n var unit = _ref3.unit,\n formatAs = _ref3.formatAs;\n // \"unit\" is now called \"formatAs\".\n unit = unit || formatAs; // If this step has a `unit` defined\n // then this `unit` must be in the list of allowed `units`.\n\n if (unit) {\n return units.indexOf(unit) >= 0;\n } // A step is not required to specify a `unit`:\n // alternatively, it could specify `format()`.\n // (see \"twitter\" style for an example)\n\n\n return true;\n });\n}\n//# sourceMappingURL=getStep.js.map","import { getSecondsInUnit } from './units.js';\nimport { getRoundFunction, getDiffRatioToNextRoundedNumber } from '../round.js';\n/**\r\n * Gets the time to next update for a step with a time unit defined.\r\n * @param {string} unit\r\n * @param {number} date — The date passed to `.format()`, converted to a timestamp.\r\n * @param {number} options.now\r\n * @param {string} [options.round] — (undocumented) Rounding mechanism.\r\n * @return {number} [timeToNextUpdate]\r\n */\n\nexport default function getTimeToNextUpdateForUnit(unit, timestamp, _ref) {\n var now = _ref.now,\n round = _ref.round;\n\n // For some units, like \"now\", there's no defined amount of seconds in them.\n if (!getSecondsInUnit(unit)) {\n // If there's no amount of seconds defined for this unit\n // then the update interval can't be determined reliably.\n return;\n }\n\n var unitDenominator = getSecondsInUnit(unit) * 1000;\n var future = timestamp > now;\n var preciseAmount = Math.abs(timestamp - now);\n var roundedAmount = getRoundFunction(round)(preciseAmount / unitDenominator) * unitDenominator;\n\n if (future) {\n if (roundedAmount > 0) {\n // Amount decreases with time.\n return preciseAmount - roundedAmount + getDiffToPreviousRoundedNumber(round, unitDenominator);\n } else {\n // Refresh right after the zero point,\n // when \"future\" changes to \"past\".\n return preciseAmount - roundedAmount + 1;\n }\n } // Amount increases with time.\n\n\n return -(preciseAmount - roundedAmount) + getDiffToNextRoundedNumber(round, unitDenominator);\n}\n\nfunction getDiffToNextRoundedNumber(round, unitDenominator) {\n return getDiffRatioToNextRoundedNumber(round) * unitDenominator;\n}\n\nfunction getDiffToPreviousRoundedNumber(round, unitDenominator) {\n return (1 - getDiffRatioToNextRoundedNumber(round)) * unitDenominator + 1;\n}\n//# sourceMappingURL=getTimeToNextUpdateForUnit.js.map","import _getTimeToNextUpdateForUnit from './getTimeToNextUpdateForUnit.js';\nimport getStepMinTime from './getStepMinTime.js';\nimport { getRoundFunction } from '../round.js'; // A thousand years is practically a metaphor for \"infinity\".\n\nvar YEAR = 365 * 24 * 60 * 60 * 1000;\nexport var INFINITY = 1000 * YEAR;\n/**\r\n * Gets the time to next update for a date and a step.\r\n * @param {number} date — The date passed to `.format()`, converted to a timestamp.\r\n * @param {object} step\r\n * @param {object} [options.previousStep]\r\n * @param {object} [options.nextStep]\r\n * @param {number} options.now\r\n * @param {boolean} options.future\r\n * @param {string} [options.round] - (undocumented) Rounding mechanism.\r\n * @return {number} [timeToNextUpdate]\r\n */\n\nexport default function getTimeToNextUpdate(date, step, _ref) {\n var prevStep = _ref.prevStep,\n nextStep = _ref.nextStep,\n now = _ref.now,\n future = _ref.future,\n round = _ref.round;\n var timestamp = date.getTime ? date.getTime() : date;\n\n var getTimeToNextUpdateForUnit = function getTimeToNextUpdateForUnit(unit) {\n return _getTimeToNextUpdateForUnit(unit, timestamp, {\n now: now,\n round: round\n });\n }; // For future dates, steps move from the last one to the first one,\n // while for past dates, steps move from the first one to the last one,\n // due to the fact that time flows in one direction,\n // and future dates' interval naturally becomes smaller\n // while past dates' interval naturally grows larger.\n //\n // For future dates, it's the transition\n // from the current step to the previous step,\n // therefore check the `minTime` of the current step.\n //\n // For past dates, it's the transition\n // from the current step to the next step,\n // therefore check the `minTime` of the next step.\n //\n\n\n var timeToStepChange = getTimeToStepChange(future ? step : nextStep, timestamp, {\n future: future,\n now: now,\n round: round,\n prevStep: future ? prevStep : step // isFirstStep: future && isFirstStep\n\n });\n\n if (timeToStepChange === undefined) {\n // Can't reliably determine \"time to next update\"\n // if not all of the steps provide `minTime`.\n return;\n }\n\n var timeToNextUpdate;\n\n if (step) {\n if (step.getTimeToNextUpdate) {\n timeToNextUpdate = step.getTimeToNextUpdate(timestamp, {\n getTimeToNextUpdateForUnit: getTimeToNextUpdateForUnit,\n getRoundFunction: getRoundFunction,\n now: now,\n future: future,\n round: round\n });\n }\n\n if (timeToNextUpdate === undefined) {\n // \"unit\" is now called \"formatAs\".\n var unit = step.unit || step.formatAs;\n\n if (unit) {\n // For some units, like \"now\", there's no defined amount of seconds in them.\n // In such cases, `getTimeToNextUpdateForUnit()` returns `undefined`,\n // and the next step's `minTime` could be used to calculate the update interval:\n // it will just assume that the label never changes for this step.\n timeToNextUpdate = getTimeToNextUpdateForUnit(unit);\n }\n }\n }\n\n if (timeToNextUpdate === undefined) {\n return timeToStepChange;\n }\n\n return Math.min(timeToNextUpdate, timeToStepChange);\n}\nexport function getStepChangesAt(currentOrNextStep, timestamp, _ref2) {\n var now = _ref2.now,\n future = _ref2.future,\n round = _ref2.round,\n prevStep = _ref2.prevStep;\n // The first step's `minTime` is `0` by default.\n // It doesn't \"change\" steps at zero point\n // but it does change the wording when switching\n // from \"future\" to \"past\": \"in ...\" -> \"... ago\".\n // Therefore, the label should be updated at zero-point too.\n var minTime = getStepMinTime(currentOrNextStep, {\n timestamp: timestamp,\n now: now,\n future: future,\n round: round,\n prevStep: prevStep\n });\n\n if (minTime === undefined) {\n return;\n }\n\n if (future) {\n // The step changes to the previous step\n // as soon as `timestamp - now` becomes\n // less than the `minTime` of the current step:\n // `timestamp - now === minTime - 1`\n // => `now === timestamp - minTime + 1`.\n return timestamp - minTime * 1000 + 1;\n } else {\n // The step changes to the next step\n // as soon as `now - timestamp` becomes\n // equal to `minTime` of the next step:\n // `now - timestamp === minTime`\n // => `now === timestamp + minTime`.\n // This is a special case when double-update could be skipped.\n if (minTime === 0 && timestamp === now) {\n return INFINITY;\n }\n\n return timestamp + minTime * 1000;\n }\n}\nexport function getTimeToStepChange(step, timestamp, _ref3) {\n var now = _ref3.now,\n future = _ref3.future,\n round = _ref3.round,\n prevStep = _ref3.prevStep;\n\n if (step) {\n var stepChangesAt = getStepChangesAt(step, timestamp, {\n now: now,\n future: future,\n round: round,\n prevStep: prevStep\n });\n\n if (stepChangesAt === undefined) {\n return;\n }\n\n return stepChangesAt - now;\n } else {\n if (future) {\n // No step.\n // Update right after zero point, when it changes from \"future\" to \"past\".\n return timestamp - now + 1;\n } else {\n // The last step doesn't ever change when `date` is in the past.\n return INFINITY;\n }\n }\n}\n//# sourceMappingURL=getTimeToNextUpdate.js.map","// For all locales added\n// their relative time formatter messages will be stored here.\nvar localesData = {};\nexport function getLocaleData(locale) {\n return localesData[locale];\n}\nexport function addLocaleData(localeData) {\n if (!localeData) {\n throw new Error('[javascript-time-ago] No locale data passed.');\n } // This locale data is stored in a global variable\n // and later used when calling `.format(time)`.\n\n\n localesData[localeData.locale] = localeData;\n}\n//# sourceMappingURL=LocaleDataStore.js.map","// just now\n// 1 second ago\n// 2 seconds ago\n// …\n// 59 seconds ago\n// 1 minute ago\n// 2 minutes ago\n// …\n// 59 minutes ago\n// 1 hour ago\n// 2 hours ago\n// …\n// 24 hours ago\n// 1 day ago\n// 2 days ago\n// …\n// 6 days ago\n// 1 week ago\n// 2 weeks ago\n// …\n// 3 weeks ago\n// 1 month ago\n// 2 months ago\n// …\n// 11 months ago\n// 1 year ago\n// 2 years ago\n// …\nexport default [{\n formatAs: 'now'\n}, {\n formatAs: 'second'\n}, {\n formatAs: 'minute'\n}, {\n formatAs: 'hour'\n}, {\n formatAs: 'day'\n}, {\n formatAs: 'week'\n}, {\n formatAs: 'month'\n}, {\n formatAs: 'year'\n}];\n//# sourceMappingURL=round.js.map","import round from '../steps/round.js'; // just now\n// 1 second ago\n// 2 seconds ago\n// …\n// 59 seconds ago\n// 1 minute ago\n// 2 minutes ago\n// …\n// 59 minutes ago\n// 1 minute ago\n// 2 minutes ago\n// …\n// 59 minutes ago\n// 1 hour ago\n// 2 hours ago\n// …\n// 24 hours ago\n// 1 day ago\n// 2 days ago\n// …\n// 6 days ago\n// 1 week ago\n// 2 weeks ago\n// 3 weeks ago\n// 4 weeks ago\n// 1 month ago\n// 2 months ago\n// …\n// 11 months ago\n// 1 year ago\n// 2 years ago\n// …\n//\n\nexport default {\n steps: round,\n labels: 'long'\n};\n//# sourceMappingURL=round.js.map","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); 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 = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : 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 round from './round.js'; // just now\n// 1 minute ago\n// 2 minutes ago\n// …\n// 59 minutes ago\n// 1 minute ago\n// 2 minutes ago\n// …\n// 59 minutes ago\n// 1 hour ago\n// 2 hours ago\n// …\n// 24 hours ago\n// 1 day ago\n// 2 days ago\n// …\n// 6 days ago\n// 1 week ago\n// 2 weeks ago\n// 3 weeks ago\n// 4 weeks ago\n// 1 month ago\n// 2 months ago\n// …\n// 11 months ago\n// 1 year ago\n// 2 years ago\n// …\n//\n\nexport default _objectSpread(_objectSpread({}, round), {}, {\n // Skip \"seconds\".\n steps: round.steps.filter(function (step) {\n return step.formatAs !== 'second';\n })\n});\n//# sourceMappingURL=roundMinute.js.map","import { minute, hour, day, week, month, year } from './units.js'; // \"factor\" is a legacy property.\n// Developers shouldn't need to use it in their custom steps.\n// \"threshold\" is a legacy name of \"min\".\n// Developers should use \"min\" property name instead of \"threshold\".\n// \"threshold_for_idOrUnit: value\" is a legacy way of specifying \"min: { id: value }\".\n// Developers should use \"min\" property instead of \"threshold\".\n// just now\n// 1 minute ago\n// 2 minutes ago\n// 5 minutes ago\n// 10 minutes ago\n// 15 minutes ago\n// 20 minutes ago\n// …\n// 50 minutes ago\n// an hour ago\n// 2 hours ago\n// …\n// 20 hours ago\n// a day ago\n// 2 days ago\n// 5 days ago\n// a week ago\n// 2 weeks ago\n// 3 weeks ago\n// a month ago\n// 2 months ago\n// 4 months ago\n// a year ago\n// 2 years ago\n// …\n\nexport default [{\n // This step returns the amount of seconds\n // by dividing the amount of seconds by `1`.\n factor: 1,\n // \"now\" labels are used for formatting the output.\n unit: 'now'\n}, {\n // When the language doesn't support `now` unit,\n // the first step is ignored, and it uses this `second` unit.\n threshold: 1,\n // `threshold_for_now` should be the same as `threshold` on minutes.\n threshold_for_now: 45.5,\n // This step returns the amount of seconds\n // by dividing the amount of seconds by `1`.\n factor: 1,\n // \"second\" labels are used for formatting the output.\n unit: 'second'\n}, {\n // `threshold` should be the same as `threshold_for_now` on seconds.\n threshold: 45.5,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in a minute.\n factor: minute,\n // \"minute\" labels are used for formatting the output.\n unit: 'minute'\n}, {\n // This step is effective starting from 2.5 minutes.\n threshold: 2.5 * minute,\n // Allow only 5-minute increments of minutes starting from 2.5 minutes.\n // `granularity` — (advanced) Time interval value \"granularity\".\n // For example, it could be set to `5` for minutes to allow only 5-minute increments\n // when formatting time intervals: `0 minutes`, `5 minutes`, `10 minutes`, etc.\n // Perhaps this feature will be removed because there seem to be no use cases\n // of it in the real world.\n granularity: 5,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in a minute.\n factor: minute,\n // \"minute\" labels are used for formatting the output.\n unit: 'minute'\n}, {\n // This step is effective starting from 22.5 minutes.\n threshold: 22.5 * minute,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in half-an-hour.\n factor: 0.5 * hour,\n // \"half-hour\" labels are used for formatting the output.\n // (if available, which is no longer the case)\n unit: 'half-hour'\n}, {\n // This step is effective starting from 42.5 minutes.\n threshold: 42.5 * minute,\n threshold_for_minute: 52.5 * minute,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in an hour.\n factor: hour,\n // \"hour\" labels are used for formatting the output.\n unit: 'hour'\n}, {\n // This step is effective starting from 20.5 hours.\n threshold: 20.5 / 24 * day,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in a day.\n factor: day,\n // \"day\" labels are used for formatting the output.\n unit: 'day'\n}, {\n // This step is effective starting from 5.5 days.\n threshold: 5.5 * day,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in a week.\n factor: week,\n // \"week\" labels are used for formatting the output.\n unit: 'week'\n}, {\n // This step is effective starting from 3.5 weeks.\n threshold: 3.5 * week,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in a month.\n factor: month,\n // \"month\" labels are used for formatting the output.\n unit: 'month'\n}, {\n // This step is effective starting from 10.5 months.\n threshold: 10.5 * month,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in a year.\n factor: year,\n // \"year\" labels are used for formatting the output.\n unit: 'year'\n}];\n//# sourceMappingURL=approximate.js.map","import approximate from '../steps/approximate.js'; // \"gradation\" is a legacy name for \"steps\".\n// It's here just for legacy compatibility.\n// Use \"steps\" name instead.\n// \"flavour\" is a legacy name for \"labels\".\n// It's here just for legacy compatibility.\n// Use \"labels\" name instead.\n// \"units\" is a legacy property.\n// It's here just for legacy compatibility.\n// Developers shouldn't need to use it in their custom styles.\n\nexport default {\n gradation: approximate,\n flavour: 'long',\n units: ['now', 'minute', 'hour', 'day', 'week', 'month', 'year']\n};\n//# sourceMappingURL=approximate.js.map","import approximate from '../steps/approximate.js'; // \"gradation\" is a legacy name for \"steps\".\n// It's here just for legacy compatibility.\n// Use \"steps\" name instead.\n// \"flavour\" is a legacy name for \"labels\".\n// It's here just for legacy compatibility.\n// Use \"labels\" name instead.\n// \"units\" is a legacy property.\n// It's here just for legacy compatibility.\n// Developers shouldn't need to use it in their custom styles.\n// Similar to the default style but with \"ago\" omitted.\n//\n// just now\n// 5 minutes\n// 10 minutes\n// 15 minutes\n// 20 minutes\n// an hour\n// 2 hours\n// …\n// 20 hours\n// 1 day\n// 2 days\n// a week\n// 2 weeks\n// 3 weeks\n// a month\n// 2 months\n// 3 months\n// 4 months\n// a year\n// 2 years\n//\n\nexport default {\n gradation: approximate,\n flavour: 'long-time',\n units: ['now', 'minute', 'hour', 'day', 'week', 'month', 'year']\n};\n//# sourceMappingURL=approximateTime.js.map","// Looks like this one's deprecated.\n// /**\n// * Returns a step corresponding to the unit.\n// * @param {Object[]} steps\n// * @param {string} unit\n// * @return {?Object}\n// */\n// export function getStepForUnit(steps, unit) {\n// \tfor (const step of steps) {\n// \t\tif (step.unit === unit) {\n// \t\t\treturn step\n// \t\t}\n// \t}\n// }\n// Looks like this one won't be used in the next major version.\n\n/**\r\n * Converts value to a `Date`\r\n * @param {(number|Date)} value\r\n * @return {Date}\r\n */\nexport function getDate(value) {\n return value instanceof Date ? value : new Date(value);\n}\n//# sourceMappingURL=helpers.js.map","import { day, getDate } from '../steps/index.js';\nimport { intlDateTimeFormatSupported } from '../locale.js'; // For compatibility with the old versions of this library.\n\nimport renameLegacyProperties from './renameLegacyProperties.js'; // Twitter-style relative date/time formatting.\n// (\"1m\", \"2h\", \"Mar 3\", \"Apr 4, 2012\").\n//\n// Seconds, minutes or hours are shown for shorter intervals,\n// and longer intervals are formatted using full date format.\n\nvar steps = [{\n formatAs: 'second'\n}, {\n formatAs: 'minute'\n}, {\n formatAs: 'hour'\n}]; // A cache for `Intl.DateTimeFormat` formatters\n// for various locales (is a global variable).\n\nvar formatters = {}; // Starting from day intervals, output month and day.\n\nvar monthAndDay = {\n minTime: function minTime(timestamp, _ref) {\n var future = _ref.future,\n getMinTimeForUnit = _ref.getMinTimeForUnit;\n // Returns `23.5 * 60 * 60` when `round` is \"round\",\n // and `24 * 60 * 60` when `round` is \"floor\".\n return getMinTimeForUnit('day');\n },\n format: function format(value, locale) {\n /* istanbul ignore else */\n if (!formatters[locale]) {\n formatters[locale] = {};\n }\n /* istanbul ignore else */\n\n\n if (!formatters[locale].dayMonth) {\n // \"Apr 11\" (MMMd)\n formatters[locale].dayMonth = new Intl.DateTimeFormat(locale, {\n month: 'short',\n day: 'numeric'\n });\n } // Output month and day.\n\n\n return formatters[locale].dayMonth.format(getDate(value));\n }\n}; // If the `date` happened/happens outside of current year,\n// then output day, month and year.\n// The interval should be such that the `date` lies outside of the current year.\n\nvar yearMonthAndDay = {\n minTime: function minTime(timestamp, _ref2) {\n var future = _ref2.future;\n\n if (future) {\n // January 1, 00:00, of the `date`'s year is right after\n // the maximum `now` for formatting a future date:\n // When `now` is before that date, the `date` is formatted as \"day/month/year\" (this step),\n // When `now` is equal to or after that date, the `date` is formatted as \"day/month\" (another step).\n // After that, it's hours, minutes, seconds, and after that it's no longer `future`.\n // The date is right after the maximum `now` for formatting a future date,\n // so subtract 1 millisecond from it.\n var maxFittingNow = new Date(new Date(timestamp).getFullYear(), 0).getTime() - 1; // Return `minTime` (in seconds).\n\n return (timestamp - maxFittingNow) / 1000;\n } else {\n // January 1, 00:00, of the year following the `date`'s year\n // is the minimum `now` for formatting a past date:\n // When `now` is before that date, the `date` is formatted as \"day/month\" (another step),\n // When `now` is equal to or after that date, the `date` is formatted as \"day/month/year\" (this step).\n // After that, it's hours, minutes, seconds, and after that it's no longer `future`.\n var minFittingNow = new Date(new Date(timestamp).getFullYear() + 1, 0).getTime(); // Return `minTime` (in seconds).\n\n return (minFittingNow - timestamp) / 1000;\n }\n },\n format: function format(value, locale) {\n /* istanbul ignore if */\n if (!formatters[locale]) {\n formatters[locale] = {};\n }\n /* istanbul ignore else */\n\n\n if (!formatters[locale].dayMonthYear) {\n // \"Apr 11, 2017\" (yMMMd)\n formatters[locale].dayMonthYear = new Intl.DateTimeFormat(locale, {\n year: 'numeric',\n month: 'short',\n day: 'numeric'\n });\n } // Output day, month and year.\n\n\n return formatters[locale].dayMonthYear.format(getDate(value));\n }\n}; // If `Intl.DateTimeFormat` is supported,\n// then longer time intervals will be formatted as dates.\n\n/* istanbul ignore else */\n\nif (intlDateTimeFormatSupported()) {\n steps.push(monthAndDay, yearMonthAndDay);\n} // Otherwise, if `Intl.DateTimeFormat` is not supported,\n// which could be the case when using Internet Explorer,\n// then simply mimick \"round\" steps.\nelse {\n steps.push({\n formatAs: 'day'\n }, {\n formatAs: 'week'\n }, {\n formatAs: 'month'\n }, {\n formatAs: 'year'\n });\n}\n\nexport default {\n steps: steps,\n labels: [// \"mini\" labels are only defined for a few languages.\n 'mini', // \"short-time\" labels are only defined for a few languages.\n 'short-time', // \"narrow\" and \"short\" labels are defined for all languages.\n // \"narrow\" labels can sometimes be weird (like \"+5d.\"),\n // but \"short\" labels have the \" ago\" part, so \"narrow\" seem\n // more appropriate.\n // \"short\" labels would have been more appropriate if they\n // didn't have the \" ago\" part, hence the \"short-time\" above.\n 'narrow', // Since \"narrow\" labels are always present, \"short\" element\n // of this array can be removed.\n 'short']\n};\n//# sourceMappingURL=twitter.js.map","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); 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 = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : 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 twitter from './twitter.js';\nexport default _objectSpread(_objectSpread({}, twitter), {}, {\n // Add \"now\".\n steps: [{\n formatAs: 'now'\n }].concat(twitter.steps)\n});\n//# sourceMappingURL=twitterNow.js.map","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); 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 = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : 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 twitter from './twitter.js';\nexport default _objectSpread(_objectSpread({}, twitter), {}, {\n // Skip \"seconds\".\n steps: twitter.steps.filter(function (step) {\n return step.formatAs !== 'second';\n })\n});\n//# sourceMappingURL=twitterMinute.js.map","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); 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 = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : 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 twitterMinute from './twitterMinute.js';\nexport default _objectSpread(_objectSpread({}, twitterMinute), {}, {\n // Add \"now\".\n steps: [{\n formatAs: 'now'\n }].concat(twitterMinute.steps)\n});\n//# sourceMappingURL=twitterMinuteNow.js.map","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); 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 = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : 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 { minute } from '../steps/units.js';\nimport twitter from './twitter.js';\nexport default _objectSpread(_objectSpread({}, twitter), {}, {\n // Skip \"seconds\".\n steps: twitter.steps.filter(function (step) {\n return step.formatAs !== 'second';\n }) // Start showing `1m` from the first minute.\n .map(function (step) {\n return step.formatAs === 'minute' ? _objectSpread(_objectSpread({}, step), {}, {\n minTime: minute\n }) : step;\n })\n});\n//# sourceMappingURL=twitterFirstMinute.js.map","export default {\n steps: [{\n formatAs: 'second'\n }, {\n formatAs: 'minute'\n }, {\n formatAs: 'hour'\n }, {\n formatAs: 'day'\n }, {\n formatAs: 'month'\n }, {\n formatAs: 'year'\n }],\n labels: [// \"mini\" labels are only defined for a few languages.\n 'mini', // \"short-time\" labels are only defined for a few languages.\n 'short-time', // \"narrow\" and \"short\" labels are defined for all languages.\n // \"narrow\" labels can sometimes be weird (like \"+5d.\"),\n // but \"short\" labels have the \" ago\" part, so \"narrow\" seem\n // more appropriate.\n // \"short\" labels would have been more appropriate if they\n // didn't have the \" ago\" part, hence the \"short-time\" above.\n 'narrow', // Since \"narrow\" labels are always present, \"short\" element\n // of this array can be removed.\n 'short']\n};\n//# sourceMappingURL=mini.js.map","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); 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 = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : 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 mini from './mini.js';\nexport default _objectSpread(_objectSpread({}, mini), {}, {\n // Add \"now\".\n steps: [{\n formatAs: 'now'\n }].concat(mini.steps)\n});\n//# sourceMappingURL=miniNow.js.map","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); 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 = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : 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 mini from './mini.js';\nexport default _objectSpread(_objectSpread({}, mini), {}, {\n // Skip \"seconds\".\n steps: mini.steps.filter(function (step) {\n return step.formatAs !== 'second';\n })\n});\n//# sourceMappingURL=miniMinute.js.map","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); 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 = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : 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 miniMinute from './miniMinute.js';\nexport default _objectSpread(_objectSpread({}, miniMinute), {}, {\n // Add \"now\".\n steps: [{\n formatAs: 'now'\n }].concat(miniMinute.steps)\n});\n//# sourceMappingURL=miniMinuteNow.js.map","import round from './round.js';\nimport roundMinute from './roundMinute.js'; // `approximate` style is deprecated.\n\nimport approximate from './approximate.js'; // `approximateTime` style is deprecated.\n\nimport approximateTime from './approximateTime.js';\nimport twitter from './twitter.js';\nimport twitterNow from './twitterNow.js';\nimport twitterMinute from './twitterMinute.js';\nimport twitterMinuteNow from './twitterMinuteNow.js';\nimport twitterFirstMinute from './twitterFirstMinute.js';\nimport mini from './mini.js';\nimport miniNow from './miniNow.js';\nimport miniMinute from './miniMinute.js';\nimport miniMinuteNow from './miniMinuteNow.js';\nexport default function getStyleByName(style) {\n switch (style) {\n // \"default\" style name is deprecated.\n case 'default':\n case 'round':\n return round;\n\n case 'round-minute':\n return roundMinute;\n\n case 'approximate':\n return approximate;\n // \"time\" style name is deprecated.\n\n case 'time':\n case 'approximate-time':\n return approximateTime;\n\n case 'mini':\n return mini;\n\n case 'mini-now':\n return miniNow;\n\n case 'mini-minute':\n return miniMinute;\n\n case 'mini-minute-now':\n return miniMinuteNow;\n\n case 'twitter':\n return twitter;\n\n case 'twitter-now':\n return twitterNow;\n\n case 'twitter-minute':\n return twitterMinute;\n\n case 'twitter-minute-now':\n return twitterMinuteNow;\n\n case 'twitter-first-minute':\n return twitterFirstMinute;\n\n default:\n // For historical reasons, the default style is \"approximate\".\n return approximate;\n }\n}\n//# sourceMappingURL=getStyleByName.js.map","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } 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\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _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(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\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 _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\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); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport RelativeTimeFormatPolyfill from 'relative-time-format';\nimport Cache from './cache.js';\nimport chooseLocale from './locale.js';\nimport isStyleObject from './isStyleObject.js';\nimport getStep from './steps/getStep.js';\nimport getStepDenominator from './steps/getStepDenominator.js';\nimport getTimeToNextUpdate from './steps/getTimeToNextUpdate.js';\nimport { addLocaleData, getLocaleData } from './LocaleDataStore.js';\nimport defaultStyle from './style/roundMinute.js';\nimport getStyleByName from './style/getStyleByName.js';\nimport { getRoundFunction } from './round.js'; // Valid time units.\n\nvar UNITS = ['now', // The rest are the same as in `Intl.RelativeTimeFormat`.\n'second', 'minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'];\n\nvar TimeAgo = /*#__PURE__*/function () {\n /**\r\n * @param {(string|string[])} locales=[] - Preferred locales (or locale).\r\n * @param {boolean} [polyfill] — Pass `false` to use native `Intl.RelativeTimeFormat` and `Intl.PluralRules` instead of the polyfills.\r\n */\n function TimeAgo() {\n var locales = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n polyfill = _ref.polyfill;\n\n _classCallCheck(this, TimeAgo);\n\n // Convert `locales` to an array.\n if (typeof locales === 'string') {\n locales = [locales];\n } // Choose the most appropriate locale\n // from the list of `locales` added by the user.\n // For example, new TimeAgo(\"en-US\") -> \"en\".\n\n\n this.locale = chooseLocale(locales.concat(TimeAgo.getDefaultLocale()), getLocaleData);\n\n if (typeof Intl !== 'undefined') {\n // Use `Intl.NumberFormat` for formatting numbers (when available).\n if (Intl.NumberFormat) {\n this.numberFormat = new Intl.NumberFormat(this.locale);\n }\n } // Some people have requested the ability to use native\n // `Intl.RelativeTimeFormat` and `Intl.PluralRules`\n // instead of the polyfills.\n // https://github.com/catamphetamine/javascript-time-ago/issues/21\n\n\n if (polyfill === false) {\n this.IntlRelativeTimeFormat = Intl.RelativeTimeFormat;\n this.IntlPluralRules = Intl.PluralRules;\n } else {\n this.IntlRelativeTimeFormat = RelativeTimeFormatPolyfill;\n this.IntlPluralRules = RelativeTimeFormatPolyfill.PluralRules;\n } // Cache `Intl.RelativeTimeFormat` instance.\n\n\n this.relativeTimeFormatCache = new Cache(); // Cache `Intl.PluralRules` instance.\n\n this.pluralRulesCache = new Cache();\n }\n /**\r\n * Formats relative date/time.\r\n *\r\n * @param {(number|Date)} input — A `Date` or a javascript timestamp.\r\n *\r\n * @param {(string|object)} style — Date/time formatting style. Either one of the built-in style names or a \"custom\" style definition object having `steps: object[]` and `labels: string[]`.\r\n *\r\n * @param {number} [options.now] - Sets the current date timestamp.\r\n *\r\n * @param {boolean} [options.future] — Tells how to format value `0`:\r\n * as \"future\" (`true`) or \"past\" (`false`).\r\n * Is `false` by default, but should have been `true` actually,\r\n * in order to correspond to `Intl.RelativeTimeFormat`\r\n * that uses `future` formatting for `0` unless `-0` is passed.\r\n *\r\n * @param {string} [options.round] — Rounding method. Overrides the style's one.\r\n *\r\n * @param {boolean} [options.getTimeToNextUpdate] — Pass `true` to return `[formattedDate, timeToNextUpdate]` instead of just `formattedDate`.\r\n *\r\n * @return {string} The formatted relative date/time. If no eligible `step` is found, then an empty string is returned.\r\n */\n\n\n _createClass(TimeAgo, [{\n key: \"format\",\n value: function format(input, style, options) {\n if (!options) {\n if (style && !isStyle(style)) {\n options = style;\n style = undefined;\n } else {\n options = {};\n }\n }\n\n if (!style) {\n style = defaultStyle;\n }\n\n if (typeof style === 'string') {\n style = getStyleByName(style);\n }\n\n var timestamp = getTimestamp(input); // Get locale messages for this type of labels.\n // \"flavour\" is a legacy name for \"labels\".\n\n var _this$getLabels = this.getLabels(style.flavour || style.labels),\n labels = _this$getLabels.labels,\n labelsType = _this$getLabels.labelsType;\n\n var now; // Can pass a custom `now`, e.g. for testing purposes.\n //\n // Legacy way was passing `now` in `style`.\n // That way is deprecated.\n\n if (style.now !== undefined) {\n now = style.now;\n } // The new way is passing `now` option to `.format()`.\n\n\n if (now === undefined && options.now !== undefined) {\n now = options.now;\n }\n\n if (now === undefined) {\n now = Date.now();\n } // how much time has passed (in seconds)\n\n\n var secondsPassed = (now - timestamp) / 1000; // in seconds\n\n var future = options.future || secondsPassed < 0;\n var nowLabel = getNowLabel(labels, getLocaleData(this.locale).now, getLocaleData(this.locale)[\"long\"], future); // `custom` – A function of `{ elapsed, time, date, now, locale }`.\n //\n // Looks like `custom` function is deprecated and will be removed\n // in the next major version.\n //\n // If this function returns a value, then the `.format()` call will return that value.\n // Otherwise the relative date/time is formatted as usual.\n // This feature is currently not used anywhere and is here\n // just for providing the ultimate customization point\n // in case anyone would ever need that. Prefer using\n // `steps[step].format(value, locale)` instead.\n //\n\n if (style.custom) {\n var custom = style.custom({\n now: now,\n date: new Date(timestamp),\n time: timestamp,\n elapsed: secondsPassed,\n locale: this.locale\n });\n\n if (custom !== undefined) {\n // Won't return `timeToNextUpdate` here\n // because `custom()` seems deprecated.\n return custom;\n }\n } // Get the list of available time interval units.\n\n\n var units = getTimeIntervalMeasurementUnits( // Controlling `style.steps` through `style.units` seems to be deprecated:\n // create a new custom `style` instead.\n style.units, labels, nowLabel); // // If no available time unit is suitable, just output an empty string.\n // if (units.length === 0) {\n // \tconsole.error(`None of the \"${units.join(', ')}\" time units have been found in \"${labelsType}\" labels for \"${this.locale}\" locale.`)\n // \treturn ''\n // }\n\n var round = options.round || style.round; // Choose the appropriate time measurement unit\n // and get the corresponding rounded time amount.\n\n var _getStep = getStep( // \"gradation\" is a legacy name for \"steps\".\n // For historical reasons, \"approximate\" steps are used by default.\n // In the next major version, there'll be no default for `steps`.\n style.gradation || style.steps || defaultStyle.steps, secondsPassed, {\n now: now,\n units: units,\n round: round,\n future: future,\n getNextStep: true\n }),\n _getStep2 = _slicedToArray(_getStep, 3),\n prevStep = _getStep2[0],\n step = _getStep2[1],\n nextStep = _getStep2[2];\n\n var formattedDate = this.formatDateForStep(timestamp, step, secondsPassed, {\n labels: labels,\n labelsType: labelsType,\n nowLabel: nowLabel,\n now: now,\n future: future,\n round: round\n }) || '';\n\n if (options.getTimeToNextUpdate) {\n var timeToNextUpdate = getTimeToNextUpdate(timestamp, step, {\n nextStep: nextStep,\n prevStep: prevStep,\n now: now,\n future: future,\n round: round\n });\n return [formattedDate, timeToNextUpdate];\n }\n\n return formattedDate;\n }\n }, {\n key: \"formatDateForStep\",\n value: function formatDateForStep(timestamp, step, secondsPassed, _ref2) {\n var _this = this;\n\n var labels = _ref2.labels,\n labelsType = _ref2.labelsType,\n nowLabel = _ref2.nowLabel,\n now = _ref2.now,\n future = _ref2.future,\n round = _ref2.round;\n\n // If no step matches, then output an empty string.\n if (!step) {\n return;\n }\n\n if (step.format) {\n return step.format(timestamp, this.locale, {\n formatAs: function formatAs(unit, value) {\n // Mimicks `Intl.RelativeTimeFormat.format()`.\n return _this.formatValue(value, unit, {\n labels: labels,\n future: future\n });\n },\n now: now,\n future: future\n });\n } // \"unit\" is now called \"formatAs\".\n\n\n var unit = step.unit || step.formatAs;\n\n if (!unit) {\n throw new Error(\"[javascript-time-ago] Each step must define either `formatAs` or `format()`. Step: \".concat(JSON.stringify(step)));\n } // `Intl.RelativeTimeFormat` doesn't operate in \"now\" units.\n // Therefore, threat \"now\" as a special case.\n\n\n if (unit === 'now') {\n return nowLabel;\n } // Amount in units.\n\n\n var amount = Math.abs(secondsPassed) / getStepDenominator(step); // Apply granularity to the time amount\n // (and fallback to the previous step\n // if the first level of granularity\n // isn't met by this amount)\n //\n // `granularity` — (advanced) Time interval value \"granularity\".\n // For example, it could be set to `5` for minutes to allow only 5-minute increments\n // when formatting time intervals: `0 minutes`, `5 minutes`, `10 minutes`, etc.\n // Perhaps this feature will be removed because there seem to be no use cases\n // of it in the real world.\n //\n\n if (step.granularity) {\n // Recalculate the amount of seconds passed based on granularity\n amount = getRoundFunction(round)(amount / step.granularity) * step.granularity;\n }\n\n var valueForFormatting = -1 * Math.sign(secondsPassed) * getRoundFunction(round)(amount); // By default, this library formats a `0` in \"past\" mode,\n // unless `future: true` option is passed.\n // This is different to `relative-time-format`'s behavior\n // which formats a `0` in \"future\" mode by default, unless it's a `-0`.\n // So, convert `0` to `-0` if `future: true` option wasn't passed.\n // `=== 0` matches both `0` and `-0`.\n\n if (valueForFormatting === 0) {\n if (future) {\n valueForFormatting = 0;\n } else {\n valueForFormatting = -0;\n }\n }\n\n switch (labelsType) {\n case 'long':\n case 'short':\n case 'narrow':\n // Format the amount using `Intl.RelativeTimeFormat`.\n return this.getFormatter(labelsType).format(valueForFormatting, unit);\n\n default:\n // Format the amount.\n // (mimicks `Intl.RelativeTimeFormat` behavior for other time label styles)\n return this.formatValue(valueForFormatting, unit, {\n labels: labels,\n future: future\n });\n }\n }\n /**\r\n * Mimicks what `Intl.RelativeTimeFormat` does for additional locale styles.\r\n * @param {number} value\r\n * @param {string} unit\r\n * @param {object} options.labels — Relative time labels.\r\n * @param {boolean} [options.future] — Tells how to format value `0`: as \"future\" (`true`) or \"past\" (`false`). Is `false` by default, but should have been `true` actually.\r\n * @return {string}\r\n */\n\n }, {\n key: \"formatValue\",\n value: function formatValue(value, unit, _ref3) {\n var labels = _ref3.labels,\n future = _ref3.future;\n return this.getFormattingRule(labels, unit, value, {\n future: future\n }).replace('{0}', this.formatNumber(Math.abs(value)));\n }\n /**\r\n * Returns formatting rule for `value` in `units` (either in past or in future).\r\n * @param {object} formattingRules — Relative time labels for different units.\r\n * @param {string} unit - Time interval measurement unit.\r\n * @param {number} value - Time interval value.\r\n * @param {boolean} [options.future] — Tells how to format value `0`: as \"future\" (`true`) or \"past\" (`false`). Is `false` by default.\r\n * @return {string}\r\n * @example\r\n * // Returns \"{0} days ago\"\r\n * getFormattingRule(en.long, \"day\", -2, 'en')\r\n */\n\n }, {\n key: \"getFormattingRule\",\n value: function getFormattingRule(formattingRules, unit, value, _ref4) {\n var future = _ref4.future;\n // Passing the language is required in order to\n // be able to correctly classify the `value` as a number.\n var locale = this.locale;\n formattingRules = formattingRules[unit]; // Check for a special \"compacted\" rules case:\n // if formatting rules are the same for \"past\" and \"future\",\n // and also for all possible `value`s, then those rules are\n // stored as a single string.\n\n if (typeof formattingRules === 'string') {\n return formattingRules;\n } // Choose either \"past\" or \"future\" based on time `value` sign.\n // If \"past\" is same as \"future\" then they're stored as \"other\".\n // If there's only \"other\" then it's being collapsed.\n\n\n var pastOrFuture = value === 0 ? future ? 'future' : 'past' : value < 0 ? 'past' : 'future';\n var quantifierRules = formattingRules[pastOrFuture] || formattingRules; // Bundle size optimization technique.\n\n if (typeof quantifierRules === 'string') {\n return quantifierRules;\n } // Quantify `value`.\n\n\n var quantifier = this.getPluralRules().select(Math.abs(value)); // \"other\" rule is supposed to always be present.\n // If only \"other\" rule is present then \"rules\" is not an object and is a string.\n\n return quantifierRules[quantifier] || quantifierRules.other;\n }\n /**\r\n * Formats a number into a string.\r\n * Uses `Intl.NumberFormat` when available.\r\n * @param {number} number\r\n * @return {string}\r\n */\n\n }, {\n key: \"formatNumber\",\n value: function formatNumber(number) {\n return this.numberFormat ? this.numberFormat.format(number) : String(number);\n }\n /**\r\n * Returns an `Intl.RelativeTimeFormat` for a given `labelsType`.\r\n * @param {string} labelsType\r\n * @return {object} `Intl.RelativeTimeFormat` instance\r\n */\n\n }, {\n key: \"getFormatter\",\n value: function getFormatter(labelsType) {\n // `Intl.RelativeTimeFormat` instance creation is (hypothetically) assumed\n // a lengthy operation so the instances are cached and reused.\n return this.relativeTimeFormatCache.get(this.locale, labelsType) || this.relativeTimeFormatCache.put(this.locale, labelsType, new this.IntlRelativeTimeFormat(this.locale, {\n style: labelsType\n }));\n }\n /**\r\n * Returns an `Intl.PluralRules` instance.\r\n * @return {object} `Intl.PluralRules` instance\r\n */\n\n }, {\n key: \"getPluralRules\",\n value: function getPluralRules() {\n // `Intl.PluralRules` instance creation is (hypothetically) assumed\n // a lengthy operation so the instances are cached and reused.\n return this.pluralRulesCache.get(this.locale) || this.pluralRulesCache.put(this.locale, new this.IntlPluralRules(this.locale));\n }\n /**\r\n * Gets localized labels for this type of labels.\r\n *\r\n * @param {(string|string[])} labelsType - Relative date/time labels type.\r\n * If it's an array then all label types are tried\r\n * until a suitable one is found.\r\n *\r\n * @returns {Object} Returns an object of shape { labelsType, labels }\r\n */\n\n }, {\n key: \"getLabels\",\n value: function getLabels() {\n var labelsType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n // Convert `labels` to an array.\n if (typeof labelsType === 'string') {\n labelsType = [labelsType];\n } // Supports legacy \"tiny\" and \"mini-time\" label styles.\n\n\n labelsType = labelsType.map(function (labelsType) {\n switch (labelsType) {\n case 'tiny':\n case 'mini-time':\n return 'mini';\n\n default:\n return labelsType;\n }\n }); // \"long\" labels type is the default one.\n // (it's always present for all languages)\n\n labelsType = labelsType.concat('long'); // Find a suitable labels type.\n\n var localeData = getLocaleData(this.locale);\n\n for (var _iterator = _createForOfIteratorHelperLoose(labelsType), _step; !(_step = _iterator()).done;) {\n var _labelsType = _step.value;\n\n if (localeData[_labelsType]) {\n return {\n labelsType: _labelsType,\n labels: localeData[_labelsType]\n };\n }\n }\n }\n }]);\n\n return TimeAgo;\n}();\n/**\r\n * Default locale global variable.\r\n */\n\n\nexport { TimeAgo as default };\nvar defaultLocale = 'en';\n/**\r\n * Gets default locale.\r\n * @return {string} locale\r\n */\n\nTimeAgo.getDefaultLocale = function () {\n return defaultLocale;\n};\n/**\r\n * Sets default locale.\r\n * @param {string} locale\r\n */\n\n\nTimeAgo.setDefaultLocale = function (locale) {\n return defaultLocale = locale;\n};\n/**\r\n * Adds locale data for a specific locale and marks the locale as default.\r\n * @param {Object} localeData\r\n */\n\n\nTimeAgo.addDefaultLocale = function (localeData) {\n if (defaultLocaleHasBeenSpecified) {\n return console.error('[javascript-time-ago] `TimeAgo.addDefaultLocale()` can only be called once. To add other locales, use `TimeAgo.addLocale()`.');\n }\n\n defaultLocaleHasBeenSpecified = true;\n TimeAgo.setDefaultLocale(localeData.locale);\n TimeAgo.addLocale(localeData);\n};\n\nvar defaultLocaleHasBeenSpecified;\n/**\r\n * Adds locale data for a specific locale.\r\n * @param {Object} localeData\r\n */\n\nTimeAgo.addLocale = function (localeData) {\n addLocaleData(localeData);\n RelativeTimeFormatPolyfill.addLocale(localeData);\n};\n/**\r\n * (legacy alias)\r\n * Adds locale data for a specific locale.\r\n * @param {Object} localeData\r\n * @deprecated\r\n */\n\n\nTimeAgo.locale = TimeAgo.addLocale;\n/**\r\n * Adds custom labels to locale data.\r\n * @param {string} locale\r\n * @param {string} name\r\n * @param {object} labels\r\n */\n\nTimeAgo.addLabels = function (locale, name, labels) {\n var localeData = getLocaleData(locale);\n\n if (!localeData) {\n addLocaleData({\n locale: locale\n });\n localeData = getLocaleData(locale); // throw new Error(`[javascript-time-ago] No data for locale \"${locale}\"`)\n }\n\n localeData[name] = labels;\n}; // Normalizes `.format()` `time` argument.\n\n\nfunction getTimestamp(input) {\n if (input.constructor === Date || isMockedDate(input)) {\n return input.getTime();\n }\n\n if (typeof input === 'number') {\n return input;\n } // For some weird reason istanbul doesn't see this `throw` covered.\n\n /* istanbul ignore next */\n\n\n throw new Error(\"Unsupported relative time formatter input: \".concat(_typeof(input), \", \").concat(input));\n} // During testing via some testing libraries `Date`s aren't actually `Date`s.\n// https://github.com/catamphetamine/javascript-time-ago/issues/22\n\n\nfunction isMockedDate(object) {\n return _typeof(object) === 'object' && typeof object.getTime === 'function';\n} // Get available time interval measurement units.\n\n\nfunction getTimeIntervalMeasurementUnits(allowedUnits, labels, nowLabel) {\n // Get all time interval measurement units that're available\n // in locale data for a given time labels style.\n var units = Object.keys(labels); // `now` unit is handled separately and is shipped in its own `now.json` file.\n // `now.json` isn't present for all locales, so it could be substituted with\n // \".second.current\".\n // Add `now` unit if it's available in locale data.\n\n if (nowLabel) {\n units.push('now');\n } // If only a specific set of available time measurement units can be used\n // then only those units are allowed (if they're present in locale data).\n\n\n if (allowedUnits) {\n units = allowedUnits.filter(function (unit) {\n return unit === 'now' || units.indexOf(unit) >= 0;\n });\n }\n\n return units;\n}\n\nfunction getNowLabel(labels, nowLabels, longLabels, future) {\n var nowLabel = labels.now || nowLabels && nowLabels.now; // Specific \"now\" message form extended locale data (if present).\n\n if (nowLabel) {\n // Bundle size optimization technique.\n if (typeof nowLabel === 'string') {\n return nowLabel;\n } // Not handling `value === 0` as `localeData.now.current` here\n // because it wouldn't make sense: \"now\" is a moment,\n // so one can't possibly differentiate between a\n // \"previous\" moment, a \"current\" moment and a \"next moment\".\n // It can only be differentiated between \"past\" and \"future\".\n\n\n if (future) {\n return nowLabel.future;\n } else {\n return nowLabel.past;\n }\n } // Use \".second.current\" as \"now\" message.\n\n\n if (longLabels && longLabels.second && longLabels.second.current) {\n return longLabels.second.current;\n }\n}\n\nfunction isStyle(variable) {\n return typeof variable === 'string' || isStyleObject(variable);\n}\n//# sourceMappingURL=TimeAgo.js.map","export default {\n\t\"locale\": \"en\",\n\t\"long\": {\n\t\t\"year\": {\n\t\t\t\"previous\": \"last year\",\n\t\t\t\"current\": \"this year\",\n\t\t\t\"next\": \"next year\",\n\t\t\t\"past\": {\n\t\t\t\t\"one\": \"{0} year ago\",\n\t\t\t\t\"other\": \"{0} years ago\"\n\t\t\t},\n\t\t\t\"future\": {\n\t\t\t\t\"one\": \"in {0} year\",\n\t\t\t\t\"other\": \"in {0} years\"\n\t\t\t}\n\t\t},\n\t\t\"quarter\": {\n\t\t\t\"previous\": \"last quarter\",\n\t\t\t\"current\": \"this quarter\",\n\t\t\t\"next\": \"next quarter\",\n\t\t\t\"past\": {\n\t\t\t\t\"one\": \"{0} quarter ago\",\n\t\t\t\t\"other\": \"{0} quarters ago\"\n\t\t\t},\n\t\t\t\"future\": {\n\t\t\t\t\"one\": \"in {0} quarter\",\n\t\t\t\t\"other\": \"in {0} quarters\"\n\t\t\t}\n\t\t},\n\t\t\"month\": {\n\t\t\t\"previous\": \"last month\",\n\t\t\t\"current\": \"this month\",\n\t\t\t\"next\": \"next month\",\n\t\t\t\"past\": {\n\t\t\t\t\"one\": \"{0} month ago\",\n\t\t\t\t\"other\": \"{0} months ago\"\n\t\t\t},\n\t\t\t\"future\": {\n\t\t\t\t\"one\": \"in {0} month\",\n\t\t\t\t\"other\": \"in {0} months\"\n\t\t\t}\n\t\t},\n\t\t\"week\": {\n\t\t\t\"previous\": \"last week\",\n\t\t\t\"current\": \"this week\",\n\t\t\t\"next\": \"next week\",\n\t\t\t\"past\": {\n\t\t\t\t\"one\": \"{0} week ago\",\n\t\t\t\t\"other\": \"{0} weeks ago\"\n\t\t\t},\n\t\t\t\"future\": {\n\t\t\t\t\"one\": \"in {0} week\",\n\t\t\t\t\"other\": \"in {0} weeks\"\n\t\t\t}\n\t\t},\n\t\t\"day\": {\n\t\t\t\"previous\": \"yesterday\",\n\t\t\t\"current\": \"today\",\n\t\t\t\"next\": \"tomorrow\",\n\t\t\t\"past\": {\n\t\t\t\t\"one\": \"{0} day ago\",\n\t\t\t\t\"other\": \"{0} days ago\"\n\t\t\t},\n\t\t\t\"future\": {\n\t\t\t\t\"one\": \"in {0} day\",\n\t\t\t\t\"other\": \"in {0} days\"\n\t\t\t}\n\t\t},\n\t\t\"hour\": {\n\t\t\t\"current\": \"this hour\",\n\t\t\t\"past\": {\n\t\t\t\t\"one\": \"{0} hour ago\",\n\t\t\t\t\"other\": \"{0} hours ago\"\n\t\t\t},\n\t\t\t\"future\": {\n\t\t\t\t\"one\": \"in {0} hour\",\n\t\t\t\t\"other\": \"in {0} hours\"\n\t\t\t}\n\t\t},\n\t\t\"minute\": {\n\t\t\t\"current\": \"this minute\",\n\t\t\t\"past\": {\n\t\t\t\t\"one\": \"{0} minute ago\",\n\t\t\t\t\"other\": \"{0} minutes ago\"\n\t\t\t},\n\t\t\t\"future\": {\n\t\t\t\t\"one\": \"in {0} minute\",\n\t\t\t\t\"other\": \"in {0} minutes\"\n\t\t\t}\n\t\t},\n\t\t\"second\": {\n\t\t\t\"current\": \"now\",\n\t\t\t\"past\": {\n\t\t\t\t\"one\": \"{0} second ago\",\n\t\t\t\t\"other\": \"{0} seconds ago\"\n\t\t\t},\n\t\t\t\"future\": {\n\t\t\t\t\"one\": \"in {0} second\",\n\t\t\t\t\"other\": \"in {0} seconds\"\n\t\t\t}\n\t\t}\n\t},\n\t\"short\": {\n\t\t\"year\": {\n\t\t\t\"previous\": \"last yr.\",\n\t\t\t\"current\": \"this yr.\",\n\t\t\t\"next\": \"next yr.\",\n\t\t\t\"past\": \"{0} yr. ago\",\n\t\t\t\"future\": \"in {0} yr.\"\n\t\t},\n\t\t\"quarter\": {\n\t\t\t\"previous\": \"last qtr.\",\n\t\t\t\"current\": \"this qtr.\",\n\t\t\t\"next\": \"next qtr.\",\n\t\t\t\"past\": {\n\t\t\t\t\"one\": \"{0} qtr. ago\",\n\t\t\t\t\"other\": \"{0} qtrs. ago\"\n\t\t\t},\n\t\t\t\"future\": {\n\t\t\t\t\"one\": \"in {0} qtr.\",\n\t\t\t\t\"other\": \"in {0} qtrs.\"\n\t\t\t}\n\t\t},\n\t\t\"month\": {\n\t\t\t\"previous\": \"last mo.\",\n\t\t\t\"current\": \"this mo.\",\n\t\t\t\"next\": \"next mo.\",\n\t\t\t\"past\": \"{0} mo. ago\",\n\t\t\t\"future\": \"in {0} mo.\"\n\t\t},\n\t\t\"week\": {\n\t\t\t\"previous\": \"last wk.\",\n\t\t\t\"current\": \"this wk.\",\n\t\t\t\"next\": \"next wk.\",\n\t\t\t\"past\": \"{0} wk. ago\",\n\t\t\t\"future\": \"in {0} wk.\"\n\t\t},\n\t\t\"day\": {\n\t\t\t\"previous\": \"yesterday\",\n\t\t\t\"current\": \"today\",\n\t\t\t\"next\": \"tomorrow\",\n\t\t\t\"past\": {\n\t\t\t\t\"one\": \"{0} day ago\",\n\t\t\t\t\"other\": \"{0} days ago\"\n\t\t\t},\n\t\t\t\"future\": {\n\t\t\t\t\"one\": \"in {0} day\",\n\t\t\t\t\"other\": \"in {0} days\"\n\t\t\t}\n\t\t},\n\t\t\"hour\": {\n\t\t\t\"current\": \"this hour\",\n\t\t\t\"past\": \"{0} hr. ago\",\n\t\t\t\"future\": \"in {0} hr.\"\n\t\t},\n\t\t\"minute\": {\n\t\t\t\"current\": \"this minute\",\n\t\t\t\"past\": \"{0} min. ago\",\n\t\t\t\"future\": \"in {0} min.\"\n\t\t},\n\t\t\"second\": {\n\t\t\t\"current\": \"now\",\n\t\t\t\"past\": \"{0} sec. ago\",\n\t\t\t\"future\": \"in {0} sec.\"\n\t\t}\n\t},\n\t\"narrow\": {\n\t\t\"year\": {\n\t\t\t\"previous\": \"last yr.\",\n\t\t\t\"current\": \"this yr.\",\n\t\t\t\"next\": \"next yr.\",\n\t\t\t\"past\": \"{0}y ago\",\n\t\t\t\"future\": \"in {0}y\"\n\t\t},\n\t\t\"quarter\": {\n\t\t\t\"previous\": \"last qtr.\",\n\t\t\t\"current\": \"this qtr.\",\n\t\t\t\"next\": \"next qtr.\",\n\t\t\t\"past\": \"{0}q ago\",\n\t\t\t\"future\": \"in {0}q\"\n\t\t},\n\t\t\"month\": {\n\t\t\t\"previous\": \"last mo.\",\n\t\t\t\"current\": \"this mo.\",\n\t\t\t\"next\": \"next mo.\",\n\t\t\t\"past\": \"{0}mo ago\",\n\t\t\t\"future\": \"in {0}mo\"\n\t\t},\n\t\t\"week\": {\n\t\t\t\"previous\": \"last wk.\",\n\t\t\t\"current\": \"this wk.\",\n\t\t\t\"next\": \"next wk.\",\n\t\t\t\"past\": \"{0}w ago\",\n\t\t\t\"future\": \"in {0}w\"\n\t\t},\n\t\t\"day\": {\n\t\t\t\"previous\": \"yesterday\",\n\t\t\t\"current\": \"today\",\n\t\t\t\"next\": \"tomorrow\",\n\t\t\t\"past\": \"{0}d ago\",\n\t\t\t\"future\": \"in {0}d\"\n\t\t},\n\t\t\"hour\": {\n\t\t\t\"current\": \"this hour\",\n\t\t\t\"past\": \"{0}h ago\",\n\t\t\t\"future\": \"in {0}h\"\n\t\t},\n\t\t\"minute\": {\n\t\t\t\"current\": \"this minute\",\n\t\t\t\"past\": \"{0}m ago\",\n\t\t\t\"future\": \"in {0}m\"\n\t\t},\n\t\t\"second\": {\n\t\t\t\"current\": \"now\",\n\t\t\t\"past\": \"{0}s ago\",\n\t\t\t\"future\": \"in {0}s\"\n\t\t}\n\t},\n\t\"now\": {\n\t\t\"now\": {\n\t\t\t\"current\": \"now\",\n\t\t\t\"future\": \"in a moment\",\n\t\t\t\"past\": \"just now\"\n\t\t}\n\t},\n\t\"mini\": {\n\t\t\"year\": \"{0}yr\",\n\t\t\"month\": \"{0}mo\",\n\t\t\"week\": \"{0}wk\",\n\t\t\"day\": \"{0}d\",\n\t\t\"hour\": \"{0}h\",\n\t\t\"minute\": \"{0}m\",\n\t\t\"second\": \"{0}s\",\n\t\t\"now\": \"now\"\n\t},\n\t\"short-time\": {\n\t\t\"year\": \"{0} yr.\",\n\t\t\"month\": \"{0} mo.\",\n\t\t\"week\": \"{0} wk.\",\n\t\t\"day\": {\n\t\t\t\"one\": \"{0} day\",\n\t\t\t\"other\": \"{0} days\"\n\t\t},\n\t\t\"hour\": \"{0} hr.\",\n\t\t\"minute\": \"{0} min.\",\n\t\t\"second\": \"{0} sec.\"\n\t},\n\t\"long-time\": {\n\t\t\"year\": {\n\t\t\t\"one\": \"{0} year\",\n\t\t\t\"other\": \"{0} years\"\n\t\t},\n\t\t\"month\": {\n\t\t\t\"one\": \"{0} month\",\n\t\t\t\"other\": \"{0} months\"\n\t\t},\n\t\t\"week\": {\n\t\t\t\"one\": \"{0} week\",\n\t\t\t\"other\": \"{0} weeks\"\n\t\t},\n\t\t\"day\": {\n\t\t\t\"one\": \"{0} day\",\n\t\t\t\"other\": \"{0} days\"\n\t\t},\n\t\t\"hour\": {\n\t\t\t\"one\": \"{0} hour\",\n\t\t\t\"other\": \"{0} hours\"\n\t\t},\n\t\t\"minute\": {\n\t\t\t\"one\": \"{0} minute\",\n\t\t\t\"other\": \"{0} minutes\"\n\t\t},\n\t\t\"second\": {\n\t\t\t\"one\": \"{0} second\",\n\t\t\t\"other\": \"{0} seconds\"\n\t\t}\n\t}\n}","import { ReportHandler } from 'web-vitals';\n\nconst reportWebVitals = (onPerfEntry?: ReportHandler) => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\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","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n","var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\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","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\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","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","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","/**\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","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 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","/**\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","/**\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","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","/** 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","/** 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","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","/**\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 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 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","/** 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","/**\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 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","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","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 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 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 baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\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","/**\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 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","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 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 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","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 root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\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","/** 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","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","/**\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 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 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 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","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","/**\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 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 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","/**\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 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","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 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 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 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 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","/** 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","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","/**\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 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 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 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","/**\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","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 * 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 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","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 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 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","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 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 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 baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n","var isObject = require('./isObject');\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n","var isStrictComparable = require('./_isStrictComparable'),\n keys = require('./keys');\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nmodule.exports = getMatchData;\n","/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nmodule.exports = matchesStrictComparable;\n","var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData'),\n matchesStrictComparable = require('./_matchesStrictComparable');\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nmodule.exports = baseMatches;\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 isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n","var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n","var baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;\n","var baseGet = require('./_baseGet');\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nmodule.exports = basePropertyDeep;\n","var baseProperty = require('./_baseProperty'),\n basePropertyDeep = require('./_basePropertyDeep'),\n isKey = require('./_isKey'),\n toKey = require('./_toKey');\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n","var baseMatches = require('./_baseMatches'),\n baseMatchesProperty = require('./_baseMatchesProperty'),\n identity = require('./identity'),\n isArray = require('./isArray'),\n property = require('./property');\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nmodule.exports = baseIteratee;\n","export enum APP_ROUTES {\n USER = \"/\",\n // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values\n HOME = \"/\",\n HELP = \"/help\",\n FORGOT_PASSWORD = \"/forgot-password\",\n CHANGE_PASSWORD = \"/change-password\",\n ME = \"/me\",\n EDIT = \"/edit\",\n ACTIONS = \"/actions\",\n CUSTOM_TOKEN_AUTH = \"/custom-token-auth\",\n PRIVACY_POLICY = \"/privacy-policy\",\n TERMS_AND_CONDITIONS = \"/terms-and-conditions\",\n PAYMENT = \"/payment\",\n PAYMENT_STATUS = \"/payment-status\",\n HISTORY = \"/history\",\n CHATS = \"/chats\",\n MY_REVIEWS = \"/my-reviews\",\n NOTIFICATIONS = \"/notifications\",\n ADMIN_USERS = \"/admin/users\",\n ADMIN = \"/admin\",\n ADMIN_CHATS = \"/admin/chats\",\n ADMIN_APPLICATIONS = \"/admin/applications\",\n ADMIN_CASES = \"/admin/cases\",\n ADMIN_REFERRALS = \"/admin/referrals\",\n ABOUT = \"/about\",\n FAQ = \"/faq\",\n NOT_FOUND = \"/404\",\n PAYMENT_ACCOUNT = \"/payment-account\",\n REFERRAL_PROGRAMS = \"/referral-programs\",\n REFERRAL_CAMPAIGNS = \"/referral-campaigns\",\n REFERRALS = \"/referrals\",\n AFFILIATE = \"/affiliate\",\n HOW_IT_WORKS = \"/how-it-works\",\n AFFILIATE_DETAILS = \"/affiliate-details\",\n}\n//http://localhost:3000/change-password?oobCode=IjNljfi0wqmGi1wqXVpnA1YDZVBIh25k5_cbFlr_tqgAAAGCxbdzIQ\n","import { default as axiosService } from \"axios\";\nimport { APP_ROUTES } from \"const/router\";\nimport { signOut } from \"utils/common\";\n\nexport const axios = axiosService.create({\n baseURL: import.meta.env.VITE_APP_API_URL,\n});\n\naxios.interceptors.response.use(\n (response) => {\n return response;\n },\n (error) => {\n if (error?.response?.status === 401) {\n signOut(() => {\n window.location.assign(APP_ROUTES.HOME + \"?auth-modal=sign-in\");\n });\n }\n //add some logic if needed\n return Promise.reject(error);\n }\n);\n\nexport default axios;\n","export default \"data:image/svg+xml,%3csvg%20width='158'%20height='158'%20viewBox='0%200%20158%20158'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_629_6059'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='158'%20height='158'%3e%3ccircle%20cx='79'%20cy='79'%20r='79'%20fill='%23F3F4F6'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_629_6059)'%3e%3cpath%20d='M163.097%20136.625V158H-6.37097V136.704C3.48604%20123.443%2016.2806%20112.68%2030.9952%20105.271C45.7098%2097.8623%2061.9386%2094.0117%2078.3911%2094.0255C113.019%2094.0255%20143.777%20110.758%20163.097%20136.625ZM106.622%2051.3687C106.622%2058.9096%20103.646%2066.1417%2098.349%2071.4739C93.0521%2076.8062%2085.868%2079.8018%2078.377%2079.8018C70.8861%2079.8018%2063.702%2076.8062%2058.4051%2071.4739C53.1082%2066.1417%2050.1324%2058.9096%2050.1324%2051.3687C50.1324%2043.8277%2053.1082%2036.5957%2058.4051%2031.2634C63.702%2025.9312%2070.8861%2022.9355%2078.377%2022.9355C85.868%2022.9355%2093.0521%2025.9312%2098.349%2031.2634C103.646%2036.5957%20106.622%2043.8277%20106.622%2051.3687Z'%20fill='%23D1D5DB'/%3e%3c/g%3e%3c/svg%3e\"","import { ImageType } from \"./utility\";\n\n// ImageType type guard\nexport function isImageType(data: any | ImageType): data is ImageType {\n if (!data) return false;\n const img = data as ImageType;\n return !!(img[\"dataUrl\"] || img.dataURL);\n}\n\n// Image file type guard\nexport function isImageFileType(data: any | ImageType): data is ImageType {\n if (!data) return false;\n const img = data as ImageType;\n return !!((img[\"data_url\"] || img[\"dataUrl\"]) && img.file);\n}\n","// ES6 Map\nvar map\ntry {\n map = Map\n} catch (_) { }\nvar set\n\n// ES6 Set\ntry {\n set = Set\n} catch (_) { }\n\nfunction baseClone (src, circulars, clones) {\n // Null/undefined/functions/etc\n if (!src || typeof src !== 'object' || typeof src === 'function') {\n return src\n }\n\n // DOM Node\n if (src.nodeType && 'cloneNode' in src) {\n return src.cloneNode(true)\n }\n\n // Date\n if (src instanceof Date) {\n return new Date(src.getTime())\n }\n\n // RegExp\n if (src instanceof RegExp) {\n return new RegExp(src)\n }\n\n // Arrays\n if (Array.isArray(src)) {\n return src.map(clone)\n }\n\n // ES6 Maps\n if (map && src instanceof map) {\n return new Map(Array.from(src.entries()))\n }\n\n // ES6 Sets\n if (set && src instanceof set) {\n return new Set(Array.from(src.values()))\n }\n\n // Object\n if (src instanceof Object) {\n circulars.push(src)\n var obj = Object.create(src)\n clones.push(obj)\n for (var key in src) {\n var idx = circulars.findIndex(function (i) {\n return i === src[key]\n })\n obj[key] = idx > -1 ? clones[idx] : baseClone(src[key], circulars, clones)\n }\n return obj\n }\n\n // ???\n return src\n}\n\nexport default function clone (src) {\n return baseClone(src, [], [])\n}\n","const toString = Object.prototype.toString;\nconst errorToString = Error.prototype.toString;\nconst regExpToString = RegExp.prototype.toString;\nconst symbolToString = typeof Symbol !== 'undefined' ? Symbol.prototype.toString : () => '';\nconst SYMBOL_REGEXP = /^Symbol\\((.*)\\)(.*)$/;\n\nfunction printNumber(val) {\n if (val != +val) return 'NaN';\n const isNegativeZero = val === 0 && 1 / val < 0;\n return isNegativeZero ? '-0' : '' + val;\n}\n\nfunction printSimpleValue(val, quoteStrings = false) {\n if (val == null || val === true || val === false) return '' + val;\n const typeOf = typeof val;\n if (typeOf === 'number') return printNumber(val);\n if (typeOf === 'string') return quoteStrings ? `\"${val}\"` : val;\n if (typeOf === 'function') return '[Function ' + (val.name || 'anonymous') + ']';\n if (typeOf === 'symbol') return symbolToString.call(val).replace(SYMBOL_REGEXP, 'Symbol($1)');\n const tag = toString.call(val).slice(8, -1);\n if (tag === 'Date') return isNaN(val.getTime()) ? '' + val : val.toISOString(val);\n if (tag === 'Error' || val instanceof Error) return '[' + errorToString.call(val) + ']';\n if (tag === 'RegExp') return regExpToString.call(val);\n return null;\n}\n\nexport default function printValue(value, quoteStrings) {\n let result = printSimpleValue(value, quoteStrings);\n if (result !== null) return result;\n return JSON.stringify(value, function (key, value) {\n let result = printSimpleValue(this[key], quoteStrings);\n if (result !== null) return result;\n return value;\n }, 2);\n}","import printValue from './util/printValue';\nexport let mixed = {\n default: '${path} is invalid',\n required: '${path} is a required field',\n oneOf: '${path} must be one of the following values: ${values}',\n notOneOf: '${path} must not be one of the following values: ${values}',\n notType: ({\n path,\n type,\n value,\n originalValue\n }) => {\n let isCast = originalValue != null && originalValue !== value;\n let msg = `${path} must be a \\`${type}\\` type, ` + `but the final value was: \\`${printValue(value, true)}\\`` + (isCast ? ` (cast from the value \\`${printValue(originalValue, true)}\\`).` : '.');\n\n if (value === null) {\n msg += `\\n If \"null\" is intended as an empty value be sure to mark the schema as \\`.nullable()\\``;\n }\n\n return msg;\n },\n defined: '${path} must be defined'\n};\nexport let string = {\n length: '${path} must be exactly ${length} characters',\n min: '${path} must be at least ${min} characters',\n max: '${path} must be at most ${max} characters',\n matches: '${path} must match the following: \"${regex}\"',\n email: '${path} must be a valid email',\n url: '${path} must be a valid URL',\n uuid: '${path} must be a valid UUID',\n trim: '${path} must be a trimmed string',\n lowercase: '${path} must be a lowercase string',\n uppercase: '${path} must be a upper case string'\n};\nexport let number = {\n min: '${path} must be greater than or equal to ${min}',\n max: '${path} must be less than or equal to ${max}',\n lessThan: '${path} must be less than ${less}',\n moreThan: '${path} must be greater than ${more}',\n positive: '${path} must be a positive number',\n negative: '${path} must be a negative number',\n integer: '${path} must be an integer'\n};\nexport let date = {\n min: '${path} field must be later than ${min}',\n max: '${path} field must be at earlier than ${max}'\n};\nexport let boolean = {\n isValue: '${path} field must be ${value}'\n};\nexport let object = {\n noUnknown: '${path} field has unspecified keys: ${unknown}'\n};\nexport let array = {\n min: '${path} field must have at least ${min} items',\n max: '${path} field must have less than or equal to ${max} items',\n length: '${path} must have ${length} items'\n};\nexport default Object.assign(Object.create(null), {\n mixed,\n string,\n number,\n date,\n object,\n array,\n boolean\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 `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n}\n\nmodule.exports = baseHas;\n","var baseHas = require('./_baseHas'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\nfunction has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n}\n\nmodule.exports = has;\n","const isSchema = obj => obj && obj.__isYupSchema__;\n\nexport default isSchema;","import has from 'lodash/has';\nimport isSchema from './util/isSchema';\n\nclass Condition {\n constructor(refs, options) {\n this.fn = void 0;\n this.refs = refs;\n this.refs = refs;\n\n if (typeof options === 'function') {\n this.fn = options;\n return;\n }\n\n if (!has(options, 'is')) throw new TypeError('`is:` is required for `when()` conditions');\n if (!options.then && !options.otherwise) throw new TypeError('either `then:` or `otherwise:` is required for `when()` conditions');\n let {\n is,\n then,\n otherwise\n } = options;\n let check = typeof is === 'function' ? is : (...values) => values.every(value => value === is);\n\n this.fn = function (...args) {\n let options = args.pop();\n let schema = args.pop();\n let branch = check(...args) ? then : otherwise;\n if (!branch) return undefined;\n if (typeof branch === 'function') return branch(schema);\n return schema.concat(branch.resolve(options));\n };\n }\n\n resolve(base, options) {\n let values = this.refs.map(ref => ref.getValue(options == null ? void 0 : options.value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context));\n let schema = this.fn.apply(base, values.concat(base, options));\n if (schema === undefined || schema === base) return base;\n if (!isSchema(schema)) throw new TypeError('conditions must return a schema object');\n return schema.resolve(options);\n }\n\n}\n\nexport default Condition;","export default function toArray(value) {\n return value == null ? [] : [].concat(value);\n}","function _extends() { _extends = Object.assign || 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); }\n\nimport printValue from './util/printValue';\nimport toArray from './util/toArray';\nlet strReg = /\\$\\{\\s*(\\w+)\\s*\\}/g;\nexport default class ValidationError extends Error {\n static formatError(message, params) {\n const path = params.label || params.path || 'this';\n if (path !== params.path) params = _extends({}, params, {\n path\n });\n if (typeof message === 'string') return message.replace(strReg, (_, key) => printValue(params[key]));\n if (typeof message === 'function') return message(params);\n return message;\n }\n\n static isError(err) {\n return err && err.name === 'ValidationError';\n }\n\n constructor(errorOrErrors, value, field, type) {\n super();\n this.value = void 0;\n this.path = void 0;\n this.type = void 0;\n this.errors = void 0;\n this.params = void 0;\n this.inner = void 0;\n this.name = 'ValidationError';\n this.value = value;\n this.path = field;\n this.type = type;\n this.errors = [];\n this.inner = [];\n toArray(errorOrErrors).forEach(err => {\n if (ValidationError.isError(err)) {\n this.errors.push(...err.errors);\n this.inner = this.inner.concat(err.inner.length ? err.inner : err);\n } else {\n this.errors.push(err);\n }\n });\n this.message = this.errors.length > 1 ? `${this.errors.length} errors occurred` : this.errors[0];\n if (Error.captureStackTrace) Error.captureStackTrace(this, ValidationError);\n }\n\n}","import ValidationError from '../ValidationError';\n\nconst once = cb => {\n let fired = false;\n return (...args) => {\n if (fired) return;\n fired = true;\n cb(...args);\n };\n};\n\nexport default function runTests(options, cb) {\n let {\n endEarly,\n tests,\n args,\n value,\n errors,\n sort,\n path\n } = options;\n let callback = once(cb);\n let count = tests.length;\n const nestedErrors = [];\n errors = errors ? errors : [];\n if (!count) return errors.length ? callback(new ValidationError(errors, value, path)) : callback(null, value);\n\n for (let i = 0; i < tests.length; i++) {\n const test = tests[i];\n test(args, function finishTestRun(err) {\n if (err) {\n // always return early for non validation errors\n if (!ValidationError.isError(err)) {\n return callback(err, value);\n }\n\n if (endEarly) {\n err.value = value;\n return callback(err, value);\n }\n\n nestedErrors.push(err);\n }\n\n if (--count <= 0) {\n if (nestedErrors.length) {\n if (sort) nestedErrors.sort(sort); //show parent errors after the nested ones: name.first, name\n\n if (errors.length) nestedErrors.push(...errors);\n errors = nestedErrors;\n }\n\n if (errors.length) {\n callback(new ValidationError(errors, value, path), value);\n return;\n }\n\n callback(null, value);\n }\n });\n }\n}","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var baseAssignValue = require('./_baseAssignValue'),\n baseForOwn = require('./_baseForOwn'),\n baseIteratee = require('./_baseIteratee');\n\n/**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\nfunction mapValues(object, iteratee) {\n var result = {};\n iteratee = baseIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n}\n\nmodule.exports = mapValues;\n","/**\n * Based on Kendo UI Core expression code \n */\n'use strict'\n\nfunction Cache(maxSize) {\n this._maxSize = maxSize\n this.clear()\n}\nCache.prototype.clear = function () {\n this._size = 0\n this._values = Object.create(null)\n}\nCache.prototype.get = function (key) {\n return this._values[key]\n}\nCache.prototype.set = function (key, value) {\n this._size >= this._maxSize && this.clear()\n if (!(key in this._values)) this._size++\n\n return (this._values[key] = value)\n}\n\nvar SPLIT_REGEX = /[^.^\\]^[]+|(?=\\[\\]|\\.\\.)/g,\n DIGIT_REGEX = /^\\d+$/,\n LEAD_DIGIT_REGEX = /^\\d/,\n SPEC_CHAR_REGEX = /[~`!#$%\\^&*+=\\-\\[\\]\\\\';,/{}|\\\\\":<>\\?]/g,\n CLEAN_QUOTES_REGEX = /^\\s*(['\"]?)(.*?)(\\1)\\s*$/,\n MAX_CACHE_SIZE = 512\n\nvar pathCache = new Cache(MAX_CACHE_SIZE),\n setCache = new Cache(MAX_CACHE_SIZE),\n getCache = new Cache(MAX_CACHE_SIZE)\n\nvar config\n\nmodule.exports = {\n Cache: Cache,\n\n split: split,\n\n normalizePath: normalizePath,\n\n setter: function (path) {\n var parts = normalizePath(path)\n\n return (\n setCache.get(path) ||\n setCache.set(path, function setter(obj, value) {\n var index = 0\n var len = parts.length\n var data = obj\n\n while (index < len - 1) {\n var part = parts[index]\n if (\n part === '__proto__' ||\n part === 'constructor' ||\n part === 'prototype'\n ) {\n return obj\n }\n\n data = data[parts[index++]]\n }\n data[parts[index]] = value\n })\n )\n },\n\n getter: function (path, safe) {\n var parts = normalizePath(path)\n return (\n getCache.get(path) ||\n getCache.set(path, function getter(data) {\n var index = 0,\n len = parts.length\n while (index < len) {\n if (data != null || !safe) data = data[parts[index++]]\n else return\n }\n return data\n })\n )\n },\n\n join: function (segments) {\n return segments.reduce(function (path, part) {\n return (\n path +\n (isQuoted(part) || DIGIT_REGEX.test(part)\n ? '[' + part + ']'\n : (path ? '.' : '') + part)\n )\n }, '')\n },\n\n forEach: function (path, cb, thisArg) {\n forEach(Array.isArray(path) ? path : split(path), cb, thisArg)\n },\n}\n\nfunction normalizePath(path) {\n return (\n pathCache.get(path) ||\n pathCache.set(\n path,\n split(path).map(function (part) {\n return part.replace(CLEAN_QUOTES_REGEX, '$2')\n })\n )\n )\n}\n\nfunction split(path) {\n return path.match(SPLIT_REGEX) || ['']\n}\n\nfunction forEach(parts, iter, thisArg) {\n var len = parts.length,\n part,\n idx,\n isArray,\n isBracket\n\n for (idx = 0; idx < len; idx++) {\n part = parts[idx]\n\n if (part) {\n if (shouldBeQuoted(part)) {\n part = '\"' + part + '\"'\n }\n\n isBracket = isQuoted(part)\n isArray = !isBracket && /^\\d+$/.test(part)\n\n iter.call(thisArg, part, isBracket, isArray, idx, parts)\n }\n }\n}\n\nfunction isQuoted(str) {\n return (\n typeof str === 'string' && str && [\"'\", '\"'].indexOf(str.charAt(0)) !== -1\n )\n}\n\nfunction hasLeadingNumber(part) {\n return part.match(LEAD_DIGIT_REGEX) && !part.match(DIGIT_REGEX)\n}\n\nfunction hasSpecialChars(part) {\n return SPEC_CHAR_REGEX.test(part)\n}\n\nfunction shouldBeQuoted(part) {\n return !isQuoted(part) && (hasLeadingNumber(part) || hasSpecialChars(part))\n}\n","import { getter } from 'property-expr';\nconst prefixes = {\n context: '$',\n value: '.'\n};\nexport function create(key, options) {\n return new Reference(key, options);\n}\nexport default class Reference {\n constructor(key, options = {}) {\n this.key = void 0;\n this.isContext = void 0;\n this.isValue = void 0;\n this.isSibling = void 0;\n this.path = void 0;\n this.getter = void 0;\n this.map = void 0;\n if (typeof key !== 'string') throw new TypeError('ref must be a string, got: ' + key);\n this.key = key.trim();\n if (key === '') throw new TypeError('ref must be a non-empty string');\n this.isContext = this.key[0] === prefixes.context;\n this.isValue = this.key[0] === prefixes.value;\n this.isSibling = !this.isContext && !this.isValue;\n let prefix = this.isContext ? prefixes.context : this.isValue ? prefixes.value : '';\n this.path = this.key.slice(prefix.length);\n this.getter = this.path && getter(this.path, true);\n this.map = options.map;\n }\n\n getValue(value, parent, context) {\n let result = this.isContext ? context : this.isValue ? value : parent;\n if (this.getter) result = this.getter(result || {});\n if (this.map) result = this.map(result);\n return result;\n }\n /**\n *\n * @param {*} value\n * @param {Object} options\n * @param {Object=} options.context\n * @param {Object=} options.parent\n */\n\n\n cast(value, options) {\n return this.getValue(value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context);\n }\n\n resolve() {\n return this;\n }\n\n describe() {\n return {\n type: 'ref',\n key: this.key\n };\n }\n\n toString() {\n return `Ref(${this.key})`;\n }\n\n static isRef(value) {\n return value && value.__isYupRef;\n }\n\n} // @ts-ignore\n\nReference.prototype.__isYupRef = true;","function _extends() { _extends = Object.assign || 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); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport mapValues from 'lodash/mapValues';\nimport ValidationError from '../ValidationError';\nimport Ref from '../Reference';\nexport default function createValidation(config) {\n function validate(_ref, cb) {\n let {\n value,\n path = '',\n label,\n options,\n originalValue,\n sync\n } = _ref,\n rest = _objectWithoutPropertiesLoose(_ref, [\"value\", \"path\", \"label\", \"options\", \"originalValue\", \"sync\"]);\n\n const {\n name,\n test,\n params,\n message\n } = config;\n let {\n parent,\n context\n } = options;\n\n function resolve(item) {\n return Ref.isRef(item) ? item.getValue(value, parent, context) : item;\n }\n\n function createError(overrides = {}) {\n const nextParams = mapValues(_extends({\n value,\n originalValue,\n label,\n path: overrides.path || path\n }, params, overrides.params), resolve);\n const error = new ValidationError(ValidationError.formatError(overrides.message || message, nextParams), value, nextParams.path, overrides.type || name);\n error.params = nextParams;\n return error;\n }\n\n let ctx = _extends({\n path,\n parent,\n type: name,\n createError,\n resolve,\n options,\n originalValue\n }, rest);\n\n if (!sync) {\n try {\n Promise.resolve(test.call(ctx, value, ctx)).then(validOrError => {\n if (ValidationError.isError(validOrError)) cb(validOrError);else if (!validOrError) cb(createError());else cb(null, validOrError);\n }).catch(cb);\n } catch (err) {\n cb(err);\n }\n\n return;\n }\n\n let result;\n\n try {\n var _ref2;\n\n result = test.call(ctx, value, ctx);\n\n if (typeof ((_ref2 = result) == null ? void 0 : _ref2.then) === 'function') {\n throw new Error(`Validation test of type: \"${ctx.type}\" returned a Promise during a synchronous validate. ` + `This test will finish after the validate call has returned`);\n }\n } catch (err) {\n cb(err);\n return;\n }\n\n if (ValidationError.isError(result)) cb(result);else if (!result) cb(createError());else cb(null, result);\n }\n\n validate.OPTIONS = config;\n return validate;\n}","import { forEach } from 'property-expr';\n\nlet trim = part => part.substr(0, part.length - 1).substr(1);\n\nexport function getIn(schema, path, value, context = value) {\n let parent, lastPart, lastPartDebug; // root path: ''\n\n if (!path) return {\n parent,\n parentPath: path,\n schema\n };\n forEach(path, (_part, isBracket, isArray) => {\n let part = isBracket ? trim(_part) : _part;\n schema = schema.resolve({\n context,\n parent,\n value\n });\n\n if (schema.innerType) {\n let idx = isArray ? parseInt(part, 10) : 0;\n\n if (value && idx >= value.length) {\n throw new Error(`Yup.reach cannot resolve an array item at index: ${_part}, in the path: ${path}. ` + `because there is no value at that index. `);\n }\n\n parent = value;\n value = value && value[idx];\n schema = schema.innerType;\n } // sometimes the array index part of a path doesn't exist: \"nested.arr.child\"\n // in these cases the current part is the next schema and should be processed\n // in this iteration. For cases where the index signature is included this\n // check will fail and we'll handle the `child` part on the next iteration like normal\n\n\n if (!isArray) {\n if (!schema.fields || !schema.fields[part]) throw new Error(`The schema does not contain the path: ${path}. ` + `(failed at: ${lastPartDebug} which is a type: \"${schema._type}\")`);\n parent = value;\n value = value && value[part];\n schema = schema.fields[part];\n }\n\n lastPart = part;\n lastPartDebug = isBracket ? '[' + _part + ']' : '.' + _part;\n });\n return {\n schema,\n parent,\n parentPath: lastPart\n };\n}\n\nconst reach = (obj, path, value, context) => getIn(obj, path, value, context).schema;\n\nexport default reach;","import Reference from '../Reference';\nexport default class ReferenceSet {\n constructor() {\n this.list = void 0;\n this.refs = void 0;\n this.list = new Set();\n this.refs = new Map();\n }\n\n get size() {\n return this.list.size + this.refs.size;\n }\n\n describe() {\n const description = [];\n\n for (const item of this.list) description.push(item);\n\n for (const [, ref] of this.refs) description.push(ref.describe());\n\n return description;\n }\n\n toArray() {\n return Array.from(this.list).concat(Array.from(this.refs.values()));\n }\n\n resolveAll(resolve) {\n return this.toArray().reduce((acc, e) => acc.concat(Reference.isRef(e) ? resolve(e) : e), []);\n }\n\n add(value) {\n Reference.isRef(value) ? this.refs.set(value.key, value) : this.list.add(value);\n }\n\n delete(value) {\n Reference.isRef(value) ? this.refs.delete(value.key) : this.list.delete(value);\n }\n\n clone() {\n const next = new ReferenceSet();\n next.list = new Set(this.list);\n next.refs = new Map(this.refs);\n return next;\n }\n\n merge(newItems, removeItems) {\n const next = this.clone();\n newItems.list.forEach(value => next.add(value));\n newItems.refs.forEach(value => next.add(value));\n removeItems.list.forEach(value => next.delete(value));\n removeItems.refs.forEach(value => next.delete(value));\n return next;\n }\n\n}","function _extends() { _extends = Object.assign || 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); }\n\n// @ts-ignore\nimport cloneDeep from 'nanoclone';\nimport { mixed as locale } from './locale';\nimport Condition from './Condition';\nimport runTests from './util/runTests';\nimport createValidation from './util/createValidation';\nimport printValue from './util/printValue';\nimport Ref from './Reference';\nimport { getIn } from './util/reach';\nimport ValidationError from './ValidationError';\nimport ReferenceSet from './util/ReferenceSet';\nimport toArray from './util/toArray'; // const UNSET = 'unset' as const;\n\nexport default class BaseSchema {\n constructor(options) {\n this.deps = [];\n this.tests = void 0;\n this.transforms = void 0;\n this.conditions = [];\n this._mutate = void 0;\n this._typeError = void 0;\n this._whitelist = new ReferenceSet();\n this._blacklist = new ReferenceSet();\n this.exclusiveTests = Object.create(null);\n this.spec = void 0;\n this.tests = [];\n this.transforms = [];\n this.withMutation(() => {\n this.typeError(locale.notType);\n });\n this.type = (options == null ? void 0 : options.type) || 'mixed';\n this.spec = _extends({\n strip: false,\n strict: false,\n abortEarly: true,\n recursive: true,\n nullable: false,\n presence: 'optional'\n }, options == null ? void 0 : options.spec);\n } // TODO: remove\n\n\n get _type() {\n return this.type;\n }\n\n _typeCheck(_value) {\n return true;\n }\n\n clone(spec) {\n if (this._mutate) {\n if (spec) Object.assign(this.spec, spec);\n return this;\n } // if the nested value is a schema we can skip cloning, since\n // they are already immutable\n\n\n const next = Object.create(Object.getPrototypeOf(this)); // @ts-expect-error this is readonly\n\n next.type = this.type;\n next._typeError = this._typeError;\n next._whitelistError = this._whitelistError;\n next._blacklistError = this._blacklistError;\n next._whitelist = this._whitelist.clone();\n next._blacklist = this._blacklist.clone();\n next.exclusiveTests = _extends({}, this.exclusiveTests); // @ts-expect-error this is readonly\n\n next.deps = [...this.deps];\n next.conditions = [...this.conditions];\n next.tests = [...this.tests];\n next.transforms = [...this.transforms];\n next.spec = cloneDeep(_extends({}, this.spec, spec));\n return next;\n }\n\n label(label) {\n let next = this.clone();\n next.spec.label = label;\n return next;\n }\n\n meta(...args) {\n if (args.length === 0) return this.spec.meta;\n let next = this.clone();\n next.spec.meta = Object.assign(next.spec.meta || {}, args[0]);\n return next;\n } // withContext(): BaseSchema<\n // TCast,\n // TContext,\n // TOutput\n // > {\n // return this as any;\n // }\n\n\n withMutation(fn) {\n let before = this._mutate;\n this._mutate = true;\n let result = fn(this);\n this._mutate = before;\n return result;\n }\n\n concat(schema) {\n if (!schema || schema === this) return this;\n if (schema.type !== this.type && this.type !== 'mixed') throw new TypeError(`You cannot \\`concat()\\` schema's of different types: ${this.type} and ${schema.type}`);\n let base = this;\n let combined = schema.clone();\n\n const mergedSpec = _extends({}, base.spec, combined.spec); // if (combined.spec.nullable === UNSET)\n // mergedSpec.nullable = base.spec.nullable;\n // if (combined.spec.presence === UNSET)\n // mergedSpec.presence = base.spec.presence;\n\n\n combined.spec = mergedSpec;\n combined._typeError || (combined._typeError = base._typeError);\n combined._whitelistError || (combined._whitelistError = base._whitelistError);\n combined._blacklistError || (combined._blacklistError = base._blacklistError); // manually merge the blacklist/whitelist (the other `schema` takes\n // precedence in case of conflicts)\n\n combined._whitelist = base._whitelist.merge(schema._whitelist, schema._blacklist);\n combined._blacklist = base._blacklist.merge(schema._blacklist, schema._whitelist); // start with the current tests\n\n combined.tests = base.tests;\n combined.exclusiveTests = base.exclusiveTests; // manually add the new tests to ensure\n // the deduping logic is consistent\n\n combined.withMutation(next => {\n schema.tests.forEach(fn => {\n next.test(fn.OPTIONS);\n });\n });\n combined.transforms = [...base.transforms, ...combined.transforms];\n return combined;\n }\n\n isType(v) {\n if (this.spec.nullable && v === null) return true;\n return this._typeCheck(v);\n }\n\n resolve(options) {\n let schema = this;\n\n if (schema.conditions.length) {\n let conditions = schema.conditions;\n schema = schema.clone();\n schema.conditions = [];\n schema = conditions.reduce((schema, condition) => condition.resolve(schema, options), schema);\n schema = schema.resolve(options);\n }\n\n return schema;\n }\n /**\n *\n * @param {*} value\n * @param {Object} options\n * @param {*=} options.parent\n * @param {*=} options.context\n */\n\n\n cast(value, options = {}) {\n let resolvedSchema = this.resolve(_extends({\n value\n }, options));\n\n let result = resolvedSchema._cast(value, options);\n\n if (value !== undefined && options.assert !== false && resolvedSchema.isType(result) !== true) {\n let formattedValue = printValue(value);\n let formattedResult = printValue(result);\n throw new TypeError(`The value of ${options.path || 'field'} could not be cast to a value ` + `that satisfies the schema type: \"${resolvedSchema._type}\". \\n\\n` + `attempted value: ${formattedValue} \\n` + (formattedResult !== formattedValue ? `result of cast: ${formattedResult}` : ''));\n }\n\n return result;\n }\n\n _cast(rawValue, _options) {\n let value = rawValue === undefined ? rawValue : this.transforms.reduce((value, fn) => fn.call(this, value, rawValue, this), rawValue);\n\n if (value === undefined) {\n value = this.getDefault();\n }\n\n return value;\n }\n\n _validate(_value, options = {}, cb) {\n let {\n sync,\n path,\n from = [],\n originalValue = _value,\n strict = this.spec.strict,\n abortEarly = this.spec.abortEarly\n } = options;\n let value = _value;\n\n if (!strict) {\n // this._validating = true;\n value = this._cast(value, _extends({\n assert: false\n }, options)); // this._validating = false;\n } // value is cast, we can check if it meets type requirements\n\n\n let args = {\n value,\n path,\n options,\n originalValue,\n schema: this,\n label: this.spec.label,\n sync,\n from\n };\n let initialTests = [];\n if (this._typeError) initialTests.push(this._typeError);\n let finalTests = [];\n if (this._whitelistError) finalTests.push(this._whitelistError);\n if (this._blacklistError) finalTests.push(this._blacklistError);\n runTests({\n args,\n value,\n path,\n sync,\n tests: initialTests,\n endEarly: abortEarly\n }, err => {\n if (err) return void cb(err, value);\n runTests({\n tests: this.tests.concat(finalTests),\n args,\n path,\n sync,\n value,\n endEarly: abortEarly\n }, cb);\n });\n }\n\n validate(value, options, maybeCb) {\n let schema = this.resolve(_extends({}, options, {\n value\n })); // callback case is for nested validations\n\n return typeof maybeCb === 'function' ? schema._validate(value, options, maybeCb) : new Promise((resolve, reject) => schema._validate(value, options, (err, value) => {\n if (err) reject(err);else resolve(value);\n }));\n }\n\n validateSync(value, options) {\n let schema = this.resolve(_extends({}, options, {\n value\n }));\n let result;\n\n schema._validate(value, _extends({}, options, {\n sync: true\n }), (err, value) => {\n if (err) throw err;\n result = value;\n });\n\n return result;\n }\n\n isValid(value, options) {\n return this.validate(value, options).then(() => true, err => {\n if (ValidationError.isError(err)) return false;\n throw err;\n });\n }\n\n isValidSync(value, options) {\n try {\n this.validateSync(value, options);\n return true;\n } catch (err) {\n if (ValidationError.isError(err)) return false;\n throw err;\n }\n }\n\n _getDefault() {\n let defaultValue = this.spec.default;\n\n if (defaultValue == null) {\n return defaultValue;\n }\n\n return typeof defaultValue === 'function' ? defaultValue.call(this) : cloneDeep(defaultValue);\n }\n\n getDefault(options) {\n let schema = this.resolve(options || {});\n return schema._getDefault();\n }\n\n default(def) {\n if (arguments.length === 0) {\n return this._getDefault();\n }\n\n let next = this.clone({\n default: def\n });\n return next;\n }\n\n strict(isStrict = true) {\n let next = this.clone();\n next.spec.strict = isStrict;\n return next;\n }\n\n _isPresent(value) {\n return value != null;\n }\n\n defined(message = locale.defined) {\n return this.test({\n message,\n name: 'defined',\n exclusive: true,\n\n test(value) {\n return value !== undefined;\n }\n\n });\n }\n\n required(message = locale.required) {\n return this.clone({\n presence: 'required'\n }).withMutation(s => s.test({\n message,\n name: 'required',\n exclusive: true,\n\n test(value) {\n return this.schema._isPresent(value);\n }\n\n }));\n }\n\n notRequired() {\n let next = this.clone({\n presence: 'optional'\n });\n next.tests = next.tests.filter(test => test.OPTIONS.name !== 'required');\n return next;\n }\n\n nullable(isNullable = true) {\n let next = this.clone({\n nullable: isNullable !== false\n });\n return next;\n }\n\n transform(fn) {\n let next = this.clone();\n next.transforms.push(fn);\n return next;\n }\n /**\n * Adds a test function to the schema's queue of tests.\n * tests can be exclusive or non-exclusive.\n *\n * - exclusive tests, will replace any existing tests of the same name.\n * - non-exclusive: can be stacked\n *\n * If a non-exclusive test is added to a schema with an exclusive test of the same name\n * the exclusive test is removed and further tests of the same name will be stacked.\n *\n * If an exclusive test is added to a schema with non-exclusive tests of the same name\n * the previous tests are removed and further tests of the same name will replace each other.\n */\n\n\n test(...args) {\n let opts;\n\n if (args.length === 1) {\n if (typeof args[0] === 'function') {\n opts = {\n test: args[0]\n };\n } else {\n opts = args[0];\n }\n } else if (args.length === 2) {\n opts = {\n name: args[0],\n test: args[1]\n };\n } else {\n opts = {\n name: args[0],\n message: args[1],\n test: args[2]\n };\n }\n\n if (opts.message === undefined) opts.message = locale.default;\n if (typeof opts.test !== 'function') throw new TypeError('`test` is a required parameters');\n let next = this.clone();\n let validate = createValidation(opts);\n let isExclusive = opts.exclusive || opts.name && next.exclusiveTests[opts.name] === true;\n\n if (opts.exclusive) {\n if (!opts.name) throw new TypeError('Exclusive tests must provide a unique `name` identifying the test');\n }\n\n if (opts.name) next.exclusiveTests[opts.name] = !!opts.exclusive;\n next.tests = next.tests.filter(fn => {\n if (fn.OPTIONS.name === opts.name) {\n if (isExclusive) return false;\n if (fn.OPTIONS.test === validate.OPTIONS.test) return false;\n }\n\n return true;\n });\n next.tests.push(validate);\n return next;\n }\n\n when(keys, options) {\n if (!Array.isArray(keys) && typeof keys !== 'string') {\n options = keys;\n keys = '.';\n }\n\n let next = this.clone();\n let deps = toArray(keys).map(key => new Ref(key));\n deps.forEach(dep => {\n // @ts-ignore\n if (dep.isSibling) next.deps.push(dep.key);\n });\n next.conditions.push(new Condition(deps, options));\n return next;\n }\n\n typeError(message) {\n let next = this.clone();\n next._typeError = createValidation({\n message,\n name: 'typeError',\n\n test(value) {\n if (value !== undefined && !this.schema.isType(value)) return this.createError({\n params: {\n type: this.schema._type\n }\n });\n return true;\n }\n\n });\n return next;\n }\n\n oneOf(enums, message = locale.oneOf) {\n let next = this.clone();\n enums.forEach(val => {\n next._whitelist.add(val);\n\n next._blacklist.delete(val);\n });\n next._whitelistError = createValidation({\n message,\n name: 'oneOf',\n\n test(value) {\n if (value === undefined) return true;\n let valids = this.schema._whitelist;\n let resolved = valids.resolveAll(this.resolve);\n return resolved.includes(value) ? true : this.createError({\n params: {\n values: valids.toArray().join(', '),\n resolved\n }\n });\n }\n\n });\n return next;\n }\n\n notOneOf(enums, message = locale.notOneOf) {\n let next = this.clone();\n enums.forEach(val => {\n next._blacklist.add(val);\n\n next._whitelist.delete(val);\n });\n next._blacklistError = createValidation({\n message,\n name: 'notOneOf',\n\n test(value) {\n let invalids = this.schema._blacklist;\n let resolved = invalids.resolveAll(this.resolve);\n if (resolved.includes(value)) return this.createError({\n params: {\n values: invalids.toArray().join(', '),\n resolved\n }\n });\n return true;\n }\n\n });\n return next;\n }\n\n strip(strip = true) {\n let next = this.clone();\n next.spec.strip = strip;\n return next;\n }\n\n describe() {\n const next = this.clone();\n const {\n label,\n meta\n } = next.spec;\n const description = {\n meta,\n label,\n type: next.type,\n oneOf: next._whitelist.describe(),\n notOneOf: next._blacklist.describe(),\n tests: next.tests.map(fn => ({\n name: fn.OPTIONS.name,\n params: fn.OPTIONS.params\n })).filter((n, idx, list) => list.findIndex(c => c.name === n.name) === idx)\n };\n return description;\n }\n\n} // eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n// @ts-expect-error\nBaseSchema.prototype.__isYupSchema__ = true;\n\nfor (const method of ['validate', 'validateSync']) BaseSchema.prototype[`${method}At`] = function (path, value, options = {}) {\n const {\n parent,\n parentPath,\n schema\n } = getIn(this, path, value, options.context);\n return schema[method](parent && parent[parentPath], _extends({}, options, {\n parent,\n path\n }));\n};\n\nfor (const alias of ['equals', 'is']) BaseSchema.prototype[alias] = BaseSchema.prototype.oneOf;\n\nfor (const alias of ['not', 'nope']) BaseSchema.prototype[alias] = BaseSchema.prototype.notOneOf;\n\nBaseSchema.prototype.optional = BaseSchema.prototype.notRequired;","import BaseSchema from './schema';\nconst Mixed = BaseSchema;\nexport default Mixed;\nexport function create() {\n return new Mixed();\n} // XXX: this is using the Base schema so that `addMethod(mixed)` works as a base class\n\ncreate.prototype = Mixed.prototype;","const isAbsent = value => value == null;\n\nexport default isAbsent;","import BaseSchema from './schema';\nimport { boolean as locale } from './locale';\nimport isAbsent from './util/isAbsent';\nexport function create() {\n return new BooleanSchema();\n}\nexport default class BooleanSchema extends BaseSchema {\n constructor() {\n super({\n type: 'boolean'\n });\n this.withMutation(() => {\n this.transform(function (value) {\n if (!this.isType(value)) {\n if (/^(true|1)$/i.test(String(value))) return true;\n if (/^(false|0)$/i.test(String(value))) return false;\n }\n\n return value;\n });\n });\n }\n\n _typeCheck(v) {\n if (v instanceof Boolean) v = v.valueOf();\n return typeof v === 'boolean';\n }\n\n isTrue(message = locale.isValue) {\n return this.test({\n message,\n name: 'is-value',\n exclusive: true,\n params: {\n value: 'true'\n },\n\n test(value) {\n return isAbsent(value) || value === true;\n }\n\n });\n }\n\n isFalse(message = locale.isValue) {\n return this.test({\n message,\n name: 'is-value',\n exclusive: true,\n params: {\n value: 'false'\n },\n\n test(value) {\n return isAbsent(value) || value === false;\n }\n\n });\n }\n\n}\ncreate.prototype = BooleanSchema.prototype;","import { string as locale } from './locale';\nimport isAbsent from './util/isAbsent';\nimport BaseSchema from './schema'; // eslint-disable-next-line\n\nlet rEmail = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i; // eslint-disable-next-line\n\nlet rUrl = /^((https?|ftp):)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900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(\\#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i; // eslint-disable-next-line\n\nlet rUUID = /^(?:[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;\n\nlet isTrimmed = value => isAbsent(value) || value === value.trim();\n\nlet objStringTag = {}.toString();\nexport function create() {\n return new StringSchema();\n}\nexport default class StringSchema extends BaseSchema {\n constructor() {\n super({\n type: 'string'\n });\n this.withMutation(() => {\n this.transform(function (value) {\n if (this.isType(value)) return value;\n if (Array.isArray(value)) return value;\n const strValue = value != null && value.toString ? value.toString() : value;\n if (strValue === objStringTag) return value;\n return strValue;\n });\n });\n }\n\n _typeCheck(value) {\n if (value instanceof String) value = value.valueOf();\n return typeof value === 'string';\n }\n\n _isPresent(value) {\n return super._isPresent(value) && !!value.length;\n }\n\n length(length, message = locale.length) {\n return this.test({\n message,\n name: 'length',\n exclusive: true,\n params: {\n length\n },\n\n test(value) {\n return isAbsent(value) || value.length === this.resolve(length);\n }\n\n });\n }\n\n min(min, message = locale.min) {\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n min\n },\n\n test(value) {\n return isAbsent(value) || value.length >= this.resolve(min);\n }\n\n });\n }\n\n max(max, message = locale.max) {\n return this.test({\n name: 'max',\n exclusive: true,\n message,\n params: {\n max\n },\n\n test(value) {\n return isAbsent(value) || value.length <= this.resolve(max);\n }\n\n });\n }\n\n matches(regex, options) {\n let excludeEmptyString = false;\n let message;\n let name;\n\n if (options) {\n if (typeof options === 'object') {\n ({\n excludeEmptyString = false,\n message,\n name\n } = options);\n } else {\n message = options;\n }\n }\n\n return this.test({\n name: name || 'matches',\n message: message || locale.matches,\n params: {\n regex\n },\n test: value => isAbsent(value) || value === '' && excludeEmptyString || value.search(regex) !== -1\n });\n }\n\n email(message = locale.email) {\n return this.matches(rEmail, {\n name: 'email',\n message,\n excludeEmptyString: true\n });\n }\n\n url(message = locale.url) {\n return this.matches(rUrl, {\n name: 'url',\n message,\n excludeEmptyString: true\n });\n }\n\n uuid(message = locale.uuid) {\n return this.matches(rUUID, {\n name: 'uuid',\n message,\n excludeEmptyString: false\n });\n } //-- transforms --\n\n\n ensure() {\n return this.default('').transform(val => val === null ? '' : val);\n }\n\n trim(message = locale.trim) {\n return this.transform(val => val != null ? val.trim() : val).test({\n message,\n name: 'trim',\n test: isTrimmed\n });\n }\n\n lowercase(message = locale.lowercase) {\n return this.transform(value => !isAbsent(value) ? value.toLowerCase() : value).test({\n message,\n name: 'string_case',\n exclusive: true,\n test: value => isAbsent(value) || value === value.toLowerCase()\n });\n }\n\n uppercase(message = locale.uppercase) {\n return this.transform(value => !isAbsent(value) ? value.toUpperCase() : value).test({\n message,\n name: 'string_case',\n exclusive: true,\n test: value => isAbsent(value) || value === value.toUpperCase()\n });\n }\n\n}\ncreate.prototype = StringSchema.prototype; //\n// String Interfaces\n//","import { number as locale } from './locale';\nimport isAbsent from './util/isAbsent';\nimport BaseSchema from './schema';\n\nlet isNaN = value => value != +value;\n\nexport function create() {\n return new NumberSchema();\n}\nexport default class NumberSchema extends BaseSchema {\n constructor() {\n super({\n type: 'number'\n });\n this.withMutation(() => {\n this.transform(function (value) {\n let parsed = value;\n\n if (typeof parsed === 'string') {\n parsed = parsed.replace(/\\s/g, '');\n if (parsed === '') return NaN; // don't use parseFloat to avoid positives on alpha-numeric strings\n\n parsed = +parsed;\n }\n\n if (this.isType(parsed)) return parsed;\n return parseFloat(parsed);\n });\n });\n }\n\n _typeCheck(value) {\n if (value instanceof Number) value = value.valueOf();\n return typeof value === 'number' && !isNaN(value);\n }\n\n min(min, message = locale.min) {\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n min\n },\n\n test(value) {\n return isAbsent(value) || value >= this.resolve(min);\n }\n\n });\n }\n\n max(max, message = locale.max) {\n return this.test({\n message,\n name: 'max',\n exclusive: true,\n params: {\n max\n },\n\n test(value) {\n return isAbsent(value) || value <= this.resolve(max);\n }\n\n });\n }\n\n lessThan(less, message = locale.lessThan) {\n return this.test({\n message,\n name: 'max',\n exclusive: true,\n params: {\n less\n },\n\n test(value) {\n return isAbsent(value) || value < this.resolve(less);\n }\n\n });\n }\n\n moreThan(more, message = locale.moreThan) {\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n more\n },\n\n test(value) {\n return isAbsent(value) || value > this.resolve(more);\n }\n\n });\n }\n\n positive(msg = locale.positive) {\n return this.moreThan(0, msg);\n }\n\n negative(msg = locale.negative) {\n return this.lessThan(0, msg);\n }\n\n integer(message = locale.integer) {\n return this.test({\n name: 'integer',\n message,\n test: val => isAbsent(val) || Number.isInteger(val)\n });\n }\n\n truncate() {\n return this.transform(value => !isAbsent(value) ? value | 0 : value);\n }\n\n round(method) {\n var _method;\n\n let avail = ['ceil', 'floor', 'round', 'trunc'];\n method = ((_method = method) == null ? void 0 : _method.toLowerCase()) || 'round'; // this exists for symemtry with the new Math.trunc\n\n if (method === 'trunc') return this.truncate();\n if (avail.indexOf(method.toLowerCase()) === -1) throw new TypeError('Only valid options for round() are: ' + avail.join(', '));\n return this.transform(value => !isAbsent(value) ? Math[method](value) : value);\n }\n\n}\ncreate.prototype = NumberSchema.prototype; //\n// Number Interfaces\n//","/* eslint-disable */\n\n/**\n *\n * Date.parse with progressive enhancement for ISO 8601 \n * NON-CONFORMANT EDITION.\n * © 2011 Colin Snover \n * Released under MIT license.\n */\n// 1 YYYY 2 MM 3 DD 4 HH 5 mm 6 ss 7 msec 8 Z 9 ± 10 tzHH 11 tzmm\nvar isoReg = /^(\\d{4}|[+\\-]\\d{6})(?:-?(\\d{2})(?:-?(\\d{2}))?)?(?:[ T]?(\\d{2}):?(\\d{2})(?::?(\\d{2})(?:[,\\.](\\d{1,}))?)?(?:(Z)|([+\\-])(\\d{2})(?::?(\\d{2}))?)?)?$/;\nexport default function parseIsoDate(date) {\n var numericKeys = [1, 4, 5, 6, 7, 10, 11],\n minutesOffset = 0,\n timestamp,\n struct;\n\n if (struct = isoReg.exec(date)) {\n // avoid NaN timestamps caused by “undefined” values being passed to Date.UTC\n for (var i = 0, k; k = numericKeys[i]; ++i) struct[k] = +struct[k] || 0; // allow undefined days and months\n\n\n struct[2] = (+struct[2] || 1) - 1;\n struct[3] = +struct[3] || 1; // allow arbitrary sub-second precision beyond milliseconds\n\n struct[7] = struct[7] ? String(struct[7]).substr(0, 3) : 0; // timestamps without timezone identifiers should be considered local time\n\n if ((struct[8] === undefined || struct[8] === '') && (struct[9] === undefined || struct[9] === '')) timestamp = +new Date(struct[1], struct[2], struct[3], struct[4], struct[5], struct[6], struct[7]);else {\n if (struct[8] !== 'Z' && struct[9] !== undefined) {\n minutesOffset = struct[10] * 60 + struct[11];\n if (struct[9] === '+') minutesOffset = 0 - minutesOffset;\n }\n\n timestamp = Date.UTC(struct[1], struct[2], struct[3], struct[4], struct[5] + minutesOffset, struct[6], struct[7]);\n }\n } else timestamp = Date.parse ? Date.parse(date) : NaN;\n\n return timestamp;\n}","// @ts-ignore\nimport isoParse from './util/isodate';\nimport { date as locale } from './locale';\nimport isAbsent from './util/isAbsent';\nimport Ref from './Reference';\nimport BaseSchema from './schema';\nlet invalidDate = new Date('');\n\nlet isDate = obj => Object.prototype.toString.call(obj) === '[object Date]';\n\nexport function create() {\n return new DateSchema();\n}\nexport default class DateSchema extends BaseSchema {\n constructor() {\n super({\n type: 'date'\n });\n this.withMutation(() => {\n this.transform(function (value) {\n if (this.isType(value)) return value;\n value = isoParse(value); // 0 is a valid timestamp equivalent to 1970-01-01T00:00:00Z(unix epoch) or before.\n\n return !isNaN(value) ? new Date(value) : invalidDate;\n });\n });\n }\n\n _typeCheck(v) {\n return isDate(v) && !isNaN(v.getTime());\n }\n\n prepareParam(ref, name) {\n let param;\n\n if (!Ref.isRef(ref)) {\n let cast = this.cast(ref);\n if (!this._typeCheck(cast)) throw new TypeError(`\\`${name}\\` must be a Date or a value that can be \\`cast()\\` to a Date`);\n param = cast;\n } else {\n param = ref;\n }\n\n return param;\n }\n\n min(min, message = locale.min) {\n let limit = this.prepareParam(min, 'min');\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n min\n },\n\n test(value) {\n return isAbsent(value) || value >= this.resolve(limit);\n }\n\n });\n }\n\n max(max, message = locale.max) {\n let limit = this.prepareParam(max, 'max');\n return this.test({\n message,\n name: 'max',\n exclusive: true,\n params: {\n max\n },\n\n test(value) {\n return isAbsent(value) || value <= this.resolve(limit);\n }\n\n });\n }\n\n}\nDateSchema.INVALID_DATE = invalidDate;\ncreate.prototype = DateSchema.prototype;\ncreate.INVALID_DATE = invalidDate;","/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n}\n\nmodule.exports = arrayReduce;\n","/**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = basePropertyOf;\n","var basePropertyOf = require('./_basePropertyOf');\n\n/** Used to map Latin Unicode letters to basic Latin letters. */\nvar deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n};\n\n/**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\nvar deburrLetter = basePropertyOf(deburredLetters);\n\nmodule.exports = deburrLetter;\n","var deburrLetter = require('./_deburrLetter'),\n toString = require('./toString');\n\n/** Used to match Latin Unicode letters (excluding mathematical operators). */\nvar reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n/** Used to compose unicode character classes. */\nvar rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;\n\n/** Used to compose unicode capture groups. */\nvar rsCombo = '[' + rsComboRange + ']';\n\n/**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\nvar reComboMark = RegExp(rsCombo, 'g');\n\n/**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\nfunction deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n}\n\nmodule.exports = deburr;\n","/** Used to match words composed of alphanumeric characters. */\nvar reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n/**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction asciiWords(string) {\n return string.match(reAsciiWord) || [];\n}\n\nmodule.exports = asciiWords;\n","/** Used to detect strings that need a more robust regexp to match words. */\nvar reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n/**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\nfunction hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n}\n\nmodule.exports = hasUnicodeWord;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n/** Used to compose unicode capture groups. */\nvar rsApos = \"['\\u2019]\",\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;\n\n/** Used to match complex or compound words. */\nvar reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n].join('|'), 'g');\n\n/**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n}\n\nmodule.exports = unicodeWords;\n","var asciiWords = require('./_asciiWords'),\n hasUnicodeWord = require('./_hasUnicodeWord'),\n toString = require('./toString'),\n unicodeWords = require('./_unicodeWords');\n\n/**\n * Splits `string` into an array of its words.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {RegExp|string} [pattern] The pattern to match words.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the words of `string`.\n * @example\n *\n * _.words('fred, barney, & pebbles');\n * // => ['fred', 'barney', 'pebbles']\n *\n * _.words('fred, barney, & pebbles', /[^, ]+/g);\n * // => ['fred', 'barney', '&', 'pebbles']\n */\nfunction words(string, pattern, guard) {\n string = toString(string);\n pattern = guard ? undefined : pattern;\n\n if (pattern === undefined) {\n return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n }\n return string.match(pattern) || [];\n}\n\nmodule.exports = words;\n","var arrayReduce = require('./_arrayReduce'),\n deburr = require('./deburr'),\n words = require('./words');\n\n/** Used to compose unicode capture groups. */\nvar rsApos = \"['\\u2019]\";\n\n/** Used to match apostrophes. */\nvar reApos = RegExp(rsApos, 'g');\n\n/**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\nfunction createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n}\n\nmodule.exports = createCompounder;\n","var createCompounder = require('./_createCompounder');\n\n/**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */\nvar snakeCase = createCompounder(function(result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n});\n\nmodule.exports = snakeCase;\n","/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nmodule.exports = baseSlice;\n","var baseSlice = require('./_baseSlice');\n\n/**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\nfunction castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n}\n\nmodule.exports = castSlice;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsZWJ = '\\\\u200d';\n\n/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\nvar reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\nfunction hasUnicode(string) {\n return reHasUnicode.test(string);\n}\n\nmodule.exports = hasUnicode;\n","/**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction asciiToArray(string) {\n return string.split('');\n}\n\nmodule.exports = asciiToArray;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction unicodeToArray(string) {\n return string.match(reUnicode) || [];\n}\n\nmodule.exports = unicodeToArray;\n","var asciiToArray = require('./_asciiToArray'),\n hasUnicode = require('./_hasUnicode'),\n unicodeToArray = require('./_unicodeToArray');\n\n/**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n}\n\nmodule.exports = stringToArray;\n","var castSlice = require('./_castSlice'),\n hasUnicode = require('./_hasUnicode'),\n stringToArray = require('./_stringToArray'),\n toString = require('./toString');\n\n/**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\nfunction createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n}\n\nmodule.exports = createCaseFirst;\n","var createCaseFirst = require('./_createCaseFirst');\n\n/**\n * Converts the first character of `string` to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.upperFirst('fred');\n * // => 'Fred'\n *\n * _.upperFirst('FRED');\n * // => 'FRED'\n */\nvar upperFirst = createCaseFirst('toUpperCase');\n\nmodule.exports = upperFirst;\n","var toString = require('./toString'),\n upperFirst = require('./upperFirst');\n\n/**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\nfunction capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n}\n\nmodule.exports = capitalize;\n","var capitalize = require('./capitalize'),\n createCompounder = require('./_createCompounder');\n\n/**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\nvar camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n});\n\nmodule.exports = camelCase;\n","var baseAssignValue = require('./_baseAssignValue'),\n baseForOwn = require('./_baseForOwn'),\n baseIteratee = require('./_baseIteratee');\n\n/**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n * with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapValues\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\nfunction mapKeys(object, iteratee) {\n var result = {};\n iteratee = baseIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, iteratee(value, key, object), value);\n });\n return result;\n}\n\nmodule.exports = mapKeys;\n","\n/**\n * Topological sorting function\n *\n * @param {Array} edges\n * @returns {Array}\n */\n\nmodule.exports = function(edges) {\n return toposort(uniqueNodes(edges), edges)\n}\n\nmodule.exports.array = toposort\n\nfunction toposort(nodes, edges) {\n var cursor = nodes.length\n , sorted = new Array(cursor)\n , visited = {}\n , i = cursor\n // Better data structures make algorithm much faster.\n , outgoingEdges = makeOutgoingEdges(edges)\n , nodesHash = makeNodesHash(nodes)\n\n // check for unknown nodes\n edges.forEach(function(edge) {\n if (!nodesHash.has(edge[0]) || !nodesHash.has(edge[1])) {\n throw new Error('Unknown node. There is an unknown node in the supplied edges.')\n }\n })\n\n while (i--) {\n if (!visited[i]) visit(nodes[i], i, new Set())\n }\n\n return sorted\n\n function visit(node, i, predecessors) {\n if(predecessors.has(node)) {\n var nodeRep\n try {\n nodeRep = \", node was:\" + JSON.stringify(node)\n } catch(e) {\n nodeRep = \"\"\n }\n throw new Error('Cyclic dependency' + nodeRep)\n }\n\n if (!nodesHash.has(node)) {\n throw new Error('Found unknown node. Make sure to provided all involved nodes. Unknown node: '+JSON.stringify(node))\n }\n\n if (visited[i]) return;\n visited[i] = true\n\n var outgoing = outgoingEdges.get(node) || new Set()\n outgoing = Array.from(outgoing)\n\n if (i = outgoing.length) {\n predecessors.add(node)\n do {\n var child = outgoing[--i]\n visit(child, nodesHash.get(child), predecessors)\n } while (i)\n predecessors.delete(node)\n }\n\n sorted[--cursor] = node\n }\n}\n\nfunction uniqueNodes(arr){\n var res = new Set()\n for (var i = 0, len = arr.length; i < len; i++) {\n var edge = arr[i]\n res.add(edge[0])\n res.add(edge[1])\n }\n return Array.from(res)\n}\n\nfunction makeOutgoingEdges(arr){\n var edges = new Map()\n for (var i = 0, len = arr.length; i < len; i++) {\n var edge = arr[i]\n if (!edges.has(edge[0])) edges.set(edge[0], new Set())\n if (!edges.has(edge[1])) edges.set(edge[1], new Set())\n edges.get(edge[0]).add(edge[1])\n }\n return edges\n}\n\nfunction makeNodesHash(arr){\n var res = new Map()\n for (var i = 0, len = arr.length; i < len; i++) {\n res.set(arr[i], i)\n }\n return res\n}\n","import has from 'lodash/has'; // @ts-expect-error\n\nimport toposort from 'toposort';\nimport { split } from 'property-expr';\nimport Ref from '../Reference';\nimport isSchema from './isSchema';\nexport default function sortFields(fields, excludedEdges = []) {\n let edges = [];\n let nodes = new Set();\n let excludes = new Set(excludedEdges.map(([a, b]) => `${a}-${b}`));\n\n function addNode(depPath, key) {\n let node = split(depPath)[0];\n nodes.add(node);\n if (!excludes.has(`${key}-${node}`)) edges.push([key, node]);\n }\n\n for (const key in fields) if (has(fields, key)) {\n let value = fields[key];\n nodes.add(key);\n if (Ref.isRef(value) && value.isSibling) addNode(value.path, key);else if (isSchema(value) && 'deps' in value) value.deps.forEach(path => addNode(path, key));\n }\n\n return toposort.array(Array.from(nodes), edges).reverse();\n}","function findIndex(arr, err) {\n let idx = Infinity;\n arr.some((key, ii) => {\n var _err$path;\n\n if (((_err$path = err.path) == null ? void 0 : _err$path.indexOf(key)) !== -1) {\n idx = ii;\n return true;\n }\n });\n return idx;\n}\n\nexport default function sortByKeyOrder(keys) {\n return (a, b) => {\n return findIndex(keys, a) - findIndex(keys, b);\n };\n}","function _extends() { _extends = Object.assign || 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); }\n\nimport has from 'lodash/has';\nimport snakeCase from 'lodash/snakeCase';\nimport camelCase from 'lodash/camelCase';\nimport mapKeys from 'lodash/mapKeys';\nimport mapValues from 'lodash/mapValues';\nimport { getter } from 'property-expr';\nimport { object as locale } from './locale';\nimport sortFields from './util/sortFields';\nimport sortByKeyOrder from './util/sortByKeyOrder';\nimport runTests from './util/runTests';\nimport ValidationError from './ValidationError';\nimport BaseSchema from './schema';\n\nlet isObject = obj => Object.prototype.toString.call(obj) === '[object Object]';\n\nfunction unknown(ctx, value) {\n let known = Object.keys(ctx.fields);\n return Object.keys(value).filter(key => known.indexOf(key) === -1);\n}\n\nconst defaultSort = sortByKeyOrder([]);\nexport default class ObjectSchema extends BaseSchema {\n constructor(spec) {\n super({\n type: 'object'\n });\n this.fields = Object.create(null);\n this._sortErrors = defaultSort;\n this._nodes = [];\n this._excludedEdges = [];\n this.withMutation(() => {\n this.transform(function coerce(value) {\n if (typeof value === 'string') {\n try {\n value = JSON.parse(value);\n } catch (err) {\n value = null;\n }\n }\n\n if (this.isType(value)) return value;\n return null;\n });\n\n if (spec) {\n this.shape(spec);\n }\n });\n }\n\n _typeCheck(value) {\n return isObject(value) || typeof value === 'function';\n }\n\n _cast(_value, options = {}) {\n var _options$stripUnknown;\n\n let value = super._cast(_value, options); //should ignore nulls here\n\n\n if (value === undefined) return this.getDefault();\n if (!this._typeCheck(value)) return value;\n let fields = this.fields;\n let strip = (_options$stripUnknown = options.stripUnknown) != null ? _options$stripUnknown : this.spec.noUnknown;\n\n let props = this._nodes.concat(Object.keys(value).filter(v => this._nodes.indexOf(v) === -1));\n\n let intermediateValue = {}; // is filled during the transform below\n\n let innerOptions = _extends({}, options, {\n parent: intermediateValue,\n __validating: options.__validating || false\n });\n\n let isChanged = false;\n\n for (const prop of props) {\n let field = fields[prop];\n let exists = has(value, prop);\n\n if (field) {\n let fieldValue;\n let inputValue = value[prop]; // safe to mutate since this is fired in sequence\n\n innerOptions.path = (options.path ? `${options.path}.` : '') + prop; // innerOptions.value = value[prop];\n\n field = field.resolve({\n value: inputValue,\n context: options.context,\n parent: intermediateValue\n });\n let fieldSpec = 'spec' in field ? field.spec : undefined;\n let strict = fieldSpec == null ? void 0 : fieldSpec.strict;\n\n if (fieldSpec == null ? void 0 : fieldSpec.strip) {\n isChanged = isChanged || prop in value;\n continue;\n }\n\n fieldValue = !options.__validating || !strict ? // TODO: use _cast, this is double resolving\n field.cast(value[prop], innerOptions) : value[prop];\n\n if (fieldValue !== undefined) {\n intermediateValue[prop] = fieldValue;\n }\n } else if (exists && !strip) {\n intermediateValue[prop] = value[prop];\n }\n\n if (intermediateValue[prop] !== value[prop]) {\n isChanged = true;\n }\n }\n\n return isChanged ? intermediateValue : value;\n }\n\n _validate(_value, opts = {}, callback) {\n let errors = [];\n let {\n sync,\n from = [],\n originalValue = _value,\n abortEarly = this.spec.abortEarly,\n recursive = this.spec.recursive\n } = opts;\n from = [{\n schema: this,\n value: originalValue\n }, ...from]; // this flag is needed for handling `strict` correctly in the context of\n // validation vs just casting. e.g strict() on a field is only used when validating\n\n opts.__validating = true;\n opts.originalValue = originalValue;\n opts.from = from;\n\n super._validate(_value, opts, (err, value) => {\n if (err) {\n if (!ValidationError.isError(err) || abortEarly) {\n return void callback(err, value);\n }\n\n errors.push(err);\n }\n\n if (!recursive || !isObject(value)) {\n callback(errors[0] || null, value);\n return;\n }\n\n originalValue = originalValue || value;\n\n let tests = this._nodes.map(key => (_, cb) => {\n let path = key.indexOf('.') === -1 ? (opts.path ? `${opts.path}.` : '') + key : `${opts.path || ''}[\"${key}\"]`;\n let field = this.fields[key];\n\n if (field && 'validate' in field) {\n field.validate(value[key], _extends({}, opts, {\n // @ts-ignore\n path,\n from,\n // inner fields are always strict:\n // 1. this isn't strict so the casting will also have cast inner values\n // 2. this is strict in which case the nested values weren't cast either\n strict: true,\n parent: value,\n originalValue: originalValue[key]\n }), cb);\n return;\n }\n\n cb(null);\n });\n\n runTests({\n sync,\n tests,\n value,\n errors,\n endEarly: abortEarly,\n sort: this._sortErrors,\n path: opts.path\n }, callback);\n });\n }\n\n clone(spec) {\n const next = super.clone(spec);\n next.fields = _extends({}, this.fields);\n next._nodes = this._nodes;\n next._excludedEdges = this._excludedEdges;\n next._sortErrors = this._sortErrors;\n return next;\n }\n\n concat(schema) {\n let next = super.concat(schema);\n let nextFields = next.fields;\n\n for (let [field, schemaOrRef] of Object.entries(this.fields)) {\n const target = nextFields[field];\n\n if (target === undefined) {\n nextFields[field] = schemaOrRef;\n } else if (target instanceof BaseSchema && schemaOrRef instanceof BaseSchema) {\n nextFields[field] = schemaOrRef.concat(target);\n }\n }\n\n return next.withMutation(() => next.shape(nextFields, this._excludedEdges));\n }\n\n getDefaultFromShape() {\n let dft = {};\n\n this._nodes.forEach(key => {\n const field = this.fields[key];\n dft[key] = 'default' in field ? field.getDefault() : undefined;\n });\n\n return dft;\n }\n\n _getDefault() {\n if ('default' in this.spec) {\n return super._getDefault();\n } // if there is no default set invent one\n\n\n if (!this._nodes.length) {\n return undefined;\n }\n\n return this.getDefaultFromShape();\n }\n\n shape(additions, excludes = []) {\n let next = this.clone();\n let fields = Object.assign(next.fields, additions);\n next.fields = fields;\n next._sortErrors = sortByKeyOrder(Object.keys(fields));\n\n if (excludes.length) {\n // this is a convenience for when users only supply a single pair\n if (!Array.isArray(excludes[0])) excludes = [excludes];\n next._excludedEdges = [...next._excludedEdges, ...excludes];\n }\n\n next._nodes = sortFields(fields, next._excludedEdges);\n return next;\n }\n\n pick(keys) {\n const picked = {};\n\n for (const key of keys) {\n if (this.fields[key]) picked[key] = this.fields[key];\n }\n\n return this.clone().withMutation(next => {\n next.fields = {};\n return next.shape(picked);\n });\n }\n\n omit(keys) {\n const next = this.clone();\n const fields = next.fields;\n next.fields = {};\n\n for (const key of keys) {\n delete fields[key];\n }\n\n return next.withMutation(() => next.shape(fields));\n }\n\n from(from, to, alias) {\n let fromGetter = getter(from, true);\n return this.transform(obj => {\n if (obj == null) return obj;\n let newObj = obj;\n\n if (has(obj, from)) {\n newObj = _extends({}, obj);\n if (!alias) delete newObj[from];\n newObj[to] = fromGetter(obj);\n }\n\n return newObj;\n });\n }\n\n noUnknown(noAllow = true, message = locale.noUnknown) {\n if (typeof noAllow === 'string') {\n message = noAllow;\n noAllow = true;\n }\n\n let next = this.test({\n name: 'noUnknown',\n exclusive: true,\n message: message,\n\n test(value) {\n if (value == null) return true;\n const unknownKeys = unknown(this.schema, value);\n return !noAllow || unknownKeys.length === 0 || this.createError({\n params: {\n unknown: unknownKeys.join(', ')\n }\n });\n }\n\n });\n next.spec.noUnknown = noAllow;\n return next;\n }\n\n unknown(allow = true, message = locale.noUnknown) {\n return this.noUnknown(!allow, message);\n }\n\n transformKeys(fn) {\n return this.transform(obj => obj && mapKeys(obj, (_, key) => fn(key)));\n }\n\n camelCase() {\n return this.transformKeys(camelCase);\n }\n\n snakeCase() {\n return this.transformKeys(snakeCase);\n }\n\n constantCase() {\n return this.transformKeys(key => snakeCase(key).toUpperCase());\n }\n\n describe() {\n let base = super.describe();\n base.fields = mapValues(this.fields, value => value.describe());\n return base;\n }\n\n}\nexport function create(spec) {\n return new ObjectSchema(spec);\n}\ncreate.prototype = ObjectSchema.prototype;","function isUndefined(value) {\n return value === undefined;\n}\n\nfunction isNull(value) {\n return value === null;\n}\n\nfunction isBoolean(value) {\n return typeof value === 'boolean';\n}\n\nfunction isObject(value) {\n return value === Object(value);\n}\n\nfunction isArray(value) {\n return Array.isArray(value);\n}\n\nfunction isDate(value) {\n return value instanceof Date;\n}\n\nfunction isBlob(value, isReactNative) {\n return isReactNative\n ? isObject(value) && !isUndefined(value.uri)\n : isObject(value) &&\n typeof value.size === 'number' &&\n typeof value.type === 'string' &&\n typeof value.slice === 'function';\n}\n\nfunction isFile(value, isReactNative) {\n return (\n isBlob(value, isReactNative) &&\n typeof value.name === 'string' &&\n (isObject(value.lastModifiedDate) || typeof value.lastModified === 'number')\n );\n}\n\nfunction initCfg(value) {\n return isUndefined(value) ? false : value;\n}\n\nfunction serialize(obj, cfg, fd, pre) {\n cfg = cfg || {};\n fd = fd || new FormData();\n\n cfg.indices = initCfg(cfg.indices);\n cfg.nullsAsUndefineds = initCfg(cfg.nullsAsUndefineds);\n cfg.booleansAsIntegers = initCfg(cfg.booleansAsIntegers);\n cfg.allowEmptyArrays = initCfg(cfg.allowEmptyArrays);\n cfg.noFilesWithArrayNotation = initCfg(cfg.noFilesWithArrayNotation);\n cfg.dotsForObjectNotation = initCfg(cfg.dotsForObjectNotation);\n\n const isReactNative = typeof fd.getParts === 'function';\n\n if (isUndefined(obj)) {\n return fd;\n } else if (isNull(obj)) {\n if (!cfg.nullsAsUndefineds) {\n fd.append(pre, '');\n }\n } else if (isBoolean(obj)) {\n if (cfg.booleansAsIntegers) {\n fd.append(pre, obj ? 1 : 0);\n } else {\n fd.append(pre, obj);\n }\n } else if (isArray(obj)) {\n if (obj.length) {\n obj.forEach((value, index) => {\n let key = pre + '[' + (cfg.indices ? index : '') + ']';\n\n if (cfg.noFilesWithArrayNotation && isFile(value, isReactNative)) {\n key = pre;\n }\n\n serialize(value, cfg, fd, key);\n });\n } else if (cfg.allowEmptyArrays) {\n fd.append(pre + '[]', '');\n }\n } else if (isDate(obj)) {\n fd.append(pre, obj.toISOString());\n } else if (isObject(obj) && !isBlob(obj, isReactNative)) {\n Object.keys(obj).forEach((prop) => {\n const value = obj[prop];\n\n if (isArray(value)) {\n while (prop.length > 2 && prop.lastIndexOf('[]') === prop.length - 2) {\n prop = prop.substring(0, prop.length - 2);\n }\n }\n\n const key = pre\n ? cfg.dotsForObjectNotation\n ? pre + '.' + prop\n : pre + '[' + prop + ']'\n : prop;\n\n serialize(value, cfg, fd, key);\n });\n } else {\n fd.append(pre, obj);\n }\n\n return fd;\n}\n\nmodule.exports = {\n serialize,\n};\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","/**\n * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.\n *\n * Specifically:\n * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js\n * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts\n *\n * Original code has MIT license: Copyright (c) Luke Edwards (lukeed.com)\n */\nfunction twJoin() {\n var index = 0;\n var argument;\n var resolvedValue;\n var string = '';\n while (index < arguments.length) {\n if (argument = arguments[index++]) {\n if (resolvedValue = toValue(argument)) {\n string && (string += ' ');\n string += resolvedValue;\n }\n }\n }\n return string;\n}\nfunction toValue(mix) {\n if (typeof mix === 'string') {\n return mix;\n }\n var resolvedValue;\n var string = '';\n for (var k = 0; k < mix.length; k++) {\n if (mix[k]) {\n if (resolvedValue = toValue(mix[k])) {\n string && (string += ' ');\n string += resolvedValue;\n }\n }\n }\n return string;\n}\n\nexport { twJoin };\n//# sourceMappingURL=tw-join.mjs.map\n","var CLASS_PART_SEPARATOR = '-';\nfunction createClassUtils(config) {\n var classMap = createClassMap(config);\n var conflictingClassGroups = config.conflictingClassGroups,\n _config$conflictingCl = config.conflictingClassGroupModifiers,\n conflictingClassGroupModifiers = _config$conflictingCl === void 0 ? {} : _config$conflictingCl;\n function getClassGroupId(className) {\n var classParts = className.split(CLASS_PART_SEPARATOR);\n // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and remove it from classParts.\n if (classParts[0] === '' && classParts.length !== 1) {\n classParts.shift();\n }\n return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);\n }\n function getConflictingClassGroupIds(classGroupId, hasPostfixModifier) {\n var conflicts = conflictingClassGroups[classGroupId] || [];\n if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {\n return [].concat(conflicts, conflictingClassGroupModifiers[classGroupId]);\n }\n return conflicts;\n }\n return {\n getClassGroupId: getClassGroupId,\n getConflictingClassGroupIds: getConflictingClassGroupIds\n };\n}\nfunction getGroupRecursive(classParts, classPartObject) {\n if (classParts.length === 0) {\n return classPartObject.classGroupId;\n }\n var currentClassPart = classParts[0];\n var nextClassPartObject = classPartObject.nextPart.get(currentClassPart);\n var classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : undefined;\n if (classGroupFromNextClassPart) {\n return classGroupFromNextClassPart;\n }\n if (classPartObject.validators.length === 0) {\n return undefined;\n }\n var classRest = classParts.join(CLASS_PART_SEPARATOR);\n return classPartObject.validators.find(function (_ref) {\n var validator = _ref.validator;\n return validator(classRest);\n })?.classGroupId;\n}\nvar arbitraryPropertyRegex = /^\\[(.+)\\]$/;\nfunction getGroupIdForArbitraryProperty(className) {\n if (arbitraryPropertyRegex.test(className)) {\n var arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];\n var property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(':'));\n if (property) {\n // I use two dots here because one dot is used as prefix for class groups in plugins\n return 'arbitrary..' + property;\n }\n }\n}\n/**\n * Exported for testing only\n */\nfunction createClassMap(config) {\n var theme = config.theme,\n prefix = config.prefix;\n var classMap = {\n nextPart: new Map(),\n validators: []\n };\n var prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config.classGroups), prefix);\n prefixedClassGroupEntries.forEach(function (_ref2) {\n var classGroupId = _ref2[0],\n classGroup = _ref2[1];\n processClassesRecursively(classGroup, classMap, classGroupId, theme);\n });\n return classMap;\n}\nfunction processClassesRecursively(classGroup, classPartObject, classGroupId, theme) {\n classGroup.forEach(function (classDefinition) {\n if (typeof classDefinition === 'string') {\n var classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);\n classPartObjectToEdit.classGroupId = classGroupId;\n return;\n }\n if (typeof classDefinition === 'function') {\n if (isThemeGetter(classDefinition)) {\n processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);\n return;\n }\n classPartObject.validators.push({\n validator: classDefinition,\n classGroupId: classGroupId\n });\n return;\n }\n Object.entries(classDefinition).forEach(function (_ref3) {\n var key = _ref3[0],\n classGroup = _ref3[1];\n processClassesRecursively(classGroup, getPart(classPartObject, key), classGroupId, theme);\n });\n });\n}\nfunction getPart(classPartObject, path) {\n var currentClassPartObject = classPartObject;\n path.split(CLASS_PART_SEPARATOR).forEach(function (pathPart) {\n if (!currentClassPartObject.nextPart.has(pathPart)) {\n currentClassPartObject.nextPart.set(pathPart, {\n nextPart: new Map(),\n validators: []\n });\n }\n currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);\n });\n return currentClassPartObject;\n}\nfunction isThemeGetter(func) {\n return func.isThemeGetter;\n}\nfunction getPrefixedClassGroupEntries(classGroupEntries, prefix) {\n if (!prefix) {\n return classGroupEntries;\n }\n return classGroupEntries.map(function (_ref4) {\n var classGroupId = _ref4[0],\n classGroup = _ref4[1];\n var prefixedClassGroup = classGroup.map(function (classDefinition) {\n if (typeof classDefinition === 'string') {\n return prefix + classDefinition;\n }\n if (typeof classDefinition === 'object') {\n return Object.fromEntries(Object.entries(classDefinition).map(function (_ref5) {\n var key = _ref5[0],\n value = _ref5[1];\n return [prefix + key, value];\n }));\n }\n return classDefinition;\n });\n return [classGroupId, prefixedClassGroup];\n });\n}\n\nexport { createClassMap, createClassUtils };\n//# sourceMappingURL=class-utils.mjs.map\n","// LRU cache inspired from hashlru (https://github.com/dominictarr/hashlru/blob/v1.0.4/index.js) but object replaced with Map to improve performance\nfunction createLruCache(maxCacheSize) {\n if (maxCacheSize < 1) {\n return {\n get: function get() {\n return undefined;\n },\n set: function set() {}\n };\n }\n var cacheSize = 0;\n var cache = new Map();\n var previousCache = new Map();\n function update(key, value) {\n cache.set(key, value);\n cacheSize++;\n if (cacheSize > maxCacheSize) {\n cacheSize = 0;\n previousCache = cache;\n cache = new Map();\n }\n }\n return {\n get: function get(key) {\n var value = cache.get(key);\n if (value !== undefined) {\n return value;\n }\n if ((value = previousCache.get(key)) !== undefined) {\n update(key, value);\n return value;\n }\n },\n set: function set(key, value) {\n if (cache.has(key)) {\n cache.set(key, value);\n } else {\n update(key, value);\n }\n }\n };\n}\n\nexport { createLruCache };\n//# sourceMappingURL=lru-cache.mjs.map\n","var IMPORTANT_MODIFIER = '!';\nfunction createSplitModifiers(config) {\n var separator = config.separator || ':';\n var isSeparatorSingleCharacter = separator.length === 1;\n var firstSeparatorCharacter = separator[0];\n var separatorLength = separator.length;\n // splitModifiers inspired by https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js\n return function splitModifiers(className) {\n var modifiers = [];\n var bracketDepth = 0;\n var modifierStart = 0;\n var postfixModifierPosition;\n for (var index = 0; index < className.length; index++) {\n var currentCharacter = className[index];\n if (bracketDepth === 0) {\n if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) {\n modifiers.push(className.slice(modifierStart, index));\n modifierStart = index + separatorLength;\n continue;\n }\n if (currentCharacter === '/') {\n postfixModifierPosition = index;\n continue;\n }\n }\n if (currentCharacter === '[') {\n bracketDepth++;\n } else if (currentCharacter === ']') {\n bracketDepth--;\n }\n }\n var baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);\n var hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER);\n var baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier;\n var maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;\n return {\n modifiers: modifiers,\n hasImportantModifier: hasImportantModifier,\n baseClassName: baseClassName,\n maybePostfixModifierPosition: maybePostfixModifierPosition\n };\n };\n}\n/**\n * Sorts modifiers according to following schema:\n * - Predefined modifiers are sorted alphabetically\n * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it\n */\nfunction sortModifiers(modifiers) {\n if (modifiers.length <= 1) {\n return modifiers;\n }\n var sortedModifiers = [];\n var unsortedModifiers = [];\n modifiers.forEach(function (modifier) {\n var isArbitraryVariant = modifier[0] === '[';\n if (isArbitraryVariant) {\n sortedModifiers.push.apply(sortedModifiers, unsortedModifiers.sort().concat([modifier]));\n unsortedModifiers = [];\n } else {\n unsortedModifiers.push(modifier);\n }\n });\n sortedModifiers.push.apply(sortedModifiers, unsortedModifiers.sort());\n return sortedModifiers;\n}\n\nexport { IMPORTANT_MODIFIER, createSplitModifiers, sortModifiers };\n//# sourceMappingURL=modifier-utils.mjs.map\n","import { createClassUtils } from './class-utils.mjs';\nimport { createLruCache } from './lru-cache.mjs';\nimport { createSplitModifiers } from './modifier-utils.mjs';\n\nfunction createConfigUtils(config) {\n return {\n cache: createLruCache(config.cacheSize),\n splitModifiers: createSplitModifiers(config),\n ...createClassUtils(config)\n };\n}\n\nexport { createConfigUtils };\n//# sourceMappingURL=config-utils.mjs.map\n","import { sortModifiers, IMPORTANT_MODIFIER } from './modifier-utils.mjs';\n\nvar SPLIT_CLASSES_REGEX = /\\s+/;\nfunction mergeClassList(classList, configUtils) {\n var splitModifiers = configUtils.splitModifiers,\n getClassGroupId = configUtils.getClassGroupId,\n getConflictingClassGroupIds = configUtils.getConflictingClassGroupIds;\n /**\n * Set of classGroupIds in following format:\n * `{importantModifier}{variantModifiers}{classGroupId}`\n * @example 'float'\n * @example 'hover:focus:bg-color'\n * @example 'md:!pr'\n */\n var classGroupsInConflict = new Set();\n return classList.trim().split(SPLIT_CLASSES_REGEX).map(function (originalClassName) {\n var _splitModifiers = splitModifiers(originalClassName),\n modifiers = _splitModifiers.modifiers,\n hasImportantModifier = _splitModifiers.hasImportantModifier,\n baseClassName = _splitModifiers.baseClassName,\n maybePostfixModifierPosition = _splitModifiers.maybePostfixModifierPosition;\n var classGroupId = getClassGroupId(maybePostfixModifierPosition ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);\n var hasPostfixModifier = Boolean(maybePostfixModifierPosition);\n if (!classGroupId) {\n if (!maybePostfixModifierPosition) {\n return {\n isTailwindClass: false,\n originalClassName: originalClassName\n };\n }\n classGroupId = getClassGroupId(baseClassName);\n if (!classGroupId) {\n return {\n isTailwindClass: false,\n originalClassName: originalClassName\n };\n }\n hasPostfixModifier = false;\n }\n var variantModifier = sortModifiers(modifiers).join(':');\n var modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;\n return {\n isTailwindClass: true,\n modifierId: modifierId,\n classGroupId: classGroupId,\n originalClassName: originalClassName,\n hasPostfixModifier: hasPostfixModifier\n };\n }).reverse()\n // Last class in conflict wins, so we need to filter conflicting classes in reverse order.\n .filter(function (parsed) {\n if (!parsed.isTailwindClass) {\n return true;\n }\n var modifierId = parsed.modifierId,\n classGroupId = parsed.classGroupId,\n hasPostfixModifier = parsed.hasPostfixModifier;\n var classId = modifierId + classGroupId;\n if (classGroupsInConflict.has(classId)) {\n return false;\n }\n classGroupsInConflict.add(classId);\n getConflictingClassGroupIds(classGroupId, hasPostfixModifier).forEach(function (group) {\n return classGroupsInConflict.add(modifierId + group);\n });\n return true;\n }).reverse().map(function (parsed) {\n return parsed.originalClassName;\n }).join(' ');\n}\n\nexport { mergeClassList };\n//# sourceMappingURL=merge-classlist.mjs.map\n","import { createConfigUtils } from './config-utils.mjs';\nimport { mergeClassList } from './merge-classlist.mjs';\nimport { twJoin } from './tw-join.mjs';\n\nfunction createTailwindMerge() {\n for (var _len = arguments.length, createConfig = new Array(_len), _key = 0; _key < _len; _key++) {\n createConfig[_key] = arguments[_key];\n }\n var configUtils;\n var cacheGet;\n var cacheSet;\n var functionToCall = initTailwindMerge;\n function initTailwindMerge(classList) {\n var firstCreateConfig = createConfig[0],\n restCreateConfig = createConfig.slice(1);\n var config = restCreateConfig.reduce(function (previousConfig, createConfigCurrent) {\n return createConfigCurrent(previousConfig);\n }, firstCreateConfig());\n configUtils = createConfigUtils(config);\n cacheGet = configUtils.cache.get;\n cacheSet = configUtils.cache.set;\n functionToCall = tailwindMerge;\n return tailwindMerge(classList);\n }\n function tailwindMerge(classList) {\n var cachedResult = cacheGet(classList);\n if (cachedResult) {\n return cachedResult;\n }\n var result = mergeClassList(classList, configUtils);\n cacheSet(classList, result);\n return result;\n }\n return function callTailwindMerge() {\n return functionToCall(twJoin.apply(null, arguments));\n };\n}\n\nexport { createTailwindMerge };\n//# sourceMappingURL=create-tailwind-merge.mjs.map\n","function fromTheme(key) {\n var themeGetter = function themeGetter(theme) {\n return theme[key] || [];\n };\n themeGetter.isThemeGetter = true;\n return themeGetter;\n}\n\nexport { fromTheme };\n//# sourceMappingURL=from-theme.mjs.map\n","var arbitraryValueRegex = /^\\[(?:([a-z-]+):)?(.+)\\]$/i;\nvar fractionRegex = /^\\d+\\/\\d+$/;\nvar stringLengths = /*#__PURE__*/new Set(['px', 'full', 'screen']);\nvar tshirtUnitRegex = /^(\\d+(\\.\\d+)?)?(xs|sm|md|lg|xl)$/;\nvar lengthUnitRegex = /\\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|^0$/;\n// Shadow always begins with x and y offset separated by underscore\nvar shadowRegex = /^-?((\\d+)?\\.?(\\d+)[a-z]+|0)_-?((\\d+)?\\.?(\\d+)[a-z]+|0)/;\nfunction isLength(value) {\n return isNumber(value) || stringLengths.has(value) || fractionRegex.test(value) || isArbitraryLength(value);\n}\nfunction isArbitraryLength(value) {\n return getIsArbitraryValue(value, 'length', isLengthOnly);\n}\nfunction isArbitrarySize(value) {\n return getIsArbitraryValue(value, 'size', isNever);\n}\nfunction isArbitraryPosition(value) {\n return getIsArbitraryValue(value, 'position', isNever);\n}\nfunction isArbitraryUrl(value) {\n return getIsArbitraryValue(value, 'url', isUrl);\n}\nfunction isArbitraryNumber(value) {\n return getIsArbitraryValue(value, 'number', isNumber);\n}\n/**\n * @deprecated Will be removed in next major version. Use `isArbitraryNumber` instead.\n */\nvar isArbitraryWeight = isArbitraryNumber;\nfunction isNumber(value) {\n return !Number.isNaN(Number(value));\n}\nfunction isPercent(value) {\n return value.endsWith('%') && isNumber(value.slice(0, -1));\n}\nfunction isInteger(value) {\n return isIntegerOnly(value) || getIsArbitraryValue(value, 'number', isIntegerOnly);\n}\nfunction isArbitraryValue(value) {\n return arbitraryValueRegex.test(value);\n}\nfunction isAny() {\n return true;\n}\nfunction isTshirtSize(value) {\n return tshirtUnitRegex.test(value);\n}\nfunction isArbitraryShadow(value) {\n return getIsArbitraryValue(value, '', isShadow);\n}\nfunction getIsArbitraryValue(value, label, testValue) {\n var result = arbitraryValueRegex.exec(value);\n if (result) {\n if (result[1]) {\n return result[1] === label;\n }\n return testValue(result[2]);\n }\n return false;\n}\nfunction isLengthOnly(value) {\n return lengthUnitRegex.test(value);\n}\nfunction isNever() {\n return false;\n}\nfunction isUrl(value) {\n return value.startsWith('url(');\n}\nfunction isIntegerOnly(value) {\n return Number.isInteger(Number(value));\n}\nfunction isShadow(value) {\n return shadowRegex.test(value);\n}\n\nexport { isAny, isArbitraryLength, isArbitraryNumber, isArbitraryPosition, isArbitraryShadow, isArbitrarySize, isArbitraryUrl, isArbitraryValue, isArbitraryWeight, isInteger, isLength, isNumber, isPercent, isTshirtSize };\n//# sourceMappingURL=validators.mjs.map\n","import { fromTheme } from './from-theme.mjs';\nimport { isAny, isLength, isTshirtSize, isArbitraryLength, isPercent, isArbitraryValue, isInteger, isArbitraryNumber, isNumber, isArbitraryPosition, isArbitrarySize, isArbitraryUrl, isArbitraryShadow } from './validators.mjs';\n\nfunction getDefaultConfig() {\n var colors = fromTheme('colors');\n var spacing = fromTheme('spacing');\n var blur = fromTheme('blur');\n var brightness = fromTheme('brightness');\n var borderColor = fromTheme('borderColor');\n var borderRadius = fromTheme('borderRadius');\n var borderSpacing = fromTheme('borderSpacing');\n var borderWidth = fromTheme('borderWidth');\n var contrast = fromTheme('contrast');\n var grayscale = fromTheme('grayscale');\n var hueRotate = fromTheme('hueRotate');\n var invert = fromTheme('invert');\n var gap = fromTheme('gap');\n var gradientColorStops = fromTheme('gradientColorStops');\n var gradientColorStopPositions = fromTheme('gradientColorStopPositions');\n var inset = fromTheme('inset');\n var margin = fromTheme('margin');\n var opacity = fromTheme('opacity');\n var padding = fromTheme('padding');\n var saturate = fromTheme('saturate');\n var scale = fromTheme('scale');\n var sepia = fromTheme('sepia');\n var skew = fromTheme('skew');\n var space = fromTheme('space');\n var translate = fromTheme('translate');\n var getOverscroll = function getOverscroll() {\n return ['auto', 'contain', 'none'];\n };\n var getOverflow = function getOverflow() {\n return ['auto', 'hidden', 'clip', 'visible', 'scroll'];\n };\n var getSpacingWithAuto = function getSpacingWithAuto() {\n return ['auto', spacing];\n };\n var getLengthWithEmpty = function getLengthWithEmpty() {\n return ['', isLength];\n };\n var getNumberWithAutoAndArbitrary = function getNumberWithAutoAndArbitrary() {\n return ['auto', isNumber, isArbitraryValue];\n };\n var getPositions = function getPositions() {\n return ['bottom', 'center', 'left', 'left-bottom', 'left-top', 'right', 'right-bottom', 'right-top', 'top'];\n };\n var getLineStyles = function getLineStyles() {\n return ['solid', 'dashed', 'dotted', 'double', 'none'];\n };\n var getBlendModes = function getBlendModes() {\n return ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity', 'plus-lighter'];\n };\n var getAlign = function getAlign() {\n return ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch'];\n };\n var getZeroAndEmpty = function getZeroAndEmpty() {\n return ['', '0', isArbitraryValue];\n };\n var getBreaks = function getBreaks() {\n return ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];\n };\n var getNumber = function getNumber() {\n return [isNumber, isArbitraryNumber];\n };\n var getNumberAndArbitrary = function getNumberAndArbitrary() {\n return [isNumber, isArbitraryValue];\n };\n return {\n cacheSize: 500,\n theme: {\n colors: [isAny],\n spacing: [isLength],\n blur: ['none', '', isTshirtSize, isArbitraryLength],\n brightness: getNumber(),\n borderColor: [colors],\n borderRadius: ['none', '', 'full', isTshirtSize, isArbitraryLength],\n borderSpacing: [spacing],\n borderWidth: getLengthWithEmpty(),\n contrast: getNumber(),\n grayscale: getZeroAndEmpty(),\n hueRotate: getNumberAndArbitrary(),\n invert: getZeroAndEmpty(),\n gap: [spacing],\n gradientColorStops: [colors],\n gradientColorStopPositions: [isPercent, isArbitraryLength],\n inset: getSpacingWithAuto(),\n margin: getSpacingWithAuto(),\n opacity: getNumber(),\n padding: [spacing],\n saturate: getNumber(),\n scale: getNumber(),\n sepia: getZeroAndEmpty(),\n skew: getNumberAndArbitrary(),\n space: [spacing],\n translate: [spacing]\n },\n classGroups: {\n // Layout\n /**\n * Aspect Ratio\n * @see https://tailwindcss.com/docs/aspect-ratio\n */\n aspect: [{\n aspect: ['auto', 'square', 'video', isArbitraryValue]\n }],\n /**\n * Container\n * @see https://tailwindcss.com/docs/container\n */\n container: ['container'],\n /**\n * Columns\n * @see https://tailwindcss.com/docs/columns\n */\n columns: [{\n columns: [isTshirtSize]\n }],\n /**\n * Break After\n * @see https://tailwindcss.com/docs/break-after\n */\n 'break-after': [{\n 'break-after': getBreaks()\n }],\n /**\n * Break Before\n * @see https://tailwindcss.com/docs/break-before\n */\n 'break-before': [{\n 'break-before': getBreaks()\n }],\n /**\n * Break Inside\n * @see https://tailwindcss.com/docs/break-inside\n */\n 'break-inside': [{\n 'break-inside': ['auto', 'avoid', 'avoid-page', 'avoid-column']\n }],\n /**\n * Box Decoration Break\n * @see https://tailwindcss.com/docs/box-decoration-break\n */\n 'box-decoration': [{\n 'box-decoration': ['slice', 'clone']\n }],\n /**\n * Box Sizing\n * @see https://tailwindcss.com/docs/box-sizing\n */\n box: [{\n box: ['border', 'content']\n }],\n /**\n * Display\n * @see https://tailwindcss.com/docs/display\n */\n display: ['block', 'inline-block', 'inline', 'flex', 'inline-flex', 'table', 'inline-table', 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row-group', 'table-row', 'flow-root', 'grid', 'inline-grid', 'contents', 'list-item', 'hidden'],\n /**\n * Floats\n * @see https://tailwindcss.com/docs/float\n */\n \"float\": [{\n \"float\": ['right', 'left', 'none']\n }],\n /**\n * Clear\n * @see https://tailwindcss.com/docs/clear\n */\n clear: [{\n clear: ['left', 'right', 'both', 'none']\n }],\n /**\n * Isolation\n * @see https://tailwindcss.com/docs/isolation\n */\n isolation: ['isolate', 'isolation-auto'],\n /**\n * Object Fit\n * @see https://tailwindcss.com/docs/object-fit\n */\n 'object-fit': [{\n object: ['contain', 'cover', 'fill', 'none', 'scale-down']\n }],\n /**\n * Object Position\n * @see https://tailwindcss.com/docs/object-position\n */\n 'object-position': [{\n object: [].concat(getPositions(), [isArbitraryValue])\n }],\n /**\n * Overflow\n * @see https://tailwindcss.com/docs/overflow\n */\n overflow: [{\n overflow: getOverflow()\n }],\n /**\n * Overflow X\n * @see https://tailwindcss.com/docs/overflow\n */\n 'overflow-x': [{\n 'overflow-x': getOverflow()\n }],\n /**\n * Overflow Y\n * @see https://tailwindcss.com/docs/overflow\n */\n 'overflow-y': [{\n 'overflow-y': getOverflow()\n }],\n /**\n * Overscroll Behavior\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n overscroll: [{\n overscroll: getOverscroll()\n }],\n /**\n * Overscroll Behavior X\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n 'overscroll-x': [{\n 'overscroll-x': getOverscroll()\n }],\n /**\n * Overscroll Behavior Y\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n 'overscroll-y': [{\n 'overscroll-y': getOverscroll()\n }],\n /**\n * Position\n * @see https://tailwindcss.com/docs/position\n */\n position: ['static', 'fixed', 'absolute', 'relative', 'sticky'],\n /**\n * Top / Right / Bottom / Left\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n inset: [{\n inset: [inset]\n }],\n /**\n * Right / Left\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-x': [{\n 'inset-x': [inset]\n }],\n /**\n * Top / Bottom\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-y': [{\n 'inset-y': [inset]\n }],\n /**\n * Start\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n start: [{\n start: [inset]\n }],\n /**\n * End\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n end: [{\n end: [inset]\n }],\n /**\n * Top\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n top: [{\n top: [inset]\n }],\n /**\n * Right\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n right: [{\n right: [inset]\n }],\n /**\n * Bottom\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n bottom: [{\n bottom: [inset]\n }],\n /**\n * Left\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n left: [{\n left: [inset]\n }],\n /**\n * Visibility\n * @see https://tailwindcss.com/docs/visibility\n */\n visibility: ['visible', 'invisible', 'collapse'],\n /**\n * Z-Index\n * @see https://tailwindcss.com/docs/z-index\n */\n z: [{\n z: ['auto', isInteger]\n }],\n // Flexbox and Grid\n /**\n * Flex Basis\n * @see https://tailwindcss.com/docs/flex-basis\n */\n basis: [{\n basis: getSpacingWithAuto()\n }],\n /**\n * Flex Direction\n * @see https://tailwindcss.com/docs/flex-direction\n */\n 'flex-direction': [{\n flex: ['row', 'row-reverse', 'col', 'col-reverse']\n }],\n /**\n * Flex Wrap\n * @see https://tailwindcss.com/docs/flex-wrap\n */\n 'flex-wrap': [{\n flex: ['wrap', 'wrap-reverse', 'nowrap']\n }],\n /**\n * Flex\n * @see https://tailwindcss.com/docs/flex\n */\n flex: [{\n flex: ['1', 'auto', 'initial', 'none', isArbitraryValue]\n }],\n /**\n * Flex Grow\n * @see https://tailwindcss.com/docs/flex-grow\n */\n grow: [{\n grow: getZeroAndEmpty()\n }],\n /**\n * Flex Shrink\n * @see https://tailwindcss.com/docs/flex-shrink\n */\n shrink: [{\n shrink: getZeroAndEmpty()\n }],\n /**\n * Order\n * @see https://tailwindcss.com/docs/order\n */\n order: [{\n order: ['first', 'last', 'none', isInteger]\n }],\n /**\n * Grid Template Columns\n * @see https://tailwindcss.com/docs/grid-template-columns\n */\n 'grid-cols': [{\n 'grid-cols': [isAny]\n }],\n /**\n * Grid Column Start / End\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-start-end': [{\n col: ['auto', {\n span: [isInteger]\n }, isArbitraryValue]\n }],\n /**\n * Grid Column Start\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-start': [{\n 'col-start': getNumberWithAutoAndArbitrary()\n }],\n /**\n * Grid Column End\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-end': [{\n 'col-end': getNumberWithAutoAndArbitrary()\n }],\n /**\n * Grid Template Rows\n * @see https://tailwindcss.com/docs/grid-template-rows\n */\n 'grid-rows': [{\n 'grid-rows': [isAny]\n }],\n /**\n * Grid Row Start / End\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-start-end': [{\n row: ['auto', {\n span: [isInteger]\n }, isArbitraryValue]\n }],\n /**\n * Grid Row Start\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-start': [{\n 'row-start': getNumberWithAutoAndArbitrary()\n }],\n /**\n * Grid Row End\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-end': [{\n 'row-end': getNumberWithAutoAndArbitrary()\n }],\n /**\n * Grid Auto Flow\n * @see https://tailwindcss.com/docs/grid-auto-flow\n */\n 'grid-flow': [{\n 'grid-flow': ['row', 'col', 'dense', 'row-dense', 'col-dense']\n }],\n /**\n * Grid Auto Columns\n * @see https://tailwindcss.com/docs/grid-auto-columns\n */\n 'auto-cols': [{\n 'auto-cols': ['auto', 'min', 'max', 'fr', isArbitraryValue]\n }],\n /**\n * Grid Auto Rows\n * @see https://tailwindcss.com/docs/grid-auto-rows\n */\n 'auto-rows': [{\n 'auto-rows': ['auto', 'min', 'max', 'fr', isArbitraryValue]\n }],\n /**\n * Gap\n * @see https://tailwindcss.com/docs/gap\n */\n gap: [{\n gap: [gap]\n }],\n /**\n * Gap X\n * @see https://tailwindcss.com/docs/gap\n */\n 'gap-x': [{\n 'gap-x': [gap]\n }],\n /**\n * Gap Y\n * @see https://tailwindcss.com/docs/gap\n */\n 'gap-y': [{\n 'gap-y': [gap]\n }],\n /**\n * Justify Content\n * @see https://tailwindcss.com/docs/justify-content\n */\n 'justify-content': [{\n justify: ['normal'].concat(getAlign())\n }],\n /**\n * Justify Items\n * @see https://tailwindcss.com/docs/justify-items\n */\n 'justify-items': [{\n 'justify-items': ['start', 'end', 'center', 'stretch']\n }],\n /**\n * Justify Self\n * @see https://tailwindcss.com/docs/justify-self\n */\n 'justify-self': [{\n 'justify-self': ['auto', 'start', 'end', 'center', 'stretch']\n }],\n /**\n * Align Content\n * @see https://tailwindcss.com/docs/align-content\n */\n 'align-content': [{\n content: ['normal'].concat(getAlign(), ['baseline'])\n }],\n /**\n * Align Items\n * @see https://tailwindcss.com/docs/align-items\n */\n 'align-items': [{\n items: ['start', 'end', 'center', 'baseline', 'stretch']\n }],\n /**\n * Align Self\n * @see https://tailwindcss.com/docs/align-self\n */\n 'align-self': [{\n self: ['auto', 'start', 'end', 'center', 'stretch', 'baseline']\n }],\n /**\n * Place Content\n * @see https://tailwindcss.com/docs/place-content\n */\n 'place-content': [{\n 'place-content': [].concat(getAlign(), ['baseline'])\n }],\n /**\n * Place Items\n * @see https://tailwindcss.com/docs/place-items\n */\n 'place-items': [{\n 'place-items': ['start', 'end', 'center', 'baseline', 'stretch']\n }],\n /**\n * Place Self\n * @see https://tailwindcss.com/docs/place-self\n */\n 'place-self': [{\n 'place-self': ['auto', 'start', 'end', 'center', 'stretch']\n }],\n // Spacing\n /**\n * Padding\n * @see https://tailwindcss.com/docs/padding\n */\n p: [{\n p: [padding]\n }],\n /**\n * Padding X\n * @see https://tailwindcss.com/docs/padding\n */\n px: [{\n px: [padding]\n }],\n /**\n * Padding Y\n * @see https://tailwindcss.com/docs/padding\n */\n py: [{\n py: [padding]\n }],\n /**\n * Padding Start\n * @see https://tailwindcss.com/docs/padding\n */\n ps: [{\n ps: [padding]\n }],\n /**\n * Padding End\n * @see https://tailwindcss.com/docs/padding\n */\n pe: [{\n pe: [padding]\n }],\n /**\n * Padding Top\n * @see https://tailwindcss.com/docs/padding\n */\n pt: [{\n pt: [padding]\n }],\n /**\n * Padding Right\n * @see https://tailwindcss.com/docs/padding\n */\n pr: [{\n pr: [padding]\n }],\n /**\n * Padding Bottom\n * @see https://tailwindcss.com/docs/padding\n */\n pb: [{\n pb: [padding]\n }],\n /**\n * Padding Left\n * @see https://tailwindcss.com/docs/padding\n */\n pl: [{\n pl: [padding]\n }],\n /**\n * Margin\n * @see https://tailwindcss.com/docs/margin\n */\n m: [{\n m: [margin]\n }],\n /**\n * Margin X\n * @see https://tailwindcss.com/docs/margin\n */\n mx: [{\n mx: [margin]\n }],\n /**\n * Margin Y\n * @see https://tailwindcss.com/docs/margin\n */\n my: [{\n my: [margin]\n }],\n /**\n * Margin Start\n * @see https://tailwindcss.com/docs/margin\n */\n ms: [{\n ms: [margin]\n }],\n /**\n * Margin End\n * @see https://tailwindcss.com/docs/margin\n */\n me: [{\n me: [margin]\n }],\n /**\n * Margin Top\n * @see https://tailwindcss.com/docs/margin\n */\n mt: [{\n mt: [margin]\n }],\n /**\n * Margin Right\n * @see https://tailwindcss.com/docs/margin\n */\n mr: [{\n mr: [margin]\n }],\n /**\n * Margin Bottom\n * @see https://tailwindcss.com/docs/margin\n */\n mb: [{\n mb: [margin]\n }],\n /**\n * Margin Left\n * @see https://tailwindcss.com/docs/margin\n */\n ml: [{\n ml: [margin]\n }],\n /**\n * Space Between X\n * @see https://tailwindcss.com/docs/space\n */\n 'space-x': [{\n 'space-x': [space]\n }],\n /**\n * Space Between X Reverse\n * @see https://tailwindcss.com/docs/space\n */\n 'space-x-reverse': ['space-x-reverse'],\n /**\n * Space Between Y\n * @see https://tailwindcss.com/docs/space\n */\n 'space-y': [{\n 'space-y': [space]\n }],\n /**\n * Space Between Y Reverse\n * @see https://tailwindcss.com/docs/space\n */\n 'space-y-reverse': ['space-y-reverse'],\n // Sizing\n /**\n * Width\n * @see https://tailwindcss.com/docs/width\n */\n w: [{\n w: ['auto', 'min', 'max', 'fit', spacing]\n }],\n /**\n * Min-Width\n * @see https://tailwindcss.com/docs/min-width\n */\n 'min-w': [{\n 'min-w': ['min', 'max', 'fit', isLength]\n }],\n /**\n * Max-Width\n * @see https://tailwindcss.com/docs/max-width\n */\n 'max-w': [{\n 'max-w': ['0', 'none', 'full', 'min', 'max', 'fit', 'prose', {\n screen: [isTshirtSize]\n }, isTshirtSize, isArbitraryLength]\n }],\n /**\n * Height\n * @see https://tailwindcss.com/docs/height\n */\n h: [{\n h: [spacing, 'auto', 'min', 'max', 'fit']\n }],\n /**\n * Min-Height\n * @see https://tailwindcss.com/docs/min-height\n */\n 'min-h': [{\n 'min-h': ['min', 'max', 'fit', isLength]\n }],\n /**\n * Max-Height\n * @see https://tailwindcss.com/docs/max-height\n */\n 'max-h': [{\n 'max-h': [spacing, 'min', 'max', 'fit']\n }],\n // Typography\n /**\n * Font Size\n * @see https://tailwindcss.com/docs/font-size\n */\n 'font-size': [{\n text: ['base', isTshirtSize, isArbitraryLength]\n }],\n /**\n * Font Smoothing\n * @see https://tailwindcss.com/docs/font-smoothing\n */\n 'font-smoothing': ['antialiased', 'subpixel-antialiased'],\n /**\n * Font Style\n * @see https://tailwindcss.com/docs/font-style\n */\n 'font-style': ['italic', 'not-italic'],\n /**\n * Font Weight\n * @see https://tailwindcss.com/docs/font-weight\n */\n 'font-weight': [{\n font: ['thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black', isArbitraryNumber]\n }],\n /**\n * Font Family\n * @see https://tailwindcss.com/docs/font-family\n */\n 'font-family': [{\n font: [isAny]\n }],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-normal': ['normal-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-ordinal': ['ordinal'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-slashed-zero': ['slashed-zero'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-figure': ['lining-nums', 'oldstyle-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-spacing': ['proportional-nums', 'tabular-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-fraction': ['diagonal-fractions', 'stacked-fractons'],\n /**\n * Letter Spacing\n * @see https://tailwindcss.com/docs/letter-spacing\n */\n tracking: [{\n tracking: ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest', isArbitraryLength]\n }],\n /**\n * Line Clamp\n * @see https://tailwindcss.com/docs/line-clamp\n */\n 'line-clamp': [{\n 'line-clamp': ['none', isNumber, isArbitraryNumber]\n }],\n /**\n * Line Height\n * @see https://tailwindcss.com/docs/line-height\n */\n leading: [{\n leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose', isLength]\n }],\n /**\n * List Style Image\n * @see https://tailwindcss.com/docs/list-style-image\n */\n 'list-image': [{\n 'list-image': ['none', isArbitraryValue]\n }],\n /**\n * List Style Type\n * @see https://tailwindcss.com/docs/list-style-type\n */\n 'list-style-type': [{\n list: ['none', 'disc', 'decimal', isArbitraryValue]\n }],\n /**\n * List Style Position\n * @see https://tailwindcss.com/docs/list-style-position\n */\n 'list-style-position': [{\n list: ['inside', 'outside']\n }],\n /**\n * Placeholder Color\n * @deprecated since Tailwind CSS v3.0.0\n * @see https://tailwindcss.com/docs/placeholder-color\n */\n 'placeholder-color': [{\n placeholder: [colors]\n }],\n /**\n * Placeholder Opacity\n * @see https://tailwindcss.com/docs/placeholder-opacity\n */\n 'placeholder-opacity': [{\n 'placeholder-opacity': [opacity]\n }],\n /**\n * Text Alignment\n * @see https://tailwindcss.com/docs/text-align\n */\n 'text-alignment': [{\n text: ['left', 'center', 'right', 'justify', 'start', 'end']\n }],\n /**\n * Text Color\n * @see https://tailwindcss.com/docs/text-color\n */\n 'text-color': [{\n text: [colors]\n }],\n /**\n * Text Opacity\n * @see https://tailwindcss.com/docs/text-opacity\n */\n 'text-opacity': [{\n 'text-opacity': [opacity]\n }],\n /**\n * Text Decoration\n * @see https://tailwindcss.com/docs/text-decoration\n */\n 'text-decoration': ['underline', 'overline', 'line-through', 'no-underline'],\n /**\n * Text Decoration Style\n * @see https://tailwindcss.com/docs/text-decoration-style\n */\n 'text-decoration-style': [{\n decoration: [].concat(getLineStyles(), ['wavy'])\n }],\n /**\n * Text Decoration Thickness\n * @see https://tailwindcss.com/docs/text-decoration-thickness\n */\n 'text-decoration-thickness': [{\n decoration: ['auto', 'from-font', isLength]\n }],\n /**\n * Text Underline Offset\n * @see https://tailwindcss.com/docs/text-underline-offset\n */\n 'underline-offset': [{\n 'underline-offset': ['auto', isLength]\n }],\n /**\n * Text Decoration Color\n * @see https://tailwindcss.com/docs/text-decoration-color\n */\n 'text-decoration-color': [{\n decoration: [colors]\n }],\n /**\n * Text Transform\n * @see https://tailwindcss.com/docs/text-transform\n */\n 'text-transform': ['uppercase', 'lowercase', 'capitalize', 'normal-case'],\n /**\n * Text Overflow\n * @see https://tailwindcss.com/docs/text-overflow\n */\n 'text-overflow': ['truncate', 'text-ellipsis', 'text-clip'],\n /**\n * Text Indent\n * @see https://tailwindcss.com/docs/text-indent\n */\n indent: [{\n indent: [spacing]\n }],\n /**\n * Vertical Alignment\n * @see https://tailwindcss.com/docs/vertical-align\n */\n 'vertical-align': [{\n align: ['baseline', 'top', 'middle', 'bottom', 'text-top', 'text-bottom', 'sub', 'super', isArbitraryLength]\n }],\n /**\n * Whitespace\n * @see https://tailwindcss.com/docs/whitespace\n */\n whitespace: [{\n whitespace: ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces']\n }],\n /**\n * Word Break\n * @see https://tailwindcss.com/docs/word-break\n */\n \"break\": [{\n \"break\": ['normal', 'words', 'all', 'keep']\n }],\n /**\n * Hyphens\n * @see https://tailwindcss.com/docs/hyphens\n */\n hyphens: [{\n hyphens: ['none', 'manual', 'auto']\n }],\n /**\n * Content\n * @see https://tailwindcss.com/docs/content\n */\n content: [{\n content: ['none', isArbitraryValue]\n }],\n // Backgrounds\n /**\n * Background Attachment\n * @see https://tailwindcss.com/docs/background-attachment\n */\n 'bg-attachment': [{\n bg: ['fixed', 'local', 'scroll']\n }],\n /**\n * Background Clip\n * @see https://tailwindcss.com/docs/background-clip\n */\n 'bg-clip': [{\n 'bg-clip': ['border', 'padding', 'content', 'text']\n }],\n /**\n * Background Opacity\n * @deprecated since Tailwind CSS v3.0.0\n * @see https://tailwindcss.com/docs/background-opacity\n */\n 'bg-opacity': [{\n 'bg-opacity': [opacity]\n }],\n /**\n * Background Origin\n * @see https://tailwindcss.com/docs/background-origin\n */\n 'bg-origin': [{\n 'bg-origin': ['border', 'padding', 'content']\n }],\n /**\n * Background Position\n * @see https://tailwindcss.com/docs/background-position\n */\n 'bg-position': [{\n bg: [].concat(getPositions(), [isArbitraryPosition])\n }],\n /**\n * Background Repeat\n * @see https://tailwindcss.com/docs/background-repeat\n */\n 'bg-repeat': [{\n bg: ['no-repeat', {\n repeat: ['', 'x', 'y', 'round', 'space']\n }]\n }],\n /**\n * Background Size\n * @see https://tailwindcss.com/docs/background-size\n */\n 'bg-size': [{\n bg: ['auto', 'cover', 'contain', isArbitrarySize]\n }],\n /**\n * Background Image\n * @see https://tailwindcss.com/docs/background-image\n */\n 'bg-image': [{\n bg: ['none', {\n 'gradient-to': ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl']\n }, isArbitraryUrl]\n }],\n /**\n * Background Color\n * @see https://tailwindcss.com/docs/background-color\n */\n 'bg-color': [{\n bg: [colors]\n }],\n /**\n * Gradient Color Stops From Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-from-pos': [{\n from: [gradientColorStopPositions]\n }],\n /**\n * Gradient Color Stops Via Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-via-pos': [{\n via: [gradientColorStopPositions]\n }],\n /**\n * Gradient Color Stops To Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-to-pos': [{\n to: [gradientColorStopPositions]\n }],\n /**\n * Gradient Color Stops From\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-from': [{\n from: [gradientColorStops]\n }],\n /**\n * Gradient Color Stops Via\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-via': [{\n via: [gradientColorStops]\n }],\n /**\n * Gradient Color Stops To\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-to': [{\n to: [gradientColorStops]\n }],\n // Borders\n /**\n * Border Radius\n * @see https://tailwindcss.com/docs/border-radius\n */\n rounded: [{\n rounded: [borderRadius]\n }],\n /**\n * Border Radius Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-s': [{\n 'rounded-s': [borderRadius]\n }],\n /**\n * Border Radius End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-e': [{\n 'rounded-e': [borderRadius]\n }],\n /**\n * Border Radius Top\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-t': [{\n 'rounded-t': [borderRadius]\n }],\n /**\n * Border Radius Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-r': [{\n 'rounded-r': [borderRadius]\n }],\n /**\n * Border Radius Bottom\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-b': [{\n 'rounded-b': [borderRadius]\n }],\n /**\n * Border Radius Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-l': [{\n 'rounded-l': [borderRadius]\n }],\n /**\n * Border Radius Start Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-ss': [{\n 'rounded-ss': [borderRadius]\n }],\n /**\n * Border Radius Start End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-se': [{\n 'rounded-se': [borderRadius]\n }],\n /**\n * Border Radius End End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-ee': [{\n 'rounded-ee': [borderRadius]\n }],\n /**\n * Border Radius End Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-es': [{\n 'rounded-es': [borderRadius]\n }],\n /**\n * Border Radius Top Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-tl': [{\n 'rounded-tl': [borderRadius]\n }],\n /**\n * Border Radius Top Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-tr': [{\n 'rounded-tr': [borderRadius]\n }],\n /**\n * Border Radius Bottom Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-br': [{\n 'rounded-br': [borderRadius]\n }],\n /**\n * Border Radius Bottom Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-bl': [{\n 'rounded-bl': [borderRadius]\n }],\n /**\n * Border Width\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w': [{\n border: [borderWidth]\n }],\n /**\n * Border Width X\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-x': [{\n 'border-x': [borderWidth]\n }],\n /**\n * Border Width Y\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-y': [{\n 'border-y': [borderWidth]\n }],\n /**\n * Border Width Start\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-s': [{\n 'border-s': [borderWidth]\n }],\n /**\n * Border Width End\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-e': [{\n 'border-e': [borderWidth]\n }],\n /**\n * Border Width Top\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-t': [{\n 'border-t': [borderWidth]\n }],\n /**\n * Border Width Right\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-r': [{\n 'border-r': [borderWidth]\n }],\n /**\n * Border Width Bottom\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-b': [{\n 'border-b': [borderWidth]\n }],\n /**\n * Border Width Left\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-l': [{\n 'border-l': [borderWidth]\n }],\n /**\n * Border Opacity\n * @see https://tailwindcss.com/docs/border-opacity\n */\n 'border-opacity': [{\n 'border-opacity': [opacity]\n }],\n /**\n * Border Style\n * @see https://tailwindcss.com/docs/border-style\n */\n 'border-style': [{\n border: [].concat(getLineStyles(), ['hidden'])\n }],\n /**\n * Divide Width X\n * @see https://tailwindcss.com/docs/divide-width\n */\n 'divide-x': [{\n 'divide-x': [borderWidth]\n }],\n /**\n * Divide Width X Reverse\n * @see https://tailwindcss.com/docs/divide-width\n */\n 'divide-x-reverse': ['divide-x-reverse'],\n /**\n * Divide Width Y\n * @see https://tailwindcss.com/docs/divide-width\n */\n 'divide-y': [{\n 'divide-y': [borderWidth]\n }],\n /**\n * Divide Width Y Reverse\n * @see https://tailwindcss.com/docs/divide-width\n */\n 'divide-y-reverse': ['divide-y-reverse'],\n /**\n * Divide Opacity\n * @see https://tailwindcss.com/docs/divide-opacity\n */\n 'divide-opacity': [{\n 'divide-opacity': [opacity]\n }],\n /**\n * Divide Style\n * @see https://tailwindcss.com/docs/divide-style\n */\n 'divide-style': [{\n divide: getLineStyles()\n }],\n /**\n * Border Color\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color': [{\n border: [borderColor]\n }],\n /**\n * Border Color X\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-x': [{\n 'border-x': [borderColor]\n }],\n /**\n * Border Color Y\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-y': [{\n 'border-y': [borderColor]\n }],\n /**\n * Border Color Top\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-t': [{\n 'border-t': [borderColor]\n }],\n /**\n * Border Color Right\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-r': [{\n 'border-r': [borderColor]\n }],\n /**\n * Border Color Bottom\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-b': [{\n 'border-b': [borderColor]\n }],\n /**\n * Border Color Left\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-l': [{\n 'border-l': [borderColor]\n }],\n /**\n * Divide Color\n * @see https://tailwindcss.com/docs/divide-color\n */\n 'divide-color': [{\n divide: [borderColor]\n }],\n /**\n * Outline Style\n * @see https://tailwindcss.com/docs/outline-style\n */\n 'outline-style': [{\n outline: [''].concat(getLineStyles())\n }],\n /**\n * Outline Offset\n * @see https://tailwindcss.com/docs/outline-offset\n */\n 'outline-offset': [{\n 'outline-offset': [isLength]\n }],\n /**\n * Outline Width\n * @see https://tailwindcss.com/docs/outline-width\n */\n 'outline-w': [{\n outline: [isLength]\n }],\n /**\n * Outline Color\n * @see https://tailwindcss.com/docs/outline-color\n */\n 'outline-color': [{\n outline: [colors]\n }],\n /**\n * Ring Width\n * @see https://tailwindcss.com/docs/ring-width\n */\n 'ring-w': [{\n ring: getLengthWithEmpty()\n }],\n /**\n * Ring Width Inset\n * @see https://tailwindcss.com/docs/ring-width\n */\n 'ring-w-inset': ['ring-inset'],\n /**\n * Ring Color\n * @see https://tailwindcss.com/docs/ring-color\n */\n 'ring-color': [{\n ring: [colors]\n }],\n /**\n * Ring Opacity\n * @see https://tailwindcss.com/docs/ring-opacity\n */\n 'ring-opacity': [{\n 'ring-opacity': [opacity]\n }],\n /**\n * Ring Offset Width\n * @see https://tailwindcss.com/docs/ring-offset-width\n */\n 'ring-offset-w': [{\n 'ring-offset': [isLength]\n }],\n /**\n * Ring Offset Color\n * @see https://tailwindcss.com/docs/ring-offset-color\n */\n 'ring-offset-color': [{\n 'ring-offset': [colors]\n }],\n // Effects\n /**\n * Box Shadow\n * @see https://tailwindcss.com/docs/box-shadow\n */\n shadow: [{\n shadow: ['', 'inner', 'none', isTshirtSize, isArbitraryShadow]\n }],\n /**\n * Box Shadow Color\n * @see https://tailwindcss.com/docs/box-shadow-color\n */\n 'shadow-color': [{\n shadow: [isAny]\n }],\n /**\n * Opacity\n * @see https://tailwindcss.com/docs/opacity\n */\n opacity: [{\n opacity: [opacity]\n }],\n /**\n * Mix Blend Mode\n * @see https://tailwindcss.com/docs/mix-blend-mode\n */\n 'mix-blend': [{\n 'mix-blend': getBlendModes()\n }],\n /**\n * Background Blend Mode\n * @see https://tailwindcss.com/docs/background-blend-mode\n */\n 'bg-blend': [{\n 'bg-blend': getBlendModes()\n }],\n // Filters\n /**\n * Filter\n * @deprecated since Tailwind CSS v3.0.0\n * @see https://tailwindcss.com/docs/filter\n */\n filter: [{\n filter: ['', 'none']\n }],\n /**\n * Blur\n * @see https://tailwindcss.com/docs/blur\n */\n blur: [{\n blur: [blur]\n }],\n /**\n * Brightness\n * @see https://tailwindcss.com/docs/brightness\n */\n brightness: [{\n brightness: [brightness]\n }],\n /**\n * Contrast\n * @see https://tailwindcss.com/docs/contrast\n */\n contrast: [{\n contrast: [contrast]\n }],\n /**\n * Drop Shadow\n * @see https://tailwindcss.com/docs/drop-shadow\n */\n 'drop-shadow': [{\n 'drop-shadow': ['', 'none', isTshirtSize, isArbitraryValue]\n }],\n /**\n * Grayscale\n * @see https://tailwindcss.com/docs/grayscale\n */\n grayscale: [{\n grayscale: [grayscale]\n }],\n /**\n * Hue Rotate\n * @see https://tailwindcss.com/docs/hue-rotate\n */\n 'hue-rotate': [{\n 'hue-rotate': [hueRotate]\n }],\n /**\n * Invert\n * @see https://tailwindcss.com/docs/invert\n */\n invert: [{\n invert: [invert]\n }],\n /**\n * Saturate\n * @see https://tailwindcss.com/docs/saturate\n */\n saturate: [{\n saturate: [saturate]\n }],\n /**\n * Sepia\n * @see https://tailwindcss.com/docs/sepia\n */\n sepia: [{\n sepia: [sepia]\n }],\n /**\n * Backdrop Filter\n * @deprecated since Tailwind CSS v3.0.0\n * @see https://tailwindcss.com/docs/backdrop-filter\n */\n 'backdrop-filter': [{\n 'backdrop-filter': ['', 'none']\n }],\n /**\n * Backdrop Blur\n * @see https://tailwindcss.com/docs/backdrop-blur\n */\n 'backdrop-blur': [{\n 'backdrop-blur': [blur]\n }],\n /**\n * Backdrop Brightness\n * @see https://tailwindcss.com/docs/backdrop-brightness\n */\n 'backdrop-brightness': [{\n 'backdrop-brightness': [brightness]\n }],\n /**\n * Backdrop Contrast\n * @see https://tailwindcss.com/docs/backdrop-contrast\n */\n 'backdrop-contrast': [{\n 'backdrop-contrast': [contrast]\n }],\n /**\n * Backdrop Grayscale\n * @see https://tailwindcss.com/docs/backdrop-grayscale\n */\n 'backdrop-grayscale': [{\n 'backdrop-grayscale': [grayscale]\n }],\n /**\n * Backdrop Hue Rotate\n * @see https://tailwindcss.com/docs/backdrop-hue-rotate\n */\n 'backdrop-hue-rotate': [{\n 'backdrop-hue-rotate': [hueRotate]\n }],\n /**\n * Backdrop Invert\n * @see https://tailwindcss.com/docs/backdrop-invert\n */\n 'backdrop-invert': [{\n 'backdrop-invert': [invert]\n }],\n /**\n * Backdrop Opacity\n * @see https://tailwindcss.com/docs/backdrop-opacity\n */\n 'backdrop-opacity': [{\n 'backdrop-opacity': [opacity]\n }],\n /**\n * Backdrop Saturate\n * @see https://tailwindcss.com/docs/backdrop-saturate\n */\n 'backdrop-saturate': [{\n 'backdrop-saturate': [saturate]\n }],\n /**\n * Backdrop Sepia\n * @see https://tailwindcss.com/docs/backdrop-sepia\n */\n 'backdrop-sepia': [{\n 'backdrop-sepia': [sepia]\n }],\n // Tables\n /**\n * Border Collapse\n * @see https://tailwindcss.com/docs/border-collapse\n */\n 'border-collapse': [{\n border: ['collapse', 'separate']\n }],\n /**\n * Border Spacing\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing': [{\n 'border-spacing': [borderSpacing]\n }],\n /**\n * Border Spacing X\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing-x': [{\n 'border-spacing-x': [borderSpacing]\n }],\n /**\n * Border Spacing Y\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing-y': [{\n 'border-spacing-y': [borderSpacing]\n }],\n /**\n * Table Layout\n * @see https://tailwindcss.com/docs/table-layout\n */\n 'table-layout': [{\n table: ['auto', 'fixed']\n }],\n /**\n * Caption Side\n * @see https://tailwindcss.com/docs/caption-side\n */\n caption: [{\n caption: ['top', 'bottom']\n }],\n // Transitions and Animation\n /**\n * Tranisition Property\n * @see https://tailwindcss.com/docs/transition-property\n */\n transition: [{\n transition: ['none', 'all', '', 'colors', 'opacity', 'shadow', 'transform', isArbitraryValue]\n }],\n /**\n * Transition Duration\n * @see https://tailwindcss.com/docs/transition-duration\n */\n duration: [{\n duration: getNumberAndArbitrary()\n }],\n /**\n * Transition Timing Function\n * @see https://tailwindcss.com/docs/transition-timing-function\n */\n ease: [{\n ease: ['linear', 'in', 'out', 'in-out', isArbitraryValue]\n }],\n /**\n * Transition Delay\n * @see https://tailwindcss.com/docs/transition-delay\n */\n delay: [{\n delay: getNumberAndArbitrary()\n }],\n /**\n * Animation\n * @see https://tailwindcss.com/docs/animation\n */\n animate: [{\n animate: ['none', 'spin', 'ping', 'pulse', 'bounce', isArbitraryValue]\n }],\n // Transforms\n /**\n * Transform\n * @see https://tailwindcss.com/docs/transform\n */\n transform: [{\n transform: ['', 'gpu', 'none']\n }],\n /**\n * Scale\n * @see https://tailwindcss.com/docs/scale\n */\n scale: [{\n scale: [scale]\n }],\n /**\n * Scale X\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-x': [{\n 'scale-x': [scale]\n }],\n /**\n * Scale Y\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-y': [{\n 'scale-y': [scale]\n }],\n /**\n * Rotate\n * @see https://tailwindcss.com/docs/rotate\n */\n rotate: [{\n rotate: [isInteger, isArbitraryValue]\n }],\n /**\n * Translate X\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-x': [{\n 'translate-x': [translate]\n }],\n /**\n * Translate Y\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-y': [{\n 'translate-y': [translate]\n }],\n /**\n * Skew X\n * @see https://tailwindcss.com/docs/skew\n */\n 'skew-x': [{\n 'skew-x': [skew]\n }],\n /**\n * Skew Y\n * @see https://tailwindcss.com/docs/skew\n */\n 'skew-y': [{\n 'skew-y': [skew]\n }],\n /**\n * Transform Origin\n * @see https://tailwindcss.com/docs/transform-origin\n */\n 'transform-origin': [{\n origin: ['center', 'top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left', 'top-left', isArbitraryValue]\n }],\n // Interactivity\n /**\n * Accent Color\n * @see https://tailwindcss.com/docs/accent-color\n */\n accent: [{\n accent: ['auto', colors]\n }],\n /**\n * Appearance\n * @see https://tailwindcss.com/docs/appearance\n */\n appearance: ['appearance-none'],\n /**\n * Cursor\n * @see https://tailwindcss.com/docs/cursor\n */\n cursor: [{\n cursor: ['auto', 'default', 'pointer', 'wait', 'text', 'move', 'help', 'not-allowed', 'none', 'context-menu', 'progress', 'cell', 'crosshair', 'vertical-text', 'alias', 'copy', 'no-drop', 'grab', 'grabbing', 'all-scroll', 'col-resize', 'row-resize', 'n-resize', 'e-resize', 's-resize', 'w-resize', 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'zoom-in', 'zoom-out', isArbitraryValue]\n }],\n /**\n * Caret Color\n * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities\n */\n 'caret-color': [{\n caret: [colors]\n }],\n /**\n * Pointer Events\n * @see https://tailwindcss.com/docs/pointer-events\n */\n 'pointer-events': [{\n 'pointer-events': ['none', 'auto']\n }],\n /**\n * Resize\n * @see https://tailwindcss.com/docs/resize\n */\n resize: [{\n resize: ['none', 'y', 'x', '']\n }],\n /**\n * Scroll Behavior\n * @see https://tailwindcss.com/docs/scroll-behavior\n */\n 'scroll-behavior': [{\n scroll: ['auto', 'smooth']\n }],\n /**\n * Scroll Margin\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-m': [{\n 'scroll-m': [spacing]\n }],\n /**\n * Scroll Margin X\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mx': [{\n 'scroll-mx': [spacing]\n }],\n /**\n * Scroll Margin Y\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-my': [{\n 'scroll-my': [spacing]\n }],\n /**\n * Scroll Margin Start\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-ms': [{\n 'scroll-ms': [spacing]\n }],\n /**\n * Scroll Margin End\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-me': [{\n 'scroll-me': [spacing]\n }],\n /**\n * Scroll Margin Top\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mt': [{\n 'scroll-mt': [spacing]\n }],\n /**\n * Scroll Margin Right\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mr': [{\n 'scroll-mr': [spacing]\n }],\n /**\n * Scroll Margin Bottom\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mb': [{\n 'scroll-mb': [spacing]\n }],\n /**\n * Scroll Margin Left\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-ml': [{\n 'scroll-ml': [spacing]\n }],\n /**\n * Scroll Padding\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-p': [{\n 'scroll-p': [spacing]\n }],\n /**\n * Scroll Padding X\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-px': [{\n 'scroll-px': [spacing]\n }],\n /**\n * Scroll Padding Y\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-py': [{\n 'scroll-py': [spacing]\n }],\n /**\n * Scroll Padding Start\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-ps': [{\n 'scroll-ps': [spacing]\n }],\n /**\n * Scroll Padding End\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pe': [{\n 'scroll-pe': [spacing]\n }],\n /**\n * Scroll Padding Top\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pt': [{\n 'scroll-pt': [spacing]\n }],\n /**\n * Scroll Padding Right\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pr': [{\n 'scroll-pr': [spacing]\n }],\n /**\n * Scroll Padding Bottom\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pb': [{\n 'scroll-pb': [spacing]\n }],\n /**\n * Scroll Padding Left\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pl': [{\n 'scroll-pl': [spacing]\n }],\n /**\n * Scroll Snap Align\n * @see https://tailwindcss.com/docs/scroll-snap-align\n */\n 'snap-align': [{\n snap: ['start', 'end', 'center', 'align-none']\n }],\n /**\n * Scroll Snap Stop\n * @see https://tailwindcss.com/docs/scroll-snap-stop\n */\n 'snap-stop': [{\n snap: ['normal', 'always']\n }],\n /**\n * Scroll Snap Type\n * @see https://tailwindcss.com/docs/scroll-snap-type\n */\n 'snap-type': [{\n snap: ['none', 'x', 'y', 'both']\n }],\n /**\n * Scroll Snap Type Strictness\n * @see https://tailwindcss.com/docs/scroll-snap-type\n */\n 'snap-strictness': [{\n snap: ['mandatory', 'proximity']\n }],\n /**\n * Touch Action\n * @see https://tailwindcss.com/docs/touch-action\n */\n touch: [{\n touch: ['auto', 'none', 'pinch-zoom', 'manipulation', {\n pan: ['x', 'left', 'right', 'y', 'up', 'down']\n }]\n }],\n /**\n * User Select\n * @see https://tailwindcss.com/docs/user-select\n */\n select: [{\n select: ['none', 'text', 'all', 'auto']\n }],\n /**\n * Will Change\n * @see https://tailwindcss.com/docs/will-change\n */\n 'will-change': [{\n 'will-change': ['auto', 'scroll', 'contents', 'transform', isArbitraryValue]\n }],\n // SVG\n /**\n * Fill\n * @see https://tailwindcss.com/docs/fill\n */\n fill: [{\n fill: [colors, 'none']\n }],\n /**\n * Stroke Width\n * @see https://tailwindcss.com/docs/stroke-width\n */\n 'stroke-w': [{\n stroke: [isLength, isArbitraryNumber]\n }],\n /**\n * Stroke\n * @see https://tailwindcss.com/docs/stroke\n */\n stroke: [{\n stroke: [colors, 'none']\n }],\n // Accessibility\n /**\n * Screen Readers\n * @see https://tailwindcss.com/docs/screen-readers\n */\n sr: ['sr-only', 'not-sr-only']\n },\n conflictingClassGroups: {\n overflow: ['overflow-x', 'overflow-y'],\n overscroll: ['overscroll-x', 'overscroll-y'],\n inset: ['inset-x', 'inset-y', 'start', 'end', 'top', 'right', 'bottom', 'left'],\n 'inset-x': ['right', 'left'],\n 'inset-y': ['top', 'bottom'],\n flex: ['basis', 'grow', 'shrink'],\n gap: ['gap-x', 'gap-y'],\n p: ['px', 'py', 'ps', 'pe', 'pt', 'pr', 'pb', 'pl'],\n px: ['pr', 'pl'],\n py: ['pt', 'pb'],\n m: ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'],\n mx: ['mr', 'ml'],\n my: ['mt', 'mb'],\n 'font-size': ['leading'],\n 'fvn-normal': ['fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction'],\n 'fvn-ordinal': ['fvn-normal'],\n 'fvn-slashed-zero': ['fvn-normal'],\n 'fvn-figure': ['fvn-normal'],\n 'fvn-spacing': ['fvn-normal'],\n 'fvn-fraction': ['fvn-normal'],\n rounded: ['rounded-s', 'rounded-e', 'rounded-t', 'rounded-r', 'rounded-b', 'rounded-l', 'rounded-ss', 'rounded-se', 'rounded-ee', 'rounded-es', 'rounded-tl', 'rounded-tr', 'rounded-br', 'rounded-bl'],\n 'rounded-s': ['rounded-ss', 'rounded-es'],\n 'rounded-e': ['rounded-se', 'rounded-ee'],\n 'rounded-t': ['rounded-tl', 'rounded-tr'],\n 'rounded-r': ['rounded-tr', 'rounded-br'],\n 'rounded-b': ['rounded-br', 'rounded-bl'],\n 'rounded-l': ['rounded-tl', 'rounded-bl'],\n 'border-spacing': ['border-spacing-x', 'border-spacing-y'],\n 'border-w': ['border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],\n 'border-w-x': ['border-w-r', 'border-w-l'],\n 'border-w-y': ['border-w-t', 'border-w-b'],\n 'border-color': ['border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],\n 'border-color-x': ['border-color-r', 'border-color-l'],\n 'border-color-y': ['border-color-t', 'border-color-b'],\n 'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],\n 'scroll-mx': ['scroll-mr', 'scroll-ml'],\n 'scroll-my': ['scroll-mt', 'scroll-mb'],\n 'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],\n 'scroll-px': ['scroll-pr', 'scroll-pl'],\n 'scroll-py': ['scroll-pt', 'scroll-pb']\n },\n conflictingClassGroupModifiers: {\n 'font-size': ['leading']\n }\n };\n}\n\nexport { getDefaultConfig };\n//# sourceMappingURL=default-config.mjs.map\n","import { createTailwindMerge } from './create-tailwind-merge.mjs';\nimport { getDefaultConfig } from './default-config.mjs';\n\nvar twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);\n\nexport { twMerge };\n//# sourceMappingURL=tw-merge.mjs.map\n","import { getAuth } from \"firebase/auth\";\nimport { queryClient } from \"index\";\n\nimport transform from \"lodash/transform\";\nimport isEqual from \"lodash/isEqual\";\nimport isArray from \"lodash/isArray\";\nimport isObject from \"lodash/isObject\";\nimport isEmpty from \"lodash/isEmpty\";\nimport axios from \"services/axios\";\n//@ts-ignore\nimport emptyProfilePlaceholder from \"assets/img/empty-profile-placeholder.svg?default\";\nimport { isImageFileType, isImageType } from \"types/guard\";\nimport { MixedSchema } from \"yup/lib/mixed\";\nimport * as yup from \"yup\";\nimport { ImageType, ProfileNotificationType } from \"types/utility\";\nimport { StylesConfig } from \"react-select\";\n\nimport { Options, serialize } from \"object-to-formdata\";\nimport type {\n JSONObject,\n Message,\n Paginator,\n Participant,\n} from \"@twilio/conversations\";\n\nimport {\n IAccount,\n IFullConversation,\n INotification,\n IReferralProgram,\n ISelectOption,\n ISocialNetwork,\n IUser,\n} from \"types/entities\";\nimport { InfiniteData } from \"@tanstack/react-query\";\nimport { IAxiosResponseWithPagination } from \"services/requests\";\nimport classNames from \"classnames\";\nimport { twMerge } from \"tailwind-merge\";\nimport type {\n CurrentChatType,\n ITwilioConversations,\n TwilioConversationsContextValueType,\n} from \"types/chats\";\n\nexport function findChatAndConversationByConversationId(\n id: string,\n prev: TwilioConversationsContextValueType\n) {\n const chat = Object.values(prev || {}).find((chat) => {\n return chat.conversations.find((i) => i.conversation.id === id);\n });\n const conversation = chat?.conversations.find(\n (i) => i.conversation.id === id\n );\n return { chat, conversation };\n}\n\nexport function toFormData(data: T, options: Options = {}) {\n return serialize(data, { indices: true, ...options });\n}\n\nasync function uploadImage(dataUrl: string) {\n const image = new Image();\n image.src = dataUrl;\n\n return image;\n}\n\nexport function filterEmptyObjectItems(values: { [key: string]: any }) {\n function internalClean(el: any) {\n return transform(\n el,\n function (result: { [key: string]: any }, value: any, key: string) {\n const isCollection = isObject(value);\n const cleaned = isCollection ? internalClean(value) : value;\n\n if (isCollection && isEmpty(cleaned)) {\n return;\n }\n\n isArray(result) ? result.push(cleaned) : (result[key] = cleaned);\n }\n );\n }\n\n return isObject(values) ? internalClean(values) : values;\n}\n\n//https://davidwells.io/snippets/get-difference-between-two-objects-javascript\n/**\n * Find difference between two objects\n * @param {object} origObj - Source object to compare newObj against\n * @param {object} newObj - New object with potential changes\n * @return {object} differences\n */\nexport function difference(\n origObj: { [key: string]: any },\n newObj: { [key: string]: any },\n selectorByKey?: (key: string | number | symbol) => boolean\n) {\n function changes(\n newObj: { [key: string]: any },\n origObj: { [key: string]: any }\n ) {\n let arrayIndexCounter = 0;\n return transform(\n newObj,\n function (result: { [key: string]: any }, value, key) {\n if (!isEqual(value, origObj[key])) {\n const resultKey = isArray(origObj) ? arrayIndexCounter++ : key;\n if (selectorByKey && selectorByKey(resultKey)) {\n result[resultKey] =\n isObject(value) && isObject(origObj[key])\n ? changes(value, origObj[key])\n : value;\n }\n if (!selectorByKey) {\n result[resultKey] =\n isObject(value) && isObject(origObj[key])\n ? changes(value, origObj[key])\n : value;\n }\n }\n }\n );\n }\n return changes(newObj, origObj);\n}\n\nexport function buildSortParams(param = \"\") {\n if (typeof param === \"string\") {\n const result = param?.match(/^-/);\n if (result) {\n const key = param.slice(1);\n return [key, \"DESC\"] as [keyof T, \"DESC\"];\n }\n }\n return [param, \"ASC\"] as [keyof T, \"ASC\"];\n}\n\nexport async function signOut(cb?: () => void) {\n await getAuth().signOut();\n queryClient.removeQueries();\n queryClient.clear();\n localStorage.clear();\n window.history.pushState({}, document.title, window.location.pathname); //remove search params on signOut\n cb ? cb() : window.location.reload();\n}\n\nexport function sortByTimeCallback(a: Date | string, b: Date | string) {\n if (typeof a === \"string\") {\n if (a && b) {\n if (new Date(a) < new Date(b)) {\n return -1;\n }\n if (new Date(a) > new Date(b)) {\n return 1;\n }\n return 0;\n } else {\n return 0;\n }\n }\n if (a && b) {\n if (a < b) {\n return -1;\n }\n if (a > b) {\n return 1;\n }\n return 0;\n } else {\n return 0;\n }\n}\n\nexport default function calculatePts(px: number) {\n return px * 0.43;\n}\n\n//https://isotropic.co/how-to-format-a-date-as-dd-mm-yyyy-in-javascript/\nexport function format(inputDate: Date) {\n let date, month;\n const year = inputDate.getFullYear();\n\n date = inputDate.getDate();\n month = inputDate.getMonth() + 1;\n\n date = date.toString().padStart(2, \"0\");\n\n month = month.toString().padStart(2, \"0\");\n\n return `${month}/${date}/${year}`;\n}\n\nexport function scrollToError() {\n const element = document.querySelector(\".error-message\");\n if (element) {\n element?.scrollIntoView({\n behavior: \"smooth\",\n block: \"end\",\n inline: \"nearest\",\n });\n }\n}\n//https://stackoverflow.com/questions/5717093/check-if-a-javascript-string-is-a-url\nexport function isValidHttpUrl(string: string) {\n let url;\n try {\n url = new URL(string);\n } catch (_) {\n return false;\n }\n return url.protocol === \"http:\" || url.protocol === \"https:\";\n}\n\nexport async function preloadImage(img: string) {\n return new Promise((resolve, reject) => {\n const image = new Image();\n image.src = img;\n image.onload = resolve;\n image.onerror = reject;\n });\n}\n\nexport async function preloadImages(list: string[]) {\n return list.map(preloadImage);\n}\n\nexport function setTokenToHeaders(token: string) {\n axios.defaults.headers.common[\"Authorization\"] = `Bearer ${token}`;\n}\n/**\n * This function is used for getting images via our server as proxy, by default we aim to download images direcly from s3\n * @param path - relative path\n */\nexport function getImagePath(path?: string) {\n const apiUrl = import.meta.env.VITE_APP_API_URL + \"/assets/\";\n return apiUrl + path;\n}\n\nexport function getAvatarUrl(path?: string | undefined) {\n return path ? path : emptyProfilePlaceholder;\n}\n\n/**\n * Check size of file that is tried to upload Check the size of the file that is being uploaded\n * @param fileDimension - max file dimension in bytes\n */\nexport function checkFileDimension(fileDimension: number) {\n return async (value: any) => {\n if (isImageFileType(value)) {\n const image = await uploadImage(value.dataUrl);\n\n return (\n !!value.file &&\n !!image.height &&\n !!image.width &&\n image.height <= fileDimension &&\n image.width <= fileDimension\n );\n }\n return true;\n };\n}\n/**\n *\n * @param cbs - array of cbs that pass to test method\n * @returns - yup schema\n */\nexport function mapTestRules(\n cbs: {\n cb: yup.TestFunction;\n id: string;\n message: string;\n }[]\n): MixedSchema, any> {\n const result: MixedSchema, any> = yup.mixed();\n return cbs.reduce(\n (schema, { cb, id, message }) => schema.test(id, message, cb),\n result\n );\n}\n\n/**\n * Check size of file that is tried to upload Check the size of the file that is being uploaded\n * @param fileSize - max file size in bytes\n */\nexport function checkFileSize(fileSize: number) {\n return (value: any) => {\n if (isImageType(value)) {\n return !!value.file && value.file?.size <= fileSize;\n }\n return true;\n };\n}\n\n/**\n * Check the type of file that being uploaded\n * @param allowedTypes - allowed types in array\n */\nexport function checkFileType(allowedTypes: string[]) {\n return (value: ImageType) => {\n if (isImageFileType(value)) {\n return !!allowedTypes.find(compareTypes(value.file));\n }\n return true;\n };\n}\n\n/**\n * compare type from file or file extension with allowed types\n * @param file - file\n * @param allowedType - mapped string from allowed types array\n */\nfunction compareTypes(file: File | undefined) {\n return (allowedType: string) => {\n if (!file) {\n return false;\n }\n if (allowedType === file.type) return true;\n const fileExtension = file.name.slice(file.name.lastIndexOf(\".\"));\n if (fileExtension === allowedType) return true;\n return false;\n };\n}\n//\nexport function prepareMessages(prev: Message[] = [], items: Message[]) {\n //sort+reverse each time\n const register: { [key: string]: Message } = {};\n\n prev.forEach((item) => {\n //make sure that if messages repeats - leave only last one\n register[item.sid] = item;\n });\n items.forEach((item) => {\n register[item.sid] = item;\n });\n //\n const newValues = Object.values(register)\n .sort((a, b) => {\n //@ts-ignore\n if (a.dateCreated < b.dateCreated) {\n return -1;\n }\n //@ts-ignore\n if (a.dateCreated > b.dateCreated) {\n return 1;\n }\n return 0;\n })\n .reverse();\n return newValues;\n}\n//\ninterface IAddCurrentChatMessagesParams {\n prev: CurrentChatType;\n message: Message;\n id: string; //conversation id\n}\nexport function updateCurrentChat(params: IAddCurrentChatMessagesParams) {\n if (!params.prev) {\n return params.prev;\n }\n if (!params.message) {\n return params.prev;\n }\n const foundConversation = params.prev?.conversations?.find(\n (i) => i.conversation.id !== params?.id\n );\n if (!foundConversation) {\n return params.prev;\n }\n const messages = prepareMessages(foundConversation.messages || [], [\n params.message,\n ]); //updated messages\n const copiedConversation = { ...foundConversation, messages };\n const conversations =\n params.prev?.conversations?.filter(\n (i) => i.conversation.id !== copiedConversation.conversation.id\n ) || [];\n conversations?.unshift(copiedConversation);\n\n return { ...params?.prev, conversations };\n}\ninterface IAddMessagesParams {\n prev: TwilioConversationsContextValueType;\n messages: Message[];\n id: string; //conversation id\n}\nexport function updateConversationMessages(\n params: IAddMessagesParams\n): TwilioConversationsContextValueType {\n if (!params?.prev) {\n return null;\n }\n if (!params?.messages.length) {\n return params.prev;\n }\n const { chat, conversation } = findChatAndConversationByConversationId(\n params.id,\n params?.prev\n );\n\n if (!chat) {\n return params.prev;\n }\n\n //\n if (!conversation) {\n return params.prev;\n }\n const messages = prepareMessages(\n conversation?.messages || [],\n params.messages\n ); //updated messages\n const orderIndex = Object.values(params?.prev).sort((a, b) => {\n //TODO- CHANGE\n if (a.orderIndex < b.orderIndex) {\n return -1;\n }\n if (a.orderIndex > b.orderIndex) {\n return 1;\n }\n return 0;\n })[0]?.orderIndex;\n //\n\n const chats = {\n ...params.prev,\n };\n if (chat?.id) {\n chats[chat.id] = {\n ...chat,\n orderIndex,\n conversations: chat.conversations.map((i) => {\n if (i.conversation.id === params.id) {\n return {\n ...i,\n messages,\n };\n }\n return i;\n }),\n };\n }\n ////////////////////\n return chats;\n}\n\ninterface IUpdatePaginatorInCurrentChatParams {\n prev: CurrentChatType;\n paginator: Paginator;\n id: string | undefined; //conversation id\n}\n\nexport function updatePaginatorInCurrentChat(\n params: IUpdatePaginatorInCurrentChatParams\n): CurrentChatType {\n if (!params?.prev) {\n return null;\n }\n if (!params?.paginator) {\n return params.prev;\n }\n if (!params?.id) {\n return params.prev;\n }\n const chat = params.prev;\n const conversation = chat?.conversations.find(\n (i) => i.conversation.id === params.id\n );\n\n if (!chat) {\n return params.prev;\n }\n if (!conversation) {\n return params.prev;\n }\n const messages = params.paginator.items;\n\n return {\n ...params.prev,\n conversations: chat.conversations.map((conversation) => {\n if (conversation.conversation.id === params.id) {\n return {\n ...conversation,\n paginator: params.paginator,\n messages: prepareMessages(conversation?.messages, messages), //messages.length ? messages : conversation.messages,\n };\n }\n return conversation;\n }),\n };\n}\ninterface IUpdatePaginatorParams {\n prev: TwilioConversationsContextValueType;\n paginator: Paginator;\n id: string | undefined; //conversation id\n}\n\nexport function updatePaginatorAndMessages(\n params: IUpdatePaginatorParams\n): TwilioConversationsContextValueType {\n if (!params?.prev) {\n return null;\n }\n if (!params?.paginator) {\n return params.prev;\n }\n if (!params?.id) {\n return params.prev;\n }\n const { chat, conversation } = findChatAndConversationByConversationId(\n params.id,\n params?.prev\n );\n if (!chat) {\n return params.prev;\n }\n if (!conversation) {\n return params.prev;\n }\n const messages = params.paginator.items;\n\n const conversations = {\n ...params.prev,\n [chat.id]: {\n ...chat,\n conversations: chat.conversations.map((conversation) => {\n if (conversation.conversation.id === params.id) {\n return {\n ...conversation,\n paginator: params.paginator,\n messages: prepareMessages(conversation?.messages, messages), //messages.length ? messages : conversation.messages,\n };\n }\n return conversation;\n }),\n },\n };\n\n return conversations;\n}\n\nexport function checkIfRed(\n participant: Partial | undefined,\n messageIndex: number\n) {\n let isViewed = false;\n\n if (participant) {\n const lastReadMessageIndex = participant.lastReadMessageIndex;\n if (typeof lastReadMessageIndex === \"number\") {\n isViewed = messageIndex <= lastReadMessageIndex; // if message index lower - it means read\n }\n }\n\n return isViewed;\n}\n\nexport function checkIfMessageRead(\n participants: Partial[] | null | undefined,\n user: string | undefined,\n messageIndex: number | undefined\n) {\n let isViewed = true;\n if (participants?.length) {\n const myParticipant = participants.find(\n (part) => (part.attributes as JSONObject)?.user === user\n );\n if (typeof messageIndex === \"number\") {\n isViewed = checkIfRed(myParticipant, messageIndex);\n }\n }\n return isViewed;\n}\n//\nexport function updateParticipantOfCurrentChat(\n prev: CurrentChatType,\n updatedParticipant: Participant\n) {\n if (!updatedParticipant) {\n return prev;\n }\n const cid = (updatedParticipant.attributes as JSONObject)\n ?.conversation as unknown as string; //id from db\n const foundConversation = prev?.conversations?.find(\n (i) => i.conversation.id !== cid // this is conversation id from twilio\n );\n if (!foundConversation) {\n return prev;\n }\n\n if (foundConversation && prev) {\n if (foundConversation) {\n const participants =\n foundConversation.participants?.filter(\n (i) => i.sid !== updatedParticipant.sid\n ) || [];\n if (participants?.length) {\n participants.push(updatedParticipant);\n }\n\n const result: CurrentChatType = {\n ...prev,\n conversations: prev.conversations.map((i) => {\n if (i.conversation.id === cid) {\n return {\n ...i,\n participants,\n };\n }\n return i;\n }),\n };\n return result;\n }\n }\n return prev;\n}\n///\n\nexport function updateParticipant(\n prev: TwilioConversationsContextValueType,\n updatedParticipant: Participant\n) {\n if (!updatedParticipant) {\n return prev;\n }\n const cid = (updatedParticipant.attributes as JSONObject)\n ?.conversation as unknown as string; //id from db\n const { chat, conversation } = findChatAndConversationByConversationId(\n cid,\n prev\n );\n if (!chat) {\n return prev;\n }\n if (!conversation) {\n return prev;\n }\n if (conversation && prev) {\n if (conversation) {\n const participants =\n conversation.participants?.filter(\n (i) => i.sid !== updatedParticipant.sid\n ) || [];\n if (participants?.length) {\n participants.push(updatedParticipant);\n }\n const result: TwilioConversationsContextValueType = {\n ...prev,\n\n [chat.id]: {\n ...chat,\n conversations: chat.conversations.map((i) => {\n if (i.conversation.id === cid) {\n return {\n ...i,\n participants,\n };\n }\n return i;\n }),\n },\n };\n return result;\n }\n }\n return prev;\n}\n/////\nexport function getTypingTextIndicatorForUser(\n conversation: IFullConversation | null | undefined,\n conversations: TwilioConversationsContextValueType | null | undefined,\n user: string | undefined //current user\n) {\n let currentConversation: null | ITwilioConversations = null;\n let someOtherParticipants: null | Participant[] | undefined = null;\n if (conversation && conversations && conversation.id) {\n const res = findChatAndConversationByConversationId(\n conversation.id,\n conversations\n );\n if (res.conversation) {\n currentConversation = res.conversation;\n }\n }\n\n if (currentConversation) {\n someOtherParticipants = currentConversation?.participants?.filter((i) => {\n const isOther = (i.attributes as JSONObject).user !== user;\n return isOther;\n });\n }\n //\n const names: string[] = [];\n someOtherParticipants?.forEach((participant) => {\n if (participant?.isTyping && conversation && currentConversation) {\n const found = conversation?.participants?.find(\n (i) => i.participant === participant?.sid\n );\n names.push(found?.user?.name || \"Someone\");\n }\n });\n\n if (names.length >= 2) {\n return names.join(\" \") + \", are typing...\";\n }\n if (names.length === 1) {\n return names.join(\" \") + \" is typing...\";\n }\n return \"\";\n}\n\n//\nexport function transformRateToPercentages(rate: number | string | undefined) {\n if (typeof rate === \"string\" && rate) {\n return Math.round((parseFloat(rate) / 5) * 100);\n }\n if (typeof rate === \"number\" && !isNaN(rate)) {\n return Math.round((rate / 5) * 100);\n }\n return 0;\n}\nexport function isUnviewedNotification(item: INotification | undefined) {\n let thereIsUnviewedNotification = false;\n if (item) {\n if (!item?.viewed) {\n thereIsUnviewedNotification = true;\n }\n }\n return thereIsUnviewedNotification;\n}\n///\nexport function getStylesForReactSelectInputs(\n config: StylesConfig = {}\n) {\n const customStyles: StylesConfig = {\n valueContainer: (provided) => {\n return { ...provided, padding: \"0 0\" };\n },\n control: (provided, state) => {\n const styles = {\n ...provided,\n borderColor: \"#CCCCCC\",\n minHeight: \"fit-content\",\n };\n\n if (state.isFocused) {\n styles.borderColor = \"#78ade4\";\n styles.boxShadow =\n \"0 0 5px 0 rgb(120 173 228 / 76%), inset 0 2px 2px 0 rgb(0 0 0 / 7%);\";\n }\n\n return styles;\n },\n placeholder: (provided) => {\n return { ...provided, fontSize: \"14px\", color: \"#9da4b1\" };\n },\n singleValue: (provided) => {\n return {\n ...provided,\n color: \"black\",\n lineHeight: \"17px\",\n fontSize: \"16px\",\n fontWeight: \"400\",\n marginLeft: \"0\",\n marginRight: \"0\",\n paddingLeft: \"16px\",\n };\n },\n input: (provided) => {\n return {\n ...provided,\n color: \"#333333\",\n lineHeight: \"17px\",\n fontSize: \"14px\",\n fontWeight: \"400\",\n };\n },\n menu: (provided) => {\n return { ...provided, borderRadius: \"3px\" };\n },\n indicatorsContainer: (provided) => {\n return { ...provided, transform: \"scale(0.7)\" };\n },\n indicatorSeparator: () => ({}),\n menuList: (provided) => {\n return { ...provided, paddingTop: \"8px\", paddingBottom: \"8px\" };\n },\n option: (provided, state) => {\n if (state.isSelected) {\n provided.backgroundColor = \"#dfe3eb\"; //look at calmIridescence color in tailwind config\n provided.color = \"inherit\";\n }\n\n return {\n ...provided,\n color: \"#333333\",\n padding: \"2px 12px\",\n fontSize: \"14px\",\n fontWeight: \"400\",\n };\n },\n ...config,\n };\n return customStyles;\n}\nexport function removeRepeatedSlashes(path: string) {\n return path.replace(/\\/+/g, \"/\");\n}\n\nexport function getMostImportantProfileNotification(\n notifications: ProfileNotificationType[] | undefined\n) {\n const mostImportantNotification = notifications?.reduce((prev, curr) => {\n if ((prev?.priority || 0) > (curr?.priority || 0)) {\n return prev;\n }\n return curr;\n }, null);\n return mostImportantNotification;\n}\n//\nexport function allowAddDebitCardOrBankAccount(\n account: IAccount[\"stripeAccount\"] | undefined\n) {\n // if there left add only external account and stripe bank account information will be completed\n return (\n account?.details_submitted ||\n (account?.requirements.currently_due.length === 1 &&\n account?.requirements.currently_due[0] === \"external_account\")\n );\n}\ninterface ICheckIfLastPaginatedItemParams {\n data: InfiniteData>;\n pageKey: number;\n itemKey: number;\n page: IAxiosResponseWithPagination;\n}\nexport function checkIfIsLastPaginatedItem({\n data,\n pageKey,\n itemKey,\n page,\n}: ICheckIfLastPaginatedItemParams) {\n const lastPage = data.pages.length - 1 === pageKey;\n const lastItem = page.data.items.length - 1 === itemKey;\n const last = lastItem && lastPage;\n return last;\n}\nexport function checkIfDevVersion() {\n const host = import.meta.env.VITE_APP_HOST;\n return (\n import.meta.env.VITE_APP_DEV_HOST === host ||\n window.location.hostname === \"localhost\"\n );\n}\n\nexport function getSocialId(\n user: Partial, any, any, any>> | undefined,\n type = \"instagram\"\n) {\n const socialId = user?.socialNetworks?.find((i) => i.type === type)?.socialId;\n return socialId;\n}\n\nexport function classnames(...args: classNames.ArgumentArray): string {\n if (args.length === 1 && typeof args[0] === \"string\") {\n // to optimize performance\n return args[0];\n }\n return twMerge(classNames(...args));\n}\n\nexport function getDirection({\n isAdminChat,\n checkedInterlocutor,\n user,\n isMine,\n}: {\n isAdminChat: boolean;\n checkedInterlocutor: string;\n user: string;\n isMine: boolean;\n}) {\n let direction: \"left\" | \"right\" = \"right\";\n if (isAdminChat && user === checkedInterlocutor) {\n direction = \"left\";\n }\n if (!isAdminChat && isMine) {\n direction = \"left\";\n }\n return direction;\n}\n\nexport function getReferralLink(code: string, usernameOrId?: string) {\n return `${import.meta.env.VITE_APP_HOST}/${\n usernameOrId ? usernameOrId : \"\"\n }?referral=${code}`;\n}\n\nexport function checkIfCampaignIsExpired(\n program: IReferralProgram,\n user: IUser\n) {\n if (program.activeMinutes && user.createdAt) {\n //add minutes to createdAt of campaign to calculate if it is expired\n const createdAt = new Date(user.createdAt);\n const expiredAt = new Date(\n createdAt.getTime() + program.activeMinutes * 60000\n );\n if (expiredAt < new Date()) {\n return false; //\n }\n }\n return true;\n}\nexport function checkIfReferralProgramIsStarted(\n program: IReferralProgram | null | undefined\n) {\n return program?.startAt && new Date() >= new Date(program.startAt);\n}\n\nexport function checkIfReferralProgramIsExpired(\n program: IReferralProgram | null | undefined\n) {\n const isStarted = checkIfReferralProgramIsStarted(program);\n\n let isExpired = false; // if ignoreExpiredAt - program will not expire\n if (!program?.ignoreExpiredAt) {\n if (isStarted && program?.expiredAt) {\n isExpired = new Date(program.expiredAt) <= new Date();\n }\n }\n return isExpired;\n}\n\nexport function getFutureHumanReadableDateFromMinutes(minutes: number) {\n const now = new Date();\n const future = new Date(now.getTime() + minutes * 60000);\n return future.toLocaleDateString(\"en-US\", {\n month: \"short\",\n year: \"numeric\",\n day: \"2-digit\",\n });\n}\n\nexport function transformMinutesIntoDays(minutes: number | null | undefined) {\n if (!minutes) {\n return 0;\n }\n const days = Math.ceil(minutes / 60 / 24);\n return days;\n}\n\nexport function getUserName(\n user: Partial> | undefined | string\n) {\n if (typeof user === \"string\") {\n return user || \"Unknown\";\n }\n let name = user?.name;\n const socialId = getSocialId(user);\n if (!name && socialId) {\n name = socialId;\n }\n if (!name && user?.email) {\n name = user?.email;\n }\n return name || \"Unknown\";\n}\n","/**\n * @remix-run/router v1.1.0\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : 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 return _extends.apply(this, arguments);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Types and Constants\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Actions represent the type of change to a location value.\n */\nvar Action;\n\n(function (Action) {\n /**\n * A POP indicates a change to an arbitrary index in the history stack, such\n * as a back or forward navigation. It does not describe the direction of the\n * navigation, only that the current index changed.\n *\n * Note: This is the default action for newly created history objects.\n */\n Action[\"Pop\"] = \"POP\";\n /**\n * A PUSH indicates a new entry being added to the history stack, such as when\n * a link is clicked and a new page loads. When this happens, all subsequent\n * entries in the stack are lost.\n */\n\n Action[\"Push\"] = \"PUSH\";\n /**\n * A REPLACE indicates the entry at the current index in the history stack\n * being replaced by a new one.\n */\n\n Action[\"Replace\"] = \"REPLACE\";\n})(Action || (Action = {}));\n\nconst PopStateEventType = \"popstate\";\n/**\n * Memory history stores the current location in memory. It is designed for use\n * in stateful non-browser environments like tests and React Native.\n */\n\nfunction createMemoryHistory(options) {\n if (options === void 0) {\n options = {};\n }\n\n let {\n initialEntries = [\"/\"],\n initialIndex,\n v5Compat = false\n } = options;\n let entries; // Declare so we can access from createMemoryLocation\n\n entries = initialEntries.map((entry, index) => createMemoryLocation(entry, typeof entry === \"string\" ? null : entry.state, index === 0 ? \"default\" : undefined));\n let index = clampIndex(initialIndex == null ? entries.length - 1 : initialIndex);\n let action = Action.Pop;\n let listener = null;\n\n function clampIndex(n) {\n return Math.min(Math.max(n, 0), entries.length - 1);\n }\n\n function getCurrentLocation() {\n return entries[index];\n }\n\n function createMemoryLocation(to, state, key) {\n if (state === void 0) {\n state = null;\n }\n\n let location = createLocation(entries ? getCurrentLocation().pathname : \"/\", to, state, key);\n warning$1(location.pathname.charAt(0) === \"/\", \"relative pathnames are not supported in memory history: \" + JSON.stringify(to));\n return location;\n }\n\n let history = {\n get index() {\n return index;\n },\n\n get action() {\n return action;\n },\n\n get location() {\n return getCurrentLocation();\n },\n\n createHref(to) {\n return typeof to === \"string\" ? to : createPath(to);\n },\n\n encodeLocation(to) {\n let path = typeof to === \"string\" ? parsePath(to) : to;\n return {\n pathname: path.pathname || \"\",\n search: path.search || \"\",\n hash: path.hash || \"\"\n };\n },\n\n push(to, state) {\n action = Action.Push;\n let nextLocation = createMemoryLocation(to, state);\n index += 1;\n entries.splice(index, entries.length, nextLocation);\n\n if (v5Compat && listener) {\n listener({\n action,\n location: nextLocation\n });\n }\n },\n\n replace(to, state) {\n action = Action.Replace;\n let nextLocation = createMemoryLocation(to, state);\n entries[index] = nextLocation;\n\n if (v5Compat && listener) {\n listener({\n action,\n location: nextLocation\n });\n }\n },\n\n go(delta) {\n action = Action.Pop;\n index = clampIndex(index + delta);\n\n if (listener) {\n listener({\n action,\n location: getCurrentLocation()\n });\n }\n },\n\n listen(fn) {\n listener = fn;\n return () => {\n listener = null;\n };\n }\n\n };\n return history;\n}\n/**\n * Browser history stores the location in regular URLs. This is the standard for\n * most web apps, but it requires some configuration on the server to ensure you\n * serve the same app at multiple URLs.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory\n */\n\nfunction createBrowserHistory(options) {\n if (options === void 0) {\n options = {};\n }\n\n function createBrowserLocation(window, globalHistory) {\n let {\n pathname,\n search,\n hash\n } = window.location;\n return createLocation(\"\", {\n pathname,\n search,\n hash\n }, // state defaults to `null` because `window.history.state` does\n globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || \"default\");\n }\n\n function createBrowserHref(window, to) {\n return typeof to === \"string\" ? to : createPath(to);\n }\n\n return getUrlBasedHistory(createBrowserLocation, createBrowserHref, null, options);\n}\n/**\n * Hash history stores the location in window.location.hash. This makes it ideal\n * for situations where you don't want to send the location to the server for\n * some reason, either because you do cannot configure it or the URL space is\n * reserved for something else.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory\n */\n\nfunction createHashHistory(options) {\n if (options === void 0) {\n options = {};\n }\n\n function createHashLocation(window, globalHistory) {\n let {\n pathname = \"/\",\n search = \"\",\n hash = \"\"\n } = parsePath(window.location.hash.substr(1));\n return createLocation(\"\", {\n pathname,\n search,\n hash\n }, // state defaults to `null` because `window.history.state` does\n globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || \"default\");\n }\n\n function createHashHref(window, to) {\n let base = window.document.querySelector(\"base\");\n let href = \"\";\n\n if (base && base.getAttribute(\"href\")) {\n let url = window.location.href;\n let hashIndex = url.indexOf(\"#\");\n href = hashIndex === -1 ? url : url.slice(0, hashIndex);\n }\n\n return href + \"#\" + (typeof to === \"string\" ? to : createPath(to));\n }\n\n function validateHashLocation(location, to) {\n warning$1(location.pathname.charAt(0) === \"/\", \"relative pathnames are not supported in hash history.push(\" + JSON.stringify(to) + \")\");\n }\n\n return getUrlBasedHistory(createHashLocation, createHashHref, validateHashLocation, options);\n}\nfunction invariant(value, message) {\n if (value === false || value === null || typeof value === \"undefined\") {\n throw new Error(message);\n }\n}\n\nfunction warning$1(cond, message) {\n if (!cond) {\n // eslint-disable-next-line no-console\n if (typeof console !== \"undefined\") console.warn(message);\n\n try {\n // Welcome to debugging history!\n //\n // This error is thrown as a convenience so you can more easily\n // find the source for a warning that appears in the console by\n // enabling \"pause on exceptions\" in your JavaScript debugger.\n throw new Error(message); // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n}\n\nfunction createKey() {\n return Math.random().toString(36).substr(2, 8);\n}\n/**\n * For browser-based histories, we combine the state and key into an object\n */\n\n\nfunction getHistoryState(location) {\n return {\n usr: location.state,\n key: location.key\n };\n}\n/**\n * Creates a Location object with a unique key from the given Path\n */\n\n\nfunction createLocation(current, to, state, key) {\n if (state === void 0) {\n state = null;\n }\n\n let location = _extends({\n pathname: typeof current === \"string\" ? current : current.pathname,\n search: \"\",\n hash: \"\"\n }, typeof to === \"string\" ? parsePath(to) : to, {\n state,\n // TODO: This could be cleaned up. push/replace should probably just take\n // full Locations now and avoid the need to run through this flow at all\n // But that's a pretty big refactor to the current test suite so going to\n // keep as is for the time being and just let any incoming keys take precedence\n key: to && to.key || key || createKey()\n });\n\n return location;\n}\n/**\n * Creates a string URL path from the given pathname, search, and hash components.\n */\n\nfunction createPath(_ref) {\n let {\n pathname = \"/\",\n search = \"\",\n hash = \"\"\n } = _ref;\n if (search && search !== \"?\") pathname += search.charAt(0) === \"?\" ? search : \"?\" + search;\n if (hash && hash !== \"#\") pathname += hash.charAt(0) === \"#\" ? hash : \"#\" + hash;\n return pathname;\n}\n/**\n * Parses a string URL path into its separate pathname, search, and hash components.\n */\n\nfunction parsePath(path) {\n let parsedPath = {};\n\n if (path) {\n let hashIndex = path.indexOf(\"#\");\n\n if (hashIndex >= 0) {\n parsedPath.hash = path.substr(hashIndex);\n path = path.substr(0, hashIndex);\n }\n\n let searchIndex = path.indexOf(\"?\");\n\n if (searchIndex >= 0) {\n parsedPath.search = path.substr(searchIndex);\n path = path.substr(0, searchIndex);\n }\n\n if (path) {\n parsedPath.pathname = path;\n }\n }\n\n return parsedPath;\n}\nfunction createClientSideURL(location) {\n // window.location.origin is \"null\" (the literal string value) in Firefox\n // under certain conditions, notably when serving from a local HTML file\n // See https://bugzilla.mozilla.org/show_bug.cgi?id=878297\n let base = typeof window !== \"undefined\" && typeof window.location !== \"undefined\" && window.location.origin !== \"null\" ? window.location.origin : window.location.href;\n let href = typeof location === \"string\" ? location : createPath(location);\n invariant(base, \"No window.location.(origin|href) available to create URL for href: \" + href);\n return new URL(href, base);\n}\n\nfunction getUrlBasedHistory(getLocation, createHref, validateLocation, options) {\n if (options === void 0) {\n options = {};\n }\n\n let {\n window = document.defaultView,\n v5Compat = false\n } = options;\n let globalHistory = window.history;\n let action = Action.Pop;\n let listener = null;\n\n function handlePop() {\n action = Action.Pop;\n\n if (listener) {\n listener({\n action,\n location: history.location\n });\n }\n }\n\n function push(to, state) {\n action = Action.Push;\n let location = createLocation(history.location, to, state);\n if (validateLocation) validateLocation(location, to);\n let historyState = getHistoryState(location);\n let url = history.createHref(location); // try...catch because iOS limits us to 100 pushState calls :/\n\n try {\n globalHistory.pushState(historyState, \"\", url);\n } catch (error) {\n // They are going to lose state here, but there is no real\n // way to warn them about it since the page will refresh...\n window.location.assign(url);\n }\n\n if (v5Compat && listener) {\n listener({\n action,\n location: history.location\n });\n }\n }\n\n function replace(to, state) {\n action = Action.Replace;\n let location = createLocation(history.location, to, state);\n if (validateLocation) validateLocation(location, to);\n let historyState = getHistoryState(location);\n let url = history.createHref(location);\n globalHistory.replaceState(historyState, \"\", url);\n\n if (v5Compat && listener) {\n listener({\n action,\n location: history.location\n });\n }\n }\n\n let history = {\n get action() {\n return action;\n },\n\n get location() {\n return getLocation(window, globalHistory);\n },\n\n listen(fn) {\n if (listener) {\n throw new Error(\"A history only accepts one active listener\");\n }\n\n window.addEventListener(PopStateEventType, handlePop);\n listener = fn;\n return () => {\n window.removeEventListener(PopStateEventType, handlePop);\n listener = null;\n };\n },\n\n createHref(to) {\n return createHref(window, to);\n },\n\n encodeLocation(to) {\n // Encode a Location the same way window.location would\n let url = createClientSideURL(typeof to === \"string\" ? to : createPath(to));\n return {\n pathname: url.pathname,\n search: url.search,\n hash: url.hash\n };\n },\n\n push,\n replace,\n\n go(n) {\n return globalHistory.go(n);\n }\n\n };\n return history;\n} //#endregion\n\nvar ResultType;\n\n(function (ResultType) {\n ResultType[\"data\"] = \"data\";\n ResultType[\"deferred\"] = \"deferred\";\n ResultType[\"redirect\"] = \"redirect\";\n ResultType[\"error\"] = \"error\";\n})(ResultType || (ResultType = {}));\n\nfunction isIndexRoute(route) {\n return route.index === true;\n} // Walk the route tree generating unique IDs where necessary so we are working\n// solely with AgnosticDataRouteObject's within the Router\n\n\nfunction convertRoutesToDataRoutes(routes, parentPath, allIds) {\n if (parentPath === void 0) {\n parentPath = [];\n }\n\n if (allIds === void 0) {\n allIds = new Set();\n }\n\n return routes.map((route, index) => {\n let treePath = [...parentPath, index];\n let id = typeof route.id === \"string\" ? route.id : treePath.join(\"-\");\n invariant(route.index !== true || !route.children, \"Cannot specify children on an index route\");\n invariant(!allIds.has(id), \"Found a route id collision on id \\\"\" + id + \"\\\". Route \" + \"id's must be globally unique within Data Router usages\");\n allIds.add(id);\n\n if (isIndexRoute(route)) {\n let indexRoute = _extends({}, route, {\n id\n });\n\n return indexRoute;\n } else {\n let pathOrLayoutRoute = _extends({}, route, {\n id,\n children: route.children ? convertRoutesToDataRoutes(route.children, treePath, allIds) : undefined\n });\n\n return pathOrLayoutRoute;\n }\n });\n}\n/**\n * Matches the given routes to a location and returns the match data.\n *\n * @see https://reactrouter.com/utils/match-routes\n */\n\nfunction matchRoutes(routes, locationArg, basename) {\n if (basename === void 0) {\n basename = \"/\";\n }\n\n let location = typeof locationArg === \"string\" ? parsePath(locationArg) : locationArg;\n let pathname = stripBasename(location.pathname || \"/\", basename);\n\n if (pathname == null) {\n return null;\n }\n\n let branches = flattenRoutes(routes);\n rankRouteBranches(branches);\n let matches = null;\n\n for (let i = 0; matches == null && i < branches.length; ++i) {\n matches = matchRouteBranch(branches[i], // Incoming pathnames are generally encoded from either window.location\n // or from router.navigate, but we want to match against the unencoded\n // paths in the route definitions. Memory router locations won't be\n // encoded here but there also shouldn't be anything to decode so this\n // should be a safe operation. This avoids needing matchRoutes to be\n // history-aware.\n safelyDecodeURI(pathname));\n }\n\n return matches;\n}\n\nfunction flattenRoutes(routes, branches, parentsMeta, parentPath) {\n if (branches === void 0) {\n branches = [];\n }\n\n if (parentsMeta === void 0) {\n parentsMeta = [];\n }\n\n if (parentPath === void 0) {\n parentPath = \"\";\n }\n\n let flattenRoute = (route, index, relativePath) => {\n let meta = {\n relativePath: relativePath === undefined ? route.path || \"\" : relativePath,\n caseSensitive: route.caseSensitive === true,\n childrenIndex: index,\n route\n };\n\n if (meta.relativePath.startsWith(\"/\")) {\n invariant(meta.relativePath.startsWith(parentPath), \"Absolute route path \\\"\" + meta.relativePath + \"\\\" nested under path \" + (\"\\\"\" + parentPath + \"\\\" is not valid. An absolute child route path \") + \"must start with the combined path of all its parent routes.\");\n meta.relativePath = meta.relativePath.slice(parentPath.length);\n }\n\n let path = joinPaths([parentPath, meta.relativePath]);\n let routesMeta = parentsMeta.concat(meta); // Add the children before adding this route to the array so we traverse the\n // route tree depth-first and child routes appear before their parents in\n // the \"flattened\" version.\n\n if (route.children && route.children.length > 0) {\n invariant( // Our types know better, but runtime JS may not!\n // @ts-expect-error\n route.index !== true, \"Index routes must not have child routes. Please remove \" + (\"all child routes from route path \\\"\" + path + \"\\\".\"));\n flattenRoutes(route.children, branches, routesMeta, path);\n } // Routes without a path shouldn't ever match by themselves unless they are\n // index routes, so don't add them to the list of possible branches.\n\n\n if (route.path == null && !route.index) {\n return;\n }\n\n branches.push({\n path,\n score: computeScore(path, route.index),\n routesMeta\n });\n };\n\n routes.forEach((route, index) => {\n var _route$path;\n\n // coarse-grain check for optional params\n if (route.path === \"\" || !((_route$path = route.path) != null && _route$path.includes(\"?\"))) {\n flattenRoute(route, index);\n } else {\n for (let exploded of explodeOptionalSegments(route.path)) {\n flattenRoute(route, index, exploded);\n }\n }\n });\n return branches;\n}\n/**\n * Computes all combinations of optional path segments for a given path,\n * excluding combinations that are ambiguous and of lower priority.\n *\n * For example, `/one/:two?/three/:four?/:five?` explodes to:\n * - `/one/three`\n * - `/one/:two/three`\n * - `/one/three/:four`\n * - `/one/three/:five`\n * - `/one/:two/three/:four`\n * - `/one/:two/three/:five`\n * - `/one/three/:four/:five`\n * - `/one/:two/three/:four/:five`\n */\n\n\nfunction explodeOptionalSegments(path) {\n let segments = path.split(\"/\");\n if (segments.length === 0) return [];\n let [first, ...rest] = segments; // Optional path segments are denoted by a trailing `?`\n\n let isOptional = first.endsWith(\"?\"); // Compute the corresponding required segment: `foo?` -> `foo`\n\n let required = first.replace(/\\?$/, \"\");\n\n if (rest.length === 0) {\n // Intepret empty string as omitting an optional segment\n // `[\"one\", \"\", \"three\"]` corresponds to omitting `:two` from `/one/:two?/three` -> `/one/three`\n return isOptional ? [required, \"\"] : [required];\n }\n\n let restExploded = explodeOptionalSegments(rest.join(\"/\"));\n let result = []; // All child paths with the prefix. Do this for all children before the\n // optional version for all children so we get consistent ordering where the\n // parent optional aspect is preferred as required. Otherwise, we can get\n // child sections interspersed where deeper optional segments are higher than\n // parent optional segments, where for example, /:two would explodes _earlier_\n // then /:one. By always including the parent as required _for all children_\n // first, we avoid this issue\n\n result.push(...restExploded.map(subpath => subpath === \"\" ? required : [required, subpath].join(\"/\"))); // Then if this is an optional value, add all child versions without\n\n if (isOptional) {\n result.push(...restExploded);\n } // for absolute paths, ensure `/` instead of empty segment\n\n\n return result.map(exploded => path.startsWith(\"/\") && exploded === \"\" ? \"/\" : exploded);\n}\n\nfunction rankRouteBranches(branches) {\n branches.sort((a, b) => a.score !== b.score ? b.score - a.score // Higher score first\n : compareIndexes(a.routesMeta.map(meta => meta.childrenIndex), b.routesMeta.map(meta => meta.childrenIndex)));\n}\n\nconst paramRe = /^:\\w+$/;\nconst dynamicSegmentValue = 3;\nconst indexRouteValue = 2;\nconst emptySegmentValue = 1;\nconst staticSegmentValue = 10;\nconst splatPenalty = -2;\n\nconst isSplat = s => s === \"*\";\n\nfunction computeScore(path, index) {\n let segments = path.split(\"/\");\n let initialScore = segments.length;\n\n if (segments.some(isSplat)) {\n initialScore += splatPenalty;\n }\n\n if (index) {\n initialScore += indexRouteValue;\n }\n\n return segments.filter(s => !isSplat(s)).reduce((score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === \"\" ? emptySegmentValue : staticSegmentValue), initialScore);\n}\n\nfunction compareIndexes(a, b) {\n let siblings = a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]);\n return siblings ? // If two routes are siblings, we should try to match the earlier sibling\n // first. This allows people to have fine-grained control over the matching\n // behavior by simply putting routes with identical paths in the order they\n // want them tried.\n a[a.length - 1] - b[b.length - 1] : // Otherwise, it doesn't really make sense to rank non-siblings by index,\n // so they sort equally.\n 0;\n}\n\nfunction matchRouteBranch(branch, pathname) {\n let {\n routesMeta\n } = branch;\n let matchedParams = {};\n let matchedPathname = \"/\";\n let matches = [];\n\n for (let i = 0; i < routesMeta.length; ++i) {\n let meta = routesMeta[i];\n let end = i === routesMeta.length - 1;\n let remainingPathname = matchedPathname === \"/\" ? pathname : pathname.slice(matchedPathname.length) || \"/\";\n let match = matchPath({\n path: meta.relativePath,\n caseSensitive: meta.caseSensitive,\n end\n }, remainingPathname);\n if (!match) return null;\n Object.assign(matchedParams, match.params);\n let route = meta.route;\n matches.push({\n // TODO: Can this as be avoided?\n params: matchedParams,\n pathname: joinPaths([matchedPathname, match.pathname]),\n pathnameBase: normalizePathname(joinPaths([matchedPathname, match.pathnameBase])),\n route\n });\n\n if (match.pathnameBase !== \"/\") {\n matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);\n }\n }\n\n return matches;\n}\n/**\n * Returns a path with params interpolated.\n *\n * @see https://reactrouter.com/utils/generate-path\n */\n\n\nfunction generatePath(originalPath, params) {\n if (params === void 0) {\n params = {};\n }\n\n let path = originalPath;\n\n if (path.endsWith(\"*\") && path !== \"*\" && !path.endsWith(\"/*\")) {\n warning(false, \"Route path \\\"\" + path + \"\\\" will be treated as if it were \" + (\"\\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\" because the `*` character must \") + \"always follow a `/` in the pattern. To get rid of this warning, \" + (\"please change the route path to \\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\".\"));\n path = path.replace(/\\*$/, \"/*\");\n }\n\n return path.replace(/^:(\\w+)/g, (_, key) => {\n invariant(params[key] != null, \"Missing \\\":\" + key + \"\\\" param\");\n return params[key];\n }).replace(/\\/:(\\w+)/g, (_, key) => {\n invariant(params[key] != null, \"Missing \\\":\" + key + \"\\\" param\");\n return \"/\" + params[key];\n }).replace(/(\\/?)\\*/, (_, prefix, __, str) => {\n const star = \"*\";\n\n if (params[star] == null) {\n // If no splat was provided, trim the trailing slash _unless_ it's\n // the entire path\n return str === \"/*\" ? \"/\" : \"\";\n } // Apply the splat\n\n\n return \"\" + prefix + params[star];\n });\n}\n/**\n * Performs pattern matching on a URL pathname and returns information about\n * the match.\n *\n * @see https://reactrouter.com/utils/match-path\n */\n\nfunction matchPath(pattern, pathname) {\n if (typeof pattern === \"string\") {\n pattern = {\n path: pattern,\n caseSensitive: false,\n end: true\n };\n }\n\n let [matcher, paramNames] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);\n let match = pathname.match(matcher);\n if (!match) return null;\n let matchedPathname = match[0];\n let pathnameBase = matchedPathname.replace(/(.)\\/+$/, \"$1\");\n let captureGroups = match.slice(1);\n let params = paramNames.reduce((memo, paramName, index) => {\n // We need to compute the pathnameBase here using the raw splat value\n // instead of using params[\"*\"] later because it will be decoded then\n if (paramName === \"*\") {\n let splatValue = captureGroups[index] || \"\";\n pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\\/+$/, \"$1\");\n }\n\n memo[paramName] = safelyDecodeURIComponent(captureGroups[index] || \"\", paramName);\n return memo;\n }, {});\n return {\n params,\n pathname: matchedPathname,\n pathnameBase,\n pattern\n };\n}\n\nfunction compilePath(path, caseSensitive, end) {\n if (caseSensitive === void 0) {\n caseSensitive = false;\n }\n\n if (end === void 0) {\n end = true;\n }\n\n warning(path === \"*\" || !path.endsWith(\"*\") || path.endsWith(\"/*\"), \"Route path \\\"\" + path + \"\\\" will be treated as if it were \" + (\"\\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\" because the `*` character must \") + \"always follow a `/` in the pattern. To get rid of this warning, \" + (\"please change the route path to \\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\".\"));\n let paramNames = [];\n let regexpSource = \"^\" + path.replace(/\\/*\\*?$/, \"\") // Ignore trailing / and /*, we'll handle it below\n .replace(/^\\/*/, \"/\") // Make sure it has a leading /\n .replace(/[\\\\.*+^$?{}|()[\\]]/g, \"\\\\$&\") // Escape special regex chars\n .replace(/\\/:(\\w+)/g, (_, paramName) => {\n paramNames.push(paramName);\n return \"/([^\\\\/]+)\";\n });\n\n if (path.endsWith(\"*\")) {\n paramNames.push(\"*\");\n regexpSource += path === \"*\" || path === \"/*\" ? \"(.*)$\" // Already matched the initial /, just match the rest\n : \"(?:\\\\/(.+)|\\\\/*)$\"; // Don't include the / in params[\"*\"]\n } else if (end) {\n // When matching to the end, ignore trailing slashes\n regexpSource += \"\\\\/*$\";\n } else if (path !== \"\" && path !== \"/\") {\n // If our path is non-empty and contains anything beyond an initial slash,\n // then we have _some_ form of path in our regex so we should expect to\n // match only if we find the end of this path segment. Look for an optional\n // non-captured trailing slash (to match a portion of the URL) or the end\n // of the path (if we've matched to the end). We used to do this with a\n // word boundary but that gives false positives on routes like\n // /user-preferences since `-` counts as a word boundary.\n regexpSource += \"(?:(?=\\\\/|$))\";\n } else ;\n\n let matcher = new RegExp(regexpSource, caseSensitive ? undefined : \"i\");\n return [matcher, paramNames];\n}\n\nfunction safelyDecodeURI(value) {\n try {\n return decodeURI(value);\n } catch (error) {\n warning(false, \"The URL path \\\"\" + value + \"\\\" could not be decoded because it is is a \" + \"malformed URL segment. This is probably due to a bad percent \" + (\"encoding (\" + error + \").\"));\n return value;\n }\n}\n\nfunction safelyDecodeURIComponent(value, paramName) {\n try {\n return decodeURIComponent(value);\n } catch (error) {\n warning(false, \"The value for the URL param \\\"\" + paramName + \"\\\" will not be decoded because\" + (\" the string \\\"\" + value + \"\\\" is a malformed URL segment. This is probably\") + (\" due to a bad percent encoding (\" + error + \").\"));\n return value;\n }\n}\n/**\n * @private\n */\n\n\nfunction stripBasename(pathname, basename) {\n if (basename === \"/\") return pathname;\n\n if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {\n return null;\n } // We want to leave trailing slash behavior in the user's control, so if they\n // specify a basename with a trailing slash, we should support it\n\n\n let startIndex = basename.endsWith(\"/\") ? basename.length - 1 : basename.length;\n let nextChar = pathname.charAt(startIndex);\n\n if (nextChar && nextChar !== \"/\") {\n // pathname does not start with basename/\n return null;\n }\n\n return pathname.slice(startIndex) || \"/\";\n}\n/**\n * @private\n */\n\nfunction warning(cond, message) {\n if (!cond) {\n // eslint-disable-next-line no-console\n if (typeof console !== \"undefined\") console.warn(message);\n\n try {\n // Welcome to debugging React Router!\n //\n // This error is thrown as a convenience so you can more easily\n // find the source for a warning that appears in the console by\n // enabling \"pause on exceptions\" in your JavaScript debugger.\n throw new Error(message); // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n}\n/**\n * Returns a resolved path object relative to the given pathname.\n *\n * @see https://reactrouter.com/utils/resolve-path\n */\n\nfunction resolvePath(to, fromPathname) {\n if (fromPathname === void 0) {\n fromPathname = \"/\";\n }\n\n let {\n pathname: toPathname,\n search = \"\",\n hash = \"\"\n } = typeof to === \"string\" ? parsePath(to) : to;\n let pathname = toPathname ? toPathname.startsWith(\"/\") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;\n return {\n pathname,\n search: normalizeSearch(search),\n hash: normalizeHash(hash)\n };\n}\n\nfunction resolvePathname(relativePath, fromPathname) {\n let segments = fromPathname.replace(/\\/+$/, \"\").split(\"/\");\n let relativeSegments = relativePath.split(\"/\");\n relativeSegments.forEach(segment => {\n if (segment === \"..\") {\n // Keep the root \"\" segment so the pathname starts at /\n if (segments.length > 1) segments.pop();\n } else if (segment !== \".\") {\n segments.push(segment);\n }\n });\n return segments.length > 1 ? segments.join(\"/\") : \"/\";\n}\n\nfunction getInvalidPathError(char, field, dest, path) {\n return \"Cannot include a '\" + char + \"' character in a manually specified \" + (\"`to.\" + field + \"` field [\" + JSON.stringify(path) + \"]. Please separate it out to the \") + (\"`to.\" + dest + \"` field. Alternatively you may provide the full path as \") + \"a string in and the router will parse it for you.\";\n}\n/**\n * @private\n *\n * When processing relative navigation we want to ignore ancestor routes that\n * do not contribute to the path, such that index/pathless layout routes don't\n * interfere.\n *\n * For example, when moving a route element into an index route and/or a\n * pathless layout route, relative link behavior contained within should stay\n * the same. Both of the following examples should link back to the root:\n *\n * \n * \n * \n *\n * \n * \n * }> // <-- Does not contribute\n * // <-- Does not contribute\n * \n * \n */\n\n\nfunction getPathContributingMatches(matches) {\n return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);\n}\n/**\n * @private\n */\n\nfunction resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {\n if (isPathRelative === void 0) {\n isPathRelative = false;\n }\n\n let to;\n\n if (typeof toArg === \"string\") {\n to = parsePath(toArg);\n } else {\n to = _extends({}, toArg);\n invariant(!to.pathname || !to.pathname.includes(\"?\"), getInvalidPathError(\"?\", \"pathname\", \"search\", to));\n invariant(!to.pathname || !to.pathname.includes(\"#\"), getInvalidPathError(\"#\", \"pathname\", \"hash\", to));\n invariant(!to.search || !to.search.includes(\"#\"), getInvalidPathError(\"#\", \"search\", \"hash\", to));\n }\n\n let isEmptyPath = toArg === \"\" || to.pathname === \"\";\n let toPathname = isEmptyPath ? \"/\" : to.pathname;\n let from; // Routing is relative to the current pathname if explicitly requested.\n //\n // If a pathname is explicitly provided in `to`, it should be relative to the\n // route context. This is explained in `Note on `` values` in our\n // migration guide from v5 as a means of disambiguation between `to` values\n // that begin with `/` and those that do not. However, this is problematic for\n // `to` values that do not provide a pathname. `to` can simply be a search or\n // hash string, in which case we should assume that the navigation is relative\n // to the current location's pathname and *not* the route pathname.\n\n if (isPathRelative || toPathname == null) {\n from = locationPathname;\n } else {\n let routePathnameIndex = routePathnames.length - 1;\n\n if (toPathname.startsWith(\"..\")) {\n let toSegments = toPathname.split(\"/\"); // Each leading .. segment means \"go up one route\" instead of \"go up one\n // URL segment\". This is a key difference from how works and a\n // major reason we call this a \"to\" value instead of a \"href\".\n\n while (toSegments[0] === \"..\") {\n toSegments.shift();\n routePathnameIndex -= 1;\n }\n\n to.pathname = toSegments.join(\"/\");\n } // If there are more \"..\" segments than parent routes, resolve relative to\n // the root / URL.\n\n\n from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : \"/\";\n }\n\n let path = resolvePath(to, from); // Ensure the pathname has a trailing slash if the original \"to\" had one\n\n let hasExplicitTrailingSlash = toPathname && toPathname !== \"/\" && toPathname.endsWith(\"/\"); // Or if this was a link to the current path which has a trailing slash\n\n let hasCurrentTrailingSlash = (isEmptyPath || toPathname === \".\") && locationPathname.endsWith(\"/\");\n\n if (!path.pathname.endsWith(\"/\") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {\n path.pathname += \"/\";\n }\n\n return path;\n}\n/**\n * @private\n */\n\nfunction getToPathname(to) {\n // Empty strings should be treated the same as / paths\n return to === \"\" || to.pathname === \"\" ? \"/\" : typeof to === \"string\" ? parsePath(to).pathname : to.pathname;\n}\n/**\n * @private\n */\n\nconst joinPaths = paths => paths.join(\"/\").replace(/\\/\\/+/g, \"/\");\n/**\n * @private\n */\n\nconst normalizePathname = pathname => pathname.replace(/\\/+$/, \"\").replace(/^\\/*/, \"/\");\n/**\n * @private\n */\n\nconst normalizeSearch = search => !search || search === \"?\" ? \"\" : search.startsWith(\"?\") ? search : \"?\" + search;\n/**\n * @private\n */\n\nconst normalizeHash = hash => !hash || hash === \"#\" ? \"\" : hash.startsWith(\"#\") ? hash : \"#\" + hash;\n/**\n * This is a shortcut for creating `application/json` responses. Converts `data`\n * to JSON and sets the `Content-Type` header.\n */\n\nconst json = function json(data, init) {\n if (init === void 0) {\n init = {};\n }\n\n let responseInit = typeof init === \"number\" ? {\n status: init\n } : init;\n let headers = new Headers(responseInit.headers);\n\n if (!headers.has(\"Content-Type\")) {\n headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n }\n\n return new Response(JSON.stringify(data), _extends({}, responseInit, {\n headers\n }));\n};\nclass AbortedDeferredError extends Error {}\nclass DeferredData {\n constructor(data) {\n this.pendingKeys = new Set();\n this.subscriber = undefined;\n invariant(data && typeof data === \"object\" && !Array.isArray(data), \"defer() only accepts plain objects\"); // Set up an AbortController + Promise we can race against to exit early\n // cancellation\n\n let reject;\n this.abortPromise = new Promise((_, r) => reject = r);\n this.controller = new AbortController();\n\n let onAbort = () => reject(new AbortedDeferredError(\"Deferred data aborted\"));\n\n this.unlistenAbortSignal = () => this.controller.signal.removeEventListener(\"abort\", onAbort);\n\n this.controller.signal.addEventListener(\"abort\", onAbort);\n this.data = Object.entries(data).reduce((acc, _ref) => {\n let [key, value] = _ref;\n return Object.assign(acc, {\n [key]: this.trackPromise(key, value)\n });\n }, {});\n }\n\n trackPromise(key, value) {\n if (!(value instanceof Promise)) {\n return value;\n }\n\n this.pendingKeys.add(key); // We store a little wrapper promise that will be extended with\n // _data/_error props upon resolve/reject\n\n let promise = Promise.race([value, this.abortPromise]).then(data => this.onSettle(promise, key, null, data), error => this.onSettle(promise, key, error)); // Register rejection listeners to avoid uncaught promise rejections on\n // errors or aborted deferred values\n\n promise.catch(() => {});\n Object.defineProperty(promise, \"_tracked\", {\n get: () => true\n });\n return promise;\n }\n\n onSettle(promise, key, error, data) {\n if (this.controller.signal.aborted && error instanceof AbortedDeferredError) {\n this.unlistenAbortSignal();\n Object.defineProperty(promise, \"_error\", {\n get: () => error\n });\n return Promise.reject(error);\n }\n\n this.pendingKeys.delete(key);\n\n if (this.done) {\n // Nothing left to abort!\n this.unlistenAbortSignal();\n }\n\n const subscriber = this.subscriber;\n\n if (error) {\n Object.defineProperty(promise, \"_error\", {\n get: () => error\n });\n subscriber && subscriber(false);\n return Promise.reject(error);\n }\n\n Object.defineProperty(promise, \"_data\", {\n get: () => data\n });\n subscriber && subscriber(false);\n return data;\n }\n\n subscribe(fn) {\n this.subscriber = fn;\n }\n\n cancel() {\n this.controller.abort();\n this.pendingKeys.forEach((v, k) => this.pendingKeys.delete(k));\n let subscriber = this.subscriber;\n subscriber && subscriber(true);\n }\n\n async resolveData(signal) {\n let aborted = false;\n\n if (!this.done) {\n let onAbort = () => this.cancel();\n\n signal.addEventListener(\"abort\", onAbort);\n aborted = await new Promise(resolve => {\n this.subscribe(aborted => {\n signal.removeEventListener(\"abort\", onAbort);\n\n if (aborted || this.done) {\n resolve(aborted);\n }\n });\n });\n }\n\n return aborted;\n }\n\n get done() {\n return this.pendingKeys.size === 0;\n }\n\n get unwrappedData() {\n invariant(this.data !== null && this.done, \"Can only unwrap data on initialized and settled deferreds\");\n return Object.entries(this.data).reduce((acc, _ref2) => {\n let [key, value] = _ref2;\n return Object.assign(acc, {\n [key]: unwrapTrackedPromise(value)\n });\n }, {});\n }\n\n}\n\nfunction isTrackedPromise(value) {\n return value instanceof Promise && value._tracked === true;\n}\n\nfunction unwrapTrackedPromise(value) {\n if (!isTrackedPromise(value)) {\n return value;\n }\n\n if (value._error) {\n throw value._error;\n }\n\n return value._data;\n}\n\nfunction defer(data) {\n return new DeferredData(data);\n}\n/**\n * A redirect response. Sets the status code and the `Location` header.\n * Defaults to \"302 Found\".\n */\n\nconst redirect = function redirect(url, init) {\n if (init === void 0) {\n init = 302;\n }\n\n let responseInit = init;\n\n if (typeof responseInit === \"number\") {\n responseInit = {\n status: responseInit\n };\n } else if (typeof responseInit.status === \"undefined\") {\n responseInit.status = 302;\n }\n\n let headers = new Headers(responseInit.headers);\n headers.set(\"Location\", url);\n return new Response(null, _extends({}, responseInit, {\n headers\n }));\n};\n/**\n * @private\n * Utility class we use to hold auto-unwrapped 4xx/5xx Response bodies\n */\n\nclass ErrorResponse {\n constructor(status, statusText, data, internal) {\n if (internal === void 0) {\n internal = false;\n }\n\n this.status = status;\n this.statusText = statusText || \"\";\n this.internal = internal;\n\n if (data instanceof Error) {\n this.data = data.toString();\n this.error = data;\n } else {\n this.data = data;\n }\n }\n\n}\n/**\n * Check if the given error is an ErrorResponse generated from a 4xx/5xx\n * Response throw from an action/loader\n */\n\nfunction isRouteErrorResponse(e) {\n return e instanceof ErrorResponse;\n}\n\nconst validMutationMethodsArr = [\"post\", \"put\", \"patch\", \"delete\"];\nconst validMutationMethods = new Set(validMutationMethodsArr);\nconst validRequestMethodsArr = [\"get\", ...validMutationMethodsArr];\nconst validRequestMethods = new Set(validRequestMethodsArr);\nconst redirectStatusCodes = new Set([301, 302, 303, 307, 308]);\nconst redirectPreserveMethodStatusCodes = new Set([307, 308]);\nconst IDLE_NAVIGATION = {\n state: \"idle\",\n location: undefined,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined\n};\nconst IDLE_FETCHER = {\n state: \"idle\",\n data: undefined,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined\n};\nconst isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\" && typeof window.document.createElement !== \"undefined\";\nconst isServer = !isBrowser; //#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region createRouter\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Create a router and listen to history POP navigations\n */\n\nfunction createRouter(init) {\n invariant(init.routes.length > 0, \"You must provide a non-empty routes array to createRouter\");\n let dataRoutes = convertRoutesToDataRoutes(init.routes); // Cleanup function for history\n\n let unlistenHistory = null; // Externally-provided functions to call on all state changes\n\n let subscribers = new Set(); // Externally-provided object to hold scroll restoration locations during routing\n\n let savedScrollPositions = null; // Externally-provided function to get scroll restoration keys\n\n let getScrollRestorationKey = null; // Externally-provided function to get current scroll position\n\n let getScrollPosition = null; // One-time flag to control the initial hydration scroll restoration. Because\n // we don't get the saved positions from until _after_\n // the initial render, we need to manually trigger a separate updateState to\n // send along the restoreScrollPosition\n\n let initialScrollRestored = false;\n let initialMatches = matchRoutes(dataRoutes, init.history.location, init.basename);\n let initialErrors = null;\n\n if (initialMatches == null) {\n // If we do not match a user-provided-route, fall back to the root\n // to allow the error boundary to take over\n let error = getInternalRouterError(404, {\n pathname: init.history.location.pathname\n });\n let {\n matches,\n route\n } = getShortCircuitMatches(dataRoutes);\n initialMatches = matches;\n initialErrors = {\n [route.id]: error\n };\n }\n\n let initialized = !initialMatches.some(m => m.route.loader) || init.hydrationData != null;\n let router;\n let state = {\n historyAction: init.history.action,\n location: init.history.location,\n matches: initialMatches,\n initialized,\n navigation: IDLE_NAVIGATION,\n restoreScrollPosition: null,\n preventScrollReset: false,\n revalidation: \"idle\",\n loaderData: init.hydrationData && init.hydrationData.loaderData || {},\n actionData: init.hydrationData && init.hydrationData.actionData || null,\n errors: init.hydrationData && init.hydrationData.errors || initialErrors,\n fetchers: new Map()\n }; // -- Stateful internal variables to manage navigations --\n // Current navigation in progress (to be committed in completeNavigation)\n\n let pendingAction = Action.Pop; // Should the current navigation prevent the scroll reset if scroll cannot\n // be restored?\n\n let pendingPreventScrollReset = false; // AbortController for the active navigation\n\n let pendingNavigationController; // We use this to avoid touching history in completeNavigation if a\n // revalidation is entirely uninterrupted\n\n let isUninterruptedRevalidation = false; // Use this internal flag to force revalidation of all loaders:\n // - submissions (completed or interrupted)\n // - useRevalidate()\n // - X-Remix-Revalidate (from redirect)\n\n let isRevalidationRequired = false; // Use this internal array to capture routes that require revalidation due\n // to a cancelled deferred on action submission\n\n let cancelledDeferredRoutes = []; // Use this internal array to capture fetcher loads that were cancelled by an\n // action navigation and require revalidation\n\n let cancelledFetcherLoads = []; // AbortControllers for any in-flight fetchers\n\n let fetchControllers = new Map(); // Track loads based on the order in which they started\n\n let incrementingLoadId = 0; // Track the outstanding pending navigation data load to be compared against\n // the globally incrementing load when a fetcher load lands after a completed\n // navigation\n\n let pendingNavigationLoadId = -1; // Fetchers that triggered data reloads as a result of their actions\n\n let fetchReloadIds = new Map(); // Fetchers that triggered redirect navigations from their actions\n\n let fetchRedirectIds = new Set(); // Most recent href/match for fetcher.load calls for fetchers\n\n let fetchLoadMatches = new Map(); // Store DeferredData instances for active route matches. When a\n // route loader returns defer() we stick one in here. Then, when a nested\n // promise resolves we update loaderData. If a new navigation starts we\n // cancel active deferreds for eliminated routes.\n\n let activeDeferreds = new Map(); // Initialize the router, all side effects should be kicked off from here.\n // Implemented as a Fluent API for ease of:\n // let router = createRouter(init).initialize();\n\n function initialize() {\n // If history informs us of a POP navigation, start the navigation but do not update\n // state. We'll update our own state once the navigation completes\n unlistenHistory = init.history.listen(_ref => {\n let {\n action: historyAction,\n location\n } = _ref;\n return startNavigation(historyAction, location);\n }); // Kick off initial data load if needed. Use Pop to avoid modifying history\n\n if (!state.initialized) {\n startNavigation(Action.Pop, state.location);\n }\n\n return router;\n } // Clean up a router and it's side effects\n\n\n function dispose() {\n if (unlistenHistory) {\n unlistenHistory();\n }\n\n subscribers.clear();\n pendingNavigationController && pendingNavigationController.abort();\n state.fetchers.forEach((_, key) => deleteFetcher(key));\n } // Subscribe to state updates for the router\n\n\n function subscribe(fn) {\n subscribers.add(fn);\n return () => subscribers.delete(fn);\n } // Update our state and notify the calling context of the change\n\n\n function updateState(newState) {\n state = _extends({}, state, newState);\n subscribers.forEach(subscriber => subscriber(state));\n } // Complete a navigation returning the state.navigation back to the IDLE_NAVIGATION\n // and setting state.[historyAction/location/matches] to the new route.\n // - Location is a required param\n // - Navigation will always be set to IDLE_NAVIGATION\n // - Can pass any other state in newState\n\n\n function completeNavigation(location, newState) {\n var _state$navigation$for;\n\n // Deduce if we're in a loading/actionReload state:\n // - We have committed actionData in the store\n // - The current navigation was a submission\n // - We're past the submitting state and into the loading state\n // - The location we've finished loading is different from the submission\n // location, indicating we redirected from the action (avoids false\n // positives for loading/submissionRedirect when actionData returned\n // on a prior submission)\n let isActionReload = state.actionData != null && state.navigation.formMethod != null && state.navigation.state === \"loading\" && ((_state$navigation$for = state.navigation.formAction) == null ? void 0 : _state$navigation$for.split(\"?\")[0]) === location.pathname; // Always preserve any existing loaderData from re-used routes\n\n let newLoaderData = newState.loaderData ? {\n loaderData: mergeLoaderData(state.loaderData, newState.loaderData, newState.matches || [])\n } : {};\n updateState(_extends({}, isActionReload ? {} : {\n actionData: null\n }, newState, newLoaderData, {\n historyAction: pendingAction,\n location,\n initialized: true,\n navigation: IDLE_NAVIGATION,\n revalidation: \"idle\",\n // Don't restore on submission navigations\n restoreScrollPosition: state.navigation.formData ? false : getSavedScrollPosition(location, newState.matches || state.matches),\n preventScrollReset: pendingPreventScrollReset\n }));\n\n if (isUninterruptedRevalidation) ; else if (pendingAction === Action.Pop) ; else if (pendingAction === Action.Push) {\n init.history.push(location, location.state);\n } else if (pendingAction === Action.Replace) {\n init.history.replace(location, location.state);\n } // Reset stateful navigation vars\n\n\n pendingAction = Action.Pop;\n pendingPreventScrollReset = false;\n isUninterruptedRevalidation = false;\n isRevalidationRequired = false;\n cancelledDeferredRoutes = [];\n cancelledFetcherLoads = [];\n } // Trigger a navigation event, which can either be a numerical POP or a PUSH\n // replace with an optional submission\n\n\n async function navigate(to, opts) {\n if (typeof to === \"number\") {\n init.history.go(to);\n return;\n }\n\n let {\n path,\n submission,\n error\n } = normalizeNavigateOptions(to, opts);\n let location = createLocation(state.location, path, opts && opts.state); // When using navigate as a PUSH/REPLACE we aren't reading an already-encoded\n // URL from window.location, so we need to encode it here so the behavior\n // remains the same as POP and non-data-router usages. new URL() does all\n // the same encoding we'd get from a history.pushState/window.location read\n // without having to touch history\n\n location = _extends({}, location, init.history.encodeLocation(location));\n let historyAction = (opts && opts.replace) === true || submission != null && isMutationMethod(submission.formMethod) ? Action.Replace : Action.Push;\n let preventScrollReset = opts && \"preventScrollReset\" in opts ? opts.preventScrollReset === true : undefined;\n return await startNavigation(historyAction, location, {\n submission,\n // Send through the formData serialization error if we have one so we can\n // render at the right error boundary after we match routes\n pendingError: error,\n preventScrollReset,\n replace: opts && opts.replace\n });\n } // Revalidate all current loaders. If a navigation is in progress or if this\n // is interrupted by a navigation, allow this to \"succeed\" by calling all\n // loaders during the next loader round\n\n\n function revalidate() {\n interruptActiveLoads();\n updateState({\n revalidation: \"loading\"\n }); // If we're currently submitting an action, we don't need to start a new\n // navigation, we'll just let the follow up loader execution call all loaders\n\n if (state.navigation.state === \"submitting\") {\n return;\n } // If we're currently in an idle state, start a new navigation for the current\n // action/location and mark it as uninterrupted, which will skip the history\n // update in completeNavigation\n\n\n if (state.navigation.state === \"idle\") {\n startNavigation(state.historyAction, state.location, {\n startUninterruptedRevalidation: true\n });\n return;\n } // Otherwise, if we're currently in a loading state, just start a new\n // navigation to the navigation.location but do not trigger an uninterrupted\n // revalidation so that history correctly updates once the navigation completes\n\n\n startNavigation(pendingAction || state.historyAction, state.navigation.location, {\n overrideNavigation: state.navigation\n });\n } // Start a navigation to the given action/location. Can optionally provide a\n // overrideNavigation which will override the normalLoad in the case of a redirect\n // navigation\n\n\n async function startNavigation(historyAction, location, opts) {\n // Abort any in-progress navigations and start a new one. Unset any ongoing\n // uninterrupted revalidations unless told otherwise, since we want this\n // new navigation to update history normally\n pendingNavigationController && pendingNavigationController.abort();\n pendingNavigationController = null;\n pendingAction = historyAction;\n isUninterruptedRevalidation = (opts && opts.startUninterruptedRevalidation) === true; // Save the current scroll position every time we start a new navigation,\n // and track whether we should reset scroll on completion\n\n saveScrollPosition(state.location, state.matches);\n pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;\n let loadingNavigation = opts && opts.overrideNavigation;\n let matches = matchRoutes(dataRoutes, location, init.basename); // Short circuit with a 404 on the root error boundary if we match nothing\n\n if (!matches) {\n let error = getInternalRouterError(404, {\n pathname: location.pathname\n });\n let {\n matches: notFoundMatches,\n route\n } = getShortCircuitMatches(dataRoutes); // Cancel all pending deferred on 404s since we don't keep any routes\n\n cancelActiveDeferreds();\n completeNavigation(location, {\n matches: notFoundMatches,\n loaderData: {},\n errors: {\n [route.id]: error\n }\n });\n return;\n } // Short circuit if it's only a hash change\n\n\n if (isHashChangeOnly(state.location, location)) {\n completeNavigation(location, {\n matches\n });\n return;\n } // Create a controller/Request for this navigation\n\n\n pendingNavigationController = new AbortController();\n let request = createClientSideRequest(location, pendingNavigationController.signal, opts && opts.submission);\n let pendingActionData;\n let pendingError;\n\n if (opts && opts.pendingError) {\n // If we have a pendingError, it means the user attempted a GET submission\n // with binary FormData so assign here and skip to handleLoaders. That\n // way we handle calling loaders above the boundary etc. It's not really\n // different from an actionError in that sense.\n pendingError = {\n [findNearestBoundary(matches).route.id]: opts.pendingError\n };\n } else if (opts && opts.submission && isMutationMethod(opts.submission.formMethod)) {\n // Call action if we received an action submission\n let actionOutput = await handleAction(request, location, opts.submission, matches, {\n replace: opts.replace\n });\n\n if (actionOutput.shortCircuited) {\n return;\n }\n\n pendingActionData = actionOutput.pendingActionData;\n pendingError = actionOutput.pendingActionError;\n\n let navigation = _extends({\n state: \"loading\",\n location\n }, opts.submission);\n\n loadingNavigation = navigation; // Create a GET request for the loaders\n\n request = new Request(request.url, {\n signal: request.signal\n });\n } // Call loaders\n\n\n let {\n shortCircuited,\n loaderData,\n errors\n } = await handleLoaders(request, location, matches, loadingNavigation, opts && opts.submission, opts && opts.replace, pendingActionData, pendingError);\n\n if (shortCircuited) {\n return;\n } // Clean up now that the action/loaders have completed. Don't clean up if\n // we short circuited because pendingNavigationController will have already\n // been assigned to a new controller for the next navigation\n\n\n pendingNavigationController = null;\n completeNavigation(location, {\n matches,\n loaderData,\n errors\n });\n } // Call the action matched by the leaf route for this navigation and handle\n // redirects/errors\n\n\n async function handleAction(request, location, submission, matches, opts) {\n interruptActiveLoads(); // Put us in a submitting state\n\n let navigation = _extends({\n state: \"submitting\",\n location\n }, submission);\n\n updateState({\n navigation\n }); // Call our action and get the result\n\n let result;\n let actionMatch = getTargetMatch(matches, location);\n\n if (!actionMatch.route.action) {\n result = {\n type: ResultType.error,\n error: getInternalRouterError(405, {\n method: request.method,\n pathname: location.pathname,\n routeId: actionMatch.route.id\n })\n };\n } else {\n result = await callLoaderOrAction(\"action\", request, actionMatch, matches, router.basename);\n\n if (request.signal.aborted) {\n return {\n shortCircuited: true\n };\n }\n }\n\n if (isRedirectResult(result)) {\n await startRedirectNavigation(state, result, opts && opts.replace === true);\n return {\n shortCircuited: true\n };\n }\n\n if (isErrorResult(result)) {\n // Store off the pending error - we use it to determine which loaders\n // to call and will commit it when we complete the navigation\n let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id); // By default, all submissions are REPLACE navigations, but if the\n // action threw an error that'll be rendered in an errorElement, we fall\n // back to PUSH so that the user can use the back button to get back to\n // the pre-submission form location to try again\n\n if ((opts && opts.replace) !== true) {\n pendingAction = Action.Push;\n }\n\n return {\n pendingActionError: {\n [boundaryMatch.route.id]: result.error\n }\n };\n }\n\n if (isDeferredResult(result)) {\n throw new Error(\"defer() is not supported in actions\");\n }\n\n return {\n pendingActionData: {\n [actionMatch.route.id]: result.data\n }\n };\n } // Call all applicable loaders for the given matches, handling redirects,\n // errors, etc.\n\n\n async function handleLoaders(request, location, matches, overrideNavigation, submission, replace, pendingActionData, pendingError) {\n // Figure out the right navigation we want to use for data loading\n let loadingNavigation = overrideNavigation;\n\n if (!loadingNavigation) {\n let navigation = _extends({\n state: \"loading\",\n location,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined\n }, submission);\n\n loadingNavigation = navigation;\n }\n\n let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(state, matches, submission, location, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, pendingActionData, pendingError, fetchLoadMatches); // Cancel pending deferreds for no-longer-matched routes or routes we're\n // about to reload. Note that if this is an action reload we would have\n // already cancelled all pending deferreds so this would be a no-op\n\n cancelActiveDeferreds(routeId => !(matches && matches.some(m => m.route.id === routeId)) || matchesToLoad && matchesToLoad.some(m => m.route.id === routeId)); // Short circuit if we have no loaders to run\n\n if (matchesToLoad.length === 0 && revalidatingFetchers.length === 0) {\n completeNavigation(location, {\n matches,\n loaderData: mergeLoaderData(state.loaderData, {}, matches),\n // Commit pending error if we're short circuiting\n errors: pendingError || null,\n actionData: pendingActionData || null\n });\n return {\n shortCircuited: true\n };\n } // If this is an uninterrupted revalidation, we remain in our current idle\n // state. If not, we need to switch to our loading state and load data,\n // preserving any new action data or existing action data (in the case of\n // a revalidation interrupting an actionReload)\n\n\n if (!isUninterruptedRevalidation) {\n revalidatingFetchers.forEach(_ref2 => {\n let [key] = _ref2;\n let fetcher = state.fetchers.get(key);\n let revalidatingFetcher = {\n state: \"loading\",\n data: fetcher && fetcher.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined\n };\n state.fetchers.set(key, revalidatingFetcher);\n });\n updateState(_extends({\n navigation: loadingNavigation,\n actionData: pendingActionData || state.actionData || null\n }, revalidatingFetchers.length > 0 ? {\n fetchers: new Map(state.fetchers)\n } : {}));\n }\n\n pendingNavigationLoadId = ++incrementingLoadId;\n revalidatingFetchers.forEach(_ref3 => {\n let [key] = _ref3;\n return fetchControllers.set(key, pendingNavigationController);\n });\n let {\n results,\n loaderResults,\n fetcherResults\n } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, request);\n\n if (request.signal.aborted) {\n return {\n shortCircuited: true\n };\n } // Clean up _after_ loaders have completed. Don't clean up if we short\n // circuited because fetchControllers would have been aborted and\n // reassigned to new controllers for the next navigation\n\n\n revalidatingFetchers.forEach(_ref4 => {\n let [key] = _ref4;\n return fetchControllers.delete(key);\n }); // If any loaders returned a redirect Response, start a new REPLACE navigation\n\n let redirect = findRedirect(results);\n\n if (redirect) {\n await startRedirectNavigation(state, redirect, replace);\n return {\n shortCircuited: true\n };\n } // Process and commit output from loaders\n\n\n let {\n loaderData,\n errors\n } = processLoaderData(state, matches, matchesToLoad, loaderResults, pendingError, revalidatingFetchers, fetcherResults, activeDeferreds); // Wire up subscribers to update loaderData as promises settle\n\n activeDeferreds.forEach((deferredData, routeId) => {\n deferredData.subscribe(aborted => {\n // Note: No need to updateState here since the TrackedPromise on\n // loaderData is stable across resolve/reject\n // Remove this instance if we were aborted or if promises have settled\n if (aborted || deferredData.done) {\n activeDeferreds.delete(routeId);\n }\n });\n });\n markFetchRedirectsDone();\n let didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId);\n return _extends({\n loaderData,\n errors\n }, didAbortFetchLoads || revalidatingFetchers.length > 0 ? {\n fetchers: new Map(state.fetchers)\n } : {});\n }\n\n function getFetcher(key) {\n return state.fetchers.get(key) || IDLE_FETCHER;\n } // Trigger a fetcher load/submit for the given fetcher key\n\n\n function fetch(key, routeId, href, opts) {\n if (isServer) {\n throw new Error(\"router.fetch() was called during the server render, but it shouldn't be. \" + \"You are likely calling a useFetcher() method in the body of your component. \" + \"Try moving it to a useEffect or a callback.\");\n }\n\n if (fetchControllers.has(key)) abortFetcher(key);\n let matches = matchRoutes(dataRoutes, href, init.basename);\n\n if (!matches) {\n setFetcherError(key, routeId, getInternalRouterError(404, {\n pathname: href\n }));\n return;\n }\n\n let {\n path,\n submission\n } = normalizeNavigateOptions(href, opts, true);\n let match = getTargetMatch(matches, path);\n\n if (submission && isMutationMethod(submission.formMethod)) {\n handleFetcherAction(key, routeId, path, match, matches, submission);\n return;\n } // Store off the match so we can call it's shouldRevalidate on subsequent\n // revalidations\n\n\n fetchLoadMatches.set(key, [path, match, matches]);\n handleFetcherLoader(key, routeId, path, match, matches, submission);\n } // Call the action for the matched fetcher.submit(), and then handle redirects,\n // errors, and revalidation\n\n\n async function handleFetcherAction(key, routeId, path, match, requestMatches, submission) {\n interruptActiveLoads();\n fetchLoadMatches.delete(key);\n\n if (!match.route.action) {\n let error = getInternalRouterError(405, {\n method: submission.formMethod,\n pathname: path,\n routeId: routeId\n });\n setFetcherError(key, routeId, error);\n return;\n } // Put this fetcher into it's submitting state\n\n\n let existingFetcher = state.fetchers.get(key);\n\n let fetcher = _extends({\n state: \"submitting\"\n }, submission, {\n data: existingFetcher && existingFetcher.data\n });\n\n state.fetchers.set(key, fetcher);\n updateState({\n fetchers: new Map(state.fetchers)\n }); // Call the action for the fetcher\n\n let abortController = new AbortController();\n let fetchRequest = createClientSideRequest(path, abortController.signal, submission);\n fetchControllers.set(key, abortController);\n let actionResult = await callLoaderOrAction(\"action\", fetchRequest, match, requestMatches, router.basename);\n\n if (fetchRequest.signal.aborted) {\n // We can delete this so long as we weren't aborted by ou our own fetcher\n // re-submit which would have put _new_ controller is in fetchControllers\n if (fetchControllers.get(key) === abortController) {\n fetchControllers.delete(key);\n }\n\n return;\n }\n\n if (isRedirectResult(actionResult)) {\n fetchControllers.delete(key);\n fetchRedirectIds.add(key);\n\n let loadingFetcher = _extends({\n state: \"loading\"\n }, submission, {\n data: undefined\n });\n\n state.fetchers.set(key, loadingFetcher);\n updateState({\n fetchers: new Map(state.fetchers)\n });\n return startRedirectNavigation(state, actionResult);\n } // Process any non-redirect errors thrown\n\n\n if (isErrorResult(actionResult)) {\n setFetcherError(key, routeId, actionResult.error);\n return;\n }\n\n if (isDeferredResult(actionResult)) {\n invariant(false, \"defer() is not supported in actions\");\n } // Start the data load for current matches, or the next location if we're\n // in the middle of a navigation\n\n\n let nextLocation = state.navigation.location || state.location;\n let revalidationRequest = createClientSideRequest(nextLocation, abortController.signal);\n let matches = state.navigation.state !== \"idle\" ? matchRoutes(dataRoutes, state.navigation.location, init.basename) : state.matches;\n invariant(matches, \"Didn't find any matches after fetcher action\");\n let loadId = ++incrementingLoadId;\n fetchReloadIds.set(key, loadId);\n\n let loadFetcher = _extends({\n state: \"loading\",\n data: actionResult.data\n }, submission);\n\n state.fetchers.set(key, loadFetcher);\n let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(state, matches, submission, nextLocation, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, {\n [match.route.id]: actionResult.data\n }, undefined, // No need to send through errors since we short circuit above\n fetchLoadMatches); // Put all revalidating fetchers into the loading state, except for the\n // current fetcher which we want to keep in it's current loading state which\n // contains it's action submission info + action data\n\n revalidatingFetchers.filter(_ref5 => {\n let [staleKey] = _ref5;\n return staleKey !== key;\n }).forEach(_ref6 => {\n let [staleKey] = _ref6;\n let existingFetcher = state.fetchers.get(staleKey);\n let revalidatingFetcher = {\n state: \"loading\",\n data: existingFetcher && existingFetcher.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined\n };\n state.fetchers.set(staleKey, revalidatingFetcher);\n fetchControllers.set(staleKey, abortController);\n });\n updateState({\n fetchers: new Map(state.fetchers)\n });\n let {\n results,\n loaderResults,\n fetcherResults\n } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, revalidationRequest);\n\n if (abortController.signal.aborted) {\n return;\n }\n\n fetchReloadIds.delete(key);\n fetchControllers.delete(key);\n revalidatingFetchers.forEach(_ref7 => {\n let [staleKey] = _ref7;\n return fetchControllers.delete(staleKey);\n });\n let redirect = findRedirect(results);\n\n if (redirect) {\n return startRedirectNavigation(state, redirect);\n } // Process and commit output from loaders\n\n\n let {\n loaderData,\n errors\n } = processLoaderData(state, state.matches, matchesToLoad, loaderResults, undefined, revalidatingFetchers, fetcherResults, activeDeferreds);\n let doneFetcher = {\n state: \"idle\",\n data: actionResult.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined\n };\n state.fetchers.set(key, doneFetcher);\n let didAbortFetchLoads = abortStaleFetchLoads(loadId); // If we are currently in a navigation loading state and this fetcher is\n // more recent than the navigation, we want the newer data so abort the\n // navigation and complete it with the fetcher data\n\n if (state.navigation.state === \"loading\" && loadId > pendingNavigationLoadId) {\n invariant(pendingAction, \"Expected pending action\");\n pendingNavigationController && pendingNavigationController.abort();\n completeNavigation(state.navigation.location, {\n matches,\n loaderData,\n errors,\n fetchers: new Map(state.fetchers)\n });\n } else {\n // otherwise just update with the fetcher data, preserving any existing\n // loaderData for loaders that did not need to reload. We have to\n // manually merge here since we aren't going through completeNavigation\n updateState(_extends({\n errors,\n loaderData: mergeLoaderData(state.loaderData, loaderData, matches)\n }, didAbortFetchLoads ? {\n fetchers: new Map(state.fetchers)\n } : {}));\n isRevalidationRequired = false;\n }\n } // Call the matched loader for fetcher.load(), handling redirects, errors, etc.\n\n\n async function handleFetcherLoader(key, routeId, path, match, matches, submission) {\n let existingFetcher = state.fetchers.get(key); // Put this fetcher into it's loading state\n\n let loadingFetcher = _extends({\n state: \"loading\",\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined\n }, submission, {\n data: existingFetcher && existingFetcher.data\n });\n\n state.fetchers.set(key, loadingFetcher);\n updateState({\n fetchers: new Map(state.fetchers)\n }); // Call the loader for this fetcher route match\n\n let abortController = new AbortController();\n let fetchRequest = createClientSideRequest(path, abortController.signal);\n fetchControllers.set(key, abortController);\n let result = await callLoaderOrAction(\"loader\", fetchRequest, match, matches, router.basename); // Deferred isn't supported or fetcher loads, await everything and treat it\n // as a normal load. resolveDeferredData will return undefined if this\n // fetcher gets aborted, so we just leave result untouched and short circuit\n // below if that happens\n\n if (isDeferredResult(result)) {\n result = (await resolveDeferredData(result, fetchRequest.signal, true)) || result;\n } // We can delete this so long as we weren't aborted by ou our own fetcher\n // re-load which would have put _new_ controller is in fetchControllers\n\n\n if (fetchControllers.get(key) === abortController) {\n fetchControllers.delete(key);\n }\n\n if (fetchRequest.signal.aborted) {\n return;\n } // If the loader threw a redirect Response, start a new REPLACE navigation\n\n\n if (isRedirectResult(result)) {\n await startRedirectNavigation(state, result);\n return;\n } // Process any non-redirect errors thrown\n\n\n if (isErrorResult(result)) {\n let boundaryMatch = findNearestBoundary(state.matches, routeId);\n state.fetchers.delete(key); // TODO: In remix, this would reset to IDLE_NAVIGATION if it was a catch -\n // do we need to behave any differently with our non-redirect errors?\n // What if it was a non-redirect Response?\n\n updateState({\n fetchers: new Map(state.fetchers),\n errors: {\n [boundaryMatch.route.id]: result.error\n }\n });\n return;\n }\n\n invariant(!isDeferredResult(result), \"Unhandled fetcher deferred data\"); // Put the fetcher back into an idle state\n\n let doneFetcher = {\n state: \"idle\",\n data: result.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined\n };\n state.fetchers.set(key, doneFetcher);\n updateState({\n fetchers: new Map(state.fetchers)\n });\n }\n /**\n * Utility function to handle redirects returned from an action or loader.\n * Normally, a redirect \"replaces\" the navigation that triggered it. So, for\n * example:\n *\n * - user is on /a\n * - user clicks a link to /b\n * - loader for /b redirects to /c\n *\n * In a non-JS app the browser would track the in-flight navigation to /b and\n * then replace it with /c when it encountered the redirect response. In\n * the end it would only ever update the URL bar with /c.\n *\n * In client-side routing using pushState/replaceState, we aim to emulate\n * this behavior and we also do not update history until the end of the\n * navigation (including processed redirects). This means that we never\n * actually touch history until we've processed redirects, so we just use\n * the history action from the original navigation (PUSH or REPLACE).\n */\n\n\n async function startRedirectNavigation(state, redirect, replace) {\n var _window;\n\n if (redirect.revalidate) {\n isRevalidationRequired = true;\n }\n\n let redirectLocation = createLocation(state.location, redirect.location);\n invariant(redirectLocation, \"Expected a location on the redirect navigation\"); // Check if this an external redirect that goes to a new origin\n\n if (typeof ((_window = window) == null ? void 0 : _window.location) !== \"undefined\") {\n let newOrigin = createClientSideURL(redirect.location).origin;\n\n if (window.location.origin !== newOrigin) {\n if (replace) {\n window.location.replace(redirect.location);\n } else {\n window.location.assign(redirect.location);\n }\n\n return;\n }\n } // There's no need to abort on redirects, since we don't detect the\n // redirect until the action/loaders have settled\n\n\n pendingNavigationController = null;\n let redirectHistoryAction = replace === true ? Action.Replace : Action.Push;\n let {\n formMethod,\n formAction,\n formEncType,\n formData\n } = state.navigation; // If this was a 307/308 submission we want to preserve the HTTP method and\n // re-submit the GET/POST/PUT/PATCH/DELETE as a submission navigation to the\n // redirected location\n\n if (redirectPreserveMethodStatusCodes.has(redirect.status) && formMethod && isMutationMethod(formMethod) && formEncType && formData) {\n await startNavigation(redirectHistoryAction, redirectLocation, {\n submission: {\n formMethod,\n formAction: redirect.location,\n formEncType,\n formData\n }\n });\n } else {\n // Otherwise, we kick off a new loading navigation, preserving the\n // submission info for the duration of this navigation\n await startNavigation(redirectHistoryAction, redirectLocation, {\n overrideNavigation: {\n state: \"loading\",\n location: redirectLocation,\n formMethod: formMethod || undefined,\n formAction: formAction || undefined,\n formEncType: formEncType || undefined,\n formData: formData || undefined\n }\n });\n }\n }\n\n async function callLoadersAndMaybeResolveData(currentMatches, matches, matchesToLoad, fetchersToLoad, request) {\n // Call all navigation loaders and revalidating fetcher loaders in parallel,\n // then slice off the results into separate arrays so we can handle them\n // accordingly\n let results = await Promise.all([...matchesToLoad.map(match => callLoaderOrAction(\"loader\", request, match, matches, router.basename)), ...fetchersToLoad.map(_ref8 => {\n let [, href, match, fetchMatches] = _ref8;\n return callLoaderOrAction(\"loader\", createClientSideRequest(href, request.signal), match, fetchMatches, router.basename);\n })]);\n let loaderResults = results.slice(0, matchesToLoad.length);\n let fetcherResults = results.slice(matchesToLoad.length);\n await Promise.all([resolveDeferredResults(currentMatches, matchesToLoad, loaderResults, request.signal, false, state.loaderData), resolveDeferredResults(currentMatches, fetchersToLoad.map(_ref9 => {\n let [,, match] = _ref9;\n return match;\n }), fetcherResults, request.signal, true)]);\n return {\n results,\n loaderResults,\n fetcherResults\n };\n }\n\n function interruptActiveLoads() {\n // Every interruption triggers a revalidation\n isRevalidationRequired = true; // Cancel pending route-level deferreds and mark cancelled routes for\n // revalidation\n\n cancelledDeferredRoutes.push(...cancelActiveDeferreds()); // Abort in-flight fetcher loads\n\n fetchLoadMatches.forEach((_, key) => {\n if (fetchControllers.has(key)) {\n cancelledFetcherLoads.push(key);\n abortFetcher(key);\n }\n });\n }\n\n function setFetcherError(key, routeId, error) {\n let boundaryMatch = findNearestBoundary(state.matches, routeId);\n deleteFetcher(key);\n updateState({\n errors: {\n [boundaryMatch.route.id]: error\n },\n fetchers: new Map(state.fetchers)\n });\n }\n\n function deleteFetcher(key) {\n if (fetchControllers.has(key)) abortFetcher(key);\n fetchLoadMatches.delete(key);\n fetchReloadIds.delete(key);\n fetchRedirectIds.delete(key);\n state.fetchers.delete(key);\n }\n\n function abortFetcher(key) {\n let controller = fetchControllers.get(key);\n invariant(controller, \"Expected fetch controller: \" + key);\n controller.abort();\n fetchControllers.delete(key);\n }\n\n function markFetchersDone(keys) {\n for (let key of keys) {\n let fetcher = getFetcher(key);\n let doneFetcher = {\n state: \"idle\",\n data: fetcher.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined\n };\n state.fetchers.set(key, doneFetcher);\n }\n }\n\n function markFetchRedirectsDone() {\n let doneKeys = [];\n\n for (let key of fetchRedirectIds) {\n let fetcher = state.fetchers.get(key);\n invariant(fetcher, \"Expected fetcher: \" + key);\n\n if (fetcher.state === \"loading\") {\n fetchRedirectIds.delete(key);\n doneKeys.push(key);\n }\n }\n\n markFetchersDone(doneKeys);\n }\n\n function abortStaleFetchLoads(landedId) {\n let yeetedKeys = [];\n\n for (let [key, id] of fetchReloadIds) {\n if (id < landedId) {\n let fetcher = state.fetchers.get(key);\n invariant(fetcher, \"Expected fetcher: \" + key);\n\n if (fetcher.state === \"loading\") {\n abortFetcher(key);\n fetchReloadIds.delete(key);\n yeetedKeys.push(key);\n }\n }\n }\n\n markFetchersDone(yeetedKeys);\n return yeetedKeys.length > 0;\n }\n\n function cancelActiveDeferreds(predicate) {\n let cancelledRouteIds = [];\n activeDeferreds.forEach((dfd, routeId) => {\n if (!predicate || predicate(routeId)) {\n // Cancel the deferred - but do not remove from activeDeferreds here -\n // we rely on the subscribers to do that so our tests can assert proper\n // cleanup via _internalActiveDeferreds\n dfd.cancel();\n cancelledRouteIds.push(routeId);\n activeDeferreds.delete(routeId);\n }\n });\n return cancelledRouteIds;\n } // Opt in to capturing and reporting scroll positions during navigations,\n // used by the component\n\n\n function enableScrollRestoration(positions, getPosition, getKey) {\n savedScrollPositions = positions;\n getScrollPosition = getPosition;\n\n getScrollRestorationKey = getKey || (location => location.key); // Perform initial hydration scroll restoration, since we miss the boat on\n // the initial updateState() because we've not yet rendered \n // and therefore have no savedScrollPositions available\n\n\n if (!initialScrollRestored && state.navigation === IDLE_NAVIGATION) {\n initialScrollRestored = true;\n let y = getSavedScrollPosition(state.location, state.matches);\n\n if (y != null) {\n updateState({\n restoreScrollPosition: y\n });\n }\n }\n\n return () => {\n savedScrollPositions = null;\n getScrollPosition = null;\n getScrollRestorationKey = null;\n };\n }\n\n function saveScrollPosition(location, matches) {\n if (savedScrollPositions && getScrollRestorationKey && getScrollPosition) {\n let userMatches = matches.map(m => createUseMatchesMatch(m, state.loaderData));\n let key = getScrollRestorationKey(location, userMatches) || location.key;\n savedScrollPositions[key] = getScrollPosition();\n }\n }\n\n function getSavedScrollPosition(location, matches) {\n if (savedScrollPositions && getScrollRestorationKey && getScrollPosition) {\n let userMatches = matches.map(m => createUseMatchesMatch(m, state.loaderData));\n let key = getScrollRestorationKey(location, userMatches) || location.key;\n let y = savedScrollPositions[key];\n\n if (typeof y === \"number\") {\n return y;\n }\n }\n\n return null;\n }\n\n router = {\n get basename() {\n return init.basename;\n },\n\n get state() {\n return state;\n },\n\n get routes() {\n return dataRoutes;\n },\n\n initialize,\n subscribe,\n enableScrollRestoration,\n navigate,\n fetch,\n revalidate,\n // Passthrough to history-aware createHref used by useHref so we get proper\n // hash-aware URLs in DOM paths\n createHref: to => init.history.createHref(to),\n encodeLocation: to => init.history.encodeLocation(to),\n getFetcher,\n deleteFetcher,\n dispose,\n _internalFetchControllers: fetchControllers,\n _internalActiveDeferreds: activeDeferreds\n };\n return router;\n} //#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region createStaticHandler\n////////////////////////////////////////////////////////////////////////////////\n\nfunction unstable_createStaticHandler(routes, opts) {\n invariant(routes.length > 0, \"You must provide a non-empty routes array to unstable_createStaticHandler\");\n let dataRoutes = convertRoutesToDataRoutes(routes);\n let basename = (opts ? opts.basename : null) || \"/\";\n /**\n * The query() method is intended for document requests, in which we want to\n * call an optional action and potentially multiple loaders for all nested\n * routes. It returns a StaticHandlerContext object, which is very similar\n * to the router state (location, loaderData, actionData, errors, etc.) and\n * also adds SSR-specific information such as the statusCode and headers\n * from action/loaders Responses.\n *\n * It _should_ never throw and should report all errors through the\n * returned context.errors object, properly associating errors to their error\n * boundary. Additionally, it tracks _deepestRenderedBoundaryId which can be\n * used to emulate React error boundaries during SSr by performing a second\n * pass only down to the boundaryId.\n *\n * The one exception where we do not return a StaticHandlerContext is when a\n * redirect response is returned or thrown from any action/loader. We\n * propagate that out and return the raw Response so the HTTP server can\n * return it directly.\n */\n\n async function query(request, _temp) {\n let {\n requestContext\n } = _temp === void 0 ? {} : _temp;\n let url = new URL(request.url);\n let method = request.method.toLowerCase();\n let location = createLocation(\"\", createPath(url), null, \"default\");\n let matches = matchRoutes(dataRoutes, location, basename); // SSR supports HEAD requests while SPA doesn't\n\n if (!isValidMethod(method) && method !== \"head\") {\n let error = getInternalRouterError(405, {\n method\n });\n let {\n matches: methodNotAllowedMatches,\n route\n } = getShortCircuitMatches(dataRoutes);\n return {\n basename,\n location,\n matches: methodNotAllowedMatches,\n loaderData: {},\n actionData: null,\n errors: {\n [route.id]: error\n },\n statusCode: error.status,\n loaderHeaders: {},\n actionHeaders: {}\n };\n } else if (!matches) {\n let error = getInternalRouterError(404, {\n pathname: location.pathname\n });\n let {\n matches: notFoundMatches,\n route\n } = getShortCircuitMatches(dataRoutes);\n return {\n basename,\n location,\n matches: notFoundMatches,\n loaderData: {},\n actionData: null,\n errors: {\n [route.id]: error\n },\n statusCode: error.status,\n loaderHeaders: {},\n actionHeaders: {}\n };\n }\n\n let result = await queryImpl(request, location, matches, requestContext);\n\n if (isResponse(result)) {\n return result;\n } // When returning StaticHandlerContext, we patch back in the location here\n // since we need it for React Context. But this helps keep our submit and\n // loadRouteData operating on a Request instead of a Location\n\n\n return _extends({\n location,\n basename\n }, result);\n }\n /**\n * The queryRoute() method is intended for targeted route requests, either\n * for fetch ?_data requests or resource route requests. In this case, we\n * are only ever calling a single action or loader, and we are returning the\n * returned value directly. In most cases, this will be a Response returned\n * from the action/loader, but it may be a primitive or other value as well -\n * and in such cases the calling context should handle that accordingly.\n *\n * We do respect the throw/return differentiation, so if an action/loader\n * throws, then this method will throw the value. This is important so we\n * can do proper boundary identification in Remix where a thrown Response\n * must go to the Catch Boundary but a returned Response is happy-path.\n *\n * One thing to note is that any Router-initiated Errors that make sense\n * to associate with a status code will be thrown as an ErrorResponse\n * instance which include the raw Error, such that the calling context can\n * serialize the error as they see fit while including the proper response\n * code. Examples here are 404 and 405 errors that occur prior to reaching\n * any user-defined loaders.\n */\n\n\n async function queryRoute(request, _temp2) {\n let {\n routeId,\n requestContext\n } = _temp2 === void 0 ? {} : _temp2;\n let url = new URL(request.url);\n let method = request.method.toLowerCase();\n let location = createLocation(\"\", createPath(url), null, \"default\");\n let matches = matchRoutes(dataRoutes, location, basename); // SSR supports HEAD requests while SPA doesn't\n\n if (!isValidMethod(method) && method !== \"head\") {\n throw getInternalRouterError(405, {\n method\n });\n } else if (!matches) {\n throw getInternalRouterError(404, {\n pathname: location.pathname\n });\n }\n\n let match = routeId ? matches.find(m => m.route.id === routeId) : getTargetMatch(matches, location);\n\n if (routeId && !match) {\n throw getInternalRouterError(403, {\n pathname: location.pathname,\n routeId\n });\n } else if (!match) {\n // This should never hit I don't think?\n throw getInternalRouterError(404, {\n pathname: location.pathname\n });\n }\n\n let result = await queryImpl(request, location, matches, requestContext, match);\n\n if (isResponse(result)) {\n return result;\n }\n\n let error = result.errors ? Object.values(result.errors)[0] : undefined;\n\n if (error !== undefined) {\n // If we got back result.errors, that means the loader/action threw\n // _something_ that wasn't a Response, but it's not guaranteed/required\n // to be an `instanceof Error` either, so we have to use throw here to\n // preserve the \"error\" state outside of queryImpl.\n throw error;\n } // Pick off the right state value to return\n\n\n let routeData = [result.actionData, result.loaderData].find(v => v);\n return Object.values(routeData || {})[0];\n }\n\n async function queryImpl(request, location, matches, requestContext, routeMatch) {\n invariant(request.signal, \"query()/queryRoute() requests must contain an AbortController signal\");\n\n try {\n if (isMutationMethod(request.method.toLowerCase())) {\n let result = await submit(request, matches, routeMatch || getTargetMatch(matches, location), requestContext, routeMatch != null);\n return result;\n }\n\n let result = await loadRouteData(request, matches, requestContext, routeMatch);\n return isResponse(result) ? result : _extends({}, result, {\n actionData: null,\n actionHeaders: {}\n });\n } catch (e) {\n // If the user threw/returned a Response in callLoaderOrAction, we throw\n // it to bail out and then return or throw here based on whether the user\n // returned or threw\n if (isQueryRouteResponse(e)) {\n if (e.type === ResultType.error && !isRedirectResponse(e.response)) {\n throw e.response;\n }\n\n return e.response;\n } // Redirects are always returned since they don't propagate to catch\n // boundaries\n\n\n if (isRedirectResponse(e)) {\n return e;\n }\n\n throw e;\n }\n }\n\n async function submit(request, matches, actionMatch, requestContext, isRouteRequest) {\n let result;\n\n if (!actionMatch.route.action) {\n let error = getInternalRouterError(405, {\n method: request.method,\n pathname: new URL(request.url).pathname,\n routeId: actionMatch.route.id\n });\n\n if (isRouteRequest) {\n throw error;\n }\n\n result = {\n type: ResultType.error,\n error\n };\n } else {\n result = await callLoaderOrAction(\"action\", request, actionMatch, matches, basename, true, isRouteRequest, requestContext);\n\n if (request.signal.aborted) {\n let method = isRouteRequest ? \"queryRoute\" : \"query\";\n throw new Error(method + \"() call aborted\");\n }\n }\n\n if (isRedirectResult(result)) {\n // Uhhhh - this should never happen, we should always throw these from\n // callLoaderOrAction, but the type narrowing here keeps TS happy and we\n // can get back on the \"throw all redirect responses\" train here should\n // this ever happen :/\n throw new Response(null, {\n status: result.status,\n headers: {\n Location: result.location\n }\n });\n }\n\n if (isDeferredResult(result)) {\n throw new Error(\"defer() is not supported in actions\");\n }\n\n if (isRouteRequest) {\n // Note: This should only be non-Response values if we get here, since\n // isRouteRequest should throw any Response received in callLoaderOrAction\n if (isErrorResult(result)) {\n throw result.error;\n }\n\n return {\n matches: [actionMatch],\n loaderData: {},\n actionData: {\n [actionMatch.route.id]: result.data\n },\n errors: null,\n // Note: statusCode + headers are unused here since queryRoute will\n // return the raw Response or value\n statusCode: 200,\n loaderHeaders: {},\n actionHeaders: {}\n };\n }\n\n if (isErrorResult(result)) {\n // Store off the pending error - we use it to determine which loaders\n // to call and will commit it when we complete the navigation\n let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);\n let context = await loadRouteData(request, matches, requestContext, undefined, {\n [boundaryMatch.route.id]: result.error\n }); // action status codes take precedence over loader status codes\n\n return _extends({}, context, {\n statusCode: isRouteErrorResponse(result.error) ? result.error.status : 500,\n actionData: null,\n actionHeaders: _extends({}, result.headers ? {\n [actionMatch.route.id]: result.headers\n } : {})\n });\n } // Create a GET request for the loaders\n\n\n let loaderRequest = new Request(request.url, {\n headers: request.headers,\n redirect: request.redirect,\n signal: request.signal\n });\n let context = await loadRouteData(loaderRequest, matches, requestContext);\n return _extends({}, context, result.statusCode ? {\n statusCode: result.statusCode\n } : {}, {\n actionData: {\n [actionMatch.route.id]: result.data\n },\n actionHeaders: _extends({}, result.headers ? {\n [actionMatch.route.id]: result.headers\n } : {})\n });\n }\n\n async function loadRouteData(request, matches, requestContext, routeMatch, pendingActionError) {\n let isRouteRequest = routeMatch != null; // Short circuit if we have no loaders to run (queryRoute())\n\n if (isRouteRequest && !(routeMatch != null && routeMatch.route.loader)) {\n throw getInternalRouterError(400, {\n method: request.method,\n pathname: new URL(request.url).pathname,\n routeId: routeMatch == null ? void 0 : routeMatch.route.id\n });\n }\n\n let requestMatches = routeMatch ? [routeMatch] : getLoaderMatchesUntilBoundary(matches, Object.keys(pendingActionError || {})[0]);\n let matchesToLoad = requestMatches.filter(m => m.route.loader); // Short circuit if we have no loaders to run (query())\n\n if (matchesToLoad.length === 0) {\n return {\n matches,\n loaderData: {},\n errors: pendingActionError || null,\n statusCode: 200,\n loaderHeaders: {}\n };\n }\n\n let results = await Promise.all([...matchesToLoad.map(match => callLoaderOrAction(\"loader\", request, match, matches, basename, true, isRouteRequest, requestContext))]);\n\n if (request.signal.aborted) {\n let method = isRouteRequest ? \"queryRoute\" : \"query\";\n throw new Error(method + \"() call aborted\");\n } // Can't do anything with these without the Remix side of things, so just\n // cancel them for now\n\n\n results.forEach(result => {\n if (isDeferredResult(result)) {\n result.deferredData.cancel();\n }\n }); // Process and commit output from loaders\n\n let context = processRouteLoaderData(matches, matchesToLoad, results, pendingActionError);\n return _extends({}, context, {\n matches\n });\n }\n\n return {\n dataRoutes,\n query,\n queryRoute\n };\n} //#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region Helpers\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Given an existing StaticHandlerContext and an error thrown at render time,\n * provide an updated StaticHandlerContext suitable for a second SSR render\n */\n\nfunction getStaticContextFromError(routes, context, error) {\n let newContext = _extends({}, context, {\n statusCode: 500,\n errors: {\n [context._deepestRenderedBoundaryId || routes[0].id]: error\n }\n });\n\n return newContext;\n}\n\nfunction isSubmissionNavigation(opts) {\n return opts != null && \"formData\" in opts;\n} // Normalize navigation options by converting formMethod=GET formData objects to\n// URLSearchParams so they behave identically to links with query params\n\n\nfunction normalizeNavigateOptions(to, opts, isFetcher) {\n if (isFetcher === void 0) {\n isFetcher = false;\n }\n\n let path = typeof to === \"string\" ? to : createPath(to); // Return location verbatim on non-submission navigations\n\n if (!opts || !isSubmissionNavigation(opts)) {\n return {\n path\n };\n }\n\n if (opts.formMethod && !isValidMethod(opts.formMethod)) {\n return {\n path,\n error: getInternalRouterError(405, {\n method: opts.formMethod\n })\n };\n } // Create a Submission on non-GET navigations\n\n\n let submission;\n\n if (opts.formData) {\n submission = {\n formMethod: opts.formMethod || \"get\",\n formAction: stripHashFromPath(path),\n formEncType: opts && opts.formEncType || \"application/x-www-form-urlencoded\",\n formData: opts.formData\n };\n\n if (isMutationMethod(submission.formMethod)) {\n return {\n path,\n submission\n };\n }\n } // Flatten submission onto URLSearchParams for GET submissions\n\n\n let parsedPath = parsePath(path);\n\n try {\n let searchParams = convertFormDataToSearchParams(opts.formData); // Since fetcher GET submissions only run a single loader (as opposed to\n // navigation GET submissions which run all loaders), we need to preserve\n // any incoming ?index params\n\n if (isFetcher && parsedPath.search && hasNakedIndexQuery(parsedPath.search)) {\n searchParams.append(\"index\", \"\");\n }\n\n parsedPath.search = \"?\" + searchParams;\n } catch (e) {\n return {\n path,\n error: getInternalRouterError(400)\n };\n }\n\n return {\n path: createPath(parsedPath),\n submission\n };\n} // Filter out all routes below any caught error as they aren't going to\n// render so we don't need to load them\n\n\nfunction getLoaderMatchesUntilBoundary(matches, boundaryId) {\n let boundaryMatches = matches;\n\n if (boundaryId) {\n let index = matches.findIndex(m => m.route.id === boundaryId);\n\n if (index >= 0) {\n boundaryMatches = matches.slice(0, index);\n }\n }\n\n return boundaryMatches;\n}\n\nfunction getMatchesToLoad(state, matches, submission, location, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, pendingActionData, pendingError, fetchLoadMatches) {\n let actionResult = pendingError ? Object.values(pendingError)[0] : pendingActionData ? Object.values(pendingActionData)[0] : null; // Pick navigation matches that are net-new or qualify for revalidation\n\n let boundaryId = pendingError ? Object.keys(pendingError)[0] : undefined;\n let boundaryMatches = getLoaderMatchesUntilBoundary(matches, boundaryId);\n let navigationMatches = boundaryMatches.filter((match, index) => match.route.loader != null && (isNewLoader(state.loaderData, state.matches[index], match) || // If this route had a pending deferred cancelled it must be revalidated\n cancelledDeferredRoutes.some(id => id === match.route.id) || shouldRevalidateLoader(state.location, state.matches[index], submission, location, match, isRevalidationRequired, actionResult))); // Pick fetcher.loads that need to be revalidated\n\n let revalidatingFetchers = [];\n fetchLoadMatches && fetchLoadMatches.forEach((_ref10, key) => {\n let [href, match, fetchMatches] = _ref10;\n\n // This fetcher was cancelled from a prior action submission - force reload\n if (cancelledFetcherLoads.includes(key)) {\n revalidatingFetchers.push([key, href, match, fetchMatches]);\n } else if (isRevalidationRequired) {\n let shouldRevalidate = shouldRevalidateLoader(href, match, submission, href, match, isRevalidationRequired, actionResult);\n\n if (shouldRevalidate) {\n revalidatingFetchers.push([key, href, match, fetchMatches]);\n }\n }\n });\n return [navigationMatches, revalidatingFetchers];\n}\n\nfunction isNewLoader(currentLoaderData, currentMatch, match) {\n let isNew = // [a] -> [a, b]\n !currentMatch || // [a, b] -> [a, c]\n match.route.id !== currentMatch.route.id; // Handle the case that we don't have data for a re-used route, potentially\n // from a prior error or from a cancelled pending deferred\n\n let isMissingData = currentLoaderData[match.route.id] === undefined; // Always load if this is a net-new route or we don't yet have data\n\n return isNew || isMissingData;\n}\n\nfunction isNewRouteInstance(currentMatch, match) {\n let currentPath = currentMatch.route.path;\n return (// param change for this match, /users/123 -> /users/456\n currentMatch.pathname !== match.pathname || // splat param changed, which is not present in match.path\n // e.g. /files/images/avatar.jpg -> files/finances.xls\n currentPath && currentPath.endsWith(\"*\") && currentMatch.params[\"*\"] !== match.params[\"*\"]\n );\n}\n\nfunction shouldRevalidateLoader(currentLocation, currentMatch, submission, location, match, isRevalidationRequired, actionResult) {\n let currentUrl = createClientSideURL(currentLocation);\n let currentParams = currentMatch.params;\n let nextUrl = createClientSideURL(location);\n let nextParams = match.params; // This is the default implementation as to when we revalidate. If the route\n // provides it's own implementation, then we give them full control but\n // provide this value so they can leverage it if needed after they check\n // their own specific use cases\n // Note that fetchers always provide the same current/next locations so the\n // URL-based checks here don't apply to fetcher shouldRevalidate calls\n\n let defaultShouldRevalidate = isNewRouteInstance(currentMatch, match) || // Clicked the same link, resubmitted a GET form\n currentUrl.toString() === nextUrl.toString() || // Search params affect all loaders\n currentUrl.search !== nextUrl.search || // Forced revalidation due to submission, useRevalidate, or X-Remix-Revalidate\n isRevalidationRequired;\n\n if (match.route.shouldRevalidate) {\n let routeChoice = match.route.shouldRevalidate(_extends({\n currentUrl,\n currentParams,\n nextUrl,\n nextParams\n }, submission, {\n actionResult,\n defaultShouldRevalidate\n }));\n\n if (typeof routeChoice === \"boolean\") {\n return routeChoice;\n }\n }\n\n return defaultShouldRevalidate;\n}\n\nasync function callLoaderOrAction(type, request, match, matches, basename, isStaticRequest, isRouteRequest, requestContext) {\n if (basename === void 0) {\n basename = \"/\";\n }\n\n if (isStaticRequest === void 0) {\n isStaticRequest = false;\n }\n\n if (isRouteRequest === void 0) {\n isRouteRequest = false;\n }\n\n let resultType;\n let result; // Setup a promise we can race against so that abort signals short circuit\n\n let reject;\n let abortPromise = new Promise((_, r) => reject = r);\n\n let onReject = () => reject();\n\n request.signal.addEventListener(\"abort\", onReject);\n\n try {\n let handler = match.route[type];\n invariant(handler, \"Could not find the \" + type + \" to run on the \\\"\" + match.route.id + \"\\\" route\");\n result = await Promise.race([handler({\n request,\n params: match.params,\n context: requestContext\n }), abortPromise]);\n invariant(result !== undefined, \"You defined \" + (type === \"action\" ? \"an action\" : \"a loader\") + \" for route \" + (\"\\\"\" + match.route.id + \"\\\" but didn't return anything from your `\" + type + \"` \") + \"function. Please return a value or `null`.\");\n } catch (e) {\n resultType = ResultType.error;\n result = e;\n } finally {\n request.signal.removeEventListener(\"abort\", onReject);\n }\n\n if (isResponse(result)) {\n let status = result.status; // Process redirects\n\n if (redirectStatusCodes.has(status)) {\n let location = result.headers.get(\"Location\");\n invariant(location, \"Redirects returned/thrown from loaders/actions must have a Location header\");\n let isAbsolute = /^[a-z+]+:\\/\\//i.test(location) || location.startsWith(\"//\"); // Support relative routing in internal redirects\n\n if (!isAbsolute) {\n let activeMatches = matches.slice(0, matches.indexOf(match) + 1);\n let routePathnames = getPathContributingMatches(activeMatches).map(match => match.pathnameBase);\n let resolvedLocation = resolveTo(location, routePathnames, new URL(request.url).pathname);\n invariant(createPath(resolvedLocation), \"Unable to resolve redirect location: \" + location); // Prepend the basename to the redirect location if we have one\n\n if (basename) {\n let path = resolvedLocation.pathname;\n resolvedLocation.pathname = path === \"/\" ? basename : joinPaths([basename, path]);\n }\n\n location = createPath(resolvedLocation);\n } // Don't process redirects in the router during static requests requests.\n // Instead, throw the Response and let the server handle it with an HTTP\n // redirect. We also update the Location header in place in this flow so\n // basename and relative routing is taken into account\n\n\n if (isStaticRequest) {\n result.headers.set(\"Location\", location);\n throw result;\n }\n\n return {\n type: ResultType.redirect,\n status,\n location,\n revalidate: result.headers.get(\"X-Remix-Revalidate\") !== null\n };\n } // For SSR single-route requests, we want to hand Responses back directly\n // without unwrapping. We do this with the QueryRouteResponse wrapper\n // interface so we can know whether it was returned or thrown\n\n\n if (isRouteRequest) {\n // eslint-disable-next-line no-throw-literal\n throw {\n type: resultType || ResultType.data,\n response: result\n };\n }\n\n let data;\n let contentType = result.headers.get(\"Content-Type\");\n\n if (contentType && contentType.startsWith(\"application/json\")) {\n data = await result.json();\n } else {\n data = await result.text();\n }\n\n if (resultType === ResultType.error) {\n return {\n type: resultType,\n error: new ErrorResponse(status, result.statusText, data),\n headers: result.headers\n };\n }\n\n return {\n type: ResultType.data,\n data,\n statusCode: result.status,\n headers: result.headers\n };\n }\n\n if (resultType === ResultType.error) {\n return {\n type: resultType,\n error: result\n };\n }\n\n if (result instanceof DeferredData) {\n return {\n type: ResultType.deferred,\n deferredData: result\n };\n }\n\n return {\n type: ResultType.data,\n data: result\n };\n} // Utility method for creating the Request instances for loaders/actions during\n// client-side navigations and fetches. During SSR we will always have a\n// Request instance from the static handler (query/queryRoute)\n\n\nfunction createClientSideRequest(location, signal, submission) {\n let url = createClientSideURL(stripHashFromPath(location)).toString();\n let init = {\n signal\n };\n\n if (submission && isMutationMethod(submission.formMethod)) {\n let {\n formMethod,\n formEncType,\n formData\n } = submission;\n init.method = formMethod.toUpperCase();\n init.body = formEncType === \"application/x-www-form-urlencoded\" ? convertFormDataToSearchParams(formData) : formData;\n } // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n\n\n return new Request(url, init);\n}\n\nfunction convertFormDataToSearchParams(formData) {\n let searchParams = new URLSearchParams();\n\n for (let [key, value] of formData.entries()) {\n invariant(typeof value === \"string\", 'File inputs are not supported with encType \"application/x-www-form-urlencoded\", ' + 'please use \"multipart/form-data\" instead.');\n searchParams.append(key, value);\n }\n\n return searchParams;\n}\n\nfunction processRouteLoaderData(matches, matchesToLoad, results, pendingError, activeDeferreds) {\n // Fill in loaderData/errors from our loaders\n let loaderData = {};\n let errors = null;\n let statusCode;\n let foundError = false;\n let loaderHeaders = {}; // Process loader results into state.loaderData/state.errors\n\n results.forEach((result, index) => {\n let id = matchesToLoad[index].route.id;\n invariant(!isRedirectResult(result), \"Cannot handle redirect results in processLoaderData\");\n\n if (isErrorResult(result)) {\n // Look upwards from the matched route for the closest ancestor\n // error boundary, defaulting to the root match\n let boundaryMatch = findNearestBoundary(matches, id);\n let error = result.error; // If we have a pending action error, we report it at the highest-route\n // that throws a loader error, and then clear it out to indicate that\n // it was consumed\n\n if (pendingError) {\n error = Object.values(pendingError)[0];\n pendingError = undefined;\n }\n\n errors = errors || {}; // Prefer higher error values if lower errors bubble to the same boundary\n\n if (errors[boundaryMatch.route.id] == null) {\n errors[boundaryMatch.route.id] = error;\n } // Once we find our first (highest) error, we set the status code and\n // prevent deeper status codes from overriding\n\n\n if (!foundError) {\n foundError = true;\n statusCode = isRouteErrorResponse(result.error) ? result.error.status : 500;\n }\n\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n } else if (isDeferredResult(result)) {\n activeDeferreds && activeDeferreds.set(id, result.deferredData);\n loaderData[id] = result.deferredData.data; // TODO: Add statusCode/headers once we wire up streaming in Remix\n } else {\n loaderData[id] = result.data; // Error status codes always override success status codes, but if all\n // loaders are successful we take the deepest status code.\n\n if (result.statusCode != null && result.statusCode !== 200 && !foundError) {\n statusCode = result.statusCode;\n }\n\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n }\n }); // If we didn't consume the pending action error (i.e., all loaders\n // resolved), then consume it here\n\n if (pendingError) {\n errors = pendingError;\n }\n\n return {\n loaderData,\n errors,\n statusCode: statusCode || 200,\n loaderHeaders\n };\n}\n\nfunction processLoaderData(state, matches, matchesToLoad, results, pendingError, revalidatingFetchers, fetcherResults, activeDeferreds) {\n let {\n loaderData,\n errors\n } = processRouteLoaderData(matches, matchesToLoad, results, pendingError, activeDeferreds); // Process results from our revalidating fetchers\n\n for (let index = 0; index < revalidatingFetchers.length; index++) {\n let [key,, match] = revalidatingFetchers[index];\n invariant(fetcherResults !== undefined && fetcherResults[index] !== undefined, \"Did not find corresponding fetcher result\");\n let result = fetcherResults[index]; // Process fetcher non-redirect errors\n\n if (isErrorResult(result)) {\n let boundaryMatch = findNearestBoundary(state.matches, match.route.id);\n\n if (!(errors && errors[boundaryMatch.route.id])) {\n errors = _extends({}, errors, {\n [boundaryMatch.route.id]: result.error\n });\n }\n\n state.fetchers.delete(key);\n } else if (isRedirectResult(result)) {\n // Should never get here, redirects should get processed above, but we\n // keep this to type narrow to a success result in the else\n throw new Error(\"Unhandled fetcher revalidation redirect\");\n } else if (isDeferredResult(result)) {\n // Should never get here, deferred data should be awaited for fetchers\n // in resolveDeferredResults\n throw new Error(\"Unhandled fetcher deferred data\");\n } else {\n let doneFetcher = {\n state: \"idle\",\n data: result.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined\n };\n state.fetchers.set(key, doneFetcher);\n }\n }\n\n return {\n loaderData,\n errors\n };\n}\n\nfunction mergeLoaderData(loaderData, newLoaderData, matches) {\n let mergedLoaderData = _extends({}, newLoaderData);\n\n matches.forEach(match => {\n let id = match.route.id;\n\n if (newLoaderData[id] === undefined && loaderData[id] !== undefined) {\n mergedLoaderData[id] = loaderData[id];\n }\n });\n return mergedLoaderData;\n} // Find the nearest error boundary, looking upwards from the leaf route (or the\n// route specified by routeId) for the closest ancestor error boundary,\n// defaulting to the root match\n\n\nfunction findNearestBoundary(matches, routeId) {\n let eligibleMatches = routeId ? matches.slice(0, matches.findIndex(m => m.route.id === routeId) + 1) : [...matches];\n return eligibleMatches.reverse().find(m => m.route.hasErrorBoundary === true) || matches[0];\n}\n\nfunction getShortCircuitMatches(routes) {\n // Prefer a root layout route if present, otherwise shim in a route object\n let route = routes.find(r => r.index || !r.path || r.path === \"/\") || {\n id: \"__shim-error-route__\"\n };\n return {\n matches: [{\n params: {},\n pathname: \"\",\n pathnameBase: \"\",\n route\n }],\n route\n };\n}\n\nfunction getInternalRouterError(status, _temp3) {\n let {\n pathname,\n routeId,\n method\n } = _temp3 === void 0 ? {} : _temp3;\n let statusText = \"Unknown Server Error\";\n let errorMessage = \"Unknown @remix-run/router error\";\n\n if (status === 400) {\n statusText = \"Bad Request\";\n\n if (method && pathname && routeId) {\n errorMessage = \"You made a \" + method + \" request to \\\"\" + pathname + \"\\\" but \" + (\"did not provide a `loader` for route \\\"\" + routeId + \"\\\", \") + \"so there is no way to handle the request.\";\n } else {\n errorMessage = \"Cannot submit binary form data using GET\";\n }\n } else if (status === 403) {\n statusText = \"Forbidden\";\n errorMessage = \"Route \\\"\" + routeId + \"\\\" does not match URL \\\"\" + pathname + \"\\\"\";\n } else if (status === 404) {\n statusText = \"Not Found\";\n errorMessage = \"No route matches URL \\\"\" + pathname + \"\\\"\";\n } else if (status === 405) {\n statusText = \"Method Not Allowed\";\n\n if (method && pathname && routeId) {\n errorMessage = \"You made a \" + method.toUpperCase() + \" request to \\\"\" + pathname + \"\\\" but \" + (\"did not provide an `action` for route \\\"\" + routeId + \"\\\", \") + \"so there is no way to handle the request.\";\n } else if (method) {\n errorMessage = \"Invalid request method \\\"\" + method.toUpperCase() + \"\\\"\";\n }\n }\n\n return new ErrorResponse(status || 500, statusText, new Error(errorMessage), true);\n} // Find any returned redirect errors, starting from the lowest match\n\n\nfunction findRedirect(results) {\n for (let i = results.length - 1; i >= 0; i--) {\n let result = results[i];\n\n if (isRedirectResult(result)) {\n return result;\n }\n }\n}\n\nfunction stripHashFromPath(path) {\n let parsedPath = typeof path === \"string\" ? parsePath(path) : path;\n return createPath(_extends({}, parsedPath, {\n hash: \"\"\n }));\n}\n\nfunction isHashChangeOnly(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash !== b.hash;\n}\n\nfunction isDeferredResult(result) {\n return result.type === ResultType.deferred;\n}\n\nfunction isErrorResult(result) {\n return result.type === ResultType.error;\n}\n\nfunction isRedirectResult(result) {\n return (result && result.type) === ResultType.redirect;\n}\n\nfunction isResponse(value) {\n return value != null && typeof value.status === \"number\" && typeof value.statusText === \"string\" && typeof value.headers === \"object\" && typeof value.body !== \"undefined\";\n}\n\nfunction isRedirectResponse(result) {\n if (!isResponse(result)) {\n return false;\n }\n\n let status = result.status;\n let location = result.headers.get(\"Location\");\n return status >= 300 && status <= 399 && location != null;\n}\n\nfunction isQueryRouteResponse(obj) {\n return obj && isResponse(obj.response) && (obj.type === ResultType.data || ResultType.error);\n}\n\nfunction isValidMethod(method) {\n return validRequestMethods.has(method);\n}\n\nfunction isMutationMethod(method) {\n return validMutationMethods.has(method);\n}\n\nasync function resolveDeferredResults(currentMatches, matchesToLoad, results, signal, isFetcher, currentLoaderData) {\n for (let index = 0; index < results.length; index++) {\n let result = results[index];\n let match = matchesToLoad[index];\n let currentMatch = currentMatches.find(m => m.route.id === match.route.id);\n let isRevalidatingLoader = currentMatch != null && !isNewRouteInstance(currentMatch, match) && (currentLoaderData && currentLoaderData[match.route.id]) !== undefined;\n\n if (isDeferredResult(result) && (isFetcher || isRevalidatingLoader)) {\n // Note: we do not have to touch activeDeferreds here since we race them\n // against the signal in resolveDeferredData and they'll get aborted\n // there if needed\n await resolveDeferredData(result, signal, isFetcher).then(result => {\n if (result) {\n results[index] = result || results[index];\n }\n });\n }\n }\n}\n\nasync function resolveDeferredData(result, signal, unwrap) {\n if (unwrap === void 0) {\n unwrap = false;\n }\n\n let aborted = await result.deferredData.resolveData(signal);\n\n if (aborted) {\n return;\n }\n\n if (unwrap) {\n try {\n return {\n type: ResultType.data,\n data: result.deferredData.unwrappedData\n };\n } catch (e) {\n // Handle any TrackedPromise._error values encountered while unwrapping\n return {\n type: ResultType.error,\n error: e\n };\n }\n }\n\n return {\n type: ResultType.data,\n data: result.deferredData.data\n };\n}\n\nfunction hasNakedIndexQuery(search) {\n return new URLSearchParams(search).getAll(\"index\").some(v => v === \"\");\n} // Note: This should match the format exported by useMatches, so if you change\n// this please also change that :) Eventually we'll DRY this up\n\n\nfunction createUseMatchesMatch(match, loaderData) {\n let {\n route,\n pathname,\n params\n } = match;\n return {\n id: route.id,\n pathname,\n params,\n data: loaderData[route.id],\n handle: route.handle\n };\n}\n\nfunction getTargetMatch(matches, location) {\n let search = typeof location === \"string\" ? parsePath(location).search : location.search;\n\n if (matches[matches.length - 1].route.index && hasNakedIndexQuery(search || \"\")) {\n // Return the leaf index route when index is present\n return matches[matches.length - 1];\n } // Otherwise grab the deepest \"path contributing\" match (ignoring index and\n // pathless layout routes)\n\n\n let pathMatches = getPathContributingMatches(matches);\n return pathMatches[pathMatches.length - 1];\n} //#endregion\n\nexport { AbortedDeferredError, Action, ErrorResponse, IDLE_FETCHER, IDLE_NAVIGATION, convertRoutesToDataRoutes as UNSAFE_convertRoutesToDataRoutes, getPathContributingMatches as UNSAFE_getPathContributingMatches, createBrowserHistory, createHashHistory, createMemoryHistory, createPath, createRouter, defer, generatePath, getStaticContextFromError, getToPathname, invariant, isRouteErrorResponse, joinPaths, json, matchPath, matchRoutes, normalizePathname, parsePath, redirect, resolvePath, resolveTo, stripBasename, unstable_createStaticHandler, warning };\n//# sourceMappingURL=router.js.map\n","/**\n * React Router v6.5.0\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport { invariant, joinPaths, matchPath, UNSAFE_getPathContributingMatches, warning, resolveTo, parsePath, matchRoutes, Action, isRouteErrorResponse, createMemoryHistory, stripBasename, AbortedDeferredError, createRouter } from '@remix-run/router';\nexport { AbortedDeferredError, Action as NavigationType, createPath, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, resolvePath } from '@remix-run/router';\nimport * as React from 'react';\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : 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 return _extends.apply(this, arguments);\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/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n\nfunction isPolyfill(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nconst is = typeof Object.is === \"function\" ? Object.is : isPolyfill; // Intentionally not using named imports because Rollup uses dynamic\n// dispatch for CommonJS interop named imports.\n\nconst {\n useState,\n useEffect,\n useLayoutEffect,\n useDebugValue\n} = React;\nlet didWarnOld18Alpha = false;\nlet didWarnUncachedGetSnapshot = false; // Disclaimer: This shim breaks many of the rules of React, and only works\n// because of a very particular set of implementation details and assumptions\n// -- change any one of them and it will break. The most important assumption\n// is that updates are always synchronous, because concurrent rendering is\n// only available in versions of React that also have a built-in\n// useSyncExternalStore API. And we only use this shim when the built-in API\n// does not exist.\n//\n// Do not assume that the clever hacks used by this hook also work in general.\n// The point of this shim is to replace the need for hacks by other libraries.\n\nfunction useSyncExternalStore$2(subscribe, getSnapshot, // Note: The shim does not use getServerSnapshot, because pre-18 versions of\n// React do not expose a way to check if we're hydrating. So users of the shim\n// will need to track that themselves and return the correct value\n// from `getSnapshot`.\ngetServerSnapshot) {\n if (process.env.NODE_ENV !== \"production\") {\n if (!didWarnOld18Alpha) {\n if (\"startTransition\" in React) {\n didWarnOld18Alpha = true;\n console.error(\"You are using an outdated, pre-release alpha of React 18 that \" + \"does not support useSyncExternalStore. The \" + \"use-sync-external-store shim will not work correctly. Upgrade \" + \"to a newer pre-release.\");\n }\n }\n } // Read the current snapshot from the store on every render. Again, this\n // breaks the rules of React, and only works here because of specific\n // implementation details, most importantly that updates are\n // always synchronous.\n\n\n const value = getSnapshot();\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!didWarnUncachedGetSnapshot) {\n const cachedValue = getSnapshot();\n\n if (!is(value, cachedValue)) {\n console.error(\"The result of getSnapshot should be cached to avoid an infinite loop\");\n didWarnUncachedGetSnapshot = true;\n }\n }\n } // Because updates are synchronous, we don't queue them. Instead we force a\n // re-render whenever the subscribed state changes by updating an some\n // arbitrary useState hook. Then, during render, we call getSnapshot to read\n // the current value.\n //\n // Because we don't actually use the state returned by the useState hook, we\n // can save a bit of memory by storing other stuff in that slot.\n //\n // To implement the early bailout, we need to track some things on a mutable\n // object. Usually, we would put that in a useRef hook, but we can stash it in\n // our useState hook instead.\n //\n // To force a re-render, we call forceUpdate({inst}). That works because the\n // new object always fails an equality check.\n\n\n const [{\n inst\n }, forceUpdate] = useState({\n inst: {\n value,\n getSnapshot\n }\n }); // Track the latest getSnapshot function with a ref. This needs to be updated\n // in the layout phase so we can access it during the tearing check that\n // happens on subscribe.\n\n useLayoutEffect(() => {\n inst.value = value;\n inst.getSnapshot = getSnapshot; // Whenever getSnapshot or subscribe changes, we need to check in the\n // commit phase if there was an interleaved mutation. In concurrent mode\n // this can happen all the time, but even in synchronous mode, an earlier\n // effect may have mutated the store.\n\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst\n });\n } // eslint-disable-next-line react-hooks/exhaustive-deps\n\n }, [subscribe, value, getSnapshot]);\n useEffect(() => {\n // Check for changes right before subscribing. Subsequent changes will be\n // detected in the subscription handler.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst\n });\n }\n\n const handleStoreChange = () => {\n // TODO: Because there is no cross-renderer API for batching updates, it's\n // up to the consumer of this library to wrap their subscription event\n // with unstable_batchedUpdates. Should we try to detect when this isn't\n // the case and print a warning in development?\n // The store changed. Check if the snapshot changed since the last time we\n // read from the store.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst\n });\n }\n }; // Subscribe to the store and return a clean-up function.\n\n\n return subscribe(handleStoreChange); // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [subscribe]);\n useDebugValue(value);\n return value;\n}\n\nfunction checkIfSnapshotChanged(inst) {\n const latestGetSnapshot = inst.getSnapshot;\n const prevValue = inst.value;\n\n try {\n const nextValue = latestGetSnapshot();\n return !is(prevValue, nextValue);\n } catch (error) {\n return true;\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 * @flow\n */\nfunction useSyncExternalStore$1(subscribe, getSnapshot, getServerSnapshot) {\n // Note: The shim does not use getServerSnapshot, because pre-18 versions of\n // React do not expose a way to check if we're hydrating. So users of the shim\n // will need to track that themselves and return the correct value\n // from `getSnapshot`.\n return getSnapshot();\n}\n\n/**\n * Inlined into the react-router repo since use-sync-external-store does not\n * provide a UMD-compatible package, so we need this to be able to distribute\n * UMD react-router bundles\n */\nconst canUseDOM = !!(typeof window !== \"undefined\" && typeof window.document !== \"undefined\" && typeof window.document.createElement !== \"undefined\");\nconst isServerEnvironment = !canUseDOM;\nconst shim = isServerEnvironment ? useSyncExternalStore$1 : useSyncExternalStore$2;\nconst useSyncExternalStore = \"useSyncExternalStore\" in React ? (module => module.useSyncExternalStore)(React) : shim;\n\n// Contexts for data routers\nconst DataStaticRouterContext = /*#__PURE__*/React.createContext(null);\n\nif (process.env.NODE_ENV !== \"production\") {\n DataStaticRouterContext.displayName = \"DataStaticRouterContext\";\n}\n\nconst DataRouterContext = /*#__PURE__*/React.createContext(null);\n\nif (process.env.NODE_ENV !== \"production\") {\n DataRouterContext.displayName = \"DataRouter\";\n}\n\nconst DataRouterStateContext = /*#__PURE__*/React.createContext(null);\n\nif (process.env.NODE_ENV !== \"production\") {\n DataRouterStateContext.displayName = \"DataRouterState\";\n}\n\nconst AwaitContext = /*#__PURE__*/React.createContext(null);\n\nif (process.env.NODE_ENV !== \"production\") {\n AwaitContext.displayName = \"Await\";\n}\n\nconst NavigationContext = /*#__PURE__*/React.createContext(null);\n\nif (process.env.NODE_ENV !== \"production\") {\n NavigationContext.displayName = \"Navigation\";\n}\n\nconst LocationContext = /*#__PURE__*/React.createContext(null);\n\nif (process.env.NODE_ENV !== \"production\") {\n LocationContext.displayName = \"Location\";\n}\n\nconst RouteContext = /*#__PURE__*/React.createContext({\n outlet: null,\n matches: []\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n RouteContext.displayName = \"Route\";\n}\n\nconst RouteErrorContext = /*#__PURE__*/React.createContext(null);\n\nif (process.env.NODE_ENV !== \"production\") {\n RouteErrorContext.displayName = \"RouteError\";\n}\n\n/**\n * Returns the full href for the given \"to\" value. This is useful for building\n * custom links that are also accessible and preserve right-click behavior.\n *\n * @see https://reactrouter.com/hooks/use-href\n */\n\nfunction useHref(to, _temp) {\n let {\n relative\n } = _temp === void 0 ? {} : _temp;\n !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n \"useHref() may be used only in the context of a component.\") : invariant(false) : void 0;\n let {\n basename,\n navigator\n } = React.useContext(NavigationContext);\n let {\n hash,\n pathname,\n search\n } = useResolvedPath(to, {\n relative\n });\n let joinedPathname = pathname; // If we're operating within a basename, prepend it to the pathname prior\n // to creating the href. If this is a root navigation, then just use the raw\n // basename which allows the basename to have full control over the presence\n // of a trailing slash on root links\n\n if (basename !== \"/\") {\n joinedPathname = pathname === \"/\" ? basename : joinPaths([basename, pathname]);\n }\n\n return navigator.createHref({\n pathname: joinedPathname,\n search,\n hash\n });\n}\n/**\n * Returns true if this component is a descendant of a .\n *\n * @see https://reactrouter.com/hooks/use-in-router-context\n */\n\nfunction useInRouterContext() {\n return React.useContext(LocationContext) != null;\n}\n/**\n * Returns the current location object, which represents the current URL in web\n * browsers.\n *\n * Note: If you're using this it may mean you're doing some of your own\n * \"routing\" in your app, and we'd like to know what your use case is. We may\n * be able to provide something higher-level to better suit your needs.\n *\n * @see https://reactrouter.com/hooks/use-location\n */\n\nfunction useLocation() {\n !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n \"useLocation() may be used only in the context of a component.\") : invariant(false) : void 0;\n return React.useContext(LocationContext).location;\n}\n/**\n * Returns the current navigation action which describes how the router came to\n * the current location, either by a pop, push, or replace on the history stack.\n *\n * @see https://reactrouter.com/hooks/use-navigation-type\n */\n\nfunction useNavigationType() {\n return React.useContext(LocationContext).navigationType;\n}\n/**\n * Returns a PathMatch object if the given pattern matches the current URL.\n * This is useful for components that need to know \"active\" state, e.g.\n * .\n *\n * @see https://reactrouter.com/hooks/use-match\n */\n\nfunction useMatch(pattern) {\n !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n \"useMatch() may be used only in the context of a component.\") : invariant(false) : void 0;\n let {\n pathname\n } = useLocation();\n return React.useMemo(() => matchPath(pattern, pathname), [pathname, pattern]);\n}\n/**\n * The interface for the navigate() function returned from useNavigate().\n */\n\n/**\n * Returns an imperative method for changing the location. Used by s, but\n * may also be used by other elements to change the location.\n *\n * @see https://reactrouter.com/hooks/use-navigate\n */\nfunction useNavigate() {\n !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n \"useNavigate() may be used only in the context of a component.\") : invariant(false) : void 0;\n let {\n basename,\n navigator\n } = React.useContext(NavigationContext);\n let {\n matches\n } = React.useContext(RouteContext);\n let {\n pathname: locationPathname\n } = useLocation();\n let routePathnamesJson = JSON.stringify(UNSAFE_getPathContributingMatches(matches).map(match => match.pathnameBase));\n let activeRef = React.useRef(false);\n React.useEffect(() => {\n activeRef.current = true;\n });\n let navigate = React.useCallback(function (to, options) {\n if (options === void 0) {\n options = {};\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(activeRef.current, \"You should call navigate() in a React.useEffect(), not when \" + \"your component is first rendered.\") : void 0;\n if (!activeRef.current) return;\n\n if (typeof to === \"number\") {\n navigator.go(to);\n return;\n }\n\n let path = resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, options.relative === \"path\"); // If we're operating within a basename, prepend it to the pathname prior\n // to handing off to history. If this is a root navigation, then we\n // navigate to the raw basename which allows the basename to have full\n // control over the presence of a trailing slash on root links\n\n if (basename !== \"/\") {\n path.pathname = path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n }\n\n (!!options.replace ? navigator.replace : navigator.push)(path, options.state, options);\n }, [basename, navigator, routePathnamesJson, locationPathname]);\n return navigate;\n}\nconst OutletContext = /*#__PURE__*/React.createContext(null);\n/**\n * Returns the context (if provided) for the child route at this level of the route\n * hierarchy.\n * @see https://reactrouter.com/hooks/use-outlet-context\n */\n\nfunction useOutletContext() {\n return React.useContext(OutletContext);\n}\n/**\n * Returns the element for the child route at this level of the route\n * hierarchy. Used internally by to render child routes.\n *\n * @see https://reactrouter.com/hooks/use-outlet\n */\n\nfunction useOutlet(context) {\n let outlet = React.useContext(RouteContext).outlet;\n\n if (outlet) {\n return /*#__PURE__*/React.createElement(OutletContext.Provider, {\n value: context\n }, outlet);\n }\n\n return outlet;\n}\n/**\n * Returns an object of key/value pairs of the dynamic params from the current\n * URL that were matched by the route path.\n *\n * @see https://reactrouter.com/hooks/use-params\n */\n\nfunction useParams() {\n let {\n matches\n } = React.useContext(RouteContext);\n let routeMatch = matches[matches.length - 1];\n return routeMatch ? routeMatch.params : {};\n}\n/**\n * Resolves the pathname of the given `to` value against the current location.\n *\n * @see https://reactrouter.com/hooks/use-resolved-path\n */\n\nfunction useResolvedPath(to, _temp2) {\n let {\n relative\n } = _temp2 === void 0 ? {} : _temp2;\n let {\n matches\n } = React.useContext(RouteContext);\n let {\n pathname: locationPathname\n } = useLocation();\n let routePathnamesJson = JSON.stringify(UNSAFE_getPathContributingMatches(matches).map(match => match.pathnameBase));\n return React.useMemo(() => resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, relative === \"path\"), [to, routePathnamesJson, locationPathname, relative]);\n}\n/**\n * Returns the element of the route that matched the current location, prepared\n * with the correct context to render the remainder of the route tree. Route\n * elements in the tree must render an to render their child route's\n * element.\n *\n * @see https://reactrouter.com/hooks/use-routes\n */\n\nfunction useRoutes(routes, locationArg) {\n !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n \"useRoutes() may be used only in the context of a component.\") : invariant(false) : void 0;\n let {\n navigator\n } = React.useContext(NavigationContext);\n let dataRouterStateContext = React.useContext(DataRouterStateContext);\n let {\n matches: parentMatches\n } = React.useContext(RouteContext);\n let routeMatch = parentMatches[parentMatches.length - 1];\n let parentParams = routeMatch ? routeMatch.params : {};\n let parentPathname = routeMatch ? routeMatch.pathname : \"/\";\n let parentPathnameBase = routeMatch ? routeMatch.pathnameBase : \"/\";\n let parentRoute = routeMatch && routeMatch.route;\n\n if (process.env.NODE_ENV !== \"production\") {\n // You won't get a warning about 2 different under a \n // without a trailing *, but this is a best-effort warning anyway since we\n // cannot even give the warning unless they land at the parent route.\n //\n // Example:\n //\n // \n // {/* This route path MUST end with /* because otherwise\n // it will never match /blog/post/123 */}\n // } />\n // } />\n // \n //\n // function Blog() {\n // return (\n // \n // } />\n // \n // );\n // }\n let parentPath = parentRoute && parentRoute.path || \"\";\n warningOnce(parentPathname, !parentRoute || parentPath.endsWith(\"*\"), \"You rendered descendant (or called `useRoutes()`) at \" + (\"\\\"\" + parentPathname + \"\\\" (under ) but the \") + \"parent route path has no trailing \\\"*\\\". This means if you navigate \" + \"deeper, the parent won't match anymore and therefore the child \" + \"routes will never render.\\n\\n\" + (\"Please change the parent to .\"));\n }\n\n let locationFromContext = useLocation();\n let location;\n\n if (locationArg) {\n var _parsedLocationArg$pa;\n\n let parsedLocationArg = typeof locationArg === \"string\" ? parsePath(locationArg) : locationArg;\n !(parentPathnameBase === \"/\" || ((_parsedLocationArg$pa = parsedLocationArg.pathname) == null ? void 0 : _parsedLocationArg$pa.startsWith(parentPathnameBase))) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"When overriding the location using `` or `useRoutes(routes, location)`, \" + \"the location pathname must begin with the portion of the URL pathname that was \" + (\"matched by all parent routes. The current pathname base is \\\"\" + parentPathnameBase + \"\\\" \") + (\"but pathname \\\"\" + parsedLocationArg.pathname + \"\\\" was given in the `location` prop.\")) : invariant(false) : void 0;\n location = parsedLocationArg;\n } else {\n location = locationFromContext;\n }\n\n let pathname = location.pathname || \"/\";\n let remainingPathname = parentPathnameBase === \"/\" ? pathname : pathname.slice(parentPathnameBase.length) || \"/\";\n let matches = matchRoutes(routes, {\n pathname: remainingPathname\n });\n\n if (process.env.NODE_ENV !== \"production\") {\n process.env.NODE_ENV !== \"production\" ? warning(parentRoute || matches != null, \"No routes matched location \\\"\" + location.pathname + location.search + location.hash + \"\\\" \") : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(matches == null || matches[matches.length - 1].route.element !== undefined, \"Matched leaf route at location \\\"\" + location.pathname + location.search + location.hash + \"\\\" does not have an element. \" + \"This means it will render an with a null value by default resulting in an \\\"empty\\\" page.\") : void 0;\n }\n\n let renderedMatches = _renderMatches(matches && matches.map(match => Object.assign({}, match, {\n params: Object.assign({}, parentParams, match.params),\n pathname: joinPaths([parentPathnameBase, // Re-encode pathnames that were decoded inside matchRoutes\n navigator.encodeLocation ? navigator.encodeLocation(match.pathname).pathname : match.pathname]),\n pathnameBase: match.pathnameBase === \"/\" ? parentPathnameBase : joinPaths([parentPathnameBase, // Re-encode pathnames that were decoded inside matchRoutes\n navigator.encodeLocation ? navigator.encodeLocation(match.pathnameBase).pathname : match.pathnameBase])\n })), parentMatches, dataRouterStateContext || undefined); // When a user passes in a `locationArg`, the associated routes need to\n // be wrapped in a new `LocationContext.Provider` in order for `useLocation`\n // to use the scoped location instead of the global location.\n\n\n if (locationArg && renderedMatches) {\n return /*#__PURE__*/React.createElement(LocationContext.Provider, {\n value: {\n location: _extends({\n pathname: \"/\",\n search: \"\",\n hash: \"\",\n state: null,\n key: \"default\"\n }, location),\n navigationType: Action.Pop\n }\n }, renderedMatches);\n }\n\n return renderedMatches;\n}\n\nfunction DefaultErrorElement() {\n let error = useRouteError();\n let message = isRouteErrorResponse(error) ? error.status + \" \" + error.statusText : error instanceof Error ? error.message : JSON.stringify(error);\n let stack = error instanceof Error ? error.stack : null;\n let lightgrey = \"rgba(200,200,200, 0.5)\";\n let preStyles = {\n padding: \"0.5rem\",\n backgroundColor: lightgrey\n };\n let codeStyles = {\n padding: \"2px 4px\",\n backgroundColor: lightgrey\n };\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"h2\", null, \"Unhandled Thrown Error!\"), /*#__PURE__*/React.createElement(\"h3\", {\n style: {\n fontStyle: \"italic\"\n }\n }, message), stack ? /*#__PURE__*/React.createElement(\"pre\", {\n style: preStyles\n }, stack) : null, /*#__PURE__*/React.createElement(\"p\", null, \"\\uD83D\\uDCBF Hey developer \\uD83D\\uDC4B\"), /*#__PURE__*/React.createElement(\"p\", null, \"You can provide a way better UX than this when your app throws errors by providing your own\\xA0\", /*#__PURE__*/React.createElement(\"code\", {\n style: codeStyles\n }, \"errorElement\"), \" props on\\xA0\", /*#__PURE__*/React.createElement(\"code\", {\n style: codeStyles\n }, \"\")));\n}\n\nclass RenderErrorBoundary extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n location: props.location,\n error: props.error\n };\n }\n\n static getDerivedStateFromError(error) {\n return {\n error: error\n };\n }\n\n static getDerivedStateFromProps(props, state) {\n // When we get into an error state, the user will likely click \"back\" to the\n // previous page that didn't have an error. Because this wraps the entire\n // application, that will have no effect--the error page continues to display.\n // This gives us a mechanism to recover from the error when the location changes.\n //\n // Whether we're in an error state or not, we update the location in state\n // so that when we are in an error state, it gets reset when a new location\n // comes in and the user recovers from the error.\n if (state.location !== props.location) {\n return {\n error: props.error,\n location: props.location\n };\n } // If we're not changing locations, preserve the location but still surface\n // any new errors that may come through. We retain the existing error, we do\n // this because the error provided from the app state may be cleared without\n // the location changing.\n\n\n return {\n error: props.error || state.error,\n location: state.location\n };\n }\n\n componentDidCatch(error, errorInfo) {\n console.error(\"React Router caught the following error during render\", error, errorInfo);\n }\n\n render() {\n return this.state.error ? /*#__PURE__*/React.createElement(RouteErrorContext.Provider, {\n value: this.state.error,\n children: this.props.component\n }) : this.props.children;\n }\n\n}\n\nfunction RenderedRoute(_ref) {\n let {\n routeContext,\n match,\n children\n } = _ref;\n let dataStaticRouterContext = React.useContext(DataStaticRouterContext); // Track how deep we got in our render pass to emulate SSR componentDidCatch\n // in a DataStaticRouter\n\n if (dataStaticRouterContext && match.route.errorElement) {\n dataStaticRouterContext._deepestRenderedBoundaryId = match.route.id;\n }\n\n return /*#__PURE__*/React.createElement(RouteContext.Provider, {\n value: routeContext\n }, children);\n}\n\nfunction _renderMatches(matches, parentMatches, dataRouterState) {\n if (parentMatches === void 0) {\n parentMatches = [];\n }\n\n if (matches == null) {\n if (dataRouterState != null && dataRouterState.errors) {\n // Don't bail if we have data router errors so we can render them in the\n // boundary. Use the pre-matched (or shimmed) matches\n matches = dataRouterState.matches;\n } else {\n return null;\n }\n }\n\n let renderedMatches = matches; // If we have data errors, trim matches to the highest error boundary\n\n let errors = dataRouterState == null ? void 0 : dataRouterState.errors;\n\n if (errors != null) {\n let errorIndex = renderedMatches.findIndex(m => m.route.id && (errors == null ? void 0 : errors[m.route.id]));\n !(errorIndex >= 0) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"Could not find a matching route for the current errors: \" + errors) : invariant(false) : void 0;\n renderedMatches = renderedMatches.slice(0, Math.min(renderedMatches.length, errorIndex + 1));\n }\n\n return renderedMatches.reduceRight((outlet, match, index) => {\n let error = match.route.id ? errors == null ? void 0 : errors[match.route.id] : null; // Only data routers handle errors\n\n let errorElement = dataRouterState ? match.route.errorElement || /*#__PURE__*/React.createElement(DefaultErrorElement, null) : null;\n\n let getChildren = () => /*#__PURE__*/React.createElement(RenderedRoute, {\n match: match,\n routeContext: {\n outlet,\n matches: parentMatches.concat(renderedMatches.slice(0, index + 1))\n }\n }, error ? errorElement : match.route.element !== undefined ? match.route.element : outlet); // Only wrap in an error boundary within data router usages when we have an\n // errorElement on this route. Otherwise let it bubble up to an ancestor\n // errorElement\n\n\n return dataRouterState && (match.route.errorElement || index === 0) ? /*#__PURE__*/React.createElement(RenderErrorBoundary, {\n location: dataRouterState.location,\n component: errorElement,\n error: error,\n children: getChildren()\n }) : getChildren();\n }, null);\n}\nvar DataRouterHook;\n\n(function (DataRouterHook) {\n DataRouterHook[\"UseRevalidator\"] = \"useRevalidator\";\n})(DataRouterHook || (DataRouterHook = {}));\n\nvar DataRouterStateHook;\n\n(function (DataRouterStateHook) {\n DataRouterStateHook[\"UseLoaderData\"] = \"useLoaderData\";\n DataRouterStateHook[\"UseActionData\"] = \"useActionData\";\n DataRouterStateHook[\"UseRouteError\"] = \"useRouteError\";\n DataRouterStateHook[\"UseNavigation\"] = \"useNavigation\";\n DataRouterStateHook[\"UseRouteLoaderData\"] = \"useRouteLoaderData\";\n DataRouterStateHook[\"UseMatches\"] = \"useMatches\";\n DataRouterStateHook[\"UseRevalidator\"] = \"useRevalidator\";\n})(DataRouterStateHook || (DataRouterStateHook = {}));\n\nfunction getDataRouterConsoleError(hookName) {\n return hookName + \" must be used within a data router. See https://reactrouter.com/routers/picking-a-router.\";\n}\n\nfunction useDataRouterContext(hookName) {\n let ctx = React.useContext(DataRouterContext);\n !ctx ? process.env.NODE_ENV !== \"production\" ? invariant(false, getDataRouterConsoleError(hookName)) : invariant(false) : void 0;\n return ctx;\n}\n\nfunction useDataRouterState(hookName) {\n let state = React.useContext(DataRouterStateContext);\n !state ? process.env.NODE_ENV !== \"production\" ? invariant(false, getDataRouterConsoleError(hookName)) : invariant(false) : void 0;\n return state;\n}\n/**\n * Returns the current navigation, defaulting to an \"idle\" navigation when\n * no navigation is in progress\n */\n\n\nfunction useNavigation() {\n let state = useDataRouterState(DataRouterStateHook.UseNavigation);\n return state.navigation;\n}\n/**\n * Returns a revalidate function for manually triggering revalidation, as well\n * as the current state of any manual revalidations\n */\n\nfunction useRevalidator() {\n let dataRouterContext = useDataRouterContext(DataRouterHook.UseRevalidator);\n let state = useDataRouterState(DataRouterStateHook.UseRevalidator);\n return {\n revalidate: dataRouterContext.router.revalidate,\n state: state.revalidation\n };\n}\n/**\n * Returns the active route matches, useful for accessing loaderData for\n * parent/child routes or the route \"handle\" property\n */\n\nfunction useMatches() {\n let {\n matches,\n loaderData\n } = useDataRouterState(DataRouterStateHook.UseMatches);\n return React.useMemo(() => matches.map(match => {\n let {\n pathname,\n params\n } = match; // Note: This structure matches that created by createUseMatchesMatch\n // in the @remix-run/router , so if you change this please also change\n // that :) Eventually we'll DRY this up\n\n return {\n id: match.route.id,\n pathname,\n params,\n data: loaderData[match.route.id],\n handle: match.route.handle\n };\n }), [matches, loaderData]);\n}\n/**\n * Returns the loader data for the nearest ancestor Route loader\n */\n\nfunction useLoaderData() {\n let state = useDataRouterState(DataRouterStateHook.UseLoaderData);\n let route = React.useContext(RouteContext);\n !route ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"useLoaderData must be used inside a RouteContext\") : invariant(false) : void 0;\n let thisRoute = route.matches[route.matches.length - 1];\n !thisRoute.route.id ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"useLoaderData can only be used on routes that contain a unique \\\"id\\\"\") : invariant(false) : void 0;\n return state.loaderData[thisRoute.route.id];\n}\n/**\n * Returns the loaderData for the given routeId\n */\n\nfunction useRouteLoaderData(routeId) {\n let state = useDataRouterState(DataRouterStateHook.UseRouteLoaderData);\n return state.loaderData[routeId];\n}\n/**\n * Returns the action data for the nearest ancestor Route action\n */\n\nfunction useActionData() {\n let state = useDataRouterState(DataRouterStateHook.UseActionData);\n let route = React.useContext(RouteContext);\n !route ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"useActionData must be used inside a RouteContext\") : invariant(false) : void 0;\n return Object.values((state == null ? void 0 : state.actionData) || {})[0];\n}\n/**\n * Returns the nearest ancestor Route error, which could be a loader/action\n * error or a render error. This is intended to be called from your\n * errorElement to display a proper error message.\n */\n\nfunction useRouteError() {\n var _state$errors;\n\n let error = React.useContext(RouteErrorContext);\n let state = useDataRouterState(DataRouterStateHook.UseRouteError);\n let route = React.useContext(RouteContext);\n let thisRoute = route.matches[route.matches.length - 1]; // If this was a render error, we put it in a RouteError context inside\n // of RenderErrorBoundary\n\n if (error) {\n return error;\n }\n\n !route ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"useRouteError must be used inside a RouteContext\") : invariant(false) : void 0;\n !thisRoute.route.id ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"useRouteError can only be used on routes that contain a unique \\\"id\\\"\") : invariant(false) : void 0; // Otherwise look for errors from our data router state\n\n return (_state$errors = state.errors) == null ? void 0 : _state$errors[thisRoute.route.id];\n}\n/**\n * Returns the happy-path data from the nearest ancestor value\n */\n\nfunction useAsyncValue() {\n let value = React.useContext(AwaitContext);\n return value == null ? void 0 : value._data;\n}\n/**\n * Returns the error from the nearest ancestor value\n */\n\nfunction useAsyncError() {\n let value = React.useContext(AwaitContext);\n return value == null ? void 0 : value._error;\n}\nconst alreadyWarned = {};\n\nfunction warningOnce(key, cond, message) {\n if (!cond && !alreadyWarned[key]) {\n alreadyWarned[key] = true;\n process.env.NODE_ENV !== \"production\" ? warning(false, message) : void 0;\n }\n}\n\n/**\n * Given a Remix Router instance, render the appropriate UI\n */\nfunction RouterProvider(_ref) {\n let {\n fallbackElement,\n router\n } = _ref;\n // Sync router state to our component state to force re-renders\n let state = useSyncExternalStore(router.subscribe, () => router.state, // We have to provide this so React@18 doesn't complain during hydration,\n // but we pass our serialized hydration data into the router so state here\n // is already synced with what the server saw\n () => router.state);\n let navigator = React.useMemo(() => {\n return {\n createHref: router.createHref,\n encodeLocation: router.encodeLocation,\n go: n => router.navigate(n),\n push: (to, state, opts) => router.navigate(to, {\n state,\n preventScrollReset: opts == null ? void 0 : opts.preventScrollReset\n }),\n replace: (to, state, opts) => router.navigate(to, {\n replace: true,\n state,\n preventScrollReset: opts == null ? void 0 : opts.preventScrollReset\n })\n };\n }, [router]);\n let basename = router.basename || \"/\";\n return /*#__PURE__*/React.createElement(DataRouterContext.Provider, {\n value: {\n router,\n navigator,\n static: false,\n // Do we need this?\n basename\n }\n }, /*#__PURE__*/React.createElement(DataRouterStateContext.Provider, {\n value: state\n }, /*#__PURE__*/React.createElement(Router, {\n basename: router.basename,\n location: router.state.location,\n navigationType: router.state.historyAction,\n navigator: navigator\n }, router.state.initialized ? /*#__PURE__*/React.createElement(Routes, null) : fallbackElement)));\n}\n\n/**\n * A that stores all entries in memory.\n *\n * @see https://reactrouter.com/router-components/memory-router\n */\nfunction MemoryRouter(_ref2) {\n let {\n basename,\n children,\n initialEntries,\n initialIndex\n } = _ref2;\n let historyRef = React.useRef();\n\n if (historyRef.current == null) {\n historyRef.current = createMemoryHistory({\n initialEntries,\n initialIndex,\n v5Compat: true\n });\n }\n\n let history = historyRef.current;\n let [state, setState] = React.useState({\n action: history.action,\n location: history.location\n });\n React.useLayoutEffect(() => history.listen(setState), [history]);\n return /*#__PURE__*/React.createElement(Router, {\n basename: basename,\n children: children,\n location: state.location,\n navigationType: state.action,\n navigator: history\n });\n}\n\n/**\n * Changes the current location.\n *\n * Note: This API is mostly useful in React.Component subclasses that are not\n * able to use hooks. In functional components, we recommend you use the\n * `useNavigate` hook instead.\n *\n * @see https://reactrouter.com/components/navigate\n */\nfunction Navigate(_ref3) {\n let {\n to,\n replace,\n state,\n relative\n } = _ref3;\n !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of\n // the router loaded. We can help them understand how to avoid that.\n \" may be used only in the context of a component.\") : invariant(false) : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(!React.useContext(NavigationContext).static, \" must not be used on the initial render in a . \" + \"This is a no-op, but you should modify your code so the is \" + \"only ever rendered in response to some user interaction or state change.\") : void 0;\n let dataRouterState = React.useContext(DataRouterStateContext);\n let navigate = useNavigate();\n React.useEffect(() => {\n // Avoid kicking off multiple navigations if we're in the middle of a\n // data-router navigation, since components get re-rendered when we enter\n // a submitting/loading state\n if (dataRouterState && dataRouterState.navigation.state !== \"idle\") {\n return;\n }\n\n navigate(to, {\n replace,\n state,\n relative\n });\n });\n return null;\n}\n\n/**\n * Renders the child route's element, if there is one.\n *\n * @see https://reactrouter.com/components/outlet\n */\nfunction Outlet(props) {\n return useOutlet(props.context);\n}\n\n/**\n * Declares an element that should be rendered at a certain URL path.\n *\n * @see https://reactrouter.com/components/route\n */\nfunction Route(_props) {\n process.env.NODE_ENV !== \"production\" ? invariant(false, \"A is only ever to be used as the child of element, \" + \"never rendered directly. Please wrap your in a .\") : invariant(false) ;\n}\n\n/**\n * Provides location context for the rest of the app.\n *\n * Note: You usually won't render a directly. Instead, you'll render a\n * router that is more specific to your environment such as a \n * in web browsers or a for server rendering.\n *\n * @see https://reactrouter.com/router-components/router\n */\nfunction Router(_ref4) {\n let {\n basename: basenameProp = \"/\",\n children = null,\n location: locationProp,\n navigationType = Action.Pop,\n navigator,\n static: staticProp = false\n } = _ref4;\n !!useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You cannot render a inside another .\" + \" You should never have more than one in your app.\") : invariant(false) : void 0; // Preserve trailing slashes on basename, so we can let the user control\n // the enforcement of trailing slashes throughout the app\n\n let basename = basenameProp.replace(/^\\/*/, \"/\");\n let navigationContext = React.useMemo(() => ({\n basename,\n navigator,\n static: staticProp\n }), [basename, navigator, staticProp]);\n\n if (typeof locationProp === \"string\") {\n locationProp = parsePath(locationProp);\n }\n\n let {\n pathname = \"/\",\n search = \"\",\n hash = \"\",\n state = null,\n key = \"default\"\n } = locationProp;\n let location = React.useMemo(() => {\n let trailingPathname = stripBasename(pathname, basename);\n\n if (trailingPathname == null) {\n return null;\n }\n\n return {\n pathname: trailingPathname,\n search,\n hash,\n state,\n key\n };\n }, [basename, pathname, search, hash, state, key]);\n process.env.NODE_ENV !== \"production\" ? warning(location != null, \" is not able to match the URL \" + (\"\\\"\" + pathname + search + hash + \"\\\" because it does not start with the \") + \"basename, so the won't render anything.\") : void 0;\n\n if (location == null) {\n return null;\n }\n\n return /*#__PURE__*/React.createElement(NavigationContext.Provider, {\n value: navigationContext\n }, /*#__PURE__*/React.createElement(LocationContext.Provider, {\n children: children,\n value: {\n location,\n navigationType\n }\n }));\n}\n\n/**\n * A container for a nested tree of elements that renders the branch\n * that best matches the current location.\n *\n * @see https://reactrouter.com/components/routes\n */\nfunction Routes(_ref5) {\n let {\n children,\n location\n } = _ref5;\n let dataRouterContext = React.useContext(DataRouterContext); // When in a DataRouterContext _without_ children, we use the router routes\n // directly. If we have children, then we're in a descendant tree and we\n // need to use child routes.\n\n let routes = dataRouterContext && !children ? dataRouterContext.router.routes : createRoutesFromChildren(children);\n return useRoutes(routes, location);\n}\n\n/**\n * Component to use for rendering lazily loaded data from returning defer()\n * in a loader function\n */\nfunction Await(_ref6) {\n let {\n children,\n errorElement,\n resolve\n } = _ref6;\n return /*#__PURE__*/React.createElement(AwaitErrorBoundary, {\n resolve: resolve,\n errorElement: errorElement\n }, /*#__PURE__*/React.createElement(ResolveAwait, null, children));\n}\nvar AwaitRenderStatus;\n\n(function (AwaitRenderStatus) {\n AwaitRenderStatus[AwaitRenderStatus[\"pending\"] = 0] = \"pending\";\n AwaitRenderStatus[AwaitRenderStatus[\"success\"] = 1] = \"success\";\n AwaitRenderStatus[AwaitRenderStatus[\"error\"] = 2] = \"error\";\n})(AwaitRenderStatus || (AwaitRenderStatus = {}));\n\nconst neverSettledPromise = new Promise(() => {});\n\nclass AwaitErrorBoundary extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n error: null\n };\n }\n\n static getDerivedStateFromError(error) {\n return {\n error\n };\n }\n\n componentDidCatch(error, errorInfo) {\n console.error(\" caught the following error during render\", error, errorInfo);\n }\n\n render() {\n let {\n children,\n errorElement,\n resolve\n } = this.props;\n let promise = null;\n let status = AwaitRenderStatus.pending;\n\n if (!(resolve instanceof Promise)) {\n // Didn't get a promise - provide as a resolved promise\n status = AwaitRenderStatus.success;\n promise = Promise.resolve();\n Object.defineProperty(promise, \"_tracked\", {\n get: () => true\n });\n Object.defineProperty(promise, \"_data\", {\n get: () => resolve\n });\n } else if (this.state.error) {\n // Caught a render error, provide it as a rejected promise\n status = AwaitRenderStatus.error;\n let renderError = this.state.error;\n promise = Promise.reject().catch(() => {}); // Avoid unhandled rejection warnings\n\n Object.defineProperty(promise, \"_tracked\", {\n get: () => true\n });\n Object.defineProperty(promise, \"_error\", {\n get: () => renderError\n });\n } else if (resolve._tracked) {\n // Already tracked promise - check contents\n promise = resolve;\n status = promise._error !== undefined ? AwaitRenderStatus.error : promise._data !== undefined ? AwaitRenderStatus.success : AwaitRenderStatus.pending;\n } else {\n // Raw (untracked) promise - track it\n status = AwaitRenderStatus.pending;\n Object.defineProperty(resolve, \"_tracked\", {\n get: () => true\n });\n promise = resolve.then(data => Object.defineProperty(resolve, \"_data\", {\n get: () => data\n }), error => Object.defineProperty(resolve, \"_error\", {\n get: () => error\n }));\n }\n\n if (status === AwaitRenderStatus.error && promise._error instanceof AbortedDeferredError) {\n // Freeze the UI by throwing a never resolved promise\n throw neverSettledPromise;\n }\n\n if (status === AwaitRenderStatus.error && !errorElement) {\n // No errorElement, throw to the nearest route-level error boundary\n throw promise._error;\n }\n\n if (status === AwaitRenderStatus.error) {\n // Render via our errorElement\n return /*#__PURE__*/React.createElement(AwaitContext.Provider, {\n value: promise,\n children: errorElement\n });\n }\n\n if (status === AwaitRenderStatus.success) {\n // Render children with resolved value\n return /*#__PURE__*/React.createElement(AwaitContext.Provider, {\n value: promise,\n children: children\n });\n } // Throw to the suspense boundary\n\n\n throw promise;\n }\n\n}\n/**\n * @private\n * Indirection to leverage useAsyncValue for a render-prop API on \n */\n\n\nfunction ResolveAwait(_ref7) {\n let {\n children\n } = _ref7;\n let data = useAsyncValue();\n\n if (typeof children === \"function\") {\n return children(data);\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, children);\n} ///////////////////////////////////////////////////////////////////////////////\n// UTILS\n///////////////////////////////////////////////////////////////////////////////\n\n/**\n * Creates a route config from a React \"children\" object, which is usually\n * either a `` element or an array of them. Used internally by\n * `` to create a route config from its children.\n *\n * @see https://reactrouter.com/utils/create-routes-from-children\n */\n\n\nfunction createRoutesFromChildren(children, parentPath) {\n if (parentPath === void 0) {\n parentPath = [];\n }\n\n let routes = [];\n React.Children.forEach(children, (element, index) => {\n if (! /*#__PURE__*/React.isValidElement(element)) {\n // Ignore non-elements. This allows people to more easily inline\n // conditionals in their route config.\n return;\n }\n\n if (element.type === React.Fragment) {\n // Transparently support React.Fragment and its children.\n routes.push.apply(routes, createRoutesFromChildren(element.props.children, parentPath));\n return;\n }\n\n !(element.type === Route) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"[\" + (typeof element.type === \"string\" ? element.type : element.type.name) + \"] is not a component. All component children of must be a or \") : invariant(false) : void 0;\n !(!element.props.index || !element.props.children) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"An index route cannot have child routes.\") : invariant(false) : void 0;\n let treePath = [...parentPath, index];\n let route = {\n id: element.props.id || treePath.join(\"-\"),\n caseSensitive: element.props.caseSensitive,\n element: element.props.element,\n index: element.props.index,\n path: element.props.path,\n loader: element.props.loader,\n action: element.props.action,\n errorElement: element.props.errorElement,\n hasErrorBoundary: element.props.errorElement != null,\n shouldRevalidate: element.props.shouldRevalidate,\n handle: element.props.handle\n };\n\n if (element.props.children) {\n route.children = createRoutesFromChildren(element.props.children, treePath);\n }\n\n routes.push(route);\n });\n return routes;\n}\n/**\n * Renders the result of `matchRoutes()` into a React element.\n */\n\nfunction renderMatches(matches) {\n return _renderMatches(matches);\n}\n/**\n * @private\n * Walk the route tree and add hasErrorBoundary if it's not provided, so that\n * users providing manual route arrays can just specify errorElement\n */\n\nfunction enhanceManualRouteObjects(routes) {\n return routes.map(route => {\n let routeClone = _extends({}, route);\n\n if (routeClone.hasErrorBoundary == null) {\n routeClone.hasErrorBoundary = routeClone.errorElement != null;\n }\n\n if (routeClone.children) {\n routeClone.children = enhanceManualRouteObjects(routeClone.children);\n }\n\n return routeClone;\n });\n}\n\nfunction createMemoryRouter(routes, opts) {\n return createRouter({\n basename: opts == null ? void 0 : opts.basename,\n history: createMemoryHistory({\n initialEntries: opts == null ? void 0 : opts.initialEntries,\n initialIndex: opts == null ? void 0 : opts.initialIndex\n }),\n hydrationData: opts == null ? void 0 : opts.hydrationData,\n routes: enhanceManualRouteObjects(routes)\n }).initialize();\n} ///////////////////////////////////////////////////////////////////////////////\n\nexport { Await, MemoryRouter, Navigate, Outlet, Route, Router, RouterProvider, Routes, DataRouterContext as UNSAFE_DataRouterContext, DataRouterStateContext as UNSAFE_DataRouterStateContext, DataStaticRouterContext as UNSAFE_DataStaticRouterContext, LocationContext as UNSAFE_LocationContext, NavigationContext as UNSAFE_NavigationContext, RouteContext as UNSAFE_RouteContext, enhanceManualRouteObjects as UNSAFE_enhanceManualRouteObjects, createMemoryRouter, createRoutesFromChildren, createRoutesFromChildren as createRoutesFromElements, renderMatches, useActionData, useAsyncError, useAsyncValue, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes };\n//# sourceMappingURL=index.js.map\n","import { useContext } from \"react\";\nimport { UNSAFE_NavigationContext, useNavigate, useLocation } from \"react-router-dom\";\nconst ReactRouter6Adapter = ({\n children\n}) => {\n const { navigator } = useContext(UNSAFE_NavigationContext);\n const navigate = useNavigate();\n const location = useLocation();\n const adapter = {\n replace(location2) {\n navigate(location2.search || \"?\", {\n replace: true,\n state: location2.state\n });\n },\n push(location2) {\n navigate(location2.search || \"?\", {\n replace: false,\n state: location2.state\n });\n },\n get location() {\n var _a;\n return (_a = navigator == null ? void 0 : navigator.location) != null ? _a : location;\n }\n };\n return children(adapter);\n};\nexport {\n ReactRouter6Adapter\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\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\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\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\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\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Detector = exports.Offline = exports.Online = undefined;\n\nvar _createClass = function () { 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require(\"react\");\n\nvar _propTypes = require(\"prop-types\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar inBrowser = typeof navigator !== \"undefined\";\n\n// these browsers don't fully support navigator.onLine, so we need to use a polling backup\nvar unsupportedUserAgentsPattern = /Windows.*Chrome|Windows.*Firefox|Linux.*Chrome/;\n\nvar ping = function ping(_ref) {\n var url = _ref.url,\n timeout = _ref.timeout;\n\n return new Promise(function (resolve) {\n var isOnline = function isOnline() {\n return resolve(true);\n };\n var isOffline = function isOffline() {\n return resolve(false);\n };\n\n var xhr = new XMLHttpRequest();\n\n xhr.onerror = isOffline;\n xhr.ontimeout = isOffline;\n xhr.onreadystatechange = function () {\n if (xhr.readyState === xhr.HEADERS_RECEIVED) {\n if (xhr.status) {\n isOnline();\n } else {\n isOffline();\n }\n }\n };\n\n xhr.open(\"GET\", url);\n xhr.timeout = timeout;\n xhr.send();\n });\n};\n\nvar propTypes = {\n children: _propTypes2.default.node,\n onChange: _propTypes2.default.func,\n polling: _propTypes2.default.oneOfType([_propTypes2.default.shape({\n url: _propTypes2.default.string,\n interval: _propTypes2.default.number,\n timeout: _propTypes2.default.number\n }), _propTypes2.default.bool]),\n wrapperType: _propTypes2.default.string\n};\n\nvar defaultProps = {\n polling: true,\n wrapperType: \"span\"\n};\n\nvar defaultPollingConfig = {\n enabled: inBrowser && unsupportedUserAgentsPattern.test(navigator.userAgent),\n url: \"https://httpbin.org/get\",\n timeout: 5000,\n interval: 5000\n};\n\n// base class that detects offline/online changes\n\nvar Base = function (_Component) {\n _inherits(Base, _Component);\n\n function Base() {\n _classCallCheck(this, Base);\n\n var _this = _possibleConstructorReturn(this, (Base.__proto__ || Object.getPrototypeOf(Base)).call(this));\n\n _this.state = {\n online: inBrowser && typeof navigator.onLine === \"boolean\" ? navigator.onLine : true\n };\n // bind event handlers\n _this.goOnline = _this.goOnline.bind(_this);\n _this.goOffline = _this.goOffline.bind(_this);\n return _this;\n }\n\n _createClass(Base, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n window.addEventListener(\"online\", this.goOnline);\n window.addEventListener(\"offline\", this.goOffline);\n\n if (this.getPollingConfig().enabled) {\n this.startPolling();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n window.removeEventListener(\"online\", this.goOnline);\n window.removeEventListener(\"offline\", this.goOffline);\n\n if (this.pollingId) {\n this.stopPolling();\n }\n }\n }, {\n key: \"renderChildren\",\n value: function renderChildren() {\n var _props = this.props,\n children = _props.children,\n wrapperType = _props.wrapperType;\n\n // usual case: one child that is a react Element\n\n if ((0, _react.isValidElement)(children)) {\n return children;\n }\n\n // no children\n if (!children) {\n return null;\n }\n\n // string children, multiple children, or something else\n return _react.createElement.apply(undefined, [wrapperType, {}].concat(_toConsumableArray(_react.Children.toArray(children))));\n }\n }, {\n key: \"getPollingConfig\",\n value: function getPollingConfig() {\n switch (this.props.polling) {\n case true:\n return defaultPollingConfig;\n case false:\n return { enabled: false };\n default:\n return Object.assign({}, defaultPollingConfig, this.props.polling);\n }\n }\n }, {\n key: \"goOnline\",\n value: function goOnline() {\n if (!this.state.online) {\n this.callOnChangeHandler(true);\n this.setState({ online: true });\n }\n }\n }, {\n key: \"goOffline\",\n value: function goOffline() {\n if (this.state.online) {\n this.callOnChangeHandler(false);\n this.setState({ online: false });\n }\n }\n }, {\n key: \"callOnChangeHandler\",\n value: function callOnChangeHandler(online) {\n if (this.props.onChange) {\n this.props.onChange(online);\n }\n }\n }, {\n key: \"startPolling\",\n value: function startPolling() {\n var _this2 = this;\n\n var _getPollingConfig = this.getPollingConfig(),\n interval = _getPollingConfig.interval;\n\n this.pollingId = setInterval(function () {\n var _getPollingConfig2 = _this2.getPollingConfig(),\n url = _getPollingConfig2.url,\n timeout = _getPollingConfig2.timeout;\n\n ping({ url: url, timeout: timeout }).then(function (online) {\n online ? _this2.goOnline() : _this2.goOffline();\n });\n }, interval);\n }\n }, {\n key: \"stopPolling\",\n value: function stopPolling() {\n clearInterval(this.pollingId);\n }\n }]);\n\n return Base;\n}(_react.Component);\n\nBase.propTypes = propTypes;\nBase.defaultProps = defaultProps;\n\nvar Online = exports.Online = function (_Base) {\n _inherits(Online, _Base);\n\n function Online() {\n _classCallCheck(this, Online);\n\n return _possibleConstructorReturn(this, (Online.__proto__ || Object.getPrototypeOf(Online)).apply(this, arguments));\n }\n\n _createClass(Online, [{\n key: \"render\",\n value: function render() {\n return this.state.online ? this.renderChildren() : null;\n }\n }]);\n\n return Online;\n}(Base);\n\nOnline.propTypes = propTypes;\nOnline.defaultProps = defaultProps;\n\nvar Offline = exports.Offline = function (_Base2) {\n _inherits(Offline, _Base2);\n\n function Offline() {\n _classCallCheck(this, Offline);\n\n return _possibleConstructorReturn(this, (Offline.__proto__ || Object.getPrototypeOf(Offline)).apply(this, arguments));\n }\n\n _createClass(Offline, [{\n key: \"render\",\n value: function render() {\n return !this.state.online ? this.renderChildren() : null;\n }\n }]);\n\n return Offline;\n}(Base);\n\nOffline.propTypes = propTypes;\nOffline.defaultProps = defaultProps;\n\nvar Detector = exports.Detector = function (_Base3) {\n _inherits(Detector, _Base3);\n\n function Detector() {\n _classCallCheck(this, Detector);\n\n return _possibleConstructorReturn(this, (Detector.__proto__ || Object.getPrototypeOf(Detector)).apply(this, arguments));\n }\n\n _createClass(Detector, [{\n key: \"render\",\n value: function render() {\n return this.props.render({ online: this.state.online });\n }\n }]);\n\n return Detector;\n}(Base);\n\nDetector.propTypes = Object.assign({}, propTypes, {\n render: _propTypes2.default.func.isRequired\n});\nDetector.defaultProps = defaultProps;\n","// src/client/build/react.ts\nimport { useState } from \"react\";\n\n// src/client/build/register.ts\nvar autoUpdateMode = \"false\";\nvar selfDestroying = \"false\";\nvar auto = autoUpdateMode === \"true\";\nvar autoDestroy = selfDestroying === \"true\";\nfunction registerSW(options = {}) {\n const {\n immediate = false,\n onNeedRefresh,\n onOfflineReady,\n onRegistered,\n onRegisteredSW,\n onRegisterError\n } = options;\n let wb;\n let registerPromise;\n let sendSkipWaitingMessage;\n const updateServiceWorker = async (_reloadPage = true) => {\n await registerPromise;\n if (!auto) {\n await sendSkipWaitingMessage?.();\n }\n };\n async function register() {\n if (\"serviceWorker\" in navigator) {\n const { Workbox } = await import(\"workbox-window\");\n wb = new Workbox(\"/sw.js\", { scope: \"/\", type: \"classic\" });\n sendSkipWaitingMessage = async () => {\n await wb?.messageSkipWaiting();\n };\n if (!autoDestroy) {\n if (auto) {\n wb.addEventListener(\"activated\", (event) => {\n if (event.isUpdate || event.isExternal)\n window.location.reload();\n });\n wb.addEventListener(\"installed\", (event) => {\n if (!event.isUpdate) {\n onOfflineReady?.();\n }\n });\n } else {\n let onNeedRefreshCalled = false;\n const showSkipWaitingPrompt = () => {\n onNeedRefreshCalled = true;\n wb?.addEventListener(\"controlling\", (event) => {\n if (event.isUpdate)\n window.location.reload();\n });\n onNeedRefresh?.();\n };\n wb.addEventListener(\"installed\", (event) => {\n if (typeof event.isUpdate === \"undefined\") {\n if (typeof event.isExternal !== \"undefined\") {\n if (event.isExternal)\n showSkipWaitingPrompt();\n else\n !onNeedRefreshCalled && onOfflineReady?.();\n } else {\n if (event.isExternal)\n window.location.reload();\n else\n !onNeedRefreshCalled && onOfflineReady?.();\n }\n } else if (!event.isUpdate) {\n onOfflineReady?.();\n }\n });\n wb.addEventListener(\"waiting\", showSkipWaitingPrompt);\n wb.addEventListener(\"externalwaiting\", showSkipWaitingPrompt);\n }\n }\n wb.register({ immediate }).then((r) => {\n if (onRegisteredSW)\n onRegisteredSW(\"/sw.js\", r);\n else\n onRegistered?.(r);\n }).catch((e) => {\n onRegisterError?.(e);\n });\n }\n }\n registerPromise = register();\n return updateServiceWorker;\n}\n\n// src/client/build/react.ts\nfunction useRegisterSW(options = {}) {\n const {\n immediate = true,\n onNeedRefresh,\n onOfflineReady,\n onRegistered,\n onRegisteredSW,\n onRegisterError\n } = options;\n const [needRefresh, setNeedRefresh] = useState(false);\n const [offlineReady, setOfflineReady] = useState(false);\n const [updateServiceWorker] = useState(() => {\n return registerSW({\n immediate,\n onOfflineReady() {\n setOfflineReady(true);\n onOfflineReady?.();\n },\n onNeedRefresh() {\n setNeedRefresh(true);\n onNeedRefresh?.();\n },\n onRegistered,\n onRegisteredSW,\n onRegisterError\n });\n });\n return {\n needRefresh: [needRefresh, setNeedRefresh],\n offlineReady: [offlineReady, setOfflineReady],\n updateServiceWorker\n };\n}\nexport {\n useRegisterSW\n};\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgInformationMark = ({\n title,\n titleId,\n ...props\n}, ref) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 18, height: 18, viewBox: \"0 0 18 18\", fill: \"none\", ref, \"aria-labelledby\": titleId, ...props }, title ? /* @__PURE__ */ React.createElement(\"title\", { id: titleId }, title) : null, /* @__PURE__ */ React.createElement(\"g\", { clipPath: \"url(#clip0_142_4926)\" }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M9 0C7.21997 0 5.47991 0.527841 3.99987 1.51677C2.51983 2.50571 1.36628 3.91131 0.685088 5.55585C0.00389957 7.20038 -0.17433 9.00998 0.172937 10.7558C0.520204 12.5016 1.37737 14.1053 2.63604 15.364C3.89472 16.6226 5.49836 17.4798 7.24419 17.8271C8.99002 18.1743 10.7996 17.9961 12.4442 17.3149C14.0887 16.6337 15.4943 15.4802 16.4832 14.0001C17.4722 12.5201 18 10.78 18 9C17.9974 6.61384 17.0484 4.32616 15.3611 2.63889C13.6738 0.951621 11.3862 0.00258081 9 0ZM9 16.5C7.51664 16.5 6.0666 16.0601 4.83323 15.236C3.59986 14.4119 2.63856 13.2406 2.07091 11.8701C1.50325 10.4997 1.35473 8.99168 1.64411 7.53682C1.9335 6.08197 2.64781 4.74559 3.6967 3.6967C4.7456 2.64781 6.08197 1.9335 7.53683 1.64411C8.99168 1.35472 10.4997 1.50325 11.8701 2.0709C13.2406 2.63856 14.4119 3.59985 15.236 4.83322C16.0601 6.06659 16.5 7.51664 16.5 9C16.4978 10.9885 15.7069 12.8948 14.3009 14.3009C12.8948 15.7069 10.9885 16.4978 9 16.5Z\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M9 7.5H8.25C8.05109 7.5 7.86032 7.57902 7.71967 7.71967C7.57902 7.86032 7.5 8.05109 7.5 8.25C7.5 8.44891 7.57902 8.63968 7.71967 8.78033C7.86032 8.92098 8.05109 9 8.25 9H9V13.5C9 13.6989 9.07902 13.8897 9.21967 14.0303C9.36032 14.171 9.55109 14.25 9.75 14.25C9.94891 14.25 10.1397 14.171 10.2803 14.0303C10.421 13.8897 10.5 13.6989 10.5 13.5V9C10.5 8.60218 10.342 8.22064 10.0607 7.93934C9.77936 7.65804 9.39782 7.5 9 7.5Z\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M9 6C9.62132 6 10.125 5.49632 10.125 4.875C10.125 4.25368 9.62132 3.75 9 3.75C8.37868 3.75 7.875 4.25368 7.875 4.875C7.875 5.49632 8.37868 6 9 6Z\" })), /* @__PURE__ */ React.createElement(\"defs\", null, /* @__PURE__ */ React.createElement(\"clipPath\", { id: \"clip0_142_4926\" }, /* @__PURE__ */ React.createElement(\"rect\", { width: 18, height: 18, fill: \"white\" }))));\nconst ForwardRef = forwardRef(SvgInformationMark);\nexport { ForwardRef as ReactComponent };\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgClose = ({\n title,\n titleId,\n ...props\n}, ref) => /* @__PURE__ */ React.createElement(\"svg\", { width: 7, height: 7, viewBox: \"0 0 7 7\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ref, \"aria-labelledby\": titleId, ...props }, title ? /* @__PURE__ */ React.createElement(\"title\", { id: titleId }, title) : null, /* @__PURE__ */ React.createElement(\"path\", { d: \"M1 6L6 1M1 1L6 6\", strokeWidth: 1.5, strokeLinecap: \"round\", strokeLinejoin: \"round\" }));\nconst ForwardRef = forwardRef(SvgClose);\nexport { ForwardRef as ReactComponent };\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgCloudDisabled = ({\n title,\n titleId,\n ...props\n}, ref) => /* @__PURE__ */ React.createElement(\"svg\", { width: 18, height: 18, viewBox: \"0 0 18 18\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ref, \"aria-labelledby\": titleId, ...props }, title ? /* @__PURE__ */ React.createElement(\"title\", { id: titleId }, title) : null, /* @__PURE__ */ React.createElement(\"g\", { clipPath: \"url(#clip0_855_1097)\" }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M16.3359 15.2748C17.2929 14.3283 17.8784 13.0698 17.9859 11.7281C18.0992 10.3672 17.7424 9.00872 16.9753 7.87906C16.2081 6.7494 15.0769 5.91687 13.7702 5.52032C13.6417 5.48024 13.525 5.40901 13.4307 5.31296C13.3363 5.21692 13.2672 5.09904 13.2294 4.96982C12.9332 3.99865 12.3941 3.11909 11.6632 2.4143C10.9323 1.70951 10.0337 1.20278 9.05239 0.942021C8.07108 0.681266 7.03948 0.675101 6.05513 0.924108C5.07078 1.17312 4.1662 1.66907 3.42693 2.36507L1.28043 0.219323C1.13897 0.0827044 0.949522 0.0071086 0.752875 0.00881741C0.556227 0.0105262 0.368118 0.0894029 0.229062 0.228459C0.0900057 0.367515 0.011129 0.555624 0.00942017 0.752272C0.00771136 0.94892 0.0833072 1.13837 0.219926 1.27982L16.7199 17.7798C16.8614 17.9164 17.0508 17.992 17.2475 17.9903C17.4441 17.9886 17.6322 17.9097 17.7713 17.7707C17.9103 17.6316 17.9892 17.4435 17.9909 17.2469C17.9926 17.0502 17.917 16.8608 17.7804 16.7193L16.3359 15.2748ZM6.82518 2.29832C7.8892 2.13683 8.97584 2.36254 9.88754 2.93442C10.7992 3.50629 11.4754 4.38634 11.7932 5.41457C11.9041 5.77652 12.1017 6.10591 12.3689 6.37411C12.6361 6.64232 12.9647 6.84123 13.3262 6.95357C14.306 7.25155 15.1542 7.87639 15.7291 8.72392C16.3041 9.57146 16.5712 10.5905 16.4859 11.6111C16.4085 12.5953 15.9746 13.5175 15.2657 14.2046L4.48668 3.42557C5.13729 2.82646 5.95122 2.43411 6.82518 2.29832ZM12.7449 16.3706C12.7659 16.5682 12.7077 16.766 12.583 16.9207C12.4582 17.0754 12.2772 17.1742 12.0797 17.1956C11.7506 17.231 11.4199 17.2485 11.0889 17.2481H4.26393C3.26389 17.2306 2.29991 16.8716 1.53208 16.2307C0.764245 15.5897 0.238772 14.7054 0.0429257 13.7246C-0.0845388 12.8811 0.0553032 12.0188 0.442827 11.2588C0.83035 10.4989 1.4461 9.87929 2.20368 9.48707C1.60382 8.39182 1.37788 7.1307 1.56018 5.89532C1.58782 5.6983 1.69261 5.52033 1.85147 5.40057C2.01034 5.2808 2.21028 5.22905 2.4073 5.2567C2.60432 5.28435 2.78229 5.38913 2.90206 5.548C3.02182 5.70686 3.07357 5.9068 3.04593 6.10382C2.9127 7.02506 3.07 7.96492 3.49593 8.79257C3.68365 9.14021 3.72665 9.54787 3.61557 9.92702C3.50449 10.3062 3.24832 10.6262 2.90268 10.8176C2.42026 11.0676 2.0283 11.4625 1.78186 11.9468C1.53541 12.4311 1.44688 12.9804 1.52868 13.5176C1.66851 14.142 2.01397 14.7015 2.50967 15.1062C3.00537 15.5109 3.6226 15.7375 4.26243 15.7496H11.0874C11.3648 15.7498 11.6419 15.735 11.9177 15.7053C12.1154 15.6851 12.3132 15.7435 12.4682 15.868C12.6232 15.9926 12.7228 16.1731 12.7457 16.3706H12.7449Z\", fill: \"#FF9900\" })), /* @__PURE__ */ React.createElement(\"defs\", null, /* @__PURE__ */ React.createElement(\"clipPath\", { id: \"clip0_855_1097\" }, /* @__PURE__ */ React.createElement(\"rect\", { width: 18, height: 18, fill: \"white\" }))));\nconst ForwardRef = forwardRef(SvgCloudDisabled);\nexport { ForwardRef as ReactComponent };\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.serialize = serialize;\nexports.deserialize = deserialize;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, 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 _typeof(obj) { 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 * Serialize React element to JSON string\n *\n * @param {ReactNode} element\n * @returns {string}\n */\nfunction serialize(element) {\n var replacer = function replacer(key, value) {\n switch (key) {\n case \"_owner\":\n case \"_store\":\n case \"ref\":\n case \"key\":\n return;\n\n default:\n return value;\n }\n };\n\n return JSON.stringify(element, replacer);\n}\n/**\n * Deserialize JSON string to React element\n *\n * @param {string|object} data\n * @param {object?} options\n * @param {object?} options.components\n * @param {function?} options.reviver\n * @returns {ReactNode}\n */\n\n\nfunction deserialize(data, options) {\n if (typeof data === \"string\") {\n data = JSON.parse(data);\n }\n\n if (data instanceof Object) {\n return deserializeElement(data, options);\n }\n\n throw new Error(\"Deserialization error: incorrect data type\");\n}\n\nfunction deserializeElement(element) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var key = arguments.length > 2 ? arguments[2] : undefined;\n var _options$components = options.components,\n components = _options$components === void 0 ? {} : _options$components,\n reviver = options.reviver;\n\n if (_typeof(element) !== \"object\") {\n return element;\n }\n\n if (element === null) {\n return element;\n }\n\n if (element instanceof Array) {\n return element.map(function (el, i) {\n return deserializeElement(el, options, i);\n });\n } // Now element has following shape { type: string, props: object }\n\n\n var type = element.type,\n props = element.props;\n\n if (typeof type !== \"string\") {\n throw new Error(\"Deserialization error: element type must be string\");\n }\n\n type = components[type] || type.toLowerCase();\n\n if (props.children) {\n props = _objectSpread({}, props, {\n children: deserializeElement(props.children, options)\n });\n }\n\n if (reviver) {\n ;\n\n var _reviver = reviver(type, props, key, components);\n\n type = _reviver.type;\n props = _reviver.props;\n key = _reviver.key;\n components = _reviver.components;\n }\n\n return _react.default.createElement(type, _objectSpread({}, props, {\n key: key\n }));\n}","import { classnames } from \"utils/common\";\nimport { ReactComponent as InformationMark } from \"assets/img/information-mark.svg\";\nimport { ReactComponent as Close } from \"assets/img/close.svg\";\nimport { ReactComponent as CloudDisabled } from \"assets/img/cloud-disabled.svg\";\nimport React from \"react\";\n//@ts-ignore\nimport { deserialize } from \"react-serialize\";\n\nexport interface IProfileNotificationProps {\n className?: string;\n type: \"warning\" | \"success\" | \"error\";\n onClose?: () => void;\n children: React.ReactNode;\n showCloseButton?: boolean;\n}\n\nexport function ProfileNotification({\n type,\n children,\n className,\n onClose,\n showCloseButton = true,\n}: IProfileNotificationProps) {\n let toRender: any = \"\";\n const isValid = React.isValidElement(children);\n //there could be an issue with children cause we use recoil that save data to LocalStorage, so our ReactNode serializing to json, in this case we need to deserialize it\n if (isValid || typeof children === \"string\") {\n toRender = children;\n }\n\n if (!isValid && typeof children === \"object\") {\n const deserialized = deserialize(children);\n if (React.isValidElement(deserialized)) {\n toRender = deserialized;\n }\n }\n\n return (\n \n
\n {type === \"success\" && }\n {type === \"warning\" && }\n {type === \"error\" && }\n
{toRender}
\n {showCloseButton && (\n \n )}\n
\n \n );\n}\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgSpinner = ({\n title,\n titleId,\n ...props\n}, ref) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", xmlnsXlink: \"http://www.w3.org/1999/xlink\", style: {\n margin: \"auto\",\n display: \"block\",\n shapeRendering: \"auto\"\n}, width: \"24px\", height: \"24px\", viewBox: \"0 0 100 100\", preserveAspectRatio: \"xMidYMid\", ref, \"aria-labelledby\": titleId, ...props }, title ? /* @__PURE__ */ React.createElement(\"title\", { id: titleId }, title) : null, /* @__PURE__ */ React.createElement(\"g\", { transform: \"rotate(0 50 50)\" }, /* @__PURE__ */ React.createElement(\"rect\", { x: 48.5, y: 24, rx: 1.5, ry: 1.68, width: 3, height: 12 }, /* @__PURE__ */ React.createElement(\"animate\", { attributeName: \"opacity\", values: \"1;0\", keyTimes: \"0;1\", dur: \"1s\", begin: \"-0.9166666666666666s\", repeatCount: \"indefinite\" }))), /* @__PURE__ */ React.createElement(\"g\", { transform: \"rotate(30 50 50)\" }, /* @__PURE__ */ React.createElement(\"rect\", { x: 48.5, y: 24, rx: 1.5, ry: 1.68, width: 3, height: 12 }, /* @__PURE__ */ React.createElement(\"animate\", { attributeName: \"opacity\", values: \"1;0\", keyTimes: \"0;1\", dur: \"1s\", begin: \"-0.8333333333333334s\", repeatCount: \"indefinite\" }))), /* @__PURE__ */ React.createElement(\"g\", { transform: \"rotate(60 50 50)\" }, /* @__PURE__ */ React.createElement(\"rect\", { x: 48.5, y: 24, rx: 1.5, ry: 1.68, width: 3, height: 12 }, /* @__PURE__ */ React.createElement(\"animate\", { attributeName: \"opacity\", values: \"1;0\", keyTimes: \"0;1\", dur: \"1s\", begin: \"-0.75s\", repeatCount: \"indefinite\" }))), /* @__PURE__ */ React.createElement(\"g\", { transform: \"rotate(90 50 50)\" }, /* @__PURE__ */ React.createElement(\"rect\", { x: 48.5, y: 24, rx: 1.5, ry: 1.68, width: 3, height: 12 }, /* @__PURE__ */ React.createElement(\"animate\", { attributeName: \"opacity\", values: \"1;0\", keyTimes: \"0;1\", dur: \"1s\", begin: \"-0.6666666666666666s\", repeatCount: \"indefinite\" }))), /* @__PURE__ */ React.createElement(\"g\", { transform: \"rotate(120 50 50)\" }, /* @__PURE__ */ React.createElement(\"rect\", { x: 48.5, y: 24, rx: 1.5, ry: 1.68, width: 3, height: 12 }, /* @__PURE__ */ React.createElement(\"animate\", { attributeName: \"opacity\", values: \"1;0\", keyTimes: \"0;1\", dur: \"1s\", begin: \"-0.5833333333333334s\", repeatCount: \"indefinite\" }))), /* @__PURE__ */ React.createElement(\"g\", { transform: \"rotate(150 50 50)\" }, /* @__PURE__ */ React.createElement(\"rect\", { x: 48.5, y: 24, rx: 1.5, ry: 1.68, width: 3, height: 12 }, /* @__PURE__ */ React.createElement(\"animate\", { attributeName: \"opacity\", values: \"1;0\", keyTimes: \"0;1\", dur: \"1s\", begin: \"-0.5s\", repeatCount: \"indefinite\" }))), /* @__PURE__ */ React.createElement(\"g\", { transform: \"rotate(180 50 50)\" }, /* @__PURE__ */ React.createElement(\"rect\", { x: 48.5, y: 24, rx: 1.5, ry: 1.68, width: 3, height: 12 }, /* @__PURE__ */ React.createElement(\"animate\", { attributeName: \"opacity\", values: \"1;0\", keyTimes: \"0;1\", dur: \"1s\", begin: \"-0.4166666666666667s\", repeatCount: \"indefinite\" }))), /* @__PURE__ */ React.createElement(\"g\", { transform: \"rotate(210 50 50)\" }, /* @__PURE__ */ React.createElement(\"rect\", { x: 48.5, y: 24, rx: 1.5, ry: 1.68, width: 3, height: 12 }, /* @__PURE__ */ React.createElement(\"animate\", { attributeName: \"opacity\", values: \"1;0\", keyTimes: \"0;1\", dur: \"1s\", begin: \"-0.3333333333333333s\", repeatCount: \"indefinite\" }))), /* @__PURE__ */ React.createElement(\"g\", { transform: \"rotate(240 50 50)\" }, /* @__PURE__ */ React.createElement(\"rect\", { x: 48.5, y: 24, rx: 1.5, ry: 1.68, width: 3, height: 12 }, /* @__PURE__ */ React.createElement(\"animate\", { attributeName: \"opacity\", values: \"1;0\", keyTimes: \"0;1\", dur: \"1s\", begin: \"-0.25s\", repeatCount: \"indefinite\" }))), /* @__PURE__ */ React.createElement(\"g\", { transform: \"rotate(270 50 50)\" }, /* @__PURE__ */ React.createElement(\"rect\", { x: 48.5, y: 24, rx: 1.5, ry: 1.68, width: 3, height: 12 }, /* @__PURE__ */ React.createElement(\"animate\", { attributeName: \"opacity\", values: \"1;0\", keyTimes: \"0;1\", dur: \"1s\", begin: \"-0.16666666666666666s\", repeatCount: \"indefinite\" }))), /* @__PURE__ */ React.createElement(\"g\", { transform: \"rotate(300 50 50)\" }, /* @__PURE__ */ React.createElement(\"rect\", { x: 48.5, y: 24, rx: 1.5, ry: 1.68, width: 3, height: 12 }, /* @__PURE__ */ React.createElement(\"animate\", { attributeName: \"opacity\", values: \"1;0\", keyTimes: \"0;1\", dur: \"1s\", begin: \"-0.08333333333333333s\", repeatCount: \"indefinite\" }))), /* @__PURE__ */ React.createElement(\"g\", { transform: \"rotate(330 50 50)\" }, /* @__PURE__ */ React.createElement(\"rect\", { x: 48.5, y: 24, rx: 1.5, ry: 1.68, width: 3, height: 12 }, /* @__PURE__ */ React.createElement(\"animate\", { attributeName: \"opacity\", values: \"1;0\", keyTimes: \"0;1\", dur: \"1s\", begin: \"0s\", repeatCount: \"indefinite\" }))));\nconst ForwardRef = forwardRef(SvgSpinner);\nexport { ForwardRef as ReactComponent };\n","import { classnames } from \"utils/common\";\nimport \"./Loader.css\";\nimport { ReactComponent as SpinnerIcon } from \"assets/img/spinner.svg\";\n\nexport interface ILoaderProps {\n className?: string;\n classNames?: { spinner?: string; dots?: string };\n type?: \"dots\" | \"spinner\";\n}\n//https://codepen.io/brainbrian/pen/bwKBJj\nexport function Loader({ className, classNames, type = \"dots\" }: ILoaderProps) {\n return (\n \n {type === \"dots\" && (\n \n \n
\n
\n \n
\n
\n \n
\n
\n \n )}\n {type === \"spinner\" && (\n \n )}\n \n );\n}\n","import React from \"react\";\nimport { classnames } from \"utils/common\";\nimport { ILoaderProps, Loader } from \"components/Loader/Loader\";\n\nexport interface IButtonProps\n extends Partial> {\n mode?: \"primary\" | \"white\";\n loading?: boolean;\n classNames?: { container?: string; spinner?: string };\n innerRef?: React.RefObject;\n spinnerType?: ILoaderProps[\"type\"];\n}\n\n/**\n * Primary UI component for user interaction\n */\n\nexport function Button({\n mode = \"primary\",\n children,\n loading,\n className,\n classNames,\n innerRef,\n spinnerType,\n ...props\n}: IButtonProps) {\n return (\n \n \n {loading ? (\n \n ) : (\n \"\"\n )}\n {!loading && children}\n \n \n );\n}\n","import { useRegisterSW } from \"virtual:pwa-register/react\";\nimport { ProfileNotification } from \"components/ProfileNotification/ProfileNotification\";\nimport { Button } from \"components/Button/Button\";\n\nconst buildDate = \"__DATE__\";\n// replaced dyanmicaly\nconst reloadSW = \"__RELOAD_SW__\";\nconst onRegisteredSw = (swUrl: string, r: any) => {\n console.log(`Service Worker at: ${swUrl}`, buildDate);\n // @ts-expect-error just ignore\n if (reloadSW === \"true\") {\n r &&\n setInterval(() => {\n console.log(\"Checking for sw update\");\n r.update();\n }, 20000 /* 20s for testing purposes */);\n } else {\n console.log(\"SW Registered: \" + r);\n }\n};\nconst onRegisterError = (error: any) => {\n console.log(\"SW registration error\", error);\n};\nconst config = {\n onRegisteredSW(swUrl: string, r: any) {\n onRegisteredSw(swUrl, r);\n },\n onRegisterError(error: any) {\n onRegisterError(error);\n },\n};\n\nfunction ReloadPrompt() {\n const {\n offlineReady: [offlineReady, setOfflineReady],\n needRefresh: [needRefresh, setNeedRefresh],\n updateServiceWorker,\n } = useRegisterSW(config);\n\n const close = () => {\n setOfflineReady(false);\n setNeedRefresh(false);\n };\n const showMessage = offlineReady || needRefresh;\n return (\n <>\n {showMessage && (\n \n
\n
\n New content available, click on reload button to update.{\" \"}\n
\n updateServiceWorker(true)}\n >\n Reload\n \n
\n
\n )}\n \n );\n}\n\nexport default ReloadPrompt;\n","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport * as React from 'react';\n\nvar changedArray = function changedArray(a, b) {\n if (a === void 0) {\n a = [];\n }\n\n if (b === void 0) {\n b = [];\n }\n\n return a.length !== b.length || a.some(function (item, index) {\n return !Object.is(item, b[index]);\n });\n};\n\nvar initialState = {\n error: null\n};\n\nvar ErrorBoundary = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(ErrorBoundary, _React$Component);\n\n function ErrorBoundary() {\n var _this;\n\n for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n _args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;\n _this.state = initialState;\n\n _this.resetErrorBoundary = function () {\n var _this$props;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n _this.props.onReset == null ? void 0 : (_this$props = _this.props).onReset.apply(_this$props, args);\n\n _this.reset();\n };\n\n return _this;\n }\n\n ErrorBoundary.getDerivedStateFromError = function getDerivedStateFromError(error) {\n return {\n error: error\n };\n };\n\n var _proto = ErrorBoundary.prototype;\n\n _proto.reset = function reset() {\n this.setState(initialState);\n };\n\n _proto.componentDidCatch = function componentDidCatch(error, info) {\n var _this$props$onError, _this$props2;\n\n (_this$props$onError = (_this$props2 = this.props).onError) == null ? void 0 : _this$props$onError.call(_this$props2, error, info);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n var error = this.state.error;\n var resetKeys = this.props.resetKeys; // There's an edge case where if the thing that triggered the error\n // happens to *also* be in the resetKeys array, we'd end up resetting\n // the error boundary immediately. This would likely trigger a second\n // error to be thrown.\n // So we make sure that we don't check the resetKeys on the first call\n // of cDU after the error is set\n\n if (error !== null && prevState.error !== null && changedArray(prevProps.resetKeys, resetKeys)) {\n var _this$props$onResetKe, _this$props3;\n\n (_this$props$onResetKe = (_this$props3 = this.props).onResetKeysChange) == null ? void 0 : _this$props$onResetKe.call(_this$props3, prevProps.resetKeys, resetKeys);\n this.reset();\n }\n };\n\n _proto.render = function render() {\n var error = this.state.error;\n var _this$props4 = this.props,\n fallbackRender = _this$props4.fallbackRender,\n FallbackComponent = _this$props4.FallbackComponent,\n fallback = _this$props4.fallback;\n\n if (error !== null) {\n var _props = {\n error: error,\n resetErrorBoundary: this.resetErrorBoundary\n };\n\n if ( /*#__PURE__*/React.isValidElement(fallback)) {\n return fallback;\n } else if (typeof fallbackRender === 'function') {\n return fallbackRender(_props);\n } else if (FallbackComponent) {\n return /*#__PURE__*/React.createElement(FallbackComponent, _props);\n } else {\n throw new Error('react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop');\n }\n }\n\n return this.props.children;\n };\n\n return ErrorBoundary;\n}(React.Component);\n\nfunction withErrorBoundary(Component, errorBoundaryProps) {\n var Wrapped = function Wrapped(props) {\n return /*#__PURE__*/React.createElement(ErrorBoundary, errorBoundaryProps, /*#__PURE__*/React.createElement(Component, props));\n }; // Format for display in DevTools\n\n\n var name = Component.displayName || Component.name || 'Unknown';\n Wrapped.displayName = \"withErrorBoundary(\" + name + \")\";\n return Wrapped;\n}\n\nfunction useErrorHandler(givenError) {\n var _React$useState = React.useState(null),\n error = _React$useState[0],\n setError = _React$useState[1];\n\n if (givenError != null) throw givenError;\n if (error != null) throw error;\n return setError;\n}\n/*\neslint\n @typescript-eslint/sort-type-union-intersection-members: \"off\",\n @typescript-eslint/no-throw-literal: \"off\",\n @typescript-eslint/prefer-nullish-coalescing: \"off\"\n*/\n\nexport { ErrorBoundary, useErrorHandler, withErrorBoundary };\n","import React, { ReactNode, Suspense } from \"react\";\nimport { Loader } from \"./Loader/Loader\";\n\nexport function SuspenseWrp({\n children,\n fallback,\n}: {\n children: React.ReactNode;\n fallback?: React.ReactNode;\n}) {\n let fb: ReactNode = ;\n if (fallback) {\n fb = fallback;\n }\n\n return {children};\n}\n","import { Button } from \"./Button/Button\";\n\nexport function ErrorFallback({\n error,\n eventId,\n button = (\n {\n window.location.reload();\n //resetError();\n }}\n >\n Reload\n \n ),\n}: {\n error: Error;\n resetErrorBoundary?: () => void;\n onReset?: () => void;\n eventId?: string;\n button?: React.ReactNode;\n}) {\n return (\n
\n
\n \n
Something went wrong:
\n \n {error.message}\n \n {eventId && Error id: {eventId}}\n {button}\n
\n
\n \n );\n}\n\nexport function ReactErrorFallback({\n error,\n resetErrorBoundary,\n}: {\n error?: any;\n resetErrorBoundary?: () => void;\n}) {\n return (\n \n );\n}\n","// the issue https://github.com/vitejs/vite/issues/11804#issuecomment-1833547616\n/**\n * This is a wrap for React.Lazy based on Christoph Nakazawa solution (https://gist.github.com/cpojer/c50a742ec943d95c3c72a41ac1c06f03) for the issue that happens when using React.Lazy and we deploy a new version of a module, changing the hash (automatically managed by bundlers).\n *\n * THE PROBLEM:\n * When our React application is compiled for production, packaging tools (Vite in this case) often add hashes to the filename to handle caching.\n * These hashes change whenever the content of the file changes. This ensures that users get the most recent version of the file, since a change in the hash will force the browser to download the new file instead of serving a cached version.\n *\n * If a user has your application open and you make a new deployment, the file names of the dynamically loaded modules may change (due to the new hashes).\n * And then, if the user navigates to a part of your application that requires loading a new module, their browser will attempt to load the module using the old file name (which is in the previously loaded code), which will result in an error as that file no longer exists on the server.\n *\n * THE SOLUTION - WORKAROUND:\n *\n * A wrap for React.Lazy that reloads the page if the module is not found.\n * If before 10 seconds, the error appears again, we assue it is not an error related to this issue and we throw the error up, letting\n * React Error Boundaries (https://react.dev/reference/react/useTransition#displaying-an-error-to-users-with-error-boundary) manage it.\n *\n * If you want to manage the error inside the react-lazy wrapper, check Christoph solution.\n **/\n\nimport type { ComponentType } from \"react\";\nimport * as React from \"react\";\n\nexport const lazy = (\n factory: () => Promise<{ default: ComponentType }>\n) => {\n return React.lazy(() => factory().catch(importErrorHandler));\n};\n\nfunction importErrorHandler(err: string): {\n default: ComponentType;\n} {\n // Get the last reload time from local storage and the current time\n const timeStr = sessionStorage?.getItem(\"last-reload\");\n const time = timeStr ? Number(timeStr) : null;\n const now = Date.now();\n\n // If the last reload time is more than 10 seconds ago, reload the page\n const isReloading = !time || time + 10_000 < now;\n if (isReloading) {\n console.log(\"New version for this module found. Reloading ...\");\n sessionStorage.setItem(\"last-reload\", String(now));\n window.location.reload();\n return { default: () => null };\n }\n\n // We let ErrorBoundary handle the error\n throw new Error(err);\n}\n","import { lazy } from \"utils/react-lazy-with-reload\";\n\nexport const App = lazy(() => import(\"./App\"));\nexport const StripeContextProvider = lazy(() =>\n import(\"context\").then((module: any) => ({\n default: module.StripeContextProvider,\n }))\n);\nexport const QueryClientProvider = lazy(() =>\n import(\"@tanstack/react-query\").then((module: any) => ({\n default: module.QueryClientProvider,\n }))\n);\nexport const BrowserRouter = lazy(() =>\n import(\"react-router-dom\").then((module: any) => ({\n default: module.BrowserRouter,\n }))\n);\nexport const RecoilRoot = lazy(() =>\n import(\"recoil\").then((module: any) => ({ default: module.RecoilRoot }))\n);\n","import type { ReactNodeArray } from \"prop-types\";\nimport React, { ReactNode, useMemo, useState } from \"react\";\n\nimport type { Stripe } from \"@stripe/stripe-js\";\nexport const StripeContext = React.createContext<{\n isLoading: boolean;\n context: null | any;\n setContext?: React.Dispatch>;\n setIsLoading?: React.Dispatch>;\n}>({\n isLoading: false,\n context: null,\n});\n\nexport function StripeContextProvider({\n // should be in twilio client context\n children,\n}: {\n children: ReactNode | ReactNodeArray;\n}) {\n const [isLoading, setIsLoading] = useState(false);\n const [context, setContext] = useState(null);\n //remove stripe from on logout\n return (\n ({ context, setContext, isLoading, setIsLoading }),\n [context, isLoading]\n )}\n >\n {children}\n \n );\n}\n","import { ReactRouter6Adapter } from \"use-query-params/adapters/react-router-6\";\nimport { QueryParamProvider } from \"use-query-params\";\n\nimport { Offline } from \"react-detect-offline\";\nimport ReloadPrompt from \"layouts/MainLayout/ReloadPrompt\";\nimport { ErrorBoundary as SErrorBoundary } from \"@sentry/react\";\nimport { ProfileNotification } from \"components/ProfileNotification/ProfileNotification\";\nimport { ErrorBoundary } from \"react-error-boundary\";\nimport { SuspenseWrp } from \"components/SuspenceWrp\";\nimport { ErrorFallback, ReactErrorFallback } from \"components/ErrorFallback\";\nimport { Loader } from \"components/Loader/Loader\";\n\nimport {\n App,\n BrowserRouter,\n QueryClientProvider,\n RecoilRoot,\n} from \"LazyComponents\";\nimport { queryClient } from \"index\";\nimport { StripeContextProvider } from \"context/StripeContext\";\n\nexport function SentryErrorBoundary({ FallbackComponent, children }: any) {\n return (\n {children}\n );\n}\n\nexport function Render() {\n return (\n \n \n \n }\n >\n {/* use error boundary and sentry error boundary to test, cause we get weird an error - UnhandledRejection: Non-Error promise rejection captured with value: Object Not Found Matching Id:2, MethodName:update, ParamCount:4\n we assume that this connected with sentry error boundary, we assume that second error boundary will catch this error\n */}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {import.meta.env.PROD && }\n \n \n
\n
\n Your application is offline. Please check your internet connection\n
\n
\n \n
\n \n );\n}\n","import ReactDOM from \"react-dom/client\";\nimport { initializeApp } from \"firebase/app\";\nimport { QueryClient } from \"@tanstack/react-query\";\n\nimport TimeAgo from \"javascript-time-ago\";\nimport en from \"javascript-time-ago/locale/en\";\nimport { hotjar } from \"react-hotjar\";\nimport {\n init,\n browserTracingIntegration,\n replayIntegration,\n} from \"@sentry/react\";\n\nimport reportWebVitals from \"./reportWebVitals\";\nimport \"./assets\";\nimport { checkIfDevVersion } from \"utils/common\";\nimport { Render } from \"MainComponents\";\n//const Sentry = lazy(() => import(\"@sentry/react\"));\n\n// import ReloadPrompt from \"layouts/MainLayout/ReloadPrompt\";\n\nhotjar.initialize(3632767, 6);\n\n// make imports in code splitting version to be lazy\n\ninit({\n enabled: !!import.meta.env.PROD,\n dsn: import.meta.env.VITE_APP_SENTRY_DSN,\n environment: checkIfDevVersion() ? \"development\" : \"production\",\n\n integrations: [\n browserTracingIntegration(),\n replayIntegration({\n maskAllText: false,\n blockAllMedia: false,\n }),\n ],\n // Performance Monitoring\n tracesSampleRate: 1.0, // Capture 100% of the transactions\n // Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled\n tracePropagationTargets: [\"localhost\", import.meta.env.VITE_APP_HOST],\n // Session Replay\n replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.\n replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.\n});\n\nTimeAgo.addDefaultLocale(en);\n\nexport const firebaseConfig = {\n apiKey: import.meta.env.VITE_APP_FIREBASE_API_KEY,\n authDomain: import.meta.env.VITE_APP_FIREBASE_AUTH_DOMAIN,\n projectId: import.meta.env.VITE_APP_FIREBASE_PROJECT_ID,\n storageBucket: import.meta.env.VITE_APP_FIREBASE_STORAGE_BUCKET,\n};\n\ninitializeApp(firebaseConfig);\n\nconst root = ReactDOM.createRoot(\n document.getElementById(\"root\") as HTMLElement\n);\n\n//https://www.codemzy.com/blog/react-query-cachetime-staletime\n//@ts-ignore\nexport const queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n staleTime: 1000 * 3, // 10 s\n cacheTime: 1000 * 4, // 15 s\n },\n },\n});\n\nif (root?.render) {\n root?.render();\n}\n\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://cra.link/PWA\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals();\n"],"file":"assets/index--Yfa8iXu.js"}